This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Support LD_SYMBOLIC and LD_SYMBOLIC_FUNCTIONS


On Tue, Jan 30, 2007 at 03:08:04PM +0000, Nick Clifton wrote:
> Hi H.J.
> 
> >>I tried it and gave up. With an environment variable, I just need
> >>to do
> >>
> >># LD_SYMBOLIC_FUNCTIONS=1 rpmbuild --rebuild 
> >>openoffice.org-2.0.4-5.5.10.src.rpm
> 
> But you do not have -Bsymbolic-functions in your spec file, so if you 
> forget this trick in the future and rebuild the openoffice.org binaries 
> again you will miss out on the optimization.  With this new feature 
> restricted to the -Bsymbolic-functions command line switch users that 
> want it are forced to do the right thing and add it to the spec file.
> 
> >>With an environment variable, you can add
> >>
> >>export LD_SYMBOLIC_FUNCTIONS=1
> >>
> >>to openoffice.org.spec and you just need to do
> >>
> >># rpmbuild -ba openoffice.org.spec
> >>
> >>You don't have to change sources of Open Office.
> 
> Right, but then adding a new command line switch does not require that 
> the sources be changed either.
> 

Then you need a linker wrapper. I don't see it any better than
an environment variable.

Can you try to build binutils itself with -Bsymbolic-functions? I
just add

export LD_SYMBOLIC_FUNCTIONS=1

in binutils.spec and I am done. It will use the new feature if
your linker supports it. If your linker doesn't, no harm is done.
The best of all is I don't have to change anything in binutils.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]