]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/elf/Inputs/shared.c
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / elf / Inputs / shared.c
1 #include <stdio.h>
2
3 extern int i;
4 int i = 42;
5
6 // Undefined weak function in a dynamic library.
7 __attribute__((weak)) void weakfoo();
8
9 // Regular function in a dynamic library.
10 void foo() {
11   // Try to call weakfoo so that the reference to weekfoo will be included in
12   // the resulting .so file.
13   if (weakfoo)
14     weakfoo();
15   puts("Fooo!!");
16 }