Stream: git-wasmtime

Topic: wasmtime / PR #3026 aarch64: Implement TLS ELF GD Relocat...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 10:13):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 10:18):

bjorn3 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 10:18):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 11:01):

afonso360 updated PR #3026 from aarch64-elf-tls to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 11:15):

bjorn3 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 11:15):

bjorn3 created PR review comment:

    /// Set an ADRP immediate field to the top 21 bits of the final address. Checks for overflow.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 11:22):

afonso360 updated PR #3026 from aarch64-elf-tls to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 11:35):

afonso360 has marked PR #3026 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 18:24):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 18:54):

cfallin merged PR #3026.


Last updated: Oct 23 2024 at 20:03 UTC