Issue 89511 - small --as-needed optimization
Summary: small --as-needed optimization
Status: CONFIRMED
Alias: None
Product: Build Tools
Classification: Code
Component: solenv (show other issues)
Version: DEV300m12
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-15 14:41 UTC by caolanm
Modified: 2017-05-20 11:27 UTC (History)
5 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
link as-needed (2.05 KB, patch)
2008-05-15 14:42 UTC, caolanm
no flags Details | Diff
In addition to the abovementioned patch, I need this one, otherwise it crashes (really! ;-) ) ld on SLED10 x86-64. (1.53 KB, patch)
2008-05-23 10:53 UTC, kendy
no flags Details | Diff
Patch with check for ld > 2.17 (14.25 KB, patch)
2009-06-26 13:28 UTC, pmladek
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2008-05-15 14:41:53 UTC
So before and after following patch 
LD_DEBUG=statistics /opt/openoffice.org3/program/soffice.bin -writer

before:
      9772:                      number of relocations: 22232
      9772:           number of relocations from cache: 54263
      9772:                final number of relocations: 65743
      9772:     final number of relocations from cache: 139071

after:
     26600:                      number of relocations: 22167
     26600:           number of relocations from cache: 54259
     26600:                final number of relocations: 65172
     26600:     final number of relocations from cache: 138359

taking just the "final number of relocation" gives a reduction of nearly (at a
stretch) 1% relocations
Comment 1 caolanm 2008-05-15 14:42:19 UTC
Created attachment 53669 [details]
link as-needed
Comment 2 hjs 2008-05-15 14:58:10 UTC
.
Comment 3 kendy 2008-05-23 10:53:47 UTC
Created attachment 53881 [details]
In addition to the abovementioned patch, I need this one, otherwise it crashes (really! ;-) ) ld on SLED10 x86-64.
Comment 4 jens-heiner.rechtien 2008-05-23 11:01:36 UTC
@kendy: does the "--as-needed" switch require recent binutils?
Comment 5 kendy 2008-05-23 11:09:14 UTC
hr: No idea when exactly it was introduced, but I've seen mail messages dated 
2004 mentioning this linker flag, so nothing too recent I think :-)
Comment 6 pmladek 2009-06-26 13:28:02 UTC
Created attachment 63229 [details]
Patch with check for ld > 2.17
Comment 7 pmladek 2009-06-26 13:33:07 UTC
I had some link errors with the older binutils (SLED10). It seems that
"-Wl,--as-needed" was buggy in binutils < 2.17, see also
http://www.gentoo.org/proj/en/qa/asneeded.xml

I attached an updated diff that checks the ld version and also uses the flag for
more architectures. I haven't tested it on all the architectures but it should
be safe with the configure check.
Comment 8 Rob Weir 2013-03-11 15:03:53 UTC
I'm adding this comment to all open issues with Issue Type == PATCH.  We have 220 such issues, many of them quite old.  I apologize for that.  

We need your help in prioritizing which patches should be integrated into our next release, Apache OpenOffice 4.0.

If you have submitted a patch and think it is applicable for AOO 4.0, please respond with a comment to let us know.

On the other hand, if the patch is no longer relevant, please let us know that as well.

If you have any general questions or want to discuss this further, please send a note to our dev mailing list:  dev@openoffice.apache.org

Thanks!

-Rob
Comment 9 Marcus 2017-05-20 11:27:31 UTC
Reset assigne to the default "issues@openoffice.apache.org".