Fix a segfault that occurs when built with Clang.
Signed-off-by: Ingo Molnar <firstname.lastname@example.org>
objtool: Fix seg fault with Clang non-section symbols
The Clang assembler likes to strip section symbols, which means objtool
can't reference some text code by its section. This confuses objtool
greatly, causing it to seg fault.
The fix is similar to what was done before, for ORC reloc generation:
e81e07244325 ("objtool: Support Clang non-section symbols in ORC generation")
Factor out that code into a common helper and use it for static call
reloc generation as well.
Reported-by: Arnd Bergmann <email@example.com>
Signed-off-by: Josh Poimboeuf <firstname.lastname@example.org>
Signed-off-by: Peter Zijlstra (Intel) <email@example.com>
Reviewed-by: Nick Desaulniers <firstname.lastname@example.org>
Reviewed-by: Miroslav Benes <email@example.com>
4 files changed