[GOLD] Got_offset_list: addend field
authorAlan Modra <amodra@gmail.com>
Thu, 5 Aug 2021 05:02:56 +0000 (14:32 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 17 Sep 2021 22:50:11 +0000 (08:20 +0930)
commit912697efc15768894c13a9370a2fcaa950f24558
tree5f1c97e1870cee187d20fbdbca17d605e18c12e5
parent6bc2c6ee80c32462a120927b0a3d1a828769f045
[GOLD] Got_offset_list: addend field

This is the first in a series of patches aimed at supporting GOT
entries against symbol plus addend generally for PowerPC64 rather than
just section symbol plus addend as gold has currently.

This patch adds an addend field to Got_offset_list, so that both local
and global symbols can have GOT entries with addend.

PR 28192
* object.h (Got_offset_list): Add addend_ field, init in both
constructors.  Adjust all accessors to suit.
(Sized_relobj::do_local_has_got_offset): Adjust to suit.
(Sized_relobj::do_local_got_offset): Likewise.
(Sized_relobj::do_set_local_got_offset): Likewise.
* symtab.h (Symbol::has_got_offset): Add optional addend param.
(Symbol::got_offset, Symbol::set_got_offset): Likewise.
* incremental.cc (Local_got_offset_visitor::visit): Add unused
uint64_t parameter with FIXME.
(Global_got_offset_visitor::visit): Add unused uint64_t parameter.
gold/incremental.cc
gold/object.h
gold/symtab.h