Re: [RFC PATCH] x86: enable dead code and data elimination (LTO)
From: Masahiro Yamada
Date: Sun Jul 09 2017 - 09:30:04 EST
2017-07-09 18:05 GMT+09:00 Ingo Molnar <mingo@xxxxxxxxxx>:
> * Nicholas Piggin <npiggin@xxxxxxxxx> wrote:
>> FYI, easiest way to check if you forgot to KEEP a linker table is
>> to look at `readelf -S vmlinux` differences, and to see what is
>> being trimmed, look at nm differences or use --print-gc-sections
>> LD option to see what symbols you're trimming. Linker tables,
>> boot entry, and exception entry tends to require anchoring.
> Could you please add a debug build target to display all discarded
> symbols/sections? Something like:
> make lto-check
> ... or so?
Actually, LTO activity existed some years ago
(but not pulled in).
IIUC, this patch enables "dead code elimination",
(or "garbage collection"?),
but I think it is different from what is called LTO.