Skip to content

Conversation

@kubkon
Copy link
Member

@kubkon kubkon commented Sep 28, 2023

It's not exactly efficient as .tbss is actually never mapped at runtime unlike .bss. For that reason, typically linker overlaps .tbss with a succeeding alloc section, usually .data, in virtual memory, since we only care about the continuity of .tdata into .tbss. When the relocations are resolved, they are lowered into positive and negative offsets wrt to the TLS segment. I think given this knowledge there exists the potential for improving current implementation by quite a bit.

In other news, I have now also added a new test target to the test matrix:

+        .{
+            .target = .{
+                .cpu_arch = .x86_64,
+                .os_tag = .linux,
+                .abi = .musl,
+            },
+            .link_libc = true,
+            .use_lld = false,
+        },

@kubkon kubkon merged commit 873c695 into master Sep 30, 2023
@kubkon kubkon deleted the elf-tls branch September 30, 2023 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant