Stream: git-wasmtime

Topic: wasmtime / PR #4616 s390x: Implement tls_value


view this post on Zulip Wasmtime GitHub notifications bot (Aug 04 2022 at 21:04):

uweigand opened PR #4616 from s390x-tls-value to main:

Implement the tls_value for s390 in the ELF general-dynamic mode.

Notable differences to the x86_64 implementation are:

This means we need new libcall entries for __tls_get_offset and
the _GLOBAL_OFFSET_TABLE_ symbol. The latter is a bit weird in
that it is not actually a function, so "libcall" seems a bit
inappropiate. But there currently is no way, apart from the
libcall mechanism, so refer to a well-known global symbol by name.

We also need to emit a relocation on a symbol placed in a
constant pool, as well as an extra relocation on the call
to __tls_get_offset required for TLS linker optimization.

Needed by the cg_clif frontend.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Aug 05 2022 at 11:57):

uweigand updated PR #4616 from s390x-tls-value to main.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 05 2022 at 15:17):

uweigand updated PR #4616 from s390x-tls-value to main.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 05 2022 at 16:04):

uweigand updated PR #4616 from s390x-tls-value to main.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 09 2022 at 20:51):

uweigand edited PR #4616 from s390x-tls-value to main:

Implement the tls_value for s390 in the ELF general-dynamic mode.

Notable differences to the x86_64 implementation are:

This means we need a new libcall entries for __tls_get_offset.
In addition, we also need a way to access _GLOBAL_OFFSET_TABLE_.
The latter is a "magic" symbol with a well-known name defined
by the ABI and recognized by the linker. This patch introduces
a new ExternalName::KnownSymbol variant to support such names
(originally due to @afonso360).

We also need to emit a relocation on a symbol placed in a
constant pool, as well as an extra relocation on the call
to __tls_get_offset required for TLS linker optimization.

Needed by the cg_clif frontend.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Aug 09 2022 at 22:03):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2022 at 17:02):

cfallin merged PR #4616.


Last updated: Nov 22 2024 at 16:03 UTC