File: test3.c

package info (click to toggle)
libabigail 2.9-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,021,756 kB
  • sloc: xml: 572,663; cpp: 110,945; sh: 11,868; ansic: 4,329; makefile: 3,486; python: 1,684; ada: 62
file content (26 lines) | stat: -rw-r--r-- 794 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * Test file for creating multiple alias for a symbol
 *
 * NOTE: linking with _old_ crti.o exposes _init and _fini as
 *       global symbols, the newer versions don't.
 *
 * 0000000000000000 g     F .init  0000000000000000 .hidden _init
 * 0000000000000000 g     F .fini  0000000000000000 .hidden _fini
 *
 * This test is looking for those symbols which are not experted.
 * So it's linked with dummy crti.o to avoid false positives.
 *
 * gcc -std=c89 -shared -gctf -g -mtune=generic -march=x86-64 -fPIC \
 *     -nostartfiles -Wl,-soname=test3.so.1 -o test3.so test3.c crti.o
 *
 */

void __foo(void);
void foo(void) __attribute__((weak, alias("__foo")));
void foo__(void) __attribute__((weak, alias("__foo")));
void __foo__(void) __attribute__((alias("__foo")));

void __foo(void)
{

}