From 2c54b692c3cac71f2fd5122507450faf32291c9a Mon Sep 17 00:00:00 2001 From: James Benton Date: Sun, 27 Dec 2015 16:23:48 -0800 Subject: [PATCH] Split relocation sections between ones used for linking and ones for runtime. --- rules/rpl.ld | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/rules/rpl.ld b/rules/rpl.ld index c494aa17..9d1f74df 100644 --- a/rules/rpl.ld +++ b/rules/rpl.ld @@ -68,8 +68,6 @@ SECTIONS { .hash ALIGN(32) : { *(.hash) } .dynsym ALIGN(32) : { *(.dynsym) } .dynstr ALIGN(32) : { *(.dynstr) } - .rela.dyn ALIGN(32) : { *(.rela.dyn) } - .rela.text ALIGN(32) : { *(.rela.text) } .eh_frame ALIGN(32) : { *(.eh_frame) } .dynamic ALIGN(32) : { *(.dynamic) } .got ALIGN(32) : { *(.got) } @@ -78,7 +76,14 @@ SECTIONS { .symtab ALIGN(32) : { *(.symtab) } .strtab ALIGN(32) : { *(.strtab) } - .rel.dyn : + /* Put all dynamic loader relocations into one section */ + .rela.dyn ALIGN(32) : { + *(.rela.dyn) + *(.rela.data.rplFuncStubs) + *(.rela.lib.rplLibs) + } + + .rel.text ALIGN(32) : { *(.rel.init) *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) @@ -98,10 +103,11 @@ SECTIONS { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } - .rela.dyn : + .rela.text ALIGN(32) : { *(.rela.init) *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) + *(.rela.rplTramp.text) *(.rela.fini) *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)