Randy
On Solaris I'd expect the LD_PRELOAD to interpose on malloc.
There are a number of binding techniques, like RTLD_GROUP and
direct bindings, that change the symbol search model from the
default (ie. starting at the executable and inspecting each
dependency in the order it was loaded). However, when these
techniques are used, we still want to preserve the
traditional/expected behavior for things like LD_PRELOAD.
We've gone through a number of steps to distinguish between
"explicit" interposition, and "implicit" interposition. The
former is achieved through LD_PRELOAD or tagging individual
objects as interposers. Here our belief was that the user
wanted their interposer to get control no matter what type of
binding was called for. The latter is a result of objects
"accidentally" defining symbols that exist in other dependencies,
and interposition occurring as a result of the default symbol
search. These, in our experience, are the name-space pollution
problems that crop up from time to times and cause application
failure.
Techniques like RTLD_GROUP and direct binding protect against
implicit interposition. However, explicit interposition should
always get control.
Now, if you're running an older version of Solaris, you might find
some holes in the above explanation ... there's been a few twists in
the road as we nailed the corner cases to implement our intent :-)
--
Rod
Strictly speaking, there's nothing specified here, assuming
that by "ELF systems" you mean as described in the generic
ABI or something common to all processor-specific ELF
implementations.
The only dlopen() flags that fall into that category are
RTLD_LAZY, RLTD_NOW, RTLD_GLOBAL, and RTLD_LOCAL. The
LD_PRELOAD feature isn't there, either.
Until these are part of the gABI, there's likely to be
mild variations in behavior of these extensions on different
OS platforms.
--
Dave Prosser d...@sco.com (908)790-2358 The SCO Group, Murray Hill, NJ
SCO is a leading provider of UNIX-based solutions and mobile services.