Files
linux/tools/objtool
Josh Poimboeuf 57f91f2596 objtool: Fix weak symbol detection
[ Upstream commit 72567c630d ]

find_symbol_hole_containing() fails to find a symbol hole (aka stripped
weak symbol) if its section has no symbols before the hole.  This breaks
weak symbol detection if -ffunction-sections is enabled.

Fix that by allowing the interval tree to contain section symbols, which
are always at offset zero for a given section.

Fixes a bunch of (-ffunction-sections) warnings like:

  vmlinux.o: warning: objtool: .text.__x64_sys_io_setup+0x10: unreachable instruction

Fixes: 4adb236867 ("objtool: Ignore extra-symbol code")
Acked-by: Petr Mladek <pmladek@suse.com>
Tested-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-01-11 15:18:18 +01:00
..
2023-08-27 21:01:31 +02:00
2022-04-22 12:32:01 +02:00
2026-01-11 15:18:18 +01:00
2023-11-20 11:51:50 +01:00
2021-10-07 00:40:17 +02:00
2022-04-22 12:32:01 +02:00