summaryrefslogtreecommitdiff
path: root/tools/objtool/check.c
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2025-09-17 09:03:52 -0700
committerJosh Poimboeuf <jpoimboe@kernel.org>2025-10-14 14:46:49 -0700
commit3b92486fa1a905cf4be81c0b65961f547fcf7be3 (patch)
tree1103a4428d46f44b7c28fbc504f34964ca1badd9 /tools/objtool/check.c
parent03c19a99ee69f4680d7da11c164ac655b4946b99 (diff)
objtool: Add annotype() helper
... for reading annotation types. 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.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 65a359cbf4ea..13ccfe0c7eba 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -14,7 +14,6 @@
#include <objtool/check.h>
#include <objtool/special.h>
#include <objtool/warn.h>
-#include <objtool/endianness.h>
#include <linux/objtool_types.h>
#include <linux/hashtable.h>
@@ -2273,9 +2272,7 @@ static int read_annotate(struct objtool_file *file,
}
for_each_reloc(sec->rsec, reloc) {
- type = *(u32 *)(sec->data->d_buf + (reloc_idx(reloc) * sec->sh.sh_entsize) + 4);
- type = bswap_if_needed(file->elf, type);
-
+ type = annotype(file->elf, sec, reloc);
offset = reloc->sym->offset + reloc_addend(reloc);
insn = find_insn(file, reloc->sym->sec, offset);