Fix problems with -r.
authorJames Clarke <jrtc27@jrtc27.com>
Wed, 8 Nov 2017 23:13:53 +0000 (15:13 -0800)
committerCary Coutant <ccoutant@gmail.com>
Wed, 8 Nov 2017 23:13:53 +0000 (15:13 -0800)
commit333d0055f6f162c334c36f1946b6fcdb5c92b681
treee2f634ea32928beaa5801afc966ea07f5e5520cc
parent08228b11557016f6f12d537ebff5f169fdf9bc6c
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.
gold/ChangeLog
gold/object.cc
gold/object.h
gold/testsuite/Makefile.am
gold/testsuite/Makefile.in
gold/testsuite/pr22266_a.c [new file with mode: 0644]
gold/testsuite/pr22266_main.c [new file with mode: 0644]
gold/testsuite/pr22266_script.t [new file with mode: 0644]
This page took 0.024566 seconds and 4 git commands to generate.