Re: [PATCH] x86/build: Move _etext to actual end of .text

From: Kees Cook
Date: Wed Jun 05 2019 - 14:20:12 EST


On Wed, Jun 05, 2019 at 11:08:13AM -0500, Alec Ari wrote:
> I'm having this problem too, build is failing:
>
> Invalid absolute R_X86_64_32S relocation: _etext
>
> I stayed on the 4.14 branch to help prevent these kind of breakages,
> so much for that idea. Gentoo GCC 8.3.0.

It seems to be a problem with the Gold linker. Using ld.bfd appears to
work. I haven't narrowed down the problem, unfortunately.

Greg, given that this change was only for special situations (Clang
CFI), can you revert this for the stable trees?

--
Kees Cook