[Bug 169564] New: reduce the number of unused shared libraries dependencies

Please DO NOT reply to this by email. All additional comments should be made in
the comments box of this bug report.

 GARNOME | general | Ver: unspecified

           Summary: reduce the number of unused shared libraries
           Product: GARNOME
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: Normal
         Component: general
        AssignedTo: pd cipherfunk org
        ReportedBy: dann godzilla ics uci edu
         QAContact: garnome-list gnome org
                CC: all-bugs bugzilla gnome org

Distribution/Version: Fedora Core 3

Currently most Gnome binaries and shared libraries have a lot of
unused shared library dependencies. This is not good as it increases
the startup time due to the increased number of relocations that need
to be performed. (for more information about this see Ulrich Drepper's
dsohowto.pdf document).

An example (using garnome-
(you need a recent glibc for this, 2.3.4 works)

$ ldd -u -r ./gcalctool
Unused direct dependencies:

"ld" from recent binutils (2.15?) has a new flag "--as-needed" that
can be used to avoid these unused direct dependencies.

One quick way to test this with garnome is to change LDFLAGS in
gar.conf.mk to:
LDFLAGS += -Wl,--as-needed -L$(libdir)

The resulting Gnome binaries are 1-2K smaller. Using LD_DEBUG=statistics
to look at the runtime linker stats shows that the startup time
decreases slightly.

Maybe it would be a good idea for garnome to add -Wl,--as-needed to
LDFLAGS by default if it can determine that the linker supports the
--as-needed flag.

------- You are receiving this mail because: -------
You are the QA contact for the bug.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]