This is the mail archive of the
mailing list for the binutils project.
Re: [gold commit] PR gold/17432: Fix allocation of TLS common during LTO
- From: Cary Coutant <ccoutant at google dot com>
- To: Binutils <binutils at sourceware dot org>
- Cc: Rafael Ãvila de EspÃndola <rafael dot espindola at gmail dot com>, Alan Modra <amodra at gmail dot com>
- Date: Tue, 30 Sep 2014 16:10:29 -0700
- Subject: Re: [gold commit] PR gold/17432: Fix allocation of TLS common during LTO
- Authentication-results: sourceware.org; auth=none
- References: <20140926045441 dot B7F09160D80 at ccoutant dot mtv dot corp dot google dot com>
> This patch fixes the problem by removing an exclusion where common
> symbols would not override the placeholder symbols, but checking to
> see if the size needs adjusting (the original reason for the exclusion).
> Furthermore, we need to avoid putting placeholder symbols in the common
> list, and wait until we see a real common symbol with a type we can
This patch fixes a stupid error from the previous patch where tosize
and tovalue were redefined in the block, shadowing the declarations
outside the block. It went unnoticed in my testing because my .bss
section got aligned to 8 bytes for other reasons, but Alan noticed the
failure in plugin_test_10 in his build environment. Sorry!
2014-09-30 Cary Coutant <firstname.lastname@example.org>
* resolve.cc (Symbol_table::resolve): Fix local shadowing error.
diff --git a/gold/resolve.cc b/gold/resolve.cc
index 52dae8b..07dff4a 100644
@@ -317,8 +317,8 @@ Symbol_table::resolve(Sized_symbol<size>* to,
if (to->is_common() && !is_ordinary && st_shndx == elfcpp::SHN_COMMON)
adjust_common = true;
- typename Sized_symbol<size>::Size_type tosize = to->symsize();
- typename Sized_symbol<size>::Value_type tovalue = to->value();
+ tosize = to->symsize();
+ tovalue = to->value();
this->override(to, sym, st_shndx, is_ordinary, object, version);