This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch/RFA]: Patch to fix R_ARM_THM_JUMP24 relocation truncated bug
- From: Matthew Gretton-Dann <matthew dot gretton-dann at arm dot com>
- To: Christophe LYON <christophe dot lyon at st dot com>
- Cc: binutils at sourceware dot org, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>
- Date: Tue, 02 Feb 2010 14:22:45 +0000
- Subject: Re: [Patch/RFA]: Patch to fix R_ARM_THM_JUMP24 relocation truncated bug
- References: <1263477671.28149.21.camel@cam-bc3-b12.cambridge.arm.com> <20100115003439.GE8112@bubble.grove.modra.org> <1263825396.18030.17.camel@cam03638.cambridge.arm.com> <20100119040211.GI8112@bubble.grove.modra.org> <1264420828.2057.13.camel@cam-bc5-b9.cambridge.arm.com> <4B67F3E4.7060602@st.com>
Hi,
On Tue, 2010-02-02 at 10:44 +0100, Christophe LYON wrote:
> > 2010-01-18 Matthew Gretton-Dann<matthew.gretton-dann@arm.com>
> >
> > * ld-arm/jump-reloc-veneers-long.d: New test.
> > * ld-arm/jump-reloc-veneers-short1.d: Likewise.
> > * ld-arm/jump-reloc-veneers-short2.d: Likewise.
> > * ld-arm/jump-reloc-veneers.s: Likewise.
> > * ld-arm/arm-elf.exp (armelftests): Run them.
> >
>
> On a trunk extracted yesterday, I observe that all these tests fail
> (target arm-none-eabi).
> There seem to be a discrepancy between the start address defined as
> -defsym _start=0x8000 in arm-elf.exp and expected to be
> 00008054 <[^>]*>:
> 8054: f000 bfd4 b.w 9000 <dest>
> in jump-reloc-venners-short1.d for instance.
>
> Am I missing something?
No - I didn't make the test cases cope with bare-metal targets properly.
Please find attached a patch which corrects the test cases to work with
arm-none-eabi as well as the other ARM targets. I have tested this on
arm-none-eabi, arm-none-elf, arm-linux, and arm-unknown-linux-gnueabi,
with no regressions.
Please can someone review and approve the patch, and then commit? A
suggested ChangeLog is
2010-02-02 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* ld-arm/jump-reloc-veneers-long.d: Correct testcase for
arm-none-eabi target.
* ld-arm/jump-reloc-veneers-short1.d: Likewise
* ld-arm/jump-reloc-veneers-short2.d: Likewise
Thanks,
Matt
--
Matthew Gretton-Dann
Principal Engineer - Tools, PD Software
ARM Limited
Index: ld/testsuite/ld-arm/jump-reloc-veneers-long.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-arm/jump-reloc-veneers-long.d,v
retrieving revision 1.1
diff -u -p -r1.1 jump-reloc-veneers-long.d
--- ld/testsuite/ld-arm/jump-reloc-veneers-long.d 1 Feb 2010 10:33:16 -0000 1.1
+++ ld/testsuite/ld-arm/jump-reloc-veneers-long.d 2 Feb 2010 13:44:33 -0000
@@ -9,13 +9,13 @@ Disassembly of section destsect:
Disassembly of section .text:
-00008058 <[^>]*>:
- 8058: b802f000 .word 0xb802f000
- 805c: 00000000 andeq r0, r0, r0
+000080.. <[^>]*>:
+ 80..: b802f000 .word 0xb802f000
+ 80..: 00000000 andeq r0, r0, r0
-00008060 <[^>]*>:
- 8060: 4778 bx pc
- 8062: 46c0 nop ; \(mov r8, r8\)
- 8064: e59fc000 ldr ip, \[pc, #0\] ; 806c <__dest_veneer\+0xc>
- 8068: e12fff1c bx ip
- 806c: 09000001 .word 0x09000001
+000080.. <[^>]*>:
+ 80..: 4778 bx pc
+ 80..: 46c0 nop ; \(mov r8, r8\)
+ 80..: e59fc000 ldr ip, \[pc, #0\] ; 80.. <__dest_veneer\+0xc>
+ 80..: e12fff1c bx ip
+ 80..: 09000001 .word 0x09000001
Index: ld/testsuite/ld-arm/jump-reloc-veneers-short1.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-arm/jump-reloc-veneers-short1.d,v
retrieving revision 1.1
diff -u -p -r1.1 jump-reloc-veneers-short1.d
--- ld/testsuite/ld-arm/jump-reloc-veneers-short1.d 1 Feb 2010 10:33:16 -0000 1.1
+++ ld/testsuite/ld-arm/jump-reloc-veneers-short1.d 2 Feb 2010 13:44:33 -0000
@@ -9,5 +9,5 @@ Disassembly of section destsect:
Disassembly of section .text:
-00008054 <[^>]*>:
- 8054: f000 bfd4 b.w 9000 <dest>
+000080.. <[^>]*>:
+ 80..: f000 bf.. b.w 9000 <dest>
Index: ld/testsuite/ld-arm/jump-reloc-veneers-short2.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-arm/jump-reloc-veneers-short2.d,v
retrieving revision 1.1
diff -u -p -r1.1 jump-reloc-veneers-short2.d
--- ld/testsuite/ld-arm/jump-reloc-veneers-short2.d 1 Feb 2010 10:33:16 -0000 1.1
+++ ld/testsuite/ld-arm/jump-reloc-veneers-short2.d 2 Feb 2010 13:44:33 -0000
@@ -9,5 +9,5 @@ Disassembly of section destsect:
Disassembly of section .text:
-00008054 <[^>]*>:
- 8054: f0f7 9fd4 b.w 900000 <dest>
+000080.. <[^>]*>:
+ 80..: f0f7 9f.. b.w 900000 <dest>