complex relocations and "ld -r"

Alan Modra amodra@bigpond.net.au
Thu Mar 26 00:09:00 GMT 2009


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



More information about the Binutils mailing list