Opened 15 months ago

Last modified 3 months ago

#9087 new bug

Executables in the Linux binaries are not stripped

Reported by: refold Owned by:
Priority: normal Milestone:
Component: Build System Version: 7.8.2
Keywords: Cc: gidyn
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description (last modified by thomie)

The executables inside the GHC binary tarball seem to come with debug information. Stripping it noticeably reduces the binary sizes:

$ file /path/to/ghc-7.8.2/lib/ghc-7.8.2/bin/ghc
/path/to/ghc-7.8.2/lib/ghc-7.8.2/bin/ghc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0x6012a4c86cd3f410ca0e59ab4ac872ce740d03c6, not stripped

$ du -sh /path/to/ghc-7.8.2/lib/ghc-7.8.2/bin/ghc
1,4M	/path/to/ghc-7.8.2/lib/ghc-7.8.2/bin/ghc

$ strip -s /path/to/ghc-7.8.2/lib/ghc-7.8.2/bin/ghc

$ du -sh /path/to/ghc-7.8.2/lib/ghc-7.8.2/bin/ghc
1021K	/path/to/ghc-7.8.2/lib/ghc-7.8.2/bin/ghc

$ du -sh /path/to/ghc-7.8.2/lib/ghc-7.8.2/bin/haddock
3,2M	/path/to/ghc-7.8.2/lib/ghc-7.8.2/bin/haddock

$ strip -s /path/to/ghc-7.8.2/lib/ghc-7.8.2/bin/haddock

$ du -sh /path/to/ghc-7.8.2/lib/ghc-7.8.2/bin/haddock
2,3M	/path/to/ghc-7.8.2/lib/ghc-7.8.2/bin/haddock

Do we really need to include the debug info for exes?

Change History (5)

comment:1 Changed 15 months ago by gidyn

  • Cc gideon@… added

Also in x86_64

comment:2 Changed 9 months ago by thomie

  • Architecture changed from x86 to Unknown/Multiple
  • Description modified (diff)
  • Summary changed from Executables in the 7.8.2 Linux i386 binary tarball are not stripped to Executables in the Linux binaries are not stripped

The binaries from https://launchpad.net/~hvr/+archive/ubuntu/ghc are stripped however.

comment:3 Changed 9 months ago by thomie

  • Component changed from Compiler to Build System

comment:4 Changed 3 months ago by gidyn

  • Cc gideon@… removed

comment:5 Changed 3 months ago by gidyn

  • Cc gidyn added
Note: See TracTickets for help on using tickets.