Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-11-30 03:05:18

On Monday 29 November 2004 20:18, Rene Rivera wrote:
> Vladimir Prus wrote:
> > On Thursday 25 November 2004 02:27, Rene Rivera wrote:
> >>...More specifically I mark almost everything as private in the ELF
> >>objects and relink to get all those private symbols removed. I don't do
> >>that in the debug so I can do symbolic debugging :-) And the regular
> >>link tools, as you mention only strip the static symbols.
> >
> > Just curious, are you using the "version script" that the linker can use?
> > I've used it in past for some special tricks, but exporting C++ symbols
> > was pretty hard due to mangling.
> No linker script, those things are nasty. It's very similar to what gcc
> 3.4 currently allows for. I mark the symbols I want to keep with
> "__attribute__ ((section (".text.dll")))" in the code. Then use the list
> of symbols in that code section to build the list of mangled C++ names
> plus vtables and other related items with the binutils "objdump"
> program. And I can further use the "objcopy" program to remove the
> non-public symbols. I posted a rather long and dense description, with
> part of the BBv1 script for doing it at:
> Although I've cleaned up the script somewhat since then. This bit of
> custom build magic is why I haven't switched to BBv2. If you can show me
> how to add such custom link steps to an existing toolset I could then
> package this up and add to BBv2.

Looking at the post you've mentioned, it looks like you need to invoke special
processing for gcc toolset, when a specific property <global-segment> is

Could you take a look at the attached code? If defined two shared libraries:

lib a : a.cpp ;
lib b : b.cpp : <globals-segment>text ;

The first is build with regular gcc toolset and the second is linked with rule. In my example, it just prints some message and
then relays to

Is this sufficient? Anything else I can help with?

- Volodya

 --Boundary-00=_+mCrBWFbGpySIFH Content-Type: application/x-tgz;
Content-Transfer-Encoding: base64
Content-Disposition: attachment;

[Attachment content not displayed.] --Boundary-00=_+mCrBWFbGpySIFH--

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at