summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRozelette <Rozelette@users.noreply.github.com>2020-09-27 19:18:45 -0500
committerGitHub <noreply@github.com>2020-09-27 20:18:45 -0400
commita672633c3bcaea1e92080bcb48fc5dc8fddb1799 (patch)
tree7f3bd184e99fa1e2fec0b8af8ac95948e066f064
parentc725249389654c58929f07258bdff15bacdc363c (diff)
Fix ordering of relocations in overlay (#32)
-rwxr-xr-xtools/overlay.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/overlay.py b/tools/overlay.py
index b7fe49699..8fdc6239f 100755
--- a/tools/overlay.py
+++ b/tools/overlay.py
@@ -28,8 +28,9 @@ if __name__ == '__main__':
out.write('.section .ovl\n');
relocs = []
- for section in elffile.iter_sections():
- if isinstance(section, RelocationSection):
+ for section_name in ['.rel.text', '.rel.data', '.rel.rodata']:
+ section = elffile.get_section_by_name(section_name)
+ if section is not None:
symtab = elffile.get_section(section['sh_link'])
for reloc in section.iter_relocations():
symbol = symtab.get_symbol(reloc['r_info_sym'])