Enabling the ORC unwinder generates invalid .o files.
From: David Laight
Date: Wed Jul 18 2018 - 10:23:33 EST
As was discovered last september (https://lkml.org/lkml/2017/9/14/561)
running objtool to generate the orc unwind data will generate invalid
object files on an systems where libelf.so hasn't been patched.
I've just spent a day debugging the same issue - as far as the
corrupted section headers - before managing to get a search tell
me something other than I was running an old distribution.
Since then the orc unwinder has been made the default on x86-64.
So anyone running anything other than the very latest distributions
can't actually build a kernel from sources.
The 'allmodconfig' build goes particularly badly.
It wouldn't be quite as annoying if the build detected the failure
and suggested updating libelf (I found 0.165 to replace 0.153) or
disabling orc.
The kernel build claims to support much older compilers than the
gcc 4.7.3 I'm trying to use, so I'd expect it to compile with
the version of libelf of the same vintage.
Perhaps the solution is to put a copy of (the required parts of)
the libelf sources with the objtool sources so that a known
version is used.
This would also safe the problems that also arise because libelf
isn't installed by default.
David
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Please consider the environment and don't print this e-mail unless you really need to