From 76a55989b180d1d9ab273fde01e5b2a18413fadf Mon Sep 17 00:00:00 2001 From: Vladimir Zapolskiy Date: Mon, 28 Nov 2016 00:15:35 +0200 Subject: sh: generate position independent code for all platforms Finally add fpic compilation option to produce relocatable code. Note that this requires to define CONFIG_NEEDS_MANUAL_RELOC for all board files, also relocation support still has some limitations (e.g. a developer should care not to overwrite the executing code or memset() with zeroes not yet relocated data on malloc init etc.), which may be fixed while switching to PIE. Due to short investigation the architecture code is not ready for PIE linking, this will require some manipulations with .dyn* sections. Signed-off-by: Vladimir Zapolskiy --- arch/sh/cpu/u-boot.lds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/sh/cpu') diff --git a/arch/sh/cpu/u-boot.lds b/arch/sh/cpu/u-boot.lds index f2e48c6..bbf9ff4 100644 --- a/arch/sh/cpu/u-boot.lds +++ b/arch/sh/cpu/u-boot.lds @@ -60,7 +60,7 @@ SECTIONS PROVIDE (_fgot = .); .got : { - *(.got) + *(.got.plt) *(.got) . = ALIGN(4); } >ram PROVIDE (_egot = .); -- cgit v1.1