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: [PATCH] Re: IA64 linker is broken


On Tue, Mar 18, 2003 at 04:25:51PM +0100, Jakub Jelinek wrote:
> 	* elfxx-ia64.c (elfNN_ia64_relax_section): Only call
> 	get_dyn_sym_info for R_IA64_LTOFF22X relocations against local
> 	symbols.  Reported by H.J.Lu <hjl at gnu dot org>.

No.  First, this is also used for LDXMOV, second, I think the
better fix is in get_dyn_sym_info.


r~


	* elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
	local symbols that have no dyninfo.

Index: elfxx-ia64.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-ia64.c,v
retrieving revision 1.71
diff -u -p -u -r1.71 elfxx-ia64.c
--- elfxx-ia64.c	3 Mar 2003 23:19:19 -0000	1.71
+++ elfxx-ia64.c	18 Mar 2003 18:55:01 -0000
@@ -1965,7 +1965,11 @@ get_dyn_sym_info (ia64_info, h, abfd, re
       struct elfNN_ia64_local_hash_entry *loc_h;
 
       loc_h = get_local_sym_hash (ia64_info, abfd, rel, create);
-      BFD_ASSERT (loc_h);
+      if (!loc_h)
+	{
+	  BFD_ASSERT (!create);
+	  return NULL;
+	}
 
       pp = &loc_h->info;
     }


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