April 13, 2020
Hi,
I'm currently working on porting the D runtime on Unikraft[1] and I am having some trouble locating a symbol referenced in rt/sections_elf_shared.d (__tls_get_addr).
Could someone tell me where does the runtime expect to retrieve its implementation from and what's its purpose?

Thanks,
Cristi

[1]:http://www.unikraft.org/
April 13, 2020
On Monday, 13 April 2020 at 14:42:25 UTC, Marius Cristian Baciu wrote:
> [...] I am having some trouble locating a symbol referenced in rt/sections_elf_shared.d (__tls_get_addr).
> Could someone tell me where does the runtime expect to retrieve its implementation from

$ gdb test
(gdb) b __tls_get_addr
Breakpoint 1 at 0x4351b8
(gdb) r
Starting program: /tmp/test
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 1, 0x00007ffff7df09c0 in __tls_get_addr () from /lib64/ld-linux-x86-64.so.2
[...]

> and what's its purpose?

It "[c]omputes the thread-speciļ¬c address of a TLS variable[.]" [1]

[1] http://www.google.com/search?q=drepper+tls.pdf