From 1d9f40833de8e92ac5684062c5845cb748f062be Mon Sep 17 00:00:00 2001 From: whitequark Date: Sun, 26 Jul 2015 16:16:48 +0300 Subject: [PATCH] Update ldscripts with -fPIC support. --- soc/runtime/ksupport.ld | 12 +++++++++++- soc/runtime/linker.ld | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/soc/runtime/ksupport.ld b/soc/runtime/ksupport.ld index b4a35873b..4126b4a7b 100644 --- a/soc/runtime/ksupport.ld +++ b/soc/runtime/ksupport.ld @@ -24,6 +24,17 @@ SECTIONS _etext = .; } > ksupport + .got : + { + _GLOBAL_OFFSET_TABLE_ = .; + *(.got) + } > ksupport + + .got.plt : + { + *(.got.plt) + } > ksupport + .rodata : { . = ALIGN(4); @@ -39,7 +50,6 @@ SECTIONS _fdata = .; *(.data .data.* .gnu.linkonce.d.*) *(.data1) - _gp = ALIGN(16); *(.sdata .sdata.* .gnu.linkonce.s.*) _edata = .; } > ksupport diff --git a/soc/runtime/linker.ld b/soc/runtime/linker.ld index 5fc12b610..d0c3a6558 100644 --- a/soc/runtime/linker.ld +++ b/soc/runtime/linker.ld @@ -26,6 +26,17 @@ SECTIONS _etext = .; } > runtime + .got : + { + _GLOBAL_OFFSET_TABLE_ = .; + *(.got) + } > runtime + + .got.plt : + { + *(.got.plt) + } > runtime + .rodata : { . = ALIGN(4); @@ -41,7 +52,6 @@ SECTIONS _fdata = .; *(.data .data.* .gnu.linkonce.d.*) *(.data1) - _gp = ALIGN(16); *(.sdata .sdata.* .gnu.linkonce.s.*) _edata = .; } > runtime