The debian-private mailing list leak, part 1. Volunteers have complained about Blackmail. Lynchings. Character assassination. Defamation. Cyberbullying. Volunteers who gave many years of their lives are picked out at random for cruel social experiments. The former DPL's girlfriend Molly de Blanc is given volunteers to experiment on for her crazy talks. These volunteers never consented to be used like lab rats. We don't either. debian-private can no longer be a safe space for the cabal. Let these monsters have nowhere to hide. Volunteers are not disposable. We stand with the victims.

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

Unstripped executables



To be really useful an unstripped executable needs to be compiled with
-g too (but not, for a.out, linked with -g since that links it
statically).

As you can see below this turns dpkg from a 118K executable into a
file which is well over *half a megabyte* !  The debugging symbols do
clearly compress well, but in the simple test below the stripped file
still compresses to well under half the size of the unstripped one.

IMO the way to do this is the way I do it in dpkg:
`./debian.rules build' makes unstripped executables in the source
tree, and it strips them in debian-tmp/usr/bin or wherever before
building the .deb file.

If all packages do things this way (rather than calling ld with -s)
you can get an unstripped binary just by downloading the source and
building it and if you want an unstripped binary then you make sure
that the version of strip on your PATH is a link to /bin/true.

Note also that if you do things this way you can usually (if your
compiler &c hasn't changed, which in practice it doesn't do very
often) get an unstripped version of the identical binary to the one
that generated the coredump, so that you don't have to reproduce the
problem.  As dpkg maintainer I keep unstripped binaries for a variety
of old dpkg versions, in case anyone mails me a coredump.

Quite why anyone would want to build a whole distribution unstripped
is beyond me; a large proportion of the installed files are
executables, and doing this will easily double the disk space
requirements.

Ian.

-chiark:dpkg-1.1.3elf> file main/dpkg
main/dpkg: ELF 32-bit LSB executable, Intel 80386, version 1
-chiark:dpkg-1.1.3elf> ll main/dpkg
-rwxrwxr-x   1 ian      ian        528206 Mar 16 19:39 main/dpkg*
-chiark:dpkg-1.1.3elf> cp main/dpkg ~/junk/
-chiark:dpkg-1.1.3elf> strip ~/junk/dpkg
-chiark:dpkg-1.1.3elf> ll ~/junk/dpkg
-rwxrwxr-x   1 ian      ian        117812 Mar 27 12:58 /usr/ian-home/junk/dpkg*
-chiark:dpkg-1.1.3elf> gzip -9v <main/dpkg | wc -c
 74.4%
 135118
-chiark:dpkg-1.1.3elf> gzip -9v <~/junk/dpkg | wc -c
 55.7%
  52138
-chiark:dpkg-1.1.3elf>