Linux kernel source tree
Go to file
Sami Tolvanen 5e95325fbb kbuild: lto: force rebuilds when switching CONFIG_LTO
When doing non-clean builds and switching between CONFIG_LTO=n and
CONFIG_LTO=y, the build system (correctly) didn't notice that assembly
and LTO-excluded C object files were rewritten in place by objtool (to
add the .orc_unwind* sections), since their build command lines were the
same between CONFIG_LTO=y and CONFIG_LTO=n. The objtool step would fail:

vmlinux.o: warning: objtool: file already has .orc_unwind section, skipping
make: *** [Makefile:1194: vmlinux] Error 255

Avoid this by making sure the build will see a difference between an LTO
and non-LTO build (by including "-fno-lto" in KBUILD_*FLAGS). This will
get ignored when CC_FLAGS_LTO is present, and will not be included at
all when CONFIG_LTO=n.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
2021-02-23 14:10:44 -08:00
Documentation
LICENSES
arch x86, build: allow LTO to be selected 2021-02-23 12:46:58 -08:00
block SCSI fixes on 20210101 2021-01-01 12:58:07 -08:00
certs
crypto
drivers drivers/misc/lkdtm: disable LTO for rodata.o 2021-01-14 08:21:09 -08:00
fs block-5.11-2021-01-01 2021-01-01 12:49:09 -08:00
include PCI: Fix PREL32 relocations for LTO 2021-01-14 08:21:09 -08:00
init kbuild: lto: add a default list of used symbols 2021-01-14 08:21:09 -08:00
ipc
kernel tracing: add support for objtool mcount 2021-02-23 12:46:57 -08:00
lib zlib: move EXPORT_SYMBOL() and MODULE_LICENSE() out of dfltcc_syms.c 2020-12-29 15:36:49 -08:00
mm mm: slub: call account_slab_page() after slab page initialization 2020-12-29 15:36:49 -08:00
net libceph: align session_key and con_secret to 16 bytes 2020-12-28 20:34:33 +01:00
samples
scripts kbuild: lto: postpone objtool 2021-02-23 12:46:57 -08:00
security
sound
tools objtool: Split noinstr validation from --vmlinux 2021-02-23 12:46:57 -08:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore kbuild: lto: fix module versioning 2021-01-14 08:21:08 -08:00
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Merge branches 'pm-cpufreq' and 'pm-cpuidle' 2021-01-02 10:16:32 +01:00
Makefile kbuild: lto: force rebuilds when switching CONFIG_LTO 2021-02-23 14:10:44 -08:00
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.