[GOLD] Got_offset_list: addend field
Alan Modra
amodra@gmail.com
Fri Sep 3 03:22:48 GMT 2021
On Thu, Sep 02, 2021 at 06:13:57PM -0700, Cary Coutant wrote:
> > 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. Note the FIXME
> > in incremental.cc, which will need attention if powerpc is to ever
> > support incremental linking.
>
> Do you think you'd ever want incremental linking on powerpc?
No, I don't think so. And I'll argue against it if someone tries to
talk me into implementing it. :-)
> Frankly,
> the effort for just the one target platform was pretty high, the
> maintenance on it is burdensome, and I'm tempted to deprecate it and
> rip it out at some point in the future.
>
> > As per the recommendation in
> > https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-default-args
> > the changes to symtab.h Symbol methods could be done with what looks
> > like a good use of default arguments but they seem to be against the
> > gold maintainers' coding practice. So instead we get more overloads.
>
> For the record, I've got nothing against default parameter values, as
> long as they're obvious default values that shouldn't ever need to be
> changed. I'm not sure what Ian's position was,
There's this:
https://sourceware.org/pipermail/binutils/2010-October/069026.html
> but he did use a
> default parameter value in at least one place (Descriptors::open in
> descriptors.h).
Heh.
> OK, with or without your suggestion to use a default parameter value
> for has_got_offset.
Thanks. I wrote the patch initially with default parameter values so
it will be easy to go back to that.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list