Commit a040ab73 authored by Josh Poimboeuf's avatar Josh Poimboeuf
Browse files

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: default avatarPetr Mladek <pmladek@suse.com>
Tested-by: default avatarJoe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
parent a1526bcf
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -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) {