On Wed, Nov 22, 2006 at 10:38:01AM -0800, John Reiser wrote:
Jakub Jelinek wrote:
> If you want bit-reproduceable results, you can equally well
> just stick the shared libraries you need into the same directory as the
> program and run it as
> ./ld-linux*.so.2 --library-path . ./the_numerical_program arguments
> it will cost you just a few extra lines in the Makefile, IMHO not a big
> deal.
Yes, the primary outputs will be the same. But the total user interface
will be different. The process name (revealed by ps, top, etc.) will be
ld-linux*.so.2 instead of the_numerical_program. So existing scripts
that monitor (or get out of the way of) the_numerical_program won't find it;
killall won't work; oprofile will group all such programs together
as ld-linux instead of as separate numerical programs, etc. This
"other stuff" is important to users and administrators.
So you link with -Wl,--dynamic-linker,./ld-linux.so.2,-rpath,'${ORIGIN}/lib'
or something similar, that's an implementation detail.
Jakub