Open DennyDai opened 2 weeks ago
Yeah I've heard of this one before. Absolute nightmare. If you can fix it, that would be amazing, if not, a detailed report of why the current cle architecture is insufficient and what points code needs to be inserted at would be fantastic.
@rhelmot I currently don't have any idea on how to fix it, just wanna open this issue before I totally forget about this. I will come back to this later when I have some free time.
Description
Expected Result
Result when not applying reloc at all (make
relocate
simply returns True)Current impl (c8eb415ae0c5ab84dff7ab026a5222d98c3110f3)
Steps to reproduce the bug
Run
./test.py
in attached zip. test.zip (test stolen from https://github.com/llvm/llvm-project/blob/main/lld/test/ELF/mips-hilo.s)Environment
No response
Additional context
If understand this correctly, according to https://refspecs.linuxfoundation.org/elf/mipsabi.pdf Page 80, 81 (4-18, 4-19)
Each relocation type needs to access the addend value from the other to calculate the correct result