GNU g++ / AIX ld question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx       http://thekramers.net
DK KD  
DKK D  Should you trust a stockbroker who's married to a travel agent?
DK KD  
DDDD   

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux