fix vxworks TLS sections

Nathan Sidwell nathan@codesourcery.com
Thu Oct 29 16:49:00 GMT 2009


I've committed this patch to fix a problem with vxworks TLS sections.  Vxworks 
uses a scheme similar to the emulated TLS scheme GCC uses where proper TLS is 
unavailable.  I'd originally placed the initialization values in the read-only 
text segment, but this is incorrect because an initialization value may be the 
address of a global variable, and hence have a relocation.  If that happens, the 
text segment is no longer read-only and in some alignment-specific cases, you 
can end up with only one loadable segment, rather than 2.  The vxworks RTP 
loader dies in that case -- I guess I just got lucky with the original set of 
testcases I was using.

Anyway, this places it always in the data segment.

nathan
-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: all.diff
URL: <https://sourceware.org/pipermail/binutils/attachments/20091029/d8847f5f/attachment.ksh>


More information about the Binutils mailing list