The relocation is missing mask so an address that has non-zero bits in 47:43 may overwrite the register number. (Frequently shows up as target register changed to xzr....)
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | ||
---|---|---|
364 ↗ | (On Diff #80866) | Now that the diff is much bigger I should point out that this line is the actual bug fix (adding mask). Other changes are necessary so that the added test can be run without causing trouble on big endian systems. |
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | ||
---|---|---|
466–467 ↗ | (On Diff #81225) | (10 - 2) -> 8 |
480–481 ↗ | (On Diff #81225) | any reason why (10 - 3) is not spelled 7 (here and everywhere else) |
test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_relocations.s | ||
1–2 ↗ | (On Diff #81225) | We need tests for both little and big endian, no? |
9–15 ↗ | (On Diff #81225) | Can you add comments pointing out the relocations emitted? |
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | ||
---|---|---|
480–481 ↗ | (On Diff #81225) | I believe it's because these are the last bits of the source (3) and the destination (10). I'm fine with either but I think the 10 - 3 is reasonably clear what it is doing along with the comment above each of these. |
test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_relocations.s | ||
1–2 ↗ | (On Diff #81225) | Sure. I don't have hardware to actually check if it's actually the correct output but I'll just reference clang/gcc output in be mode. |
9–15 ↗ | (On Diff #81225) | Sorry, what exactly do you mean? The relocations are explicitly specified in the code (#:abs_g3: etc.). Do you mean to write the name like R_AARCH64_MOVW_UABS_G3? Or something else? |
test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_relocations.s | ||
---|---|---|
9–15 ↗ | (On Diff #81225) | Or do you mean the disassemble of the relocated instructions? |
(and add the required tests please)
Sure.
test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_relocations.s | ||
---|---|---|
9–15 ↗ | (On Diff #81225) | OK. Will do. |
Tests added. Also discovered and had to fix two other bugs since the arch detection was wrong for aarch64_be ELF file....