diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-08-01 15:21:29 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-08-01 15:21:29 +0200 |
commit | 282889dddc41a6f47100d34cf8518775ca46c98f (patch) | |
tree | 48599362ca090ce921938f4911144fda184dac50 | |
parent | 039176372b4271f370ef38eb2ee5d43923a5b28b (diff) |
Move read-only sections to after text section
-rw-r--r-- | i386/ldscript | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/i386/ldscript b/i386/ldscript index 55a1284..7e4e3b0 100644 --- a/i386/ldscript +++ b/i386/ldscript @@ -6,8 +6,36 @@ ENTRY(_start) SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); SECTIONS { + .init : + { + KEEP (*(.init)) + } =0x90909090 + .plt : { *(.plt) } + /* + * There are specific requirements about entry points, so we have it + * configurable via `_START': `.text' will begin there and `.text.start' will + * be first in there. See also `i386/i386at/boothdr.S' and + * `gnumach_LINKFLAGS' in `i386/Makefrag.am'. + */ + . = _START; + .text : + { + *(.text.start) + *(.text .stub .text.* .gnu.linkonce.t.*) + KEEP (*(.text.*personality*)) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + } =0x90909090 + .fini : + { + KEEP (*(.fini)) + } =0x90909090 + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0x08048000); . = 0x08048000 + SIZEOF_HEADERS; + PROVIDE (__executable_start = .); .interp : { *(.interp) } .hash : { *(.hash) } .dynsym : { *(.dynsym) } @@ -41,33 +69,7 @@ SECTIONS .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } .rel.plt : { *(.rel.plt) } .rela.plt : { *(.rela.plt) } - .init : - { - KEEP (*(.init)) - } =0x90909090 - .plt : { *(.plt) } - /* - * There are specific requirements about entry points, so we have it - * configurable via `_START': `.text' will begin there and `.text.start' will - * be first in there. See also `i386/i386at/boothdr.S' and - * `gnumach_LINKFLAGS' in `i386/Makefrag.am'. - */ - . = _START; - .text : - { - *(.text.start) - *(.text .stub .text.* .gnu.linkonce.t.*) - KEEP (*(.text.*personality*)) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - } =0x90909090 - .fini : - { - KEEP (*(.fini)) - } =0x90909090 - PROVIDE (__etext = .); - PROVIDE (_etext = .); - PROVIDE (etext = .); + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } .rodata1 : { *(.rodata1) } .eh_frame_hdr : { *(.eh_frame_hdr) } |