Debian Codegraph @

include/coff/x86.h

raw
1 /* COFF information shared by Intel 386/486 and AMD 64 (aka x86-64).
2 Copyright (C) 2001-2025 Free Software Foundation, Inc.
3
4 This file is part of BFD, the Binary File Descriptor library.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
20
21 #ifndef COFF_X86_H
22 #define COFF_X86_H
23
24 #define L_LNNO_SIZE 2
25 #define INCLUDE_COMDAT_FIELDS_IN_AUXENT
26
27 #include "coff/external.h"
28
29 #define COFF_PAGE_SIZE 0x1000
30
31 /* .NET DLLs XOR the Machine number (above) with an override to
32 indicate that the DLL contains OS-specific machine code rather
33 than just IL or bytecode. See
34 https://github.com/dotnet/coreclr/blob/6f7aa7967c607b8c667518314ab937c0d7547025/src/inc/pedecoder.h#L94-L107. */
35 #define IMAGE_FILE_MACHINE_NATIVE_APPLE_OVERRIDE 0x4644
36 #define IMAGE_FILE_MACHINE_NATIVE_FREEBSD_OVERRIDE 0xadc4
37 #define IMAGE_FILE_MACHINE_NATIVE_LINUX_OVERRIDE 0x7b79
38 #define IMAGE_FILE_MACHINE_NATIVE_NETBSD_OVERRIDE 0x1993
39
40 /* Define some NT default values. */
41 /* #define NT_IMAGE_BASE 0x400000 moved to internal.h. */
42 #define NT_SECTION_ALIGNMENT 0x1000
43 #define NT_FILE_ALIGNMENT 0x200
44 #define NT_DEF_RESERVE 0x100000
45 #define NT_DEF_COMMIT 0x1000
46
47 /* Relocation directives. */
48
49 struct external_reloc
50 {
51 char r_vaddr[4];
52 char r_symndx[4];
53 char r_type[2];
54 };
55
56 #define RELOC struct external_reloc
57 #define RELSZ 10
58
59 #endif /* COFF_X86_H */