[lsb-discuss] Best-effort dynamic linking -- take 1
Jeff Licquia
jeff at licquia.org
Mon Jul 21 14:11:38 PDT 2008
Alexey Khoroshilov wrote:
> Yes, the thing that was not clear here is why we should exit (i.e.
> proceed with the nativelinker) if the LSB linker is a symlink.
Thinking about this, it occurs to me that we should not just verify that
the LSB linker is a symlink, but that it points to the native linker.
If we add that test, does it make more sense to you?
> After reading the last argument "while (*pos && argc < 128)"
> dereferences the pos element, which is the next after the last written
> by read(). And it is zero only if cmdbuf was initialized by zeros.
I could have sworn that the page describing cmdline mentioned that the
last argument was followed by a "double zero", which would have made
this OK. But I can't find that write-up now, and the test program I
whipped up just now showed conclusively that no "double-zero" is present.
> As far as I know (not sure) the heap manager initialization code is
> executed during // the first invocation of malloc-family functions. At
> least, malloc can be called by any C++ constructor, which can be
> executed at the similar stage.
And with older gcc, the order of initializers couldn't be guaranteed.
Maybe gcc played some special magic, but I doubt it. I'll test using
malloc and see how well it works.
More information about the lsb-discuss
mailing list