OLD | NEW |
1 /* Default linker script, for normal executables */ | 1 /* Default linker script, for normal executables */ |
2 OUTPUT_FORMAT("elf32-nacl", "elf32-nacl", | 2 OUTPUT_FORMAT("elf32-nacl", "elf32-nacl", |
3 "elf32-nacl") | 3 "elf32-nacl") |
4 OUTPUT_ARCH(i386) | 4 OUTPUT_ARCH(i386) |
5 ENTRY(_start) | 5 ENTRY(_start) |
6 SEARCH_DIR("=/usr/local/lib32"); SEARCH_DIR("=/lib32"); SEARCH_DIR("=/usr/lib32"
); | 6 SEARCH_DIR("=/usr/local/lib32"); SEARCH_DIR("=/lib32"); SEARCH_DIR("=/usr/lib32"
); |
7 SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); | 7 SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); |
8 PHDRS | 8 PHDRS |
9 { | 9 { |
10 seg_interp PT_INTERP FLAGS(4) ; /* read */ | 10 seg_interp PT_INTERP FLAGS(4) ; /* read */ |
11 seg_code PT_LOAD FLAGS(5) ; /* read + execute */ | 11 seg_code PT_LOAD FLAGS(5) ; /* read + execute */ |
12 seg_rodata PT_LOAD FLAGS(4) ; /* read */ | 12 seg_rodata PT_LOAD FLAGS(4) ; /* read */ |
13 seg_rwdata PT_LOAD FLAGS(6) ; /* read + write */ | 13 seg_rwdata PT_LOAD FLAGS(6) ; /* read + write */ |
14 seg_bss PT_LOAD FLAGS(6) ; /* read + write */ | 14 seg_bss PT_LOAD FLAGS(6) ; /* read + write */ |
15 seg_dynamic PT_DYNAMIC FLAGS(6) ; | 15 seg_dynamic PT_DYNAMIC FLAGS(6) ; |
16 seg_stack PT_GNU_STACK FLAGS(6) ; | 16 seg_stack PT_GNU_STACK FLAGS(6) ; |
17 seg_tls PT_TLS FLAGS(4) ; | 17 seg_tls PT_TLS FLAGS(4) ; |
| 18 seg_build_id PT_NOTE FLAGS(4) ; |
18 } | 19 } |
19 SECTIONS | 20 SECTIONS |
20 { | 21 { |
21 . = 0x1000000; | 22 . = 0x1000000; |
22 PROVIDE (__executable_start = .); | 23 PROVIDE (__executable_start = .); |
23 | 24 |
24 /* The ALIGN(32) instructions below are workarounds. | 25 /* The ALIGN(32) instructions below are workarounds. |
25 TODO(mseaborn): Get the object files to include the correct | 26 TODO(mseaborn): Get the object files to include the correct |
26 alignments and padding themselves. | 27 alignments and padding themselves. |
27 See http://code.google.com/p/nativeclient/issues/detail?id=499. */ | 28 See http://code.google.com/p/nativeclient/issues/detail?id=499. */ |
(...skipping 18 matching lines...) Expand all Loading... |
46 PROVIDE (_etext = .); | 47 PROVIDE (_etext = .); |
47 PROVIDE (etext = .); | 48 PROVIDE (etext = .); |
48 | 49 |
49 . = 0x11000000; | 50 . = 0x11000000; |
50 .interp : { *(.interp) } :seg_rodata :seg_interp | 51 .interp : { *(.interp) } :seg_rodata :seg_interp |
51 .note.gnu.build-id : | 52 .note.gnu.build-id : |
52 { | 53 { |
53 PROVIDE_HIDDEN (__note_gnu_build_id_start = .); | 54 PROVIDE_HIDDEN (__note_gnu_build_id_start = .); |
54 *(.note.gnu.build-id) | 55 *(.note.gnu.build-id) |
55 PROVIDE_HIDDEN (__note_gnu_build_id_end = .); | 56 PROVIDE_HIDDEN (__note_gnu_build_id_end = .); |
56 } :seg_rodata | 57 } :seg_rodata :seg_build_id |
57 .hash : { *(.hash) } | 58 .hash : { *(.hash) } :seg_rodata |
58 .gnu.hash : { *(.gnu.hash) } | 59 .gnu.hash : { *(.gnu.hash) } |
59 .dynsym : { *(.dynsym) } | 60 .dynsym : { *(.dynsym) } |
60 .dynstr : { *(.dynstr) } | 61 .dynstr : { *(.dynstr) } |
61 .gnu.version : { *(.gnu.version) } | 62 .gnu.version : { *(.gnu.version) } |
62 .gnu.version_d : { *(.gnu.version_d) } | 63 .gnu.version_d : { *(.gnu.version_d) } |
63 .gnu.version_r : { *(.gnu.version_r) } | 64 .gnu.version_r : { *(.gnu.version_r) } |
64 .rel.init : { *(.rel.init) } | 65 .rel.init : { *(.rel.init) } |
65 .rela.init : { *(.rela.init) } | 66 .rela.init : { *(.rela.init) } |
66 .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } | 67 .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } |
67 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } | 68 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 .debug_typenames 0 : { *(.debug_typenames) } | 238 .debug_typenames 0 : { *(.debug_typenames) } |
238 .debug_varnames 0 : { *(.debug_varnames) } | 239 .debug_varnames 0 : { *(.debug_varnames) } |
239 /* DWARF 3 */ | 240 /* DWARF 3 */ |
240 .debug_pubtypes 0 : { *(.debug_pubtypes) } | 241 .debug_pubtypes 0 : { *(.debug_pubtypes) } |
241 .debug_ranges 0 : { *(.debug_ranges) } | 242 .debug_ranges 0 : { *(.debug_ranges) } |
242 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } | 243 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } |
243 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) } | 244 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) } |
244 /DISCARD/ : { *(.note.ABI-tag) } | 245 /DISCARD/ : { *(.note.ABI-tag) } |
245 /DISCARD/ : { *(.interp) } | 246 /DISCARD/ : { *(.interp) } |
246 } | 247 } |
OLD | NEW |