This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: The future C++ template model in gcc?
On Fri, Jul 27, 2001 at 07:47:04PM +0200, Martin v. Loewis wrote:
> > Someone else mentined to me that we may use a special ELF section to
> > implement `expport'. I don't like the setuid idea either. I don't
> > know what the exact sementics of export are. I doubt we have to change
> > an existing libray if we resolve everything at the compile time.
>
> What is it that you don't like about using a special ELF section?
>
No. It is just that someone else had the similar idea.
> As for the problem to solve:
>
> Assume you have a package A, with header files and implementation
> files; the implementation files contain the exported templates. When
> producing a "binary" package, you get a shared library. To use this
> library in an application B, you normally need the header files and
> the shared library. Now, with exported templates, you also need the
> code of the templates in the implementation files.
>
> How would you make the template definitions available to the
> compilation of B? The proposal is to put the template definitions, or
> atleast a reference to them, into the shared library. Thus, on linking
> B, the prelinker can figure out the missing template instantiations,
> and look into the shared library to instantiate them.
Why does it have to be setuid?
H.J.