| www.delorie.com/gnu/docs/dld/dld_9.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Dynamically linked functions may still be invoked from modules (e.g.,
main) that do not contain references to such functions.
A typical use of dld_get_func would be:
{
void (*func) ();
int error_code;
...
/* First, link in the object file "my_object_file.o". Proceed
only if the link operation is successful, i.e. it returns 0.
"my_new_func" is a function defined in "my_object_file.o".
Set func to point at the entry point of this function and
then invoke it indirectly through func. */
if ((error_code = dld_link ("my_object_file.o")) == 0) {
if ((func = (void (*) ()) get_func ("my_new_func")) != 0)
(*func) ();
...
} else {
...
}
}
|
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |