This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Add support for AIX noipath option to ld
- From: Ådne Hovda <ahovda at openit dot com>
- To: binutils at sourceware dot org
- Date: Tue, 24 Jun 2014 16:54:19 +0200
- Subject: Add support for AIX noipath option to ld
- Authentication-results: sourceware.org; auth=none
Hi
I've set up a Binutils/GCC cross compiler for Linux -> AIX and have some
issues with the LIBPATH for individual members when putting full path to
system libraries from the sys-root on the linker line.
Compiling like this:
powerpc-ibm-aix5.1.0.0-gcc xhello.c /mytoolchain/usr/lib/libX11.a
-Wl,-blibpath:"/usr/lib:/lib"
Produces an import section like this:
***Import File Strings***
INDEX PATH BASE MEMBER
0 /usr/lib:/lib
1 libc.a shr.o
2 /mytoolchain/usr/lib libX11.a shr4.o
The native AIX linker has the noipath option, which results in:
***Import File Strings***
INDEX PATH BASE MEMBER
0 /usr/lib:/lib
1 libc.a shr.o
2 libX11.a shr4.o
Which is what I'm after. Please note that the regular libpath/nolibpath
options have no effect on these search paths.
From the ld man page on AIX:
noipath For shared objects listed on the command-line, rather than specified
with the -l flag, use a null path component when listing the shared object in
the loader section of the output file. A null path component is always used for
shared objects specified with the -l flag.
I guess this is considered an edge-case, and I don't expect a lot of
support, but any pointers as to where in the code to start looking will
be greatly appreciated.
Best regards,
Ådne Hovda