old-cross-binutils/ld/testsuite/ld-elf/comm1.c
H.J. Lu 0a36a439ee 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.
2008-09-16 14:09:34 +00:00

17 lines
190 B
C

#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;
}