This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: arm-wince-pe support resurrection
- From: Nick Clifton <nickc at redhat dot com>
- To: <Dmitry dot Semyonov at oktet dot ru>
- Cc: <binutils at sources dot redhat dot com>
- Date: Thu, 04 Dec 2003 18:15:46 +0000
- Subject: Re: arm-wince-pe support resurrection
- References: <Pine.LNX.4.33.0311182221220.15453-103000@mail.oktet.ru>
Hi Dmitry,
With regard to this patch:
---------------------------------------------------------
diff -rNc3p binutils-031114/bfd/coff-arm.c /home/sdv/cross/binutils-031114/bfd/coff-arm.c
*** binutils-031114/bfd/coff-arm.c Fri Jul 25 14:50:03 2003
--- /home/sdv/cross/binutils-031114/bfd/coff-arm.c Fri Nov 14 22:11:43 2003
*************** coff_arm_reloc (abfd, reloc_entry, symbo
*** 252,262 ****
#undef ARM_THUMB12
#undef ARM_26D
#define ARM_32 1
#define ARM_RVA32 2
#define ARM_26 3
#define ARM_THUMB12 4
- #define ARM_26D 5
#define ARM_SECTION 14
#define ARM_SECREL 15
#endif
--- 252,262 ----
#undef ARM_THUMB12
#undef ARM_26D
+ #define ARM_26D 0
#define ARM_32 1
#define ARM_RVA32 2
#define ARM_26 3
#define ARM_THUMB12 4
#define ARM_SECTION 14
#define ARM_SECREL 15
#endif
*************** coff_arm_reloc (abfd, reloc_entry, symbo
*** 264,270 ****
static reloc_howto_type aoutarm_std_reloc_howto[] =
{
#ifdef ARM_WINCE
! EMPTY_HOWTO (-1),
HOWTO (ARM_32,
0,
2,
--- 264,282 ----
static reloc_howto_type aoutarm_std_reloc_howto[] =
{
#ifdef ARM_WINCE
! HOWTO (ARM_26D,
! 2,
! 2,
! 24,
! FALSE,
! 0,
! complain_overflow_dont,
! aoutarm_fix_pcrel_26_done,
! "ARM_26D",
! FALSE,
! 0x00ffffff,
! 0x0,
! FALSE),
HOWTO (ARM_32,
0,
2,
*************** static reloc_howto_type aoutarm_std_relo
*** 274,280 ****
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_32",
! TRUE,
0xffffffff,
0xffffffff,
PCRELOFFSET),
--- 286,292 ----
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_32",
! FALSE,
0xffffffff,
0xffffffff,
PCRELOFFSET),
*************** static reloc_howto_type aoutarm_std_relo
*** 287,293 ****
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_RVA32",
! TRUE,
0xffffffff,
0xffffffff,
PCRELOFFSET),
--- 299,305 ----
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_RVA32",
! FALSE,
0xffffffff,
0xffffffff,
PCRELOFFSET),
*************** static reloc_howto_type aoutarm_std_relo
*** 317,335 ****
0x000007ff,
0x000007ff,
PCRELOFFSET),
! HOWTO (ARM_26D,
! 2,
! 2,
! 24,
! FALSE,
! 0,
! complain_overflow_dont,
! aoutarm_fix_pcrel_26_done,
! "ARM_26D",
! TRUE,
! 0x00ffffff,
! 0x0,
! FALSE),
EMPTY_HOWTO (-1),
EMPTY_HOWTO (-1),
EMPTY_HOWTO (-1),
--- 329,335 ----
0x000007ff,
0x000007ff,
PCRELOFFSET),
! EMPTY_HOWTO (-1),
EMPTY_HOWTO (-1),
EMPTY_HOWTO (-1),
EMPTY_HOWTO (-1),
*************** static reloc_howto_type aoutarm_std_relo
*** 347,353 ****
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_16",
! TRUE,
0x0000ffff,
0x0000ffff,
PCRELOFFSET),
--- 347,353 ----
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_16",
! FALSE,
0x0000ffff,
0x0000ffff,
PCRELOFFSET),
*************** static reloc_howto_type aoutarm_std_relo
*** 360,366 ****
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_32",
! TRUE,
0xffffffff,
0xffffffff,
PCRELOFFSET),
--- 360,366 ----
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_32",
! FALSE,
0xffffffff,
0xffffffff,
PCRELOFFSET),
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>
* coff-arm.c (coff_arm_reloc):
Do not put relocation information into object code.
MS linker adds the value from "COFF relocations" to the data stored
in object code. This leads to invalid linking.
* coff-arm.c (coff_arm_reloc):
Re-map ARM_26D relocation from 5 to 0. This fixes "bad fixup" error
generated by MS linker.
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. 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.
Cheers
Nick