[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] another ld fix for m68k



 Hi,

this one fixes an obscure little bug, which must have been there for years
without ever being noticed, but which now suddenly started breaking glibc
builds.
This can go upstream (like the first ld patch; only the gas patch is just a
temporary hack till I hunt down the real bug).


diff -urN binutils-2.10.91.0.2.orig/bfd/elf32-m68k.c binutils-2.10.91.0.2/bfd/elf32-m68k.c
--- binutils-2.10.91.0.2.orig/bfd/elf32-m68k.c	Tue Jan 23 21:11:11 2001
+++ binutils-2.10.91.0.2/bfd/elf32-m68k.c	Fri Mar  2 12:10:24 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



Reply to: