1*a9fa9459Szrj /* COFF information for AMD 64. 2*a9fa9459Szrj Copyright (C) 2006-2016 Free Software Foundation, Inc. 3*a9fa9459Szrj 4*a9fa9459Szrj This file is part of BFD, the Binary File Descriptor library. 5*a9fa9459Szrj 6*a9fa9459Szrj This program is free software; you can redistribute it and/or modify 7*a9fa9459Szrj it under the terms of the GNU General Public License as published by 8*a9fa9459Szrj the Free Software Foundation; either version 3 of the License, or 9*a9fa9459Szrj (at your option) any later version. 10*a9fa9459Szrj 11*a9fa9459Szrj This program is distributed in the hope that it will be useful, 12*a9fa9459Szrj but WITHOUT ANY WARRANTY; without even the implied warranty of 13*a9fa9459Szrj MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*a9fa9459Szrj GNU General Public License for more details. 15*a9fa9459Szrj 16*a9fa9459Szrj You should have received a copy of the GNU General Public License 17*a9fa9459Szrj along with this program; if not, write to the Free Software 18*a9fa9459Szrj Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 19*a9fa9459Szrj MA 02110-1301, USA. 20*a9fa9459Szrj 21*a9fa9459Szrj Written by Kai Tietz, OneVision Software GmbH&CoKg. */ 22*a9fa9459Szrj 23*a9fa9459Szrj #define L_LNNO_SIZE 2 24*a9fa9459Szrj #define INCLUDE_COMDAT_FIELDS_IN_AUXENT 25*a9fa9459Szrj 26*a9fa9459Szrj #include "coff/external.h" 27*a9fa9459Szrj 28*a9fa9459Szrj #define COFF_PAGE_SIZE 0x1000 29*a9fa9459Szrj 30*a9fa9459Szrj #define AMD64MAGIC 0x8664 31*a9fa9459Szrj 32*a9fa9459Szrj #define AMD64BADMAG(x) ((x).f_magic != AMD64MAGIC) 33*a9fa9459Szrj #define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b 34*a9fa9459Szrj 35*a9fa9459Szrj #define OMAGIC 0404 /* Object files, eg as output. */ 36*a9fa9459Szrj #define ZMAGIC IMAGE_NT_OPTIONAL_HDR64_MAGIC /* Demand load format, eg normal ld output 0x10b. */ 37*a9fa9459Szrj #define STMAGIC 0401 /* Target shlib. */ 38*a9fa9459Szrj #define SHMAGIC 0443 /* Host shlib. */ 39*a9fa9459Szrj 40*a9fa9459Szrj /* Define some NT default values. */ 41*a9fa9459Szrj /* #define NT_IMAGE_BASE 0x400000 moved to internal.h. */ 42*a9fa9459Szrj #define NT_SECTION_ALIGNMENT 0x1000 43*a9fa9459Szrj #define NT_FILE_ALIGNMENT 0x200 44*a9fa9459Szrj #define NT_DEF_RESERVE 0x100000 45*a9fa9459Szrj #define NT_DEF_COMMIT 0x1000 46*a9fa9459Szrj 47*a9fa9459Szrj /* Relocation directives. */ 48*a9fa9459Szrj 49*a9fa9459Szrj struct external_reloc 50*a9fa9459Szrj { 51*a9fa9459Szrj char r_vaddr[4]; 52*a9fa9459Szrj char r_symndx[4]; 53*a9fa9459Szrj char r_type[2]; 54*a9fa9459Szrj }; 55*a9fa9459Szrj 56*a9fa9459Szrj #define RELOC struct external_reloc 57*a9fa9459Szrj #define RELSZ 10 58