This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gold commit] PR gold/17432: Fix allocation of TLS common during LTO

> 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
> trust.

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  <>

        PR gold/17432
        * (Symbol_table::resolve): Fix local shadowing error.

diff --git a/gold/ b/gold/
index 52dae8b..07dff4a 100644
--- a/gold/
+++ b/gold/
@@ -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);
          if (adjust_common)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]