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, 6 insertions, 0 deletions
diff --git a/tools/objtool/include/objtool/elf.h b/tools/objtool/include/objtool/elf.h
index 74f63934afd3..a938cb1d4172 100644
--- a/tools/objtool/include/objtool/elf.h
+++ b/tools/objtool/include/objtool/elf.h
@@ -209,6 +209,12 @@ static inline void mark_sec_changed(struct elf *elf, struct section *sec,
for_each_sec(file, __sec) \
sec_for_each_sym(__sec, sym)
+#define for_each_reloc(rsec, reloc) \
+ list_for_each_entry(reloc, &rsec->reloc_list, list)
+
+#define for_each_reloc_from(rsec, reloc) \
+ list_for_each_entry_from(reloc, &rsec->reloc_list, list)
+
#define OFFSET_STRIDE_BITS 4
#define OFFSET_STRIDE (1UL << OFFSET_STRIDE_BITS)
#define OFFSET_STRIDE_MASK (~(OFFSET_STRIDE - 1))