objtool: Don't print parentheses in function addresses

The parentheses in the "func()+off" address output are inconsistent with
how the kernel prints function addresses, breaking Peter's scripts.
Remove them.

Suggested-by: Peter Zijlstra <[email protected]>
Signed-off-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Miroslav Benes <[email protected]>
Link: https://lkml.kernel.org/r/f2bec70312f62ef4f1ea21c134d9def627182ad3.1650300597.git.jpoimboe@redhat.com
This commit is contained in:
Josh Poimboeuf authored and Peter Zijlstra committed 2022-04-22 12:32:02 +02:00
1 parent b51277eb97
commit 2bc3dec705
1 file changed
+1 -5
+1 -5
View File
@@ -33,11 +33,7 @@ static inline char *offstr(struct section *sec, unsigned long offset)
}
str = malloc(strlen(name) + 20);
if (func)
sprintf(str, "%s()+0x%lx", name, name_off);
else
sprintf(str, "%s+0x%lx", name, name_off);
sprintf(str, "%s+0x%lx", name, name_off);
return str;
}