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 Thu, Jan 25, 2007 at 10:22:06AM -0800, H. J. Lu wrote:
> > environment set up to run this kind of test.  I was asking you, since I 
> > think that you do have this kind of knowledge, if you could tell me why 
> > using environment variables in this way would be a good thing.  Are the 
> > alternatives really so bad ?  If this feature is only for user 
> > convenience, then we should really consider whether it is worth it.  If 
> > supporting this environment variable will make our 
> > (binutils-maintaining) lives harder then do we really want to do it ?
> 
> When you have many complex pages, like Open Office, it isn't
> practical to modify sources directly to support -Bsymbloic-functions.
> 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
> 
> to rebuild Open Office with optimized DSOs and I don't have to write
> one single line of code.  You can optimize all or some packages.
> It is much nicer than a wrapper script, with that, you have to make
> sure that the right wrapper script is used to for packages you want to
> optimize. 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.

One more example, it will be ice to build binutils configured using
--enable-shared with -Bsymbolic-functions. With LD_SYMBOLIC_FUNCTIONS
and rpm, I just need to add

export LD_SYMBOLIC_FUNCTIONS=1

to binutils.spec and I am done.


H.J.


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