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] Use IE model for static variables in glibc

On Thu, Jul 09, 2015 at 01:40:33PM -0700, Roland McGrath wrote:
> The tests should have comments explaining what they are testing.

Ugh, I actually looked at the test now - I had just lifted it from
Alex's patch.  I'll fix it up with the comment, copyright notice, etc.

> If it's important that all TLS accesses in libc code be IE, then there
> should be a static test for that.  Perhaps it could grep readelf -r output
> for the TLS dynamic reloc types.  Or perhaps there is something we could do
> to make references to __tls_get_addr when linking be a hard failure.
> If the intent is to catch all TLS access in libc code, then why are you
> touching the source instead of just compiling with -ftls-model=initial-exec
> across the board?  If we do that, then it's probably fine not to have the
> static test.

I'll need to ensure that test cases are not built with
-ftls-model=initial-exec and also specific cases like memusage.
Basically, it is more work and is probably not something I can finish
in time for 2.22, given that I have other stuff to finish in the near
term.  I'll add the readelf test case now to ensure that all
and code is IE.  I've not reviewed the other modules and
I suspect that some of them should not have it either.  Do you think
it would be OK if I do this in 2.23?

I also have to look at the impact on ARM since it uses
-ftls-model=gnu2 to get tls descriptors.  I reckon it would actually
be an improvement, but I'd like to make sure that it is.  There's also
a good case IMO to somehow compute static TLS usage within and and add that to the surplus.  That way the surplus would
be reserved specifically for user DSOs that absolutely want to use IE
and libc will never encroach that.  Again a good project for 2.23.


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