aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerry Guo <terry.guo@arm.com>2015-01-22 16:12:14 +0800
committerTerry Guo <terry.guo@arm.com>2015-01-22 16:19:03 +0800
commitcd3813a8c9e59ccba0c42f5e3664465428e0e89c (patch)
tree83f8bc3d914145c1ea9b835850bf26433fedcc70
parente38cb2d722a3072411059b6d8f978020c42e20a7 (diff)
downloadgdb-binutils-2_24-branch.zip
gdb-binutils-2_24-branch.tar.gz
gdb-binutils-2_24-branch.tar.bz2
Backport from mainlinebinutils-2_24-branch
bfd/ChangeLog 2015-01-22 Thomas Preud'homme <thomas.preudhomme@arm.com> Backport from mainline 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com> * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND to check if a symbol should be bound symbolically. ld/testsuite/ChangeLog 2015-01-22 Thomas Preud'homme <thomas.preudhomme@arm.com> Backport from mainline 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com> * ld-aarch64/aarch64-elf.exp: Added relocs-257-symbolic-func test. * ld-aarch64/relocs-257-symbolic-func.d: New file. * ld-aarch64/relocs-257-symbolic-func.s: Likewise.
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/elfnn-aarch64.c2
-rw-r--r--ld/testsuite/ChangeLog9
-rw-r--r--ld/testsuite/ld-aarch64/aarch64-elf.exp2
-rw-r--r--ld/testsuite/ld-aarch64/relocs-257-symbolic-func.d5
-rw-r--r--ld/testsuite/ld-aarch64/relocs-257-symbolic-func.s11
6 files changed, 36 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index a969c98..3509da7 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2015-01-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ Backport from mainline
+ 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
+ to check if a symbol should be bound symbolically.
+
2015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
Backport from master
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index d47b47e..7d9a22c 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -4329,7 +4329,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
memset (&outrel, 0, sizeof outrel);
else if (h != NULL
&& h->dynindx != -1
- && (!info->shared || !info->symbolic || !h->def_regular))
+ && (!info->shared || !SYMBOLIC_BIND (info, h) || !h->def_regular))
outrel.r_info = ELFNN_R_INFO (h->dynindx, r_type);
else
{
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 8ec7d5b..6513e53 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2015-01-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ Backport from mainline
+ 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * ld-aarch64/aarch64-elf.exp: Added relocs-257-symbolic-func test.
+ * ld-aarch64/relocs-257-symbolic-func.d: New file.
+ * ld-aarch64/relocs-257-symbolic-func.s: Likewise.
+
2014-10-24 Tejas Belagod <tejas.belagod@arm.com>
* ld-aarch64/aarch64-elf.exp (aarch64elftests): Drive erratum
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index fcc9af4..19bcd13 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -165,3 +165,5 @@ run_dump_test "ifunc-19b"
run_dump_test "ifunc-20"
run_dump_test "ifunc-21"
run_dump_test "ifunc-22"
+
+run_dump_test "relocs-257-symbolic-func"
diff --git a/ld/testsuite/ld-aarch64/relocs-257-symbolic-func.d b/ld/testsuite/ld-aarch64/relocs-257-symbolic-func.d
new file mode 100644
index 0000000..810fd43
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/relocs-257-symbolic-func.d
@@ -0,0 +1,5 @@
+#source: relocs-257-symbolic-func.s
+#ld: -shared -Bsymbolic-functions
+#readelf: -r --wide
+#...
+.* +R_AARCH64_RELATIVE +.*
diff --git a/ld/testsuite/ld-aarch64/relocs-257-symbolic-func.s b/ld/testsuite/ld-aarch64/relocs-257-symbolic-func.s
new file mode 100644
index 0000000..35d5ba8
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/relocs-257-symbolic-func.s
@@ -0,0 +1,11 @@
+ .text
+ .global tempy
+ .type tempy, %function
+tempy:
+ .size tempy, .-tempy
+ .section .data.rel
+ .align 3
+ .type tempy_ptr, %object
+ .size tempy_ptr, 8
+tempy_ptr:
+ .xword tempy