NASM 2.06rc15
[nasm/avx512.git] / output / outelf.h
blobe38adb14ca6866f5809a5f0d36abeaa41ed8cc2f
1 /*
2 * Internal definitions common to outelf32 and outelf64
3 */
4 #ifndef OUTPUT_OUTELF_H
5 #define OUTPUT_OUTELF_H
7 #define SYM_GLOBAL 0x10
9 #define GLOBAL_TEMP_BASE 0x40000000 /* bigger than any sane symbol index */
11 #define SEG_ALIGN 16 /* alignment of sections in file */
12 #define SEG_ALIGN_1 (SEG_ALIGN-1)
14 /* this stuff is needed for the stabs debugging format */
15 #define N_SO 0x64 /* ID for main source file */
16 #define N_SOL 0x84 /* ID for sub-source file */
17 #define N_BINCL 0x82
18 #define N_EINCL 0xA2
19 #define N_SLINE 0x44
20 #define TY_STABSSYMLIN 0x40 /* ouch */
22 /* this stuff is needed for the dwarf debugging format */
23 #define TY_DEBUGSYMLIN 0x40 /* internal call to debug_out */
25 /* Known sections with nonstandard defaults */
26 struct elf_known_section {
27 const char *name; /* Name of section */
28 int type; /* Section type (SHT_) */
29 uint32_t flags; /* Section flags (SHF_) */
30 uint32_t align; /* Section alignment */
32 extern const struct elf_known_section elf_known_sections[];
35 * Special ELF sections (after the real sections but before debugging ones)
37 #define sec_shstrtab (nsects + 1)
38 #define sec_symtab (nsects + 2)
39 #define sec_strtab (nsects + 3)
40 #define sec_numspecial 3
43 * Debugging ELF sections (last in the file)
46 /* stabs */
47 #define sec_stab (nsections-3)
48 #define sec_stabstr (nsections-2)
49 #define sec_rel_stab (nsections-1)
51 /* dwarf */
52 #define sec_debug_aranges (nsections-10)
53 #define sec_rela_debug_aranges (nsections-9)
54 #define sec_debug_pubnames (nsections-8)
55 #define sec_debug_info (nsections-7)
56 #define sec_rela_debug_info (nsections-6)
57 #define sec_debug_abbrev (nsections-5)
58 #define sec_debug_line (nsections-4)
59 #define sec_rela_debug_line (nsections-3)
60 #define sec_debug_frame (nsections-2)
61 #define sec_debug_loc (nsections-1)
63 #endif /* OUTPUT_OUTELF_H */