PATCH: Support LD_SYMBOLIC and LD_SYMBOLIC_FUNCTIONS

Paul Brook paul@codesourcery.com
Thu Jan 25 15:02:00 GMT 2007


On Thursday 25 January 2007 13:43, H. J. Lu wrote:
> On Thu, Jan 25, 2007 at 07:58:48AM -0500, Daniel Jacobowitz wrote:
> > On Wed, Jan 24, 2007 at 07:48:07PM -0800, H. J. Lu wrote:
> > > I rebuilt firefox with -Bsymbolic-functions. It significantly reduced
> > > number of relocations in DSOs and improved firefox load time.  This
> > > patch allows me to apply -Bsymbolic-functions on firefox by just
> > > setting LD_SYMBOLIC_FUNCTIONS before compiling it.  It will make it
> > > trivial to rebuild any or all packages with -Bsymbolic-functions and
> > > improve system performance.
> >
> > Just my two cents, but I think this is a horribly bad idea, for the
> > same reason that there isn't a general $LD_OPTIONS variable (or
> > $GCC_OPTIONS).  It will hurt reproducibility.
>
> It is very convenient to use LD_SYMBOLIC_FUNCTIONS on a per package
> bassis. You can set it in a Makefile, script or a rpm spec file in
> the build environment.

If you can set it in a Makefile, you should be able to add it to that 
makefile's LDFLAGS without much more trouble.

I agree with Dan that using environment variables to control linker behavior 
is a really bad idea. People are liable to put in in their .profile 
because "It makes things go faster", then complain when things mysteriously 
break.

Paul



More information about the Binutils mailing list