From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2005-07-14 11:25:13
Rene Rivera wrote:
> Markus Schöpflin wrote:
>>I just discovered that I cannot prelink a dynamic library produced by bbv1.
>>The system I tried this on was RHEL 3. The error message I got was:
>>prelink: ... section file offsets not monotonically increasing
>>After a lot of head scratching, I decided to disable the use of objcopy in
>>gcc-tools.jam, et voila, now prelink works.
>>This leaves me wondering why objcopy is used at all. I found some reference
>>on this ML to a linker performance problem that this should fix, but I
>>wasn't successful in digging up more info.
>>Is objcopy still needed?
> It may be that the "bug" in the linker is no longer there, and I
> remember some discussion on the binutils crowd about it getting
> addressed. So it's possible it's no longer needed. But that would apply
> to new distributions as old one would still use the slower binutils.
The distro used is RHEL3, rpm -q binutils gives binutils-18.104.22.168.4-35.
>>I don't seem to get any noticable speed benefit
>>when it's used.
> Try linking many, more than 10, object files that all use template
> heavily. Of course it could be that your system has a binutils that
> doesn't have the "bug" ;-)
I'm using it to create boost.python and some extension modules. But I have
to admit I didn't really time it, it has just been my personal impression.
>>Is there some way to disable the use of objcopy, besides
>>creating a new tools file?
> Hm, it doesn't look like it :-( It hadn't come up until now, it's easy
> enough to check for some option (--no-objcopy) on the invocation. Of
> course I wonder why is it that the link doesn't work for you given that
> all BBv1 does with objcopy is remove the 'readonly' flag from debug_str
Nono, it's _pre_link not working. It seems that objcopy disturbs some order
prelink expects to find in the object file.
> So one question I have; What is the version of binutils you are using?
-> objcopy --version
GNU objcopy 22.214.171.124.4 20030523
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
-> rpm -q prelink
-> prelink --version
BTW, I need prelink to relocate my python extension module, to allow it to
cooperate with an external library that has a fixed location for a shared
memory segment, which unfortunately collides with the standard location
where the module is mapped when loaded by the python interpreter.
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