This is the mail archive of the
mailing list for the binutils project.
Re: m68k reloc types
- From: Andreas Schwab <schwab at suse dot de>
- To: Roman Zippel <zippel at linux-m68k dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 16 Aug 2004 15:47:10 +0200
- Subject: Re: m68k reloc types
- References: <Pine.LNX.email@example.com>
Roman Zippel <firstname.lastname@example.org> writes:
> One issue that really confused me at first is that some m68k pic reloc
> types do something completely different than their i386 counterparts.
The m68k has different capabilites than the i386.
> Here an example:
> 0000003e <f>:
> 3e: 4e56 0000 linkw %fp,#0
> 42: 2f0d movel %a5,%sp@-
> 44: 4bfb 0170 0000 lea %pc@(46 <f+0x8>),%a5
> 4a: 0000
> 48: R_68K_GOT32 _GLOBAL_OFFSET_TABLE_+0x2
> 4c: 2075 0170 0000 moveal %a5@(00000000),%a0
> 52: 0000
> 50: R_68K_GOT32O x
> 54: 2010 movel %a0@,%d0
> 56: 2a5f moveal %sp@+,%a5
> 58: 4e5e unlk %fp
> 5a: 4e75 rts
> i386 uses R_386_GOTPC and R_386_GOT32 here
Which are basically the same as R_68K_GOT32 and R_68K_GOT32O, resp.
> AFAICS it should be possible to fix this, existing binaries may not break
> of course, but I think it should be possible to just rename this
> within binutils.
Why do you need to rename them? The names are defined by the ELF specs.
> Does anyone sees a problem with fixing this or does someone even know the
> reason for these anomalies?
I see nothing broken here.
Andreas Schwab, SuSE Labs, email@example.com
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."