PATCH: Add gold support for TLS descriptors

Cary Coutant ccoutant@google.com
Thu Apr 17 00:38:00 GMT 2008


This patch adds support for the _TLS_MODULE_BASE_ symbol, fixing a
test failure when compiling the tests with -O2.

	* symtab.cc (sized_finalize_symbol): Add check for TLS symbol.
	* x86_64.cc (Target_x86_64::define_tls_base_symbol): New function.
	(Target_x86_64::tls_base_symbol_defined_): New field.
	(Target_x86_64::Scan::local): Define _TLS_MODULE_BASE_ symbol.
	(Target_x86_64::Scan::global): Likewise.

I had a bit of trouble deciding where to define the symbol --
Target::do_finalize_sections() seemed like the best place, but the
symbol table is unavailable there, and I didn't deem it worth the
interface change to put it there. Instead, gold will define the symbol
the first time it sees one of the TLSDESC relocations.

OK?

-cary
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tlsdesc-patch-2.txt
URL: <https://sourceware.org/pipermail/binutils/attachments/20080417/a60afad7/attachment.txt>


More information about the Binutils mailing list