This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: complex relocations and "ld -r"


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]