This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Confused by Multilib on AIX


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 ----+



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]