This is the mail archive of the
mailing list for the GCC project.
Re: [I don't think it's off-topic at all] Linking speed for C++
On Tue, May 29, 2001 at 02:51:21PM -0700, Joe Buck wrote:
> So it seems that the next thing to try is to use -Bsymbolic for everything
> except such global objects, either by marking them with attributes,
> or to move their definitions into separate .cpp files that get compiled
> without -Bsymbolic.
> Richard, do you think that this will work?
No. -Bsymbolic is only relevant at link time. It does not
affect the compiler proper.
If you want finer resolution, you have to start playing with
ELF symbol visibility modifiers. And if you want to use this
on symbols that still need to be seen outside the library
(i.e. most functions), you'll need glibc 2.2.2 or later as
this feature is relatively new.
Moreover, for C++ you'll really need more help from the
compiler as well, since putting
asm (".protected _Z6mumble1V");
all over the place with mangled symbols really isn't going
to cut the mustard.