ELF/m68k linker crash

Andreas Schwab schwab@suse.de
Mon Mar 19 10:15:00 GMT 2001


This fixes a crash in the linker on ELF/m68k targets for both HEAD and
release branch.

Andreas.

2001-03-19  Andreas Schwab  <schwab@suse.de>

	* elf32-m68k.c (elf_m68k_relocate_section): Don't need the
	relocation value when resolving a reference from a debugging
	section.

--- elf32-m68k.c.~1.21.~	Wed Jan 24 11:09:34 2001
+++ elf32-m68k.c	Mon Mar 19 18:37:10 2001
@@ -1462,7 +1462,14 @@
 		      && ((! info->symbolic && h->dynindx != -1)
 			  || (h->elf_link_hash_flags
 			      & ELF_LINK_HASH_DEF_REGULAR) == 0)
-		      && (input_section->flags & SEC_ALLOC) != 0
+		      && ((input_section->flags & SEC_ALLOC) != 0
+			  /* DWARF will emit R_68K_32 relocations in its
+			     sections against symbols defined externally
+			     in shared libraries.  We can't do anything
+			     with them here.  */
+			  || ((input_section->flags & SEC_DEBUGGING) != 0
+			      && (h->elf_link_hash_flags
+				  & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
 		      && (r_type == R_68K_8
 			  || r_type == R_68K_16
 			  || r_type == R_68K_32

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5



More information about the Binutils mailing list