Closed Bug 43357 Opened 25 years ago Closed 25 years ago

integrate elf-dynstr-gc into *nix builds

Categories

(SeaMonkey :: Build Config, defect, P3)

x86
Linux

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: waterson, Assigned: cls)

References

()

Details

Attachments

(2 files)

Subject: ~ 13% size reduction on Linux using elf-gc-dynstr Resent-Date: Wed, 21 Jun 2000 13:49:25 -0700 (PDT) Resent-From: porkjockeys@mozilla.org Date: Wed, 21 Jun 2000 13:49:10 -0700 From: "Lynch, Rusty" <rusty.lynch@intel.com> To: "'porkjockeys@mozilla.org'" <porkjockeys@mozilla.org> CC: "'alla@lysator.liu.se'" <alla@lysator.liu.se> At the last footprint reduction meeting a new tool for stripping out unneeded symbols out of shared libraries on Linux. I went ahead an tried out the utility. After downloading and installing libelf-0.6.4-4 on my RedHat 6.1 system, I was able to build and test elf-gc-dynstr. The results I see are very promising: * Mozilla wide optimized/stripped build ==> a little under 13% reduction * same binaries compressed ==> a little over 5% I haven't done extensive test to verify none of the .so files are corrupted, but i was able to startup the browser and surf for about 20 minutes without any problems (before I moved on to other things.) So, when can we get this in the build? -rusty
we have embedding clients that can benefit from this in a *huge* way.
Work already in progress. I must've missed a step though because I cannot get it to work for me. ../../dist/bin/elf-gc-dynstr ../../dist/bin/libmozjs.so Couldn't GC any strings, exiting. make: *** [install] Error 1
Status: NEW → ASSIGNED
It looks like this is what happens on a 'c' shared library where we don't have any fluff to remove. We could change the utility to return 0 in this case.
That's right -- no fluff in libmozjs.so! (Why didn't jwz and I fight harder for C? Because we like playing cassandra? ;-) /be
Only the shared libraries in components/ will be minimized by this, and only if the version symbol hack is used.
Does anyone know if this works on architectures other than i386?
Define works. It doesn't crash or do anything bad, but it doesn't do anything good either. It needs some extra care and loving for each architecture that should be supported. (The GOT and PLT sections are architecture specific.) To work in a cross-compiling environment (ie. fix up ppc binaries from an x86 host) some endianness handling needs to be added too.
Attached patch updated patchSplinter Review
Here's an updated patch that only gc's the component libs and removes the additional -lelf. I also added NTO to the OS_TARGET filter.
I already removed the -lelf from the makefile, just FYI.
Someone give an r= and I'll a= so we can get this checked in. /be
At blizzard's suggestion, I tweaked the patch to be a configure option. --enable-elf-dynstr-gc will attempt to run elf-gc-dynstr on component libraries if MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS is also set.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
This broke our OS/2 tinderbox. The second ELF statement in rules.mk should be in the else case for the OS/2 line. I need to make this change, but there is noone around for approvals yet. I am going to go ahead and do it and watch the tinderboxes. I will be on IRC if there are any problems.
There is no OS/2 case for that particular segment. I think I see what the real problem is...the shell being used doesn't support the : command. Quick fix. +ifeq ($(OS_ARCH),OS_2) +ELF_DYNSTR_GC = echo +else ELF_DYNSTR_GC = : +endif
verified.
Status: RESOLVED → VERIFIED
Is there any reason why this is not on by default on linux opt builds?
"It needs some extra care and loving for each architecture that should be supported. (The GOT and PLT sections are architecture specific.)" Alex, has any further work been done for non-x86 platforms?
I have not done any work on non x86 archs. But it will still work in the sense that it will not break anything. Files not recognized as supported will be ignored.
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: