mirror of https://github.com/zeldaret/mm.git
Fix ordering of relocations in overlay (#32)
This commit is contained in:
parent
c725249389
commit
a672633c3b
|
@ -28,8 +28,9 @@ if __name__ == '__main__':
|
||||||
out.write('.section .ovl\n');
|
out.write('.section .ovl\n');
|
||||||
|
|
||||||
relocs = []
|
relocs = []
|
||||||
for section in elffile.iter_sections():
|
for section_name in ['.rel.text', '.rel.data', '.rel.rodata']:
|
||||||
if isinstance(section, RelocationSection):
|
section = elffile.get_section_by_name(section_name)
|
||||||
|
if section is not None:
|
||||||
symtab = elffile.get_section(section['sh_link'])
|
symtab = elffile.get_section(section['sh_link'])
|
||||||
for reloc in section.iter_relocations():
|
for reloc in section.iter_relocations():
|
||||||
symbol = symtab.get_symbol(reloc['r_info_sym'])
|
symbol = symtab.get_symbol(reloc['r_info_sym'])
|
||||||
|
|
Loading…
Reference in New Issue