gold patch committed: Fix race condition

Ian Lance Taylor iant@google.com
Thu Feb 10 01:16:00 GMT 2011


Until now gold released local symbol information after doing all
relocations.  However, when I added support for STT_GNU_IFUNC, it became
possible for there to be an IRELATIVE relocation referring to the value
of a local symbol, which requires the value of the local symbol when
writing out the relocation.  That was not a problem in the normal
unthreaded mode, because the relocations would be written out before the
local values were discarded.  When threading, though, there is no
required ordering between these operations, so it was possible for gold
to attempt to fetch the local symbol value after it had been released,
leading to an assertion failure.  Ths patch fixes the problem by simply
not freeing the local symbol information.  Committed to mainline and
2.21 branch.

Ian


2011-02-09  Ian Lance Taylor  <iant@google.com>

	PR gold/12316
	* object.h (class Sized_relobj): Remove clear_local_symbols.
	* reloc.cc (Sized_relobj::do_relocate): Don't call
	clear_local_symbols.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 1870 bytes
Desc: patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20110210/d3463f6a/attachment.bin>


More information about the Binutils mailing list