This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] fix static TLS consumption by TLS descriptors

On 3 June 2014 04:05, Kyle McMartin <> wrote:
> Sorry for the delay, been a busy few weeks.
> On Mon, May 19, 2014 at 12:25:55PM +0100, Will Newton wrote:
>> On 14 May 2014 21:54, Kyle McMartin <> wrote:
>> > On Wed, May 14, 2014 at 04:32:51PM -0400, Kyle McMartin wrote:
>> >>
>> >
>> > rth points out something more sensible than the if (0) ugliness which I
>> > like better. Thanks!
>> Yes, I think this version looks nicer. I guess you could try using a
>> more complicated #ifdef but I'm not sure if it would be any prettier.
> The nesting makes it significantly worse, better to just let the
> compiler to do the work here, rather than cpp.
>> It looks like it might be possible to abstract these details out into
>> two functions, one for REL and one for RELA. Did you investigate that?
> Not sure I follow you here.

What I meant was that there is a lot of copy and paste here, maybe we
can clean that up. But your patch doesn't make it worse so its fine to
leave that for another day I think.

>> It would be nice to make the test a part of the glibc test suite. It
>> might take a bit of work to translate into the glibc test framework
>> but would be worth it to make sure this area of the dynamic linker
>> gets tested.
> No objection from me, all of this TLS code is very much a
> nest of vipers and corner cases.
>> Is aarch64 the only architecture in this set that uses the gnu2
>> dialect by default? (btw, typo in your commit message
>> s/ftls-dialect/mtls-dialect/)
> Yes, it's the only one that uses this default in GCC. And, frankly,
> given how this rtld code falls apart, I don't think anyone has even
> bothered testing it anywhere else, much less used it in production.

I tested the patch on ARM with -mtls-dialect=gnu2 and found one
unrelated glibc bug and two binutils bugs, so yes, it appears to be
lightly used. ;-)

Will Newton
Toolchain Working Group, Linaro

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]