[GOLD] Output_data_got tidy
Some Output_data_got methods already have support for addends, but
were implemented as separate methods. This removes unnecessary code
duplication.
Relobj::local_has_got_offset and others there get a similar treatment.
Comments are removed since it should be obvious without a comment, and
the existing comments are not precisely what the code does. For
example, a local_has_got_offset call without an addend does not return
whether the local symbol has *a* GOT offset of type GOT_TYPE, it
returns whether there is a GOT entry of type GOT_TYPE for the symbol
with addend of zero.
PR 28192
* output.h (Output_data_got::add_local): Make addend optional.
(Output_data_got::add_local_with_rel): Likewise.
(Output_data_got::add_local_pair_with_rel): Likewise.
* output.cc (Output_data_got::add_local): Delete overload
without addend.
(Output_data_got::add_local_with_rel): Likewise.
(Output_data_got::add_local_pair_with_rel): Likewise.
* object.h (Relobj::local_has_got_offset): Make addend optional.
Delete overload without addend later. Update comment.
(Relobj::local_got_offset): Likewise.
(Relobj::set_local_got_offset): Likewise.