mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
0cd9f5f03b
* ld-elfvers/vers1.c: Add missing prototypes and include <stdio.h> if necessary. * ld-elfvers/vers15.c: Likewise. * ld-elfvers/vers19.c: Likewise. * ld-elfvers/vers2.c: Likewise. * ld-elfvers/vers3.c: Likewise. * ld-elfvers/vers4.c: Likewise. * ld-elfvers/vers6.c: Likewise. * ld-elfvers/vers7.c: Likewise. * ld-elfvers/vers9.c: Likewise. * ld-shared/main.c: Likewise. * ld-srec/sr3.cc (Foo::Foo): Remove arg name.
32 lines
431 B
C
32 lines
431 B
C
/*
|
|
* Testcase to make sure that a versioned symbol definition in an
|
|
* application correctly defines the version node, if and only if
|
|
* the actual symbol is exported. This is built both with and without
|
|
* -export-dynamic.
|
|
*/
|
|
#include <stdio.h>
|
|
|
|
extern int foo ();
|
|
|
|
int
|
|
bar()
|
|
{
|
|
return 3;
|
|
}
|
|
|
|
int
|
|
new_foo()
|
|
{
|
|
return 1000+bar();
|
|
|
|
}
|
|
|
|
__asm__(".symver new_foo,foo@@VERS_2.0");
|
|
|
|
int
|
|
main()
|
|
{
|
|
printf("%d\n", foo());
|
|
return 0;
|
|
}
|