This is the mail archive of the binutils@sources.redhat.com 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: ld is broken on ia64


On Mon, Nov 19, 2001 at 03:06:00PM +1030, Alan Modra wrote:
> It seems to me that the real problem is that the elflink.h change means
> elfxx-ia64.c needs a different method of detecting relocs against removed
> link-once section syms.  Like so:
> 
> 	* elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
> 	than sym_sec->output_section to detect relocs against discarded
> 	sections.
> 
> -- 
> Alan Modra
> 
> -w diff, fix formatting after applying!
> Index: bfd/elfxx-ia64.c
> ===================================================================
> RCS file: /cvs/src/src/bfd/elfxx-ia64.c,v
> retrieving revision 1.31
> diff -u -p -w -r1.31 elfxx-ia64.c
> --- elfxx-ia64.c	2001/11/10 00:23:34	1.31
> +++ elfxx-ia64.c	2001/11/19 04:18:34
> @@ -3835,7 +3835,14 @@ elfNN_ia64_relocate_section (output_bfd,
>  	case R_IA64_SEGREL32LSB:
>  	case R_IA64_SEGREL64MSB:
>  	case R_IA64_SEGREL64LSB:
> +	  if (r_symndx == 0)
>  	  {
> +	      /* If the input section was discarded from the output, then
> +		 do nothing.  */
> +	      r = bfd_reloc_ok;
> +	    }

Are you sure under no other conditions r_symndx will be 0? Won't that
make relocations against undefined symbols ok?


H.J.


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