This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Use IE model for static variables in glibc
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 10 Jul 2015 13:03:47 -0700 (PDT)
- Subject: Re: [PATCH] Use IE model for static variables in glibc
- Authentication-results: sourceware.org; auth=none
- References: <20150709180544 dot GA8522 at spoyarek dot pnq dot redhat dot com> <20150709204033 dot 262B02C39DC at topped-with-meat dot com> <20150710051823 dot GH2816 at spoyarek dot pnq dot redhat dot com>
> I'll need to ensure that test cases are not built with
> -ftls-model=initial-exec and also specific cases like memusage.
Right.
> 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 libc.so
> and libpthread.so 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?
If we have the readelf test in then I think that's fine for the time being.
Cleaning up further is just an ease-of-maintenance issue. The test will
break when such maintenance is required, so worst case we won't actually
revisit the issue until that happens.
> 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.
Fair enough.
> There's also a good case IMO to somehow compute static TLS usage within
> libc.so and libpthread.so 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.
That sounds reasonable.
Thanks,
Roland