Add copyright header to nasmdoc.src
[nasm/sigaren-mirror.git] / output / outelf.c
blobafd67872dec5762175267dcfbc9af922249f4b87
1 /*
2 * Common code for outelf32 and outelf64
3 */
5 #include "compiler.h"
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include <inttypes.h>
11 #include "nasm.h"
12 #include "output/outform.h"
14 #include "output/elfcommon.h"
15 #include "output/dwarf.h"
16 #include "output/outelf.h"
18 #if defined(OF_ELF32) || defined(OF_ELF64)
20 const struct elf_known_section elf_known_sections[] = {
21 { ".text", SHT_PROGBITS, SHF_ALLOC|SHF_EXECINSTR, 16 },
22 { ".rodata", SHT_PROGBITS, SHF_ALLOC, 4 },
23 { ".lrodata", SHT_PROGBITS, SHF_ALLOC, 4 },
24 { ".data", SHT_PROGBITS, SHF_ALLOC|SHF_WRITE, 4 },
25 { ".ldata", SHT_PROGBITS, SHF_ALLOC|SHF_WRITE, 4 },
26 { ".bss", SHT_NOBITS, SHF_ALLOC|SHF_WRITE, 4 },
27 { ".lbss", SHT_NOBITS, SHF_ALLOC|SHF_WRITE, 4 },
28 { ".tdata", SHT_PROGBITS, SHF_ALLOC|SHF_WRITE|SHF_TLS, 4 },
29 { ".tbss", SHT_NOBITS, SHF_ALLOC|SHF_WRITE|SHF_TLS, 4 },
30 { ".comment", SHT_PROGBITS, 0, 1 },
31 { NULL, SHT_PROGBITS, SHF_ALLOC, 1 } /* default */
34 #endif /* defined(OF_ELF32) || defined(OF_ELF64) */