Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jul 2000 09:06:13 -0700 (PDT)
From:      John Polstra <jdp@polstra.com>
To:        hackers@freebsd.org
Cc:        jazepeda@pacbell.net
Subject:   Re: ELF rtld and environment variables...
Message-ID:  <200007241606.JAA03633@vashon.polstra.com>
In-Reply-To: <Pine.BSF.4.21.0007240318430.33342-100000@zippy.pacbell.net>
References:  <Pine.BSF.4.21.0007240318430.33342-100000@zippy.pacbell.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <Pine.BSF.4.21.0007240318430.33342-100000@zippy.pacbell.net>,
Alex Zepeda  <jazepeda@pacbell.net> wrote:

[LD_PRELOAD and LD_LIBRARY_PATH]
> This works great if you're using your average ELF binary.  However, if
> you're like me and still somewhat attached to the idea of using Navigator
> which is an a.out binary (perhaps the only one I still have left), you're
> SOL as the variables tweak the a.out RTLD too.  This perhaps doesn't sound
> too bad, until one realizes that the said shlib objets are ELF, and the
> a.out rtld doesn't grok any of them, meaning that one has to fire up an
> xterm, unset the said variables to start netscape.
> 
> My question is this: is there any way to make the a.out rtld ignore these
> variables?

No, there isn't.  I don't plan to do anything more with the a.out
dynamic linker, as I consider it obsolete at this point.  I'd
suggest making a script "run_aout" that looks something like this
(untested):

    #! /bin/sh
    unset LD_PRELOAD
    unset LD_LIBRARY_PATH
    exec $0 "$@"

BTW, it's generally not a good idea to set either of those environment
variables globally.  You should only set them in scripts which run
specific executables that need them to be set.  Besides the a.out
problem, they affect programs run under Linux emulation too.

John
-- 
  John Polstra                                               jdp@polstra.com
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Disappointment is a good sign of basic intelligence."  -- Chögyam Trungpa



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007241606.JAA03633>