From: Jeff Andrews <jeff@beta.pyu.ca>
To: <gcc-help@gcc.gnu.org>
Subject: Get TLS information without readelf
Date: Sat, 30 Oct 2021 03:41:12 -0400 (EDT) [thread overview]
Message-ID: <20211030074112.D9FC7140175@vultr155> (raw)
Hi all. I'd like to use tls (specifically __thread) with g++ but without a standard library. For the moment all my variables are zero initalized. How should I get the TLS memory size? I can see all the information I need in the TLS header after I build the binary by using "readelf -l". I'll need "MemSiz", possibly "Align" and once I have non zero thread locals I'll need VirtAddr and FileSiz. Is there a way to export these as a symbol/global variable?
next reply other threads:[~2021-10-30 7:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-30 7:41 Jeff Andrews [this message]
2021-10-30 13:33 ` Alexander Shpilkin
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=20211030074112.D9FC7140175@vultr155 \
--to=jeff@beta.pyu.ca \
--cc=gcc-help@gcc.gnu.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).