x86_64.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* COFF information for AMD 64.
  2. Copyright (C) 2006-2015 Free Software Foundation, Inc.
  3. This file is part of BFD, the Binary File Descriptor library.
  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. Written by Kai Tietz, OneVision Software GmbH&CoKg. */
  17. #define L_LNNO_SIZE 2
  18. #define INCLUDE_COMDAT_FIELDS_IN_AUXENT
  19. #include "coff/external.h"
  20. #define COFF_PAGE_SIZE 0x1000
  21. #define AMD64MAGIC 0x8664
  22. #define AMD64BADMAG(x) ((x).f_magic != AMD64MAGIC)
  23. #define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
  24. #define OMAGIC 0404 /* Object files, eg as output. */
  25. #define ZMAGIC IMAGE_NT_OPTIONAL_HDR64_MAGIC /* Demand load format, eg normal ld output 0x10b. */
  26. #define STMAGIC 0401 /* Target shlib. */
  27. #define SHMAGIC 0443 /* Host shlib. */
  28. /* Define some NT default values. */
  29. /* #define NT_IMAGE_BASE 0x400000 moved to internal.h. */
  30. #define NT_SECTION_ALIGNMENT 0x1000
  31. #define NT_FILE_ALIGNMENT 0x200
  32. #define NT_DEF_RESERVE 0x100000
  33. #define NT_DEF_COMMIT 0x1000
  34. /* Relocation directives. */
  35. struct external_reloc
  36. {
  37. char r_vaddr[4];
  38. char r_symndx[4];
  39. char r_type[2];
  40. };
  41. #define RELOC struct external_reloc
  42. #define RELSZ 10