This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Building with AIX gcc 3.3
- From: "Frank Patz" <fp at contact dot de>
- To: "'David Edelsohn'" <dje at watson dot ibm dot com>, "'Ken Foskey'" <foskey at optushome dot com dot au>
- Cc: <gcc at gcc dot gnu dot org>, <gcc-help at gcc dot gnu dot org>
- Date: Thu, 7 Aug 2003 19:35:29 +0200
- Subject: RE: Building with AIX gcc 3.3
- Organization: CONTACT Software GmbH
> dje wrote:
> -Wl,-bexpall does not export symbols with leading underscore,
> which are all C++ mangled names in the new ABI. You need to
> generate the
> export list explicitly using nm and awk substr:
>
> nm -BCpg *.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2
> == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort
> -u > icu.exp
>
> Also, you need to use -Wl,-G when creating the shared object and
> -Wl,-brtl when linking the final application.
Doesn't the GCC frontend do all this automatically? collect2 generates
an export file and adds it to the linker command, and -brtl is added
automatically, when -shared is used. The frontend does not add -G
automatically when linking shared libraries, however. On the other hand
this doesn't seem to make a difference.
- frank