From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: musl can't handle gold's STB_LOCAL TLS symbols
Date: Sat, 25 May 2019 22:49:21 +0200 [thread overview]
Message-ID: <20190525204921.GN16415@port70.net> (raw)
In-Reply-To: <20190525165133.GF23599@brightrain.aerifal.cx>
* Rich Felker <dalias@libc.org> [2019-05-25 12:51:33 -0400]:
> On Sat, May 25, 2019 at 11:18:16AM +0200, Szabolcs Nagy wrote:
> >
> > the sysv elf spec allows leaving STB_LOCAL symbols
> > in the dynamic symbol table if they were hidden [1].
> > it does not say if symbolic dynamic relocs may refer
> > to them, though.
>
> I don't think there's any reasonable way a reference to the symbol
> from a relocation can distinguish between one that needs to use the
> local definition and one that needs to follow normal global symbol
> resolution, is there? Or can it just skip the lookup entirely and use
> the reference as the definition in this case?? If that's possible it
> might be trivial and non-controversial to support.
i think using the ref as the def is the only sensible
interpretation for STB_LOCAL.
glibc seems to do that but there are some warts: on ppc32
sym->st_value is already added to reloc->r_addend for
STB_LOCAL syms, but not for tls syms (assuming glibc is right).
prev parent reply other threads:[~2019-05-25 20:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 0:47 Ryan Prichard
2019-05-24 1:12 ` Rich Felker
2019-05-25 9:18 ` Szabolcs Nagy
2019-05-25 16:51 ` Rich Felker
2019-05-25 20:49 ` Szabolcs Nagy [this message]
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=20190525204921.GN16415@port70.net \
--to=nsz@port70.net \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).