Building with AIX gcc 3.3
Frank Patz
fp@contact.de
Thu Aug 7 17:29:00 GMT 2003
> 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
More information about the Gcc-help
mailing list