binutils227: Backport binutils commit 333d0055f6f16
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>
Sun, 13 Sep 2020 14:49:45 +0000 (14:49 +0000)
committerAntonio Huete Jimenez <tuxillo@quantumachine.net>
Tue, 15 Sep 2020 23:34:51 +0000 (01:34 +0200)
commit131ec8c89584be411ba5568fa5780449f780e268
treecf5bacf9daebe5880ae875acd6a46b934ac75249
parenta81d61373c324ec9245c63defbffd4f2e5205421
binutils227: Backport binutils commit 333d0055f6f16

-------
Fix problems with -r.

The fix committed for PR gold/19291 ended up breaking other cases. The
commit added adjustment code to write_local_symbols, but in many cases
compute_final_local_value_internal had already subtracted the output
section's address. To fix this, all other adjustments are now removed, so
only the one in write_local_symbols is left.

gold/
PR gold/22266
* object.cc (Sized_relobj_file::compute_final_local_value_internal):
Drop relocatable parameter and stop adjusting output value based on
it.
(Sized_relobj_file::compute_final_local_value): Stop passing
relocatable to compute_final_local_value_internal.
(Sized_relobj_file::do_finalize_local_symbols): Ditto.
* object.h (Sized_relobj_file::compute_final_local_value_internal):
Drop relocatable parameter.
-------
contrib/binutils-2.27/gold/object.cc
contrib/binutils-2.27/gold/object.h