-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve test_dylink_tls. NFC #14982
Improve test_dylink_tls. NFC #14982
Conversation
Make TLS variables static which fixes a linker failure when building with `-g` (for example this test currently fails under wasm2g and wasm0g congigurations). Also, add two different TLS variables in each of the modules which helps with debugging since only one of them will be at TLS offset 0.
bda79ec
to
7d04d82
Compare
So I guess this doesn't actually test import and export of TLS, just that TLS variables work in main and side modules? |
wait but why does the link fail with the old version? |
Yes exactly, there is a TODO already in place to add TLS import/export testing. |
This test currently fails with following error when building with
I guess because Its not clear to me why this doesn't also fail without |
I figured it out. The reason is that we have relocations of type R_WASM_MEMORY_ADDR_I32 in the debug info section which forces the address to be imported as I guess on native platforms you would end up with dynamic relocations in the debug info section? But we currently don't support that. Even with TLS imports which I'm hoping to land this week I don't we can change the debug info sections to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this change is fine. I just wanted to make sure we understood what's happening here so we pick it up when we're ready.
Ick :( |
Make TLS variables static which fixes a linker failure when
building with
-g
(for example this test currently fails under wasm2gand wasm0g congigurations).
Also, add two different TLS variables in each of the modules which
helps with debugging since only one of them will be at TLS offset 0.