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


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;
+	    }
+	  else
+	    {
 	    struct elf_segment_map *m;
 	    Elf_Internal_Phdr *p;
 
@@ -3855,12 +3862,6 @@ elfNN_ia64_relocate_section (output_bfd,
 
 	    if (m == NULL)
 	      {
-		/* If the input section was discarded from the output, then
-		   do nothing.  */
-
-		if (bfd_is_abs_section (sym_sec->output_section))
-		  r = bfd_reloc_ok;
-		else
 		  r = bfd_reloc_notsupported;
 	      }
 	    else


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