1 --- dmd/src/dmd/backend/elfobj.c.old 2010-12-17 19:11:16.000000000 +0100
2 +++ dmd/src/dmd/backend/elfobj.c 2011-12-23 00:53:36.585240795 +0100
6 static char section_names_init64[] =
7 - "\0.symtab\0.strtab\0.shstrtab\0.text\0.data\0.bss\0.note\0.comment\0.rodata\0.rela.text\0.rela.data";
8 + "\0.symtab\0.strtab\0.shstrtab\0.text\0.data\0.bss\0.note\0.comment\0.rodata\0.note.GNU-stack\0.rela.text\0.rela.data";
10 #define NAMIDX_SYMTAB 1 // .symtab
11 #define NAMIDX_STRTAB 9 // .strtab
13 #define NAMIDX_NOTE 44 // .note
14 #define NAMIDX_COMMENT 50 // .comment
15 #define NAMIDX_RODATA 59 // .rodata
16 - #define NAMIDX_RELTEXT 67 // .rel.text and .rela.text
17 - #define NAMIDX_RELDATA 77 // .rel.data
18 - #define NAMIDX_RELDATA64 78 // .rela.data
19 + #define NAMIDX_GNUSTACK 67 // .note.GNU-stack
20 + #define NAMIDX_RELTEXT 83 // .rel.text and .rela.text
21 + #define NAMIDX_RELDATA 93 // .rel.data
22 + #define NAMIDX_RELDATA64 94 // .rela.data
25 section_names->setsize(sizeof(section_names_init64));
27 elf_newsection2(NAMIDX_SHSTRTAB,SHT_STRTAB, 0, 0,0,0,0,0, 1,0);
28 elf_newsection2(NAMIDX_COMMENT, SHT_PROGDEF,0, 0,0,0,0,0, 1,0);
29 elf_newsection2(NAMIDX_NOTE,SHT_NOTE, 0, 0,0,0,0,0, 1,0);
30 + elf_newsection2(NAMIDX_GNUSTACK,SHT_PROGDEF,0, 0,0,0,0,0, 1,0);
33 namidx = NAMIDX_TEXT; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
35 namidx = NAMIDX_SHSTRTAB; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
36 namidx = NAMIDX_COMMENT; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
37 namidx = NAMIDX_NOTE; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
38 + namidx = NAMIDX_GNUSTACK; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
42 static char section_names_init[] =
43 - "\0.symtab\0.strtab\0.shstrtab\0.text\0.data\0.bss\0.note\0.comment\0.rodata\0.rel.text\0.rel.data";
44 + "\0.symtab\0.strtab\0.shstrtab\0.text\0.data\0.bss\0.note\0.comment\0.rodata\0.note.GNU-stack\0.rel.text\0.rel.data";
47 section_names->setsize(sizeof(section_names_init));
49 elf_newsection2(NAMIDX_SHSTRTAB,SHT_STRTAB, 0, 0,0,0,0,0, 1,0);
50 elf_newsection2(NAMIDX_COMMENT, SHT_PROGDEF,0, 0,0,0,0,0, 1,0);
51 elf_newsection2(NAMIDX_NOTE,SHT_NOTE, 0, 0,0,0,0,0, 1,0);
52 + elf_newsection2(NAMIDX_GNUSTACK,SHT_PROGDEF,0, 0,0,0,0,0, 1,0);
55 namidx = NAMIDX_TEXT; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
57 namidx = NAMIDX_SHSTRTAB; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
58 namidx = NAMIDX_COMMENT; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
59 namidx = NAMIDX_NOTE; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
60 + namidx = NAMIDX_GNUSTACK; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;