[debhelper-devel] Bug#789351: Bug#789351: please strip .comment sections from static libraries

Guillem Jover guillem at debian.org
Mon Jun 29 12:45:10 UTC 2015


Hi!

On Sat, 2015-06-20 at 12:59:40 +0200, Niels Thykier wrote:
> Control: tags -1 moreinfo
> 
> On 2015-06-20 09:51, Helmut Grohne wrote:
> > Package: debhelper
> > Version: 9.20150507
> > Severity: wishlist
> > Tags: patch
> > File: /usr/bin/dh_strip
> > 
> > dh_strip passes --remove-section=.comment and --remove-section=.note to
> > strip for shared libraries and executables, but does not do so for
> > static libraries. The .comment sections usually contain the full gcc
> > version. When comparing two -dev packages built with different gcc
> > versions using debbindiff, the difference in .comment sections of static
> > libraries makes up for the bulk of output.
> > 
> > Is there a reason for why static libraries keep .comment and .note
> > sections? I could not find one. Removing them there as well, would
> > improve the debbindiff output and make packages a little bit smaller.
> > The gcc version is not recorded at all for packages without static
> > libraries and it will be recorded for all packages once .buildinfo files
> > are available to the archive.
> 
> As discussed on #debian-devel, I am open to the change.  However, it
> seems that (at least) OCaml is storing bytecode in the .comment section
> of its binaries (presumably including static libraries).
> 
> I think we need a (cheap and "fairly") reliable indicator of whether
> something is likely to be an OCaml (etc.) static lib, which is storing
> bytecode or other "important" data in these sections.

Given Helmut's findings, and that lintian now warns about this (although
at experimental level), it would be nice to get dh_strip to remove those
sections. Which would also make it easier to change policy, as most
packages would just stop including such sections.

But I'm pretty sure you are aware of all this given your involvement in
the code and bug reports. :)

Thanks,
Guillem




More information about the debhelper-devel mailing list