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: binutils problem


Richard Zidlicky <rz@linux-m68k.org> writes:

|> 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);
|>  }

This is just a workaround, it should be fixed in binutils eventually.
But m68k is not the only platform which has problems with NONE
relocations. :-(

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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