mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
alpha: discard .eh_frame and the relocation sections
gcc emits .eh_frame for Alpha even though the kernel builds with -fno-asynchronous-unwind-tables, and nothing in the kernel consumes it: the stack trace code scans the stack for text addresses rather than unwinding DWARF. It was allocated in the loaded image, so dropping it shrinks vmlinux by about 1.1MB for a Marvel SMP configuration. The .rela* sections are equally useless, as the kernel image is not relocatable. The linker was already dropping their contents. Both were being placed as orphan sections, which is what drew attention to them. Assisted-by: Claude:claude-opus-5 Signed-off-by: Matt Turner <mattst88@gmail.com> Tested-by: Magnus Lindholm <linmag7@gmail.com> Reviewed-by: Magnus Lindholm <linmag7@gmail.com> Link: https://lore.kernel.org/r/20260905-arch-kconfig-options-v2-v2-18-83e8245761a2@gmail.com Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
This commit is contained in:
parent
e517a172b7
commit
27f48a2c82
|
|
@ -76,5 +76,16 @@ SECTIONS
|
|||
MODINFO
|
||||
ELF_DETAILS
|
||||
|
||||
/*
|
||||
* gcc emits .eh_frame for Alpha even with
|
||||
* -fno-asynchronous-unwind-tables, and the kernel has no DWARF
|
||||
* unwinder to consume it. The relocation sections are likewise
|
||||
* useless as the kernel image is not relocatable.
|
||||
*/
|
||||
/DISCARD/ : {
|
||||
*(.eh_frame)
|
||||
*(.rela .rela*)
|
||||
}
|
||||
|
||||
DISCARDS
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user