GNU g++ / AIX ld question
David Kramer
david@thekramers.net
Thu Sep 9 18:51:00 GMT 2004
I have a two-fold problem at work, where I am trying to move the company's
AIX 5.2 xlC-compiled C++ application to gcc (note that I just can't get
binutils to work right, so I'm using the native linker).
1) The table of contents is > 64K, and according to their respective
documentations, all options that either make the TOC bigger in ld, or put
less in the TOC in gcc, make the program run slower. This is not
desirable, but not a show-stopper.
2) A library of ours (tccommon) that we are linking in has classes that
reference another class (status) in another library (tcdb). The
application I am trying to link requires some classes from tccommon, but
not any of the ones that require the status class. However, the linker is
complaining that the status class is missing (undefine symbols) anyway. I
thought they would have been garbage collected out.
The xlC compiler has an option, "-qfuncsect", which puts each function in
a separate csect. This seems equivalent to g++'s "-ffunction-sections".
The kicker is that xlC has an option "-qtwolink" to do a two-pass link to
eliminate any sections containing only unreferenced objects. That killed
both birds with two stones.
I can't seem to find a comparable g++ option to not link in objects that
are not referenced, and that means when I link my application against
tccommon, it's claiming that the status class methods are undefined, even
though nothing the application is using from tccommon uses the status
class.
Thanks in advance.
--
DDDD David Kramer david@thekramers.net http://thekramers.net
DK KD
DKK D Should you trust a stockbroker who's married to a travel agent?
DK KD
DDDD
More information about the Gcc-help
mailing list