This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Change to coff-arm.c breaks binutils
- To: Sean McNeil <sean at mcneil dot com>
- Subject: Re: Change to coff-arm.c breaks binutils
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- Date: 23 Apr 2001 10:13:34 +0100
- Cc: binutils at sources dot redhat dot com, aoliva at redhat dot com
- References: <987703408.1802.0.camel@desk.mcneil.com>
Hi Sean,
> The following entry in the ChangeLog for the BFD breaks relocs for my
> final link:
>
> 2000-07-04 Alexandre Oliva <aoliva@redhat.com>
>
> * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
> value of PC-relative offsets.
>
>
> The target is arm-wrs-vxworks and the code in question is...
>
> #if 0 /* We must not ignore the symbol value. If the symbol is
> within the same section, the relocation should have already
> been fixed, but if it is not, we'll be handed a reloc into
> the beginning of the symbol's section, so we must not cancel
> out the symbol's value, otherwise we'll be adding it in
> twice. */
> if (sym != NULL && sym->n_scnum != 0)
> addend += sym->n_value;
> #endif
>
> If I change this to an #if 1, then all is well. Can someone review and
> fix? With this code fragment removed, many of my relocs are at a fixed
> address as opposed to the proper location.
>
> for instance,
>
> 1608: ebfffe7c bl 1000 <STACK_REDZONE_NATIVE>
>
> instead of the proper
>
> 1608: eb06dbd1 bl 1b8554 <___divsi3>
Interesting - there does not appear to be any entry in the mail
archive explaining what problem Alexandre's patch was trying to fix.
Alexandre has suggested that maybe this is something that needs to
conditionally enabled, depending upon the target. Looking at
config.bfd there does not appear to be support for an arm-wrs-vxworks
target, so maybe one ought to be added ? [What binutils target are
you currently using, just arm-coff ?]
Cheers
Nick