diff options
author | Jiong Wang <jiong.wang@arm.com> | 2016-11-10 09:25:17 +0000 |
---|---|---|
committer | Jiong Wang <jiong.wang@arm.com> | 2016-11-10 09:25:17 +0000 |
commit | ac33b731d214d79738ca04d27f7464d4482f6a01 (patch) | |
tree | 896ece5b0fd3bab286cc4443c7c9d5187dd020db /bfd/elfnn-aarch64.c | |
parent | 9b9720149dfee4a9a961c29d0382fc5bdf9c975b (diff) | |
download | gdb-ac33b731d214d79738ca04d27f7464d4482f6a01.zip gdb-ac33b731d214d79738ca04d27f7464d4482f6a01.tar.gz gdb-ac33b731d214d79738ca04d27f7464d4482f6a01.tar.bz2 |
[AArch64] Bind defined symbol locally in PIE
bfd/
PR target/20737
* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Bind defined
symbol locally in PIE.
ld/
* testsuite/ld-aarch64/pie-bind-locally-a.s: New test source.
* testsuite/ld-aarch64/pie-bind-locally-b.s: Likewise.
* testsuite/ld-aarch64/pie-bind-locally.d: New testcase.
* testsuite/ld-aarch64/aarch64-elf.exp: Run new testcase.
Diffstat (limited to 'bfd/elfnn-aarch64.c')
-rw-r--r-- | bfd/elfnn-aarch64.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 544a8ea..4ebdbe2 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -5193,7 +5193,8 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, else if (h != NULL && h->dynindx != -1 && (!bfd_link_pic (info) - || !SYMBOLIC_BIND (info, h) + || !(bfd_link_pie (info) + || SYMBOLIC_BIND (info, h)) || !h->def_regular)) outrel.r_info = ELFNN_R_INFO (h->dynindx, r_type); else |