diff options
author | Peter Zijlstra | 2022-03-08 16:30:16 +0100 |
---|---|---|
committer | Peter Zijlstra | 2022-03-15 10:32:32 +0100 |
commit | 5cff2086b01526b8c7deacc86473ffbab0cddfa9 (patch) | |
tree | a6d2b86a790cefbdc706ee1e3fcf2a353cd89a43 /tools/objtool | |
parent | 537da1ed54658e916141e50923a7f5b20c728856 (diff) |
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
Diffstat (limited to 'tools/objtool')
-rw-r--r-- | tools/objtool/include/objtool/warn.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/objtool/include/objtool/warn.h b/tools/objtool/include/objtool/warn.h index d99c4675e4a5..802cfda0a6f6 100644 --- a/tools/objtool/include/objtool/warn.h +++ b/tools/objtool/include/objtool/warn.h @@ -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; |