void afunc()
{
printf ("\tin ARCHIVE library procedure 'afunc'\n");
}
main.c
main()
{
bfunc();
}
If these files are compiled and linked as:
$ cc
$ ld
$ cc main.o libA.so unsat.o libB.a
The
$ test1
in ARCHIVE library procedure `afunc'
At link time, there is an outstanding unsatisfied symbol for afunc() when libB is found. The exported symbol for afunc() is not remembered after libA.so is scanned. At run time, the afunc() symbol that is called is the one that came from the archive library, which resides in test1. The IPF and
$ test1
in SHARED library procedure `afunc'
The IPF and
Resolution of Unsatisfied Shared Library References
In the IPF and
The
For example, given these source files:
lib1.c
void a()
{
}
lib2.c
extern int unsat; void b()
{
unsat = 14;
}
Using Shared Libraries in Default Mode 127