While playing with glibc I noticed one interesting technique. It is
based on gcc's extension that allows you to declare weak symbols. In
essence it works like this:
extern void weak_f (void) __attribute__ ((weak));
int main ()
{
if (weak_f)
{
weak_f ();
}
}
When you link such code ld won't complain if weak_f is unresolved.
Plus you can check at run-time if symbol has been resolved as shown
above.
googling :-)http://kolpackov.net/pip
googling :-)
http://kolpackov.net/pipermail/notes/2004-March/000006.html
Good day,
While playing with glibc I noticed one interesting technique. It is
based on gcc's extension that allows you to declare weak symbols. In
essence it works like this:
extern void weak_f (void) __attribute__ ((weak));
int main ()
{
if (weak_f)
{
weak_f ();
}
}
When you link such code ld won't complain if weak_f is unresolved.
Plus you can check at run-time if symbol has been resolved as shown
above.
rommance.net
댓글 달기