This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Confused by Multilib on AIX
- To: David Edelsohn <dje at watson dot ibm dot com>
- Subject: Re: Confused by Multilib on AIX
- From: Frank Pilhofer <fp at informatik dot uni-frankfurt dot de>
- Date: Fri, 9 Oct 1998 13:17:19 +0200
- Cc: Frank Pilhofer <fp at informatik dot uni-frankfurt dot de>, egcs at cygnus dot com
- References: <fp@informatik.uni-frankfurt.de> <9810090506.AA54806@marc.watson.ibm.com>
On Fri, Oct 09, 1998 at 01:06:32AM -0400, David Edelsohn wrote:
>
> I thought that dlopen() was suppose to work with
> shared objects, but maybe it requires additional / different shared
> library linking options.
>
Well, dlopen() works fine on my own shared objects (created with
gcc -shared), as long as they don't depend on libstdc++. I have
tried linking the main program and the module with `-Wl,-brtl'
(which is supposedly necessary to invoke the runtime linker), but
that didn't change anything.
I have also re-linked libstdc++ from egcs's source directory with
g++ -v -nostdlib -Wl,-brtl -shared -o libstdc++.so \
`cat piclist` -lgcc -lm -lc
but that didn't work either. The resulting shared library can be
linked against, but not be loaded at runtime. This is puzzling.
>
> Have you used the AIX "dump" command to inspect
> the shared object to see what it contains?
>
I am not very familiar with dump. I know about `dump -H', which
shows a file's dependencies on shared libraries. It reports:
dump -H main (the main program that wants to load the module)
***Import File Strings***
INDEX PATH BASE MEMBER
0 /local/pkg/egcs/1.1a/IBMrisc/lib/gcc-lib/powerpc-ibm-aix4.2.0.0/egcs-2.91.57:/local/pkg/egcs/1.1a/IBMrisc/powerpc-ibm-aix4.2.0.0/lib:/local/pkg/egcs/1.1a/IBMrisc/lib:/usr/lib:/lib
1 libdl.a shr.o
2 libc.a shr.o
3 librtl.a shr.o
4 .
dump -H module.so (the module that refuses to load)
***Import File Strings***
INDEX PATH BASE MEMBER
0 /local/pkg/egcs/1.1a/IBMrisc/lib/gcc-lib/powerpc-ibm-aix4.2.0.0/egcs-2.91.57:/local/pkg/egcs/1.1a/IBMrisc/powerpc-ibm-aix4.2.0.0/lib:/local/pkg/egcs/1.1a/IBMrisc/lib:/usr/lib:/lib
1 libstdc++.so
2 libc.a shr.o
3 librtl.a shr.o
4 .
dump -H /local/pkg/egcs/1.1a/IBMrisc/lib/libstdc++.so
***Import File Strings***
INDEX PATH BASE MEMBER
0 /local/pkg/egcs/1.1a/egcs-1.1a/obj-IBMrisc/gcc:/usr/lib:/lib
1 libc.a shr.o
2 .
Frank
--
+ Frank Pilhofer fp@informatik.uni-frankfurt.de +
| http://www.uni-frankfurt.de/~fp/ |
+---- Life would be a very great deal less weird without you. - DA ----+