summaryrefslogtreecommitdiff
path: root/tools/objtool/include/objtool/elf.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/objtool/include/objtool/elf.h')
-rw-r--r--tools/objtool/include/objtool/elf.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/objtool/include/objtool/elf.h b/tools/objtool/include/objtool/elf.h
index 41d2149f8bb8..be08b32a93ee 100644
--- a/tools/objtool/include/objtool/elf.h
+++ b/tools/objtool/include/objtool/elf.h
@@ -75,7 +75,6 @@ struct reloc {
struct section *sec;
struct symbol *sym;
struct list_head sym_reloc_entry;
- s64 addend;
bool jump_table_start;
};
@@ -217,6 +216,11 @@ static inline void set_reloc_type(struct reloc *reloc, int type)
reloc->rel.r_info = GELF_R_INFO(GELF_R_SYM(reloc->rel.r_info), type);
}
+static inline s64 reloc_addend(struct reloc *reloc)
+{
+ return reloc->rela.r_addend;
+}
+
#define for_each_sec(file, sec) \
list_for_each_entry(sec, &file->elf->sections, list)