[patch][gold] Fix R_ARM_TLS_LE32 when there is no TLS segment

Rafael Espindola espindola@google.com
Thu May 20 17:14:00 GMT 2010

The attached patch fixes R_ARM_TLS_LE32 relocations when there is no TLS
segment. This can happen with linker scripts. I think the old code was
also wrong in the case we have a .tbss and a .tdata section. The relocations
would be correct for the section with the largest address, but not for the
other one.

2010-05-20  Rafael Espindola  <espindola@google.com>

	* arm.cc (relocated_section): New.
	(Target_arm<big_endian>::Relocate::relocate_tls): Use
	relocated_section and Layout::tls_section.
	* layout.cc (Layout::Layout): Initialize tls_section_.
	(Layout::compute_tls_section): New.
	* layout.h (Layout::tls_section, Layout::compute_tls_section,
	Layout::tls_section_): New.

Rafael Ávila de Espíndola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gold-tls.patch
Type: text/x-diff
Size: 4932 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100520/118e50f1/attachment.bin>

More information about the Binutils mailing list