mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
8170f7693b
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 commits202ac193bb
and07492f668d
. ld/ PR ld/19579 PR ld/21306 * testsuite/ld-elf/pr19579a.c (main): Updated.
16 lines
222 B
C
16 lines
222 B
C
#include <stdio.h>
|
|
|
|
int foo[1];
|
|
int bar[2];
|
|
|
|
extern int *foo_p (void);
|
|
extern int *bar_p (void);
|
|
|
|
int
|
|
main ()
|
|
{
|
|
if (foo[0] == 0 && foo == foo_p () && bar[0] == -1 && bar == bar_p ())
|
|
printf ("PASS\n");
|
|
return 0;
|
|
}
|