Skip to contentSkip to conversation

linux-next: build failure after merge of the tip tree

PATCH In review Stephen Rothwell 4 participants 5 messages Aug 8, 2018 – Aug 9, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the tip tree, today's linux-next build (x86_64 defconfig) failed like this:

Invalid absolute R_X86_64_32S relocation: __end_rodata_aligned /kisskb/src/arch/x86/boot/compressed/Makefile:127: recipe for target 'arch/x86/boot/compressed/vmlinux.relocs' failed

Caused by commit

39d668e04eda ("x86/mm/pti: Make pti_clone_kernel_text() compile on 32 bit")

This was a build using gcc 4.6.3. the i386 defconfig also failed like this:

Invalid absolute R_386_32 relocation: __end_rodata_aligned

They started failing on next-20180723 (which is the first -next that contained the above commit). Sorry that we did not notice this earlier. At least the i386 defconfig build works with gcc 7.3.1.

You can see the full build results here:
http://kisskb.ellerman.id.au/kisskb/head/6b522b734da2950c368aae668f963b8925fb5545/

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

Hi Stephen,

Quoted 6 lines · Stephen Rothwell

Invalid absolute R_X86_64_32S relocation: __end_rodata_aligned /kisskb/src/arch/x86/boot/compressed/Makefile:127: recipe for target 'arch/x86/boot/compressed/vmlinux.relocs' failed

Caused by commit

39d668e04eda ("x86/mm/pti: Make pti_clone_kernel_text() compile on 32 bit")

Thanks for the report! I only built the source with gcc-4.8 and gcc-7.3, so I didn't catch this earlier. I have a fix now and will send it as a separate reply in this thread.

Thanks,

Joerg

#2 lore raw

PATCH 1/1 x86, relocs: Add __end_rodata_aligned to S_REL

In reply to Stephen Rothwell

This new symbol needs to be in the workaround-list for buggy binutils, otherwise the build with gcc-4.6 fails.

Fixes 39d668e04eda ('x86/mm/pti: Make pti_clone_kernel_text() compile on 32 bit')
---
 arch/x86/tools/relocs.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/tools/relocs.c +1 -0
index 220e97841e49..3a6c8ebc8032 100644
@@ -67,6 +67,7 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = {
 	"__tracedata_(start|end)|"
 	"__(start|stop)_notes|"
 	"__end_rodata|"
+	"__end_rodata_aligned|"
 	"__initramfs_start|"
 	"(jiffies|jiffies_64)|"
 #if ELF_BITS == 64
Signature · 1 line
2.16.4
Tested-by on v1 1/1
#3 lore raw

Re: [PATCH] x86, relocs: Add __end_rodata_aligned to S_REL

Quoted 22 lines · Joerg Roedel

This new symbol needs to be in the workaround-list for buggy binutils, otherwise the build with gcc-4.6 fails.

Fixes 39d668e04eda ('x86/mm/pti: Make pti_clone_kernel_text() compile on 32 bit')
---
 arch/x86/tools/relocs.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/tools/relocs.c +1 -1
index 220e97841e49..3a6c8ebc8032 100644
@@ -67,6 +67,7 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = {
        "__tracedata_(start|end)|"
        "__(start|stop)_notes|"
        "__end_rodata|"
+       "__end_rodata_aligned|"
        "__initramfs_start|"
        "(jiffies|jiffies_64)|"
 #if ELF_BITS == 64
--
Quoted 2 lines

2.16.4

#4 lore raw

[tip:x86/pti] x86/relocs: Add __end_rodata_aligned to S_REL

In reply to Joerg Roedel
x86/relocs: Add __end_rodata_aligned to S_REL
Commit-ID:  a29dba161ad1a01bbfbc80aa184b089ddd169a4e
Gitweb:     https://git.kernel.org/tip/a29dba161ad1a01bbfbc80aa184b089ddd169a4e
Author:     Joerg Roedel <[email protected]>
AuthorDate: Thu, 9 Aug 2018 11:44:49 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Thu, 9 Aug 2018 20:42:07 +0200

x86/relocs: Add __end_rodata_aligned to S_REL

This new symbol needs to be in the workaround-list for buggy binutils, otherwise the build with gcc-4.6 fails.

Fixes 39d668e04eda ('x86/mm/pti: Make pti_clone_kernel_text() compile on 32 bit')
Cc "H. Peter Anvin" <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Linux-Next Mailing List <[email protected]>
---
 arch/x86/tools/relocs.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/tools/relocs.c +1 -0
index 220e97841e49..3a6c8ebc8032 100644
@@ -67,6 +67,7 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = {
 	"__tracedata_(start|end)|"
 	"__(start|stop)_notes|"
 	"__end_rodata|"
+	"__end_rodata_aligned|"
 	"__initramfs_start|"
 	"(jiffies|jiffies_64)|"
 #if ELF_BITS == 64