Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2003-01-21 18:26:08


"Raoul Gough" <raoulgough_at_[hidden]> writes:

> When building a .dll on windows using gcc, we should be supplying
> the --enable-auto-image-base flag to the linker. Without this flag,
> all the dll's end up with the same load address (0x10000000) which can
> degrade program load performance (basically, if an executable requires
> multiple DLLs that have the same load address, the linker/loaded has
> to relocate all but one of them on startup and perform fixups). You
> can verify this with:
>
> objdump -p my.dll [...] | grep ImageBase
>
> Currently, all boost DLLs end up at 0x10000000. It doesn't really cost
> anything to supply this flag - the linker chooses a load address on
> the basis of some kind of hash function which makes relocations at
> startup far less likely.
>
> The change is easy for mingw-tools.jam (just add the option to
> IMPLIB_COMMAND), but I'm not sure about gcc-tools.jam, since I don't
> know if the option is available on platforms other than Win32.

Can't you just make it conditional on $(NT)?

-- 
David Abrahams
dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution
 

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk