summaryrefslogtreecommitdiffstats
path: root/ld
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@st.com>2009-04-15 13:49:54 +0000
committerChristophe Lyon <christophe.lyon@st.com>2009-04-15 13:49:54 +0000
commit82b5c97a793698d0b27480bbfbf7f56f9dfe741a (patch)
tree29d993a8292188815c758bdaef6f45b0b0b79e8d /ld
parentd8a1b51e44c811cb8d20570f497d80e278049ee2 (diff)
downloadppe42-binutils-82b5c97a793698d0b27480bbfbf7f56f9dfe741a.tar.gz
ppe42-binutils-82b5c97a793698d0b27480bbfbf7f56f9dfe741a.zip
2009-04-15 Christophe Lyon <christophe.lyon@st.com>
bfd/ * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM branch to an undef weak symbol into a jump to next instruction if a PLT entry will be created. testsuite/ * ld-arm/arm-elf.exp: Add 1 more test to check undef weak reference with PLT in ARM mode. * ld-arm/thumb2-bl-undefweak1.d, ld-arm/thumb2-bl-undefweak1.s: New files.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/ld-arm/arm-elf.exp1
-rw-r--r--ld/testsuite/ld-arm/thumb2-bl-undefweak1.d9
-rw-r--r--ld/testsuite/ld-arm/thumb2-bl-undefweak1.s9
4 files changed, 26 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index e92a871b19..7c79608d9c 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-15 Christophe Lyon <christophe.lyon@st.com>
+
+ * ld-arm/arm-elf.exp: Add 1 more test to check undef weak
+ reference with PLT in ARM mode.
+ * ld-arm/thumb2-bl-undefweak1.d, ld-arm/thumb2-bl-undefweak1.s:
+ New files.
+
2009-04-08 H.J. Lu <hongjiu.lu@intel.com>
* ld-i386/abs.d: Add --32 for assembler and -melf_i386 for
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 3625ddb550..94002a1aea 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -185,6 +185,7 @@ run_dump_test "group-relocs-ldr-bad"
run_dump_test "group-relocs-ldrs-bad"
run_dump_test "group-relocs-ldc-bad"
run_dump_test "thumb2-bl-undefweak"
+run_dump_test "thumb2-bl-undefweak1"
run_dump_test "emit-relocs1"
# Exclude non-ARM-EABI targets.
diff --git a/ld/testsuite/ld-arm/thumb2-bl-undefweak1.d b/ld/testsuite/ld-arm/thumb2-bl-undefweak1.d
new file mode 100644
index 0000000000..929d180be7
--- /dev/null
+++ b/ld/testsuite/ld-arm/thumb2-bl-undefweak1.d
@@ -0,0 +1,9 @@
+#source: thumb2-bl-undefweak1.s
+#as:
+#ld: -shared
+#objdump: -dr
+#...
+Disassembly of section .text:
+
+.* <foo>:
+ .*: ........ bl ... <foo-0x.*>
diff --git a/ld/testsuite/ld-arm/thumb2-bl-undefweak1.s b/ld/testsuite/ld-arm/thumb2-bl-undefweak1.s
new file mode 100644
index 0000000000..a302811b42
--- /dev/null
+++ b/ld/testsuite/ld-arm/thumb2-bl-undefweak1.s
@@ -0,0 +1,9 @@
+@ Test that calls to undefined weak functions resolve to call through
+@ the PLT in shared libraries in ARM mode.
+
+ .arch armv6
+ .syntax unified
+ .text
+foo:
+ bl bar
+ .weak bar
OpenPOWER on IntegriCloud