Rod Evans wrote:
> Wouldn't it be simpler to add the definition?
>
> I must be missing something.
Perhaps I missed the environment variable NSPR_USE_ZONE_ALLOCATOR.
If the symbol isn't found, NSPR goes on to inspect for the
environment variable.
So, you don't want to define the symbol (PR_FALSE), because you
want to allow the user to set NSPR_USE_ZONE_ALLOCATOR, right?
Perhaps you could add some hackery like this to firefox:
#include <dlfcn.h>
#include <string.h>
extern void *_dlsym(void *, const char *);
void *
dlsym(void *handle, const char *name)
{
/*
* Catch any symbol we wish to emulate as unavailable.
*/
if (strcmp(name, "nspr_use_zone_allocator") == 0) {
/*
* Generate a "symbol not found" dlerror() message.
*/
void *handle = dlopen(0, (RTLD_LAZY | RTLD_FIRST));
(void) _dlsym(handle, "nspr_use_zone_allocator");
return (NULL);
}
/*
* For anything else, let the real dlsym() take control.
*/
return (_dlsym(handle, name));
}
I stuck this in an interpose.so, then LD_PRELOADED it :-)
--
Rod.