mirror of
https://github.com/torvalds/linux.git
synced 2024-10-25 06:31:06 +00:00
objtool: Have WARN_FUNC fall back to sym+off
Currently WARN_FUNC() either prints func+off and failing that prints sec+off, add an intermediate sym+off. This is useful when playing around with entry code. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/r/20220308154317.461283840@infradead.org
This commit is contained in:
parent
537da1ed54
commit
5cff2086b0
|
@ -22,6 +22,8 @@ static inline char *offstr(struct section *sec, unsigned long offset)
|
|||
unsigned long name_off;
|
||||
|
||||
func = find_func_containing(sec, offset);
|
||||
if (!func)
|
||||
func = find_symbol_containing(sec, offset);
|
||||
if (func) {
|
||||
name = func->name;
|
||||
name_off = offset - func->offset;
|
||||
|
|
Loading…
Reference in New Issue
Block a user