diff options
| author | Rosen Penev <rosenp@gmail.com> | 2026-10-04 16:48:26 -0700 |
|---|---|---|
| committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2026-11-05 15:21:05 +0100 |
| commit | 255d9dbd936f7db8b963e82429f6e57cd9d48999 (patch) | |
| tree | 1d53965cc96d0349c6bd7165fdfb5ceb339ba0a8 /tools/lib/python | |
| parent | b79147fb33c3b5713c005e763b00239ea14b552a (diff) | |
MIPS: Avoid dead code/data elimination when using recordmcount
CONFIG_LD_DEAD_CODE_DATA_ELIMINATION builds with -ffunction-sections,
placing every function in its own section. recordmcount refuses to use
weak symbols as section bases, as a strong definition could override
them, so a weak function alone in its section, such as the generic
pcibios_fixup_bus() stub, breaks the build:
Cannot find symbol for section 88: .text.pcibios_fixup_bus.
drivers/pci/probe.o: failed
MIPS always records mcount locations with recordmcount, so this hits
any config with the function tracer and dead code elimination enabled,
e.g. malta_defconfig built with LLVM=1.
Only offer dead code elimination when recordmcount is not used, as
powerpc does since commit f8b2336f15f3 ("powerpc: Avoid dead code/data
elimination when using recordmcount"). In practice this makes it
unavailable together with the function tracer on MIPS.
Fixes: c0436b503591 ("MIPS: Enable dead code elimination")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
