]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Backport from master:
authorTerry Guo <terry.guo@arm.com>
Thu, 22 Jan 2015 08:34:44 +0000 (16:34 +0800)
committerTerry Guo <terry.guo@arm.com>
Thu, 22 Jan 2015 08:34:44 +0000 (16:34 +0800)
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.

bfd/ChangeLog
bfd/elfnn-aarch64.c
ld/testsuite/ChangeLog
ld/testsuite/ld-aarch64/aarch64-elf.exp
ld/testsuite/ld-aarch64/relocs-257-symbolic-func.d [new file with mode: 0644]
ld/testsuite/ld-aarch64/relocs-257-symbolic-func.s [new file with mode: 0644]

index 8326438ef5ba7dcb0d483fc29d64af6300e32721..6d936e2ad9b176d0ee99e0959e45bf4c494f5bca 100644 (file)
@@ -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
index 0879db97be80ae76db1034477bc673fb3897f1ae..9939fcfe81b74ac2c36893f1d80c854cfe252507 100644 (file)
@@ -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
            {
index 5a07e147f5c61fa81fc5fd44fe666381fe90a91a..1b1d9352b8a00c4eb1cae6fd4eccd38ae164f78a 100644 (file)
@@ -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-11  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/17827
index a75e07039abb9a891ba01d27b8c792b41d1a57c1..c0bd39ae36a38268602597a3d69e7c84cef26814 100644 (file)
@@ -175,6 +175,7 @@ run_dump_test "ifunc-21"
 run_dump_test "ifunc-22"
 
 run_dump_test "relasz"
+run_dump_test "relocs-257-symbolic-func"
 
 set aarch64elflinktests {
   {"ld-aarch64/so with global symbol" "-shared" "" "" {copy-reloc-so.s}
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 (file)
index 0000000..810fd43
--- /dev/null
@@ -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 (file)
index 0000000..35d5ba8
--- /dev/null
@@ -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