diff --git a/arch/sh/config.mk b/arch/sh/config.mk index 673ed8dfa4..71540c8bb2 100644 --- a/arch/sh/config.mk +++ b/arch/sh/config.mk @@ -15,5 +15,6 @@ CONFIG_STANDALONE_LOAD_ADDR += -EB endif PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__ +PLATFORM_RELFLAGS += -fpic LDFLAGS_FINAL = --gc-sections PLATFORM_RELFLAGS += -ffixed-r13 diff --git a/arch/sh/cpu/u-boot.lds b/arch/sh/cpu/u-boot.lds index f2e48c6eca..bbf9ff485f 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 = .);