[uClibc] static linking aid: dummy libdl

Bennett Todd bet at rahul.net
Mon Jan 24 18:09:33 UTC 2005


I'm finding that almost all apps are happy to build and run in a
purely statically linked environment, one with no support for
dynamic libs at all.

Occasionally, though, I find one that's got libdl invocations wired
into it.

Rather than patching, I've found that this libdl.c:

	void *dlopen(const char *filename, int flag){return (void *)0;}
	const char *dlerror(void){return (char *)0;}
	void *dlsym(void *handle, char *symbol){return (void *)0;}
	int dlclose(void *handle){return 0;}

suffices to make 'em link and stop whinging, and as long as the
dynamic loading functionality is operationally optional, the
result seems to work fine.

-Bennett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20050124/1e5e02b2/attachment-0002.pgp 


More information about the uClibc mailing list