This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: complex relocations and "ld -r"
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: DJ Delorie <dj at redhat dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 26 Mar 2009 10:38:52 +1030
- Subject: Re: complex relocations and "ld -r"
- References: <200903252101.n2PL1WcV010685@greed.delorie.com>
On Wed, Mar 25, 2009 at 05:01:32PM -0400, DJ Delorie wrote:
> Index: elflink.c
> ===================================================================
> RCS file: /cvs/src/src/bfd/elflink.c,v
> retrieving revision 1.331
> diff -p -U3 -r1.331 elflink.c
> --- elflink.c 13 Mar 2009 11:34:42 -0000 1.331
> +++ elflink.c 25 Mar 2009 20:59:44 -0000
> @@ -9329,7 +9329,8 @@ elf_link_input_bfd (struct elf_final_lin
> sym, *ps);
> }
>
> - if (s_type == STT_RELC || s_type == STT_SRELC)
> + if ((s_type == STT_RELC || s_type == STT_SRELC)
> + && !finfo->info->relocatable)
> {
> bfd_vma val;
> bfd_vma dot = (rel->r_offset
Looks good to me.
--
Alan Modra
Australia Development Lab, IBM