public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Linking question ?
@ 1999-02-18  0:02 mikael.aronsson
  1999-02-20 17:30 ` Alexandre Oliva
  1999-02-28 22:53 ` mikael.aronsson
  0 siblings, 2 replies; 6+ messages in thread
From: mikael.aronsson @ 1999-02-18  0:02 UTC (permalink / raw)
  To: egcs

Hi !

I use a C++ library of templated classes, it is a small set of very big C++
files, and when I link to the library my application grows big time.

It look's like it links to stuff in the library that are not referenced in
any way, my question is how is the link done, will it put the entire object
file into my executable if anything is referenced or does it only include
the methods that are used in the object file ?

Mikael Aronsson


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

* Re: Linking question ?
  1999-02-18  0:02 Linking question ? mikael.aronsson
@ 1999-02-20 17:30 ` Alexandre Oliva
       [not found]   ` < orbtio5yx4.fsf@araguaia.dcc.unicamp.br >
  1999-02-28 22:53   ` Alexandre Oliva
  1999-02-28 22:53 ` mikael.aronsson
  1 sibling, 2 replies; 6+ messages in thread
From: Alexandre Oliva @ 1999-02-20 17:30 UTC (permalink / raw)
  To: mikael.aronsson; +Cc: egcs

On Feb 18, 1999, mikael.aronsson@flygt.com wrote:

> any way, my question is how is the link done, will it put the entire object
> file into my executable if anything is referenced or does it only include
> the methods that are used in the object file ?

The former

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil

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

* Re: Linking question ?
       [not found]   ` < orbtio5yx4.fsf@araguaia.dcc.unicamp.br >
@ 1999-02-21  9:14     ` Horst von Brand
  1999-02-28 22:53       ` Horst von Brand
  0 siblings, 1 reply; 6+ messages in thread
From: Horst von Brand @ 1999-02-21  9:14 UTC (permalink / raw)
  To: egcs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

Alexandre Oliva <oliva@dcc.unicamp.br> said:
> On Feb 18, 1999, mikael.aronsson@flygt.com wrote:
> > any way, my question is how is the link done, will it put the entire object
> > file into my executable if anything is referenced or does it only include
> > the methods that are used in the object file ?
> 
> The former

To expand a little on this: If you want the later, put each method in a
separate .cc file
-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viña del Mar, Chile                               +56 32 672616

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

* Re: Linking question ?
  1999-02-21  9:14     ` Horst von Brand
@ 1999-02-28 22:53       ` Horst von Brand
  0 siblings, 0 replies; 6+ messages in thread
From: Horst von Brand @ 1999-02-28 22:53 UTC (permalink / raw)
  To: egcs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

Alexandre Oliva <oliva@dcc.unicamp.br> said:
> On Feb 18, 1999, mikael.aronsson@flygt.com wrote:
> > any way, my question is how is the link done, will it put the entire object
> > file into my executable if anything is referenced or does it only include
> > the methods that are used in the object file ?
> 
> The former

To expand a little on this: If you want the later, put each method in a
separate .cc file
-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viña del Mar, Chile                               +56 32 672616

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

* Linking question ?
  1999-02-18  0:02 Linking question ? mikael.aronsson
  1999-02-20 17:30 ` Alexandre Oliva
@ 1999-02-28 22:53 ` mikael.aronsson
  1 sibling, 0 replies; 6+ messages in thread
From: mikael.aronsson @ 1999-02-28 22:53 UTC (permalink / raw)
  To: egcs

Hi !

I use a C++ library of templated classes, it is a small set of very big C++
files, and when I link to the library my application grows big time.

It look's like it links to stuff in the library that are not referenced in
any way, my question is how is the link done, will it put the entire object
file into my executable if anything is referenced or does it only include
the methods that are used in the object file ?

Mikael Aronsson



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

* Re: Linking question ?
  1999-02-20 17:30 ` Alexandre Oliva
       [not found]   ` < orbtio5yx4.fsf@araguaia.dcc.unicamp.br >
@ 1999-02-28 22:53   ` Alexandre Oliva
  1 sibling, 0 replies; 6+ messages in thread
From: Alexandre Oliva @ 1999-02-28 22:53 UTC (permalink / raw)
  To: mikael.aronsson; +Cc: egcs

On Feb 18, 1999, mikael.aronsson@flygt.com wrote:

> any way, my question is how is the link done, will it put the entire object
> file into my executable if anything is referenced or does it only include
> the methods that are used in the object file ?

The former

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil


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

end of thread, other threads:[~1999-02-28 22:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-18  0:02 Linking question ? mikael.aronsson
1999-02-20 17:30 ` Alexandre Oliva
     [not found]   ` < orbtio5yx4.fsf@araguaia.dcc.unicamp.br >
1999-02-21  9:14     ` Horst von Brand
1999-02-28 22:53       ` Horst von Brand
1999-02-28 22:53   ` Alexandre Oliva
1999-02-28 22:53 ` mikael.aronsson

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