This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Add gold support for TLS descriptors
From: "Cary Coutant" <ccoutant@google.com>
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.
>
> * 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.
Dosn't i386.cc need this too? I'm getting testsuite failures
on i386 with fedora rawhide and the problem is an underfined
reference to _TLS_MODULE_BASE_