diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2008-09-16 14:09:34 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2008-09-16 14:09:34 +0000 |
commit | 0a36a439ee413816df8ab88a769135076e6355f6 (patch) | |
tree | 9038090ce719b70f67aaacdbd267a4bc5aad52de /ld/testsuite/ld-elf/comm1.c | |
parent | e87d403811e6f31fde1848a31c9e1feec914b37e (diff) | |
download | gdb-0a36a439ee413816df8ab88a769135076e6355f6.zip gdb-0a36a439ee413816df8ab88a769135076e6355f6.tar.gz gdb-0a36a439ee413816df8ab88a769135076e6355f6.tar.bz2 |
bfd/
2008-09-16 H.J. Lu <hongjiu.lu@intel.com>
PR ld/6877
* elflink.c (_bfd_elf_merge_symbol): Allow a common symbol to
override the function in a shared library.
ld/testsuite/
2008-09-16 H.J. Lu <hongjiu.lu@intel.com>
PR ld/6877
* ld-elf/comm1.c: New.
* ld-elf/func1.c: Likewise.
* ld-elf/shared.exp: Add tests for libfunc1.so and comm1.
Diffstat (limited to 'ld/testsuite/ld-elf/comm1.c')
-rw-r--r-- | ld/testsuite/ld-elf/comm1.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/comm1.c b/ld/testsuite/ld-elf/comm1.c new file mode 100644 index 0000000..c553d86 --- /dev/null +++ b/ld/testsuite/ld-elf/comm1.c @@ -0,0 +1,17 @@ +#include <stdio.h> +#include <stdlib.h> + +int foo; +void bar (void); + +int +main () +{ + if (foo != 0) + abort (); + foo = 200; + bar (); + if (foo == 200) + printf ("PASS\n"); + return 0; +} |