This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Getting offset of inital-exec TLS variables on GNU/Linux
- From: Simon Marchi <simark at simark dot ca>
- To: Florian Weimer <fweimer at redhat dot com>, gdb at sourceware dot org
- Date: Fri, 17 May 2019 10:08:35 -0400
- Subject: Re: Getting offset of inital-exec TLS variables on GNU/Linux
- References: <87o941pej8.fsf@oldenburg2.str.redhat.com>
On 2019-05-17 6:21 a.m., Florian Weimer wrote:
> Is it possible to obtain the offset of initial-exec TLS variable on
> GNU/Linux?
>
> It doesn't seem so because GDB executes the DWARF to access the TLS
> variable, so the offset is an implementation detail. Although it is
> often visible at the ELF layer.
>
> Thanks,
> Florian
Can you clarify a little bit?
You are looking for the offset the variable from which point of reference:
- The start of the TLS area of this module?
- The start of the TLS area of the current thread?
- Something else?
Also, are you looking for something you can find statically, with just the
executable, or are you working in the context of the live process?
Simon