Displaying 2 results from an estimated 2 matches for "call_non_existent_funct".
2004 Aug 06
2
Re: does installed lib support _int()s ?
> Note however that you'd still have to dlopen the library since can't
> just do: if (call_is_allowed)
> speex_encode_int(...);
>
> because then it won't link.
Yeah, I understand that.
I wonder if there's a way to "weak-link" against libraries on
Linux/GNU-ld-so? The idea is that a symbol lookup/relocation isn't
performed until the call is
2004 Aug 06
1
Re: does installed lib support _int()s ?
...It goes through all of the external symbols
not present in the executable, and tries to find them in the library search
paths. If it can't find ALL of them, the linker-loader fails to run the
program.
To give one stupid example:
----------- snip -------------
#include <stdio.h>
extern call_non_existent_function(int i, int j, int k);
int main (int argc, **char argv)
{
if (argc == -1) call_non_existent_function(1,2,3);
printf("Hello, World\n");
}
With weak-linking, the above program should link *and* run, on any system
whether or not call_non_existent_function() exists on your system....