Re: [PATCH] x86/tools/relocs: Add _etext and __end_of_kernel_reserve to S_REL

Arvind Sankar
2020-01-11T17:32:18Z

On Sat, Jan 11, 2020 at 12:20:48PM -0500, Arvind Sankar wrote:
> I'm running gentoo, but building the kernel using binutils-2.21.1
> compiled from the GNU source tarball, and gcc-4.6.4 again compiled from
> source. (It's not something I normally need but I was investigating
> something else to see what exactly happens with older toolchains.)
>
> I used the below to compile the kernel (I added in
> readelf/objdump/objcopy just now, and it does build until the relocs
> error). The config is x86-64 defconfig with CONFIG_RETPOLINE overridden
> to n (since gcc 4.6.4 doesn't support retpoline).
>
> make O=~/kernel64 -j LD=~/old/bin/ld AS=~/old/bin/as READELF=~/old/bin/readelf \
> OBJDUMP=~/old/bin/objdump OBJCOPY=~/old/bin/objcopy GCC=~/old/bin/gcc
^^ that should be CC
>

The built kernel (with this patch) does boot till userspace on qemu, so
these old versions aren't producing a completely broken kernel.