binutils problem

Richard Zidlicky rz@linux-m68k.org
Mon Aug 26 03:39:00 GMT 2002


On Mon, Aug 26, 2002 at 08:31:03AM +0930, Alan Modra wrote:

> Zeroing the reloc section is already done for m68k.  If m68k glibc
> rejects R_NONE relocs, then this problem will persist until
> bfd/elf32-m68k.c is rewritten to delay allocation of reloc slots as
> is currently done for x86, hppa, ppc64, s390 and just recently, sh,
> all using more or less the same scheme, and ia64, alpha and perhaps
> others.  A quick binutils fix is IMO not possible, but the rewrite
> should be fairly mechanical given the existing examples.


I can confirm that this apparently cures the problem without
visible negative effects:

--- glibc-2.2.90/sysdeps/m68k/dl-machine.h.rz	Mon Aug 26 11:44:44 2002
+++ glibc-2.2.90/sysdeps/m68k/dl-machine.h	Mon Aug 26 11:45:31 2002
@@ -311,6 +311,8 @@
   Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
   if (ELF32_R_TYPE (reloc->r_info) == R_68K_JMP_SLOT)
     *reloc_addr += l_addr;
+  else if (ELF32_R_TYPE (reloc->r_info) == R_68K_NONE)
+    return;
   else
     _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1);
 }


Richard



More information about the Binutils mailing list