This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFC][PATCH] Handle arbitrary .plt/.got displacements in ld on ARM
- From: Yury Gribov <y dot gribov at samsung dot com>
- To: Hans-Peter Nilsson <hp at bitrange dot com>, nick clifton <nickc at redhat dot com>
- Cc: Will Newton <will dot newton at linaro dot org>, "binutils at sourceware dot org" <binutils at sourceware dot org>, Viacheslav Garbuzov <v dot garbuzov at samsung dot com>, Yuri Gribov <tetra2005 at gmail dot com>
- Date: Fri, 28 Feb 2014 10:15:35 +0400
- Subject: Re: [RFC][PATCH] Handle arbitrary .plt/.got displacements in ld on ARM
- Authentication-results: sourceware.org; auth=none
- References: <52F4B2B3 dot 8060804 at samsung dot com> <CANu=Dmh_amrVpf_hQMt2CsnLdTbxv78muPLBi3U_WGS-XE7kSQ at mail dot gmail dot com> <52F8BD92 dot 5080609 at samsung dot com> <5307609F dot 8070001 at redhat dot com> <530B6043 dot 4070605 at samsung dot com> <530C5B23 dot 2070306 at redhat dot com> <530F355F dot 3010405 at samsung dot com> <530F4DD6 dot 8070708 at redhat dot com> <alpine dot BSF dot 2 dot 02 dot 1402280049470 dot 22875 at arjuna dot pair dot com>
> The new test fails for arm-eabi:
Right, I only tested linux-gnueabi. Could you check whether attached
patch works for you? Gnueabi and eabi tests passed fine here.
-Y
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index ec569ca..b6bde2b 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -188,7 +188,7 @@ set armelftests_common {
"" {exec-got-1b.s}
{{readelf --relocs exec-got-1.d}}
"exec-got-1"}
- {"Long PLT entries in executables" "--long-plt -shared --section-start=.plt=0x200 --section-start=.got=0xf0000300" ""
+ {"Long PLT entries in executables" "--long-plt -shared --section-start=.plt=0x1000 --section-start=.got=0xf0001100" ""
"" {long-plt-format.s}
{{objdump "-d -j .plt" long-plt-format.d}}
"long-plt-format"}
diff --git a/ld/testsuite/ld-arm/long-plt-format.d b/ld/testsuite/ld-arm/long-plt-format.d
index c08cb71..c64b42f 100644
--- a/ld/testsuite/ld-arm/long-plt-format.d
+++ b/ld/testsuite/ld-arm/long-plt-format.d
@@ -3,13 +3,13 @@
Disassembly of section .plt:
-00000200 <.plt>:
- 200: .*
- 204: .*
- 208: .*
- 20c: .*
- 210: .* .word .*
- 214: .* add ip, pc, #-268435456 ; 0xf0000000
- 218: .* add ip, ip, #0, 12
- 21c: .* add ip, ip, #0, 20
- 220: .* ldr pc, [ip, #[0-9]*]! ; 0x.*
+.* <.plt>:
+ .*: .*
+ .*: .*
+ .*: .*
+ .*: .*
+ .*: .* .word .*
+ .*: .* add ip, pc, #-268435456 ; 0xf0000000
+ .*: .* add ip, ip, #0, 12
+ .*: .* add ip, ip, #0, 20
+ .*: .* ldr pc, [ip, #[0-9]*]! ; 0x.*