This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: FYI: patches for powerpc-aix...
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org, rsandifo at linux dot vnet dot ibm dot com
- Date: Fri, 17 May 2013 14:53:07 +0930
- Subject: Re: FYI: patches for powerpc-aix...
- References: <20130218230528 dot GH22159 at adacore dot com> <20130219024126 dot GI1266 at bubble dot grove dot modra dot org> <4C5A0934-EF54-4A9F-A4BF-EF56E098B3CC at adacore dot com> <20130515235945 dot GE5221 at bubble dot grove dot modra dot org> <51691E90-E8F7-4EBE-8CF7-BF50EA2DDCD8 at adacore dot com> <87zjvv3x50 dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com>
On Thu, May 16, 2013 at 01:52:11PM +0100, Richard Sandiford wrote:
> * config/tc-ppc.c (ppc_reloc_info): New structure.
> (ppc_get_reloc_info): New function.
> (md_assemble): Use it instead of bfd_reloc_type_lookup.
> (md_apply_fix): Apply PC-relative conversion before code/data switch,
> using ppc_get_reloc_info to get the PC-relative form. Use the
> field widths and values created there.
I like the change you've made here to put the value twiddling in
md_apply_fix for both insn and data relocs in one place (field_value).
I'm not so sure about trying to merge the bfd_reloc_type_lookup from
md_assemble. We don't currently need the "howto" in md_apply_fix, so
that seems like doing unnecessary work.
--
Alan Modra
Australia Development Lab, IBM