Skip to content

Commit 5cff208

Browse files
author
Peter Zijlstra
committed
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) <[email protected]> Acked-by: Josh Poimboeuf <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 537da1e commit 5cff208

File tree

1 file changed

+2
-0
lines changed
  • tools/objtool/include/objtool

1 file changed

+2
-0
lines changed

tools/objtool/include/objtool/warn.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ static inline char *offstr(struct section *sec, unsigned long offset)
2222
unsigned long name_off;
2323

2424
func = find_func_containing(sec, offset);
25+
if (!func)
26+
func = find_symbol_containing(sec, offset);
2527
if (func) {
2628
name = func->name;
2729
name_off = offset - func->offset;

0 commit comments

Comments
 (0)