2009-06-25 19:30:50 +00:00
|
|
|
/*
|
|
|
|
* Common code for outelf32 and outelf64
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "compiler.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
|
|
|
#include "nasm.h"
|
2009-06-28 05:07:33 +00:00
|
|
|
#include "output/outform.h"
|
2009-06-25 19:30:50 +00:00
|
|
|
|
2009-06-25 20:06:49 +00:00
|
|
|
#include "output/elfcommon.h"
|
|
|
|
#include "output/dwarf.h"
|
|
|
|
#include "output/outelf.h"
|
2009-06-25 19:30:50 +00:00
|
|
|
|
2009-06-28 04:10:09 +00:00
|
|
|
#if defined(OF_ELF32) || defined(OF_ELF64)
|
|
|
|
|
2009-06-25 19:30:50 +00:00
|
|
|
const struct elf_known_section elf_known_sections[] = {
|
|
|
|
{ ".text", SHT_PROGBITS, SHF_ALLOC|SHF_EXECINSTR, 16 },
|
|
|
|
{ ".rodata", SHT_PROGBITS, SHF_ALLOC, 4 },
|
|
|
|
{ ".lrodata", SHT_PROGBITS, SHF_ALLOC, 4 },
|
|
|
|
{ ".data", SHT_PROGBITS, SHF_ALLOC|SHF_WRITE, 4 },
|
|
|
|
{ ".ldata", SHT_PROGBITS, SHF_ALLOC|SHF_WRITE, 4 },
|
|
|
|
{ ".bss", SHT_NOBITS, SHF_ALLOC|SHF_WRITE, 4 },
|
|
|
|
{ ".lbss", SHT_NOBITS, SHF_ALLOC|SHF_WRITE, 4 },
|
|
|
|
{ ".tdata", SHT_PROGBITS, SHF_ALLOC|SHF_WRITE|SHF_TLS, 4 },
|
|
|
|
{ ".tbss", SHT_NOBITS, SHF_ALLOC|SHF_WRITE|SHF_TLS, 4 },
|
|
|
|
{ ".comment", SHT_PROGBITS, 0, 1 },
|
|
|
|
{ NULL, SHT_PROGBITS, SHF_ALLOC, 1 } /* default */
|
|
|
|
};
|
2009-06-28 04:10:09 +00:00
|
|
|
|
|
|
|
#endif /* defined(OF_ELF32) || defined(OF_ELF64) */
|