repost: libg++ won't build on alphaev56-dec-osf4.0d

Jeffrey A Law law@cygnus.com
Thu Jan 7 17:47:00 GMT 1999


  In message < or1zl7fpnd.fsf@araguaia.dcc.unicamp.br >you write:
  > > No, not necessarily.  In fact, I've run into this problem before.  Folks
  > > had a C program which did a shl_load on a bunch of C++ shared libraries,
  > > including libstdc++.
  > 
  > Ugh!  Well, in this case, I think the only way out is to arrange for
  > controlled symbol exporting.  It doesn't really have to be portable
  > across platforms, since it's just an additional argument to the
  > libstdc++ build command.  But I should not that, with libtool, this
  > could be made in a portable way. :-)
Yup.  Note there's two ways to control symbol exporting.

First is to get the linker to do it for you.  This is the preferred method
IMHO.

The second is to go into the object file and scribble on the symbol table.
I've used the latter in the past with good success.  But it's not for the
weak -- you have to get down and dirty with bfd.

Note that you can either hide the symbols by making them non-exported/local
in the shared library, or by scrambling their names beyond recognition.

jeff



More information about the Gcc-bugs mailing list