summaryrefslogtreecommitdiff
path: root/tools/objtool/check.c
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2025-09-17 09:03:40 -0700
committerJosh Poimboeuf <jpoimboe@kernel.org>2025-10-14 14:46:47 -0700
commita040ab73dfd1bc8198848a438f77497d8d03fba9 (patch)
treec106fa0c70afc7bcbca1e76c0cf50d86039fb9f2 /tools/objtool/check.c
parenta1526bcfcb6cb7cb601b9ff8e24d08881ef9afb8 (diff)
objtool: Simplify reloc offset calculation in unwind_read_hints()
Simplify the relocation offset calculation in unwind_read_hints(), similar to other conversions which have already been done. Acked-by: Petr Mladek <pmladek@suse.com> Tested-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r--tools/objtool/check.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 46b425fade4f..473e73722d5c 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2200,14 +2200,7 @@ static int read_unwind_hints(struct objtool_file *file)
return -1;
}
- if (is_sec_sym(reloc->sym)) {
- offset = reloc_addend(reloc);
- } else if (reloc->sym->local_label) {
- offset = reloc->sym->offset;
- } else {
- ERROR("unexpected relocation symbol type in %s", sec->rsec->name);
- return -1;
- }
+ offset = reloc->sym->offset + reloc_addend(reloc);
insn = find_insn(file, reloc->sym->sec, offset);
if (!insn) {