afonso360 opened PR #3026 from aarch64-elf-tls
to main
:
Hey,
I've been working on this, but I'm a bit stuck and need some help.
This PR Implements TLS ELF GD relocations for aarch64. ELF GD Relocations are a bit unusual in aarch64 since the default is TLS descriptors (at least in gcc/clang).
Right now I don't think the relocations are being performed correctly.
The only way I have to test this is to run the following command:
clif-util compile -D --set tls_model=elf_gd --target aarch64 ./filetests/filetests/isa/aarch64/tls-elf-gd.clif
Which emits the following code:
... snipped ... 20: 00 00 00 90 adrp x0, #0 24: 00 00 00 91 add x0, x0, #0 28: 00 00 00 94 bl #0x28 2c: 1f 20 03 d5 nop ... snipped ...
I suspect that this means that the first two relocations are silently not being done?
The other issue that I have, is that I haven't found a way to create a runtest that tests this.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
This is correct. All registers are fixed, so marking them as clobbered in
aarch64_get_regs
is enough. There are no registers that need to be remapped.
afonso360 updated PR #3026 from aarch64-elf-tls
to main
.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
/// Set an ADRP immediate field to the top 21 bits of the final address. Checks for overflow.
afonso360 updated PR #3026 from aarch64-elf-tls
to main
.
afonso360 has marked PR #3026 as ready for review.
cfallin submitted PR review.
cfallin merged PR #3026.
Last updated: Nov 22 2024 at 16:03 UTC