This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gcc2.95 shared library scheme for AIX doesn't work on AIX 4.1
- To: "Stuart D. Gathman" <stuart at bmsi dot com>
- Subject: Re: gcc2.95 shared library scheme for AIX doesn't work on AIX 4.1
- From: Geoff Keating <geoffk at cygnus dot com>
- Date: 07 Apr 2000 17:43:05 -0700
- CC: gcc-bugs at gcc dot gnu dot org
- References: <38EE5F01.62F228B1@bmsi.com>
"Stuart D. Gathman" <stuart@bmsi.com> writes:
> The shared library implementation for AIX in GCC 2.95.2 uses an import file
> for libgcc.a which begins with
>
> #! .
>
> On AIX 4.2 and later, this tells the loader to link these symbols against the
> main program. AIX 4.1 does not support this.
>
> Recommendation: If you are going to require AIX 4.2, then a much cleaner
> method is supported. The AIX linker supports a "-binitfini" option beginning
> with 4.2. This option specifies an initilization and a cleanup function for
> the library. With this feature, collect2 needs only to scan the current
> module being linked and pass __do_global_ctors and __do_global_dtors to the
> linker with -binitfini. I would make this change if I had an AIX 4.2 of 4.3
> development machine . . .
This change is already in the current development sources, but I think
only for AIX 4.3. The development sources are very different to
2.95.2, you may prefer to make your patches against those.
I'd be interested in your suggestions for AIX 4.1---although I have no
AIX 4.2 or 4.1 machines here.
--
- Geoffrey Keating <geoffk@cygnus.com>