Files
Josh Poimboeuf aea8e10574 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>
2025-12-18 13:54:42 +01:00
..
2023-01-30 16:27:46 -08:00
2023-01-30 16:27:46 -08:00
2025-12-18 13:54:42 +01:00
2023-10-05 17:01:11 -07:00
2023-03-23 23:18:56 +01:00
2022-04-22 12:32:01 +02:00