Support MIPS64 .o files - don't remove has_addend (#495)
authorNoam Yorav-Raphael <noamraph@gmail.com>
Mon, 4 Sep 2023 12:55:14 +0000 (15:55 +0300)
committerGitHub <noreply@github.com>
Mon, 4 Sep 2023 12:55:14 +0000 (05:55 -0700)
commitc9e558f76bbe9418f56b79779852e1ab77b6f8fa
tree155718ffccbb8ac64b62ad4e743e4abd5a3a4a1e
parentc4a20fbbe244c33c0a030d91a36d91a06eec0f69
Support MIPS64 .o files - don't remove has_addend (#495)

* Update relocation.py to support MIPS64 .o files. Add a test file. DWARF test still shows an error.

* Make test pass for test/testfiles_for_readelf/simple_mips_gcc.o.elf by having two _RELOCATION_RECIPES_MIPS, one for REL and one for RELA

* Adjust llvm-dwarfdump output for MIPS64 to match pyelftools and gcc-objdump.

* update dwarf_mips64el.o.elf

* Change dwarf_mips64el.c to not use globals

Now we don't depend on whether relocations on globals in .o should be performed or not.

* run_dwarfdump_test.py: add a comment to explain the special case.

---------

Co-authored-by: Noam Yorav-Raphael <noam.yoravraphael@mobileye.com>
Co-authored-by: Noam Yorav-Raphael <noamyr@mobileye.com>
elftools/elf/relocation.py
scripts/dwarfdump.py
test/run_dwarfdump_tests.py
test/testfiles_for_dwarfdump/dwarf_mips64el.o.elf [new file with mode: 0644]
test/testfiles_for_dwarfdump/dwarf_mips64el/.gitignore [new file with mode: 0644]
test/testfiles_for_dwarfdump/dwarf_mips64el/dwarf_mips64el.c [new file with mode: 0644]
test/testfiles_for_dwarfdump/dwarf_mips64el/flake.lock [new file with mode: 0644]
test/testfiles_for_dwarfdump/dwarf_mips64el/flake.nix [new file with mode: 0644]