Skip to contentSkip to conversation

x86/build: Move _etext to actual end of .text

PATCH Klaus Kusche 4 participants 4 messages Jun 9, 2019 – Jun 20, 2019

lore
Share & tools
lore
#0 lore raw

Hello,

Same problem for linux 5.1.7:
Kernel building fails with the same relocation error.

5.1.5 does not have the problem, builds fine for me.

Is there anything I can do to investigate the problem?

Signature · 5 lines
Prof. Dr. Klaus Kusche
Private address: Rosenberg 41, 07546 Gera, Germany
+49 365 20413058 [email protected] https://www.computerix.info
Office address: DHGE Gera, Weg der Freundschaft 4, 07546 Gera, Germany
+49 365 4341 306 [email protected] https://www.dhge.de
#1 lore raw
Quoted 10 lines · Klaus Kusche

Hello,

Same problem for linux 5.1.7:
Kernel building fails with the same relocation error.

5.1.5 does not have the problem, builds fine for me.

Is there anything I can do to investigate the problem?

Please try linux 5.1.8. The problematic patch was reverted there.

Signature · 2 lines
Regards,
  Johannes
#2 lore raw
Quoted 6 lines · Johannes Hirte
Quoted 5 lines · Klaus Kusche

Hello,

Same problem for linux 5.1.7:
Kernel building fails with the same relocation error.

Quoted 6 lines
Quoted 4 lines

5.1.5 does not have the problem, builds fine for me.

Is there anything I can do to investigate the problem?

Please try linux 5.1.8. The problematic patch was reverted there.

I'm having this same issue with v5.2-rc5 using an older version of gcc (4.9.2). If I use a more recent version of gcc (7.3.0) it works fine.

Reverting this patch allows gcc v4.9.2 to build kernel v5.2-rc5 successfully.

You said in this chain that you were reverting this patch in stable kernels. Are you going to revert it in tip-of-tree as well?

- Ross

#3 lore raw
Quoted 15 lines · Ross Zwisler
Quoted 6 lines · Johannes Hirte
Quoted 5 lines · Klaus Kusche

Hello,

Same problem for linux 5.1.7:
Kernel building fails with the same relocation error.

Quoted 6 lines
Quoted 4 lines

5.1.5 does not have the problem, builds fine for me.

Is there anything I can do to investigate the problem?

Please try linux 5.1.8. The problematic patch was reverted there.

Quoted 7 lines

I'm having this same issue with v5.2-rc5 using an older version of gcc (4.9.2). If I use a more recent version of gcc (7.3.0) it works fine.

Reverting this patch allows gcc v4.9.2 to build kernel v5.2-rc5 successfully.

You said in this chain that you were reverting this patch in stable kernels. Are you going to revert it in tip-of-tree as well?

My original rationale was that we shouldn't break old toolchains on old kernels (i.e. if a stable kernel built before it should continue to bulid). For the latest kernel it was fixing a future problem and regularizing the linker script (other architectures already do it in this style), however, it seems to not only be an old gcc issue, but also a Gold linker issue. Building with LD=ld.gold blows up on a modern gcc too:

$ gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
...
$ ld.gold --version
GNU gold (GNU Binutils for Ubuntu 2.30) 1.15
...
$ make LD=ld.gold ...
...
Invalid absolute R_X86_64_32S relocation: _etext

Ingo, seems like this should be reverted. What do you think?

Signature · 1 line
Kees Cook