powerpc.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Basic coff information for the PowerPC
  2. Based on coff/rs6000.h, coff/i386.h and others.
  3. Copyright (C) 2001-2015 Free Software Foundation, Inc.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  15. MA 02110-1301, USA.
  16. Initial release: Kim Knuttila (krk@cygnus.com) */
  17. #define L_LNNO_SIZE 2
  18. #define INCLUDE_COMDAT_FIELDS_IN_AUXENT
  19. #include "coff/external.h"
  20. /* Bits for f_flags:
  21. F_RELFLG relocation info stripped from file
  22. F_EXEC file is executable (no unresolved external references)
  23. F_LNNO line numbers stripped from file
  24. F_LSYMS local symbols stripped from file
  25. F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */
  26. #define F_RELFLG (0x0001)
  27. #define F_EXEC (0x0002)
  28. #define F_LNNO (0x0004)
  29. #define F_LSYMS (0x0008)
  30. /* extra NT defines */
  31. #define PPCMAGIC 0760 /* peeked on aa PowerPC Windows NT box */
  32. #define DOSMAGIC 0x5a4d /* from arm.h, i386.h */
  33. #define NT_SIGNATURE 0x00004550 /* from arm.h, i386.h */
  34. /* from winnt.h */
  35. #define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
  36. #define PPCBADMAG(x) ((x).f_magic != PPCMAGIC)
  37. /********************** RELOCATION DIRECTIVES **********************/
  38. struct external_reloc
  39. {
  40. char r_vaddr[4];
  41. char r_symndx[4];
  42. char r_type[2];
  43. };
  44. #define RELOC struct external_reloc
  45. #define RELSZ 10