> Hmmm, the idea of defining a symbol within an object, and then tagging > it in some way as "does-not-exist" such that a symbol lookup would > be aborted when this symbol is found, is an idea to chew on :-)
Ho boy, you asked for it..... I have a more flexible idea: (Don't skimp on the rope, man!) An RTLD extension mechanism where a symbol ("foo") can be associated with a "resolve helper" function symbol ("foo_resolver"). When RTLD looks in libfoo and triesto resolve "foo", it sees that it needs to call the foo_resolver function. This call-back function uses an API defined by RTLD to decide how RTLD should proceed. 1. terminate lookup, symbol not found 2. use this (XX) symbol as the resolution 3. look next in library "baz" 4. call system("/bin/ls /var/tmp") 5. proceed with lookup --chris