]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
xtensa: fix linker script transformation for .text.unlikely
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 17 Sep 2012 01:44:31 +0000 (05:44 +0400)
committerChris Zankel <chris@zankel.net>
Wed, 3 Oct 2012 22:11:04 +0000 (15:11 -0700)
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 <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
arch/xtensa/kernel/Makefile

index 59fc3fe15572af5231181d5b255998fcf6029294..0f9f35fc191af0c7d04f888be013cea06c3c586c 100644 (file)
@@ -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     $@