This is the mail archive of the
mailing list for the binutils project.
RE: SH relocation differences in older versions of the binutils
- From: Jeff Baker <jbaker at qnx dot com>
- To: 'DJ Delorie' <dj at redhat dot com>, Jeff Baker <jbaker at qnx dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 6 Jan 2004 16:03:09 -0500
- Subject: RE: SH relocation differences in older versions of the binutils
These are the collisions:
33 (R_SH_SWITCH8) moved to 24 (UNUSED) replaced by R_SH_DIR16
34 (R_SH_GNU_VTINHERIT) moved to 22 (UNUSED) replaced by R_SH_DIR8
35 (R_SH_GNU_VTENTRY) moved to 23 (UNUSED) replaced by R_SH_DIR8UL
36 (R_SH_LOOP_START) moved to 10 (UNUSED) replaced by R_SH_DIR8UW
37 (R_SH_LOOP_END) moved to 11 (UNUSED) replaced by R_SH_DIR8U
Obviously if I see 10, 11, 22, 23 or 24 I can assume the .o was generated
after the reloc changes. The issue is what to do if I see 33->37. Is there
anything I can do to detect if I need to change the number to maintain
compatibility (or generate some sort of sensible error message)?
Ultimately what we would prefer is a .comment entry (or something similar)
that specifically states what versions of the tools were used. What method
for storing this information is likely to be accepted as a patch?
> -----Original Message-----
> From: DJ Delorie [mailto:email@example.com]
> Sent: Tuesday, January 06, 2004 3:53 PM
> To: firstname.lastname@example.org
> Cc: email@example.com
> Subject: Re: SH relocation differences in older versions of the binutils
> > For example: If I send you some random .o that contains a reloc number
> > can you tell me if it's supposed to be an R_SH_LOOP_START or an
> > just by examining the binary?
> Well, R_SH_LOOP_START should point to the loop opcode (or near it), if
> you want to disassemble it. I don't expect that to be reliable,