Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Simon Marchi <simark@simark.ca>
Cc: gdb@sourceware.org
Subject: Re: Getting offset of inital-exec TLS variables on GNU/Linux
Date: Sun, 19 May 2019 13:00:00 -0000	[thread overview]
Message-ID: <87a7flp2tm.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <19f008ac-ffb7-5e15-ae6c-5fc00791c964@simark.ca> (Simon Marchi's	message of "Fri, 17 May 2019 10:08:35 -0400")

* Simon Marchi:

> 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?

The offset from something related to the thread pointer to the variable,
for cases where this is constant (specifically, initial-exec TLS
variables).

> 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?

I have a live process, and it would be best if the information matched
that process (even if it uses different libraries than those currently
installed in the file system).

Thanks,
Florian


  reply	other threads:[~2019-05-17 14:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87o941pej8.fsf@oldenburg2.str.redhat.com>
2019-05-17 14:34 ` Simon Marchi
2019-05-19 13:00   ` Florian Weimer [this message]
2019-05-23 15:55     ` Simon Marchi
2019-05-24 19:32       ` Florian Weimer
2019-05-24 20:12         ` Carlos O'Donell
2019-05-25  0:45           ` Florian Weimer
2019-05-25 22:35             ` Carlos O'Donell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a7flp2tm.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=simark@simark.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox