This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ld option for setting runtime libpath for AIX
- To: Kevin Heatwole <kdh at ocsystems dot com>
- Subject: Re: ld option for setting runtime libpath for AIX
- From: Tom Rix <trix at redhat dot com>
- Date: Wed, 24 Oct 2001 21:55:11 -0500
- CC: binutils at sources dot redhat dot com
- References: <EA7742BA-C8BE-11D5-BA01-0050E4A0C05B@ocsystems.com>
I believe you can do something like
export LIBPATH=$NEWLIBPATH.
And this string will appear as the first and default library path to be
used as the system loader. See Loader Section Import File ID's in the
xcoff spec.
Tom
Kevin Heatwole wrote:
> I'm looking for the equivalent AIX ld to option -blibpath:/lib:/usr/lib
> for GNU ld for AIX. Specifically, I want to override the default
> LIBPATH stored in executables to just look in the directories
> "/lib:/usr/lib".
>
> Does anyone know if there is such an equivalent option or linker command
> to set this value in executables bound with GNU ld for AIX?
>
> I know about adding directories with -L or SEARCH_DIR, but I want to
> replace the whole default LIBPATH. I also know that the AIX loader uses
> the environment variable LIBPATH to override the value stored in the
> binary.
>
> But, neither of these workarounds is quite what I want to do.
>
> Hope someone can point me to something that allows, at link-time, to set
> the runtime LIBPATH for AIX executables that is stored in the
> executables. Thanks in advance for any help here.
>
> I'm using a snapshot of binutils (binutils-011017.tar) built as a cross
> to rs6000-ibm-aix4.2.1.0 hosted on a LinuxPPC machine (since
> binutils-2.11 seemed to indicate that there are bad bugs in ld for AIX).
>
> Kevin Heatwole
> OC Systems, Inc.
--
Tom Rix
GCC Engineer
trix@redhat.com
256.704.9201