From: Max Filippov Date: Mon, 16 Jul 2012 10:06:00 +0000 (+0400) Subject: xtensa: fix linker script transformation for .text.unlikely X-Git-Tag: next-20120816~78^2~10 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=659b408952a09711eb77a99500394af356a903e6;p=karo-tx-linux.git xtensa: fix linker script transformation for .text.unlikely Now that binutils generate *.unlikely sections which don't follow documented (info as) literal section naming rules, section name transformation script doesn't work well resulting in the following errors at vmlinux link time: main.c:(.text.unlikely+0x3): dangerous relocation: l32r: literal placed after use: .literal.unlikely Fix section name transformation script by adding specific rule for .text.unlikely sections. Signed-off-by: Max Filippov Signed-off-by: Chris Zankel --- diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile index 59fc3fe15572..0f9f35fc191a 100644 --- a/arch/xtensa/kernel/Makefile +++ b/arch/xtensa/kernel/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_MODULES) += xtensa_ksyms.o module.o # Replicate rules in scripts/Makefile.build sed-y = -e 's/\*(\(\.[a-z]*it\|\.ref\|\)\.text)/*(\1.literal \1.text)/g' \ + -e 's/\.text\.unlikely/.literal.unlikely .text.unlikely/g' \ -e 's/\*(\(\.text\.[a-z]*\))/*(\1.literal \1)/g' quiet_cmd__cpp_lds_S = LDS $@