This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] gold: remove unused methods in Output_data_got_powerpc
- From: Alan Modra <amodra at gmail dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 14 Oct 2013 13:25:32 +1030
- Subject: Re: [PATCH] gold: remove unused methods in Output_data_got_powerpc
- Authentication-results: sourceware.org; auth=none
- References: <CAB=4xhrDkG1OZnJrG1eOA4NRogvo46wta9Q6_WC6LeF1R5_1Gg at mail dot gmail dot com> <CAHACq4p_PEf5R3RTA3ZFD+2rX339084gV8ATMMN3WYk=5CSrOA at mail dot gmail dot com> <20131011225626 dot GB20756 at bubble dot grove dot modra dot org> <20131011231423 dot GC20756 at bubble dot grove dot modra dot org> <CAB=4xhqw+sW7wG=dJYLcbN_9XLsmd6wCAF1U6c8RsN2xAmuzMQ at mail dot gmail dot com> <CAHACq4pCLQki-qbk3=YzzuZ7UkhUwBZ4bXrnCLoH7hb3EmOmPA at mail dot gmail dot com> <20131012004348 dot GD20756 at bubble dot grove dot modra dot org> <CAHACq4ob7EdUjsKcnmytRzTHKr___PyBHA83KFNfdC7+nutCqQ at mail dot gmail dot com>
On Sat, Oct 12, 2013 at 07:56:08AM -0700, Cary Coutant wrote:
> > Another option, avoiding the need for a virtual function and the
> > overhead this adds for all targets, is to override add_global(),
> > add_global_plt() etc. in Output_data_got_powerpc. This keeps the
> > overhead to powerpc.cc. Is this preferable?
> >
> > I also moved add_constant_pair into output.h for symmetry (and just in
> > case someone decided to optimise addition of constants).
>
> This looks good to me. Thanks!
Now committed to mainline and 2.24 with this changelog.
* output.h (Output_data_got::add_constant): Tidy.
(Output_data_got::add_constant_pair): New function.
* powerpc.cc (Output_data_got_powerpc): Override all Output_data_got
methods used so as to first call reserve_ent().
--
Alan Modra
Australia Development Lab, IBM