From 8170f7693bc0a9442c0aa280197925db92d48ca6 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 7 Apr 2017 07:40:14 -0700 Subject: ELF: Check ELF_COMMON_DEF_P for common symbols Since common symbols that are turned into definitions don't have the DEF_REGULAR flag set, we need to check ELF_COMMON_DEF_P for common symbols. bfd/ PR ld/19579 PR ld/21306 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check ELF_COMMON_DEF_P for common symbols. * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. * elflink.c (_bfd_elf_merge_symbol): Revert commits 202ac193bbbecc96a4978d1ac3d17148253f9b01 and 07492f668d2173da7a2bda3707ff0985e0f460b6. ld/ PR ld/19579 PR ld/21306 * testsuite/ld-elf/pr19579a.c (main): Updated. --- ld/ChangeLog | 6 ++++++ ld/testsuite/ld-elf/pr19579a.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'ld') diff --git a/ld/ChangeLog b/ld/ChangeLog index c632fd8..044b947 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2017-04-07 H.J. Lu + + PR ld/19579 + PR ld/21306 + * testsuite/ld-elf/pr19579a.c (main): Updated. + 2017-04-07 Nick Clifton PR 21090 diff --git a/ld/testsuite/ld-elf/pr19579a.c b/ld/testsuite/ld-elf/pr19579a.c index e4a6eb1..69d0f35 100644 --- a/ld/testsuite/ld-elf/pr19579a.c +++ b/ld/testsuite/ld-elf/pr19579a.c @@ -9,7 +9,7 @@ extern int *bar_p (void); int main () { - if (foo[0] == 0 && foo == foo_p () && bar[0] == 0 && bar == bar_p ()) + if (foo[0] == 0 && foo == foo_p () && bar[0] == -1 && bar == bar_p ()) printf ("PASS\n"); return 0; } -- cgit v1.1