1 /*
2 * Test file for creating multiple alias for a symbol
3 *
4 * NOTE: linking with _old_ crti.o exposes _init and _fini as
5 * global symbols, the newer versions don't.
6 *
7 * 0000000000000000 g F .init 0000000000000000 .hidden _init
8 * 0000000000000000 g F .fini 0000000000000000 .hidden _fini
9 *
10 * This test is looking for those symbols which are not experted.
11 * So it's linked with dummy crti.o to avoid false positives.
12 *
13 * gcc -std=c89 -shared -gctf -g -mtune=generic -march=x86-64 -fPIC \
14 * -nostartfiles -Wl,-soname=test3.so.1 -o test3.so test3.c crti.o
15 *
16 */
17
18 void __foo(void);
19 void foo(void) __attribute__((weak, alias("__foo")));
20 void foo__(void) __attribute__((weak, alias("__foo")));
21 void __foo__(void) __attribute__((alias("__foo")));
22
__foo(void)23 void __foo(void)
24 {
25
26 }
27