ld option for setting runtime libpath for AIX

Kevin Heatwole kdh@ocsystems.com
Wed Oct 24 13:37:00 GMT 2001


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.



More information about the Binutils mailing list