This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: using templates in shared library



> All symbols _are_ already instantiated in the library. The question is
> how to get rid of them in the library or program linking to it.

The GNU linker already removes redundant templates from an executable.
It can do this because templates are put into special "linkonce" sections.
This feature works on ELF platforms such as Linux or Solaris.  This
means that you are paying in disk space to store extra templates in
.o files, but you are not paying for disk space or memory for executable
files.

Ideally, we should also be able to do the same with shared libraries.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]