public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: GNU g++ / AIX ld question
@ 2004-09-09 18:58 lrtaylor
  2004-09-09 19:09 ` David Kramer
  0 siblings, 1 reply; 3+ messages in thread
From: lrtaylor @ 2004-09-09 18:58 UTC (permalink / raw)
  To: david, gcc-help

Just a thought on this - there probably is a linker option (that is, for
ld) for this.  I would recommend taking a look at ld's command line
options and pass the appropriate option to it though g++ using the -Wl
option.

Thanks,
Lyle


-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of David Kramer
Sent: Thursday, September 09, 2004 12:52 PM
To: gcc-help@gcc.gnu.org
Subject: GNU g++ / AIX ld question

<SNIP>
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.
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: GNU g++ / AIX ld question
  2004-09-09 18:58 GNU g++ / AIX ld question lrtaylor
@ 2004-09-09 19:09 ` David Kramer
  0 siblings, 0 replies; 3+ messages in thread
From: David Kramer @ 2004-09-09 19:09 UTC (permalink / raw)
  To: gcc-help

On Thu, 9 Sep 2004 lrtaylor@micron.com wrote:

> Just a thought on this - there probably is a linker option (that is, for
> ld) for this.  I would recommend taking a look at ld's command line
> options and pass the appropriate option to it though g++ using the -Wl
> option.

I looked pretty hard a few times, but could not find one.

Thanks anyway.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* GNU g++ / AIX ld question
@ 2004-09-09 18:51 David Kramer
  0 siblings, 0 replies; 3+ messages in thread
From: David Kramer @ 2004-09-09 18:51 UTC (permalink / raw)
  To: gcc-help

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   

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-09-09 19:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-09 18:58 GNU g++ / AIX ld question lrtaylor
2004-09-09 19:09 ` David Kramer
  -- strict thread matches above, loose matches on Subject: below --
2004-09-09 18:51 David Kramer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).