Currently the book instructions in SVN aren't quite adequate to deal
with the 4.14.12 kernel, as-shipped. The default configuration sets
"CONFIG_UNWINDER_ORC=y" which requires elflib to compile. Using "make
menuconfig," the only option seems to be selecting between ORC unwinder,
and frame pointers, which promises at least a 5%-10% slowdown and
increased file-size in the kernel (ORC is the default). It does not
appear that disabling kernel debugging gets rid of the need for the
unwinder, and correspondingly for elflib. According to the kernel patch
mailing list: "The kernel now is using objtool to create unwind
information. This needs libelf to work. Advantage is that this approach
no longer depends on assembler sources being heavily annotated with
unwind hints."
I think the book either needs to cover how to disable stack trace and
obviate the need for libelf (currently in BLFS), or include it in
Chapter 6 as a necessary LFS library. As written in the book, the
instruction to "make defconfig" will create a kernel config that can't
be built without libelf. Right now the only way I can figure out to get
4.14.12 to build is by installing elfutils from BLFS. Looking at the
kernel makefile commits, it appears not to test for libelf if
CONFIG_STACK_VALIDATION is disabled. Looking through the menus, "Kernel
Hacking > Compile Time Checks and Compiler Options" has "compile-time
stack metadata validation" (which is where "CONFIG_STACK_VALIDATION" is
set) hard-coded "yes," so that depends on setting somewhere else (if,
indeed it is switchable).
I'm feeling a bit stupid, right now. I'm stumped as to what switch
enables stack validation and the ORC unwinder that depends on libelf.
The only way I've seen online to disable stack validation is to manually
edit the .config file. (some people are saying it is disabled by
default. Not my experience). Personally, I'm not doing kernel
debugging, so all of this stuff is just extra cruft, to me, and I'd be
happy to skip it as irrelevant to an LFS build. Thing is, I don't know
HOW! (sorry if this belongs in support, but since this is in the SVN
version, I thought it might be worth addressing in the dev list).
—Victor Wren
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page