PATCH: Add gold support for TLS descriptors

David Miller
Thu Apr 17 00:57:00 GMT 2008

From: "Cary Coutant" <>
Date: Wed, 16 Apr 2008 17:38:16 -0700

> This patch adds support for the _TLS_MODULE_BASE_ symbol, fixing a
> test failure when compiling the tests with -O2.
> 	* (sized_finalize_symbol): Add check for TLS symbol.
> 	* (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.

Dosn't need this too?  I'm getting testsuite failures
on i386 with fedora rawhide and the problem is an underfined
reference to _TLS_MODULE_BASE_

More information about the Binutils mailing list