It looks like we need some x86 segmentation-based addressing too.
Created attachment 6071 [details] libgomp.so containing the SDT_V3 errors I've attached the libgomp.so I hand-built, that has the SDT_V3 errors in it.
Created attachment 6072 [details] libgomp.so containing the SDT_V3 errors
Created attachment 6073 [details] i686 libgomp.so containing the SDT_V3 errors
In an internal context, %fs:0 contains the linear base address of the tls segment. In an external context, the base address is available via ptrace: i386: PTRACE_GET_THREAD_AREA x86_64: PTRACE_ARCH_PRCTL
For the dwarf register numbers, figure 3.36 in: https://refspecs.linuxbase.org/elf/x86_64-abi-0.99.pdf Segment Register ES 50 %es Segment Register CS 51 %cs Segment Register SS 52 %ss Segment Register DS 53 %ds Segment Register FS 54 %fs Segment Register GS 55 %gs