This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: arm-wince-pe support resurrection
- From: Dmitry Semyonov <Dmitry dot Semyonov at oktet dot ru>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: <binutils at sources dot redhat dot com>
- Date: Thu, 4 Dec 2003 22:33:25 +0300 (MSK)
- Subject: Re: arm-wince-pe support resurrection
- Reply-to: <Dmitry dot Semyonov at oktet dot ru>
Hello Nick.
On Thu, 4 Dec 2003, Nick Clifton wrote:
[...]
> diff -rNc3p binutils-031114/ld/pe-dll.c /home/sdv/cross/binutils-031114/ld/pe-dll.c
> *** binutils-031114/ld/pe-dll.c Fri Oct 31 08:32:44 2003
> --- /home/sdv/cross/binutils-031114/ld/pe-dll.c Fri Nov 14 22:11:43 2003
> *************** generate_reloc (bfd *abfd, struct bfd_li
> *** 1155,1161 ****
> total_relocs++;
> break;
> case BITS_AND_SHIFT (24, 2):
> ! if (relocs[i]->howto->type == 5)
> /* This is an ARM_26D reloc, which is an ARM_26 reloc
> that has already been fully processed during a
> previous link stage, so ignore it here. */
> --- 1155,1164 ----
> total_relocs++;
> break;
> case BITS_AND_SHIFT (24, 2):
> ! /* FIXME: 0 is ARM_26D, it is defined in bfd/coff-arm.c
> ! Those ARM_xxx definitions should go in proper
> ! header someday. */
> ! if (relocs[i]->howto->type == 0)
> /* This is an ARM_26D reloc, which is an ARM_26 reloc
> that has already been fully processed during a
> previous link stage, so ignore it here. */
>
[...]
> 2003-11-18 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
>
> * pe-dll.c (generate_reloc):
> Re-map ARM_26D relocation from 5 to 0. This fixes "bad fixup" error
> generated by MS linker.
>
> ----------------------------------------------------------------------
> I think that the changes to coff-arm.c should be made conditional upon
> ARM_WINCE beign defined.
The modified parts of coff-arm.c are already protected by ARM_WINCE
macro. The modified part of pe-dll.c obviously requires cleanup as
stated in the comments.
> In fact I am not sure that it is a good idea
> to change reloc numbers at all, but assuming that it needs to be done,
> I think that we need to ensure that we maintain backwards comptability
> with older toolchains which still produce ARM_26D relocs with a value
> of 5.
It is explicitly stated in MS PE COFF specification (section 5.2: ARM
Processors) that relocation 0 is ignored. 5th one is not
mentioned, so in my opinion it should be treated as reserved, and should
not be used.
I suspect patched binutils will not be backward compatible with object
files produced by the older toolchains. (At least the condition from the
above patch should test for both 5 and 0 values for compatibility.) But
why not to recompile the files if it is really necessary to use new
binutils?
In fact I have doubts there are active users of arm-wince-pe target
currently at all. (I have not seen the ones for several months in such
mailing lists like gcc*, binutils*, crossgcc, wince-devel). So, I don't
think the change will hurt someone.
...Bye..Dmitry.