Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sat, 25 May 2019 22:49:21 +0200
From: Szabolcs Nagy <>
Subject: Re: musl can't handle gold's STB_LOCAL TLS symbols

* Rich Felker <> [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).

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.