Tuesday December 19, 2006 | Surfing With a Linker Alien Rod Evans's Weblog |
|
'_init'/'_fini' not found - use the compiler drivers
A recently added error check within
ld: warning: symbol `_init' not found, but .init section exists - \
possible link-edit without using the compiler driver
ld: warning: symbol `_fini' not found, but .fini section exists - \
possible link-edit without using the compiler driver
The encapsulation, and execution of
Users typically create these sections using a
% cat foobar.c
static int foobar = 0;
#pragma init (foo)
void foo()
{
foobar = 1;
}
#pragma fini (bar)
void bar()
{
foobar = 0;
}
The functions themselves are placed in a
This is where the compiler drivers come in. As part of creating a dynamic
object, the compiler drivers provide input files that encapsulate the
_init { # provided by
It is the symbols
Some folks are using
This leaves the developer wondering why their
It's best not to use Technorati Tag: OpenSolaris Technorati Tag: Solaris (2006-12-19 14:43:49.0) Permalink Comments [2] |
|
||||