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

Re: Policy for stripping binaries

On Sat, Apr 21, 2001 at 04:44:24PM -0400, Bob Hilliard wrote:
>      gcc apparently creates sections `.note' and `.comment' when compiling
> binaries.  Running either `strip' or the -s option to install does not
> remove these redundant sections.  Lintian issues a warning
> `binary-has-unneeded-section' when it detects these sections in a
> binary. 

install -s _does_ remove those sections.  It was patched for it
around the time that the tag was added to Lintian (though long
before Shaleh raised it to a warning).  You could have easily
found this out by trying it.

Rules files rarely call strip directly, and when they do it
is uncomfortable to add the long options for stripping those
two sections.  It doesn't makes much difference whether 99%
or 100% of the binaries strip them, because the space savings
was small in the first place.  So I don't think this should be
a Lintian warning.  It used to be an info-level tag (those are
only shown if requested with -I), and I think that's still the
right level.

>      I don't think lintian should warn about things that are permitted
> by policy.  I propose that policy add a recommendation to use `strip
> --remove-section=.comment --remove-section=.note' on binaries.

I don't agree with this principle.  Many things permitted by policy
are worth warning about.  For example, policy says nothing about
calling dh_testversion, but Lintian warns about it because debhelper
deprecates it.

I'd like to see these sections mentioned in policy, though, with
a recommendation of similar strength to this one:

     Maintainers are encouraged to preserve the modification times of the
     upstream source files in a package, as far as is reasonably possible.
     Even though this is optional, this is still a good idea.  [1]

I interpret this as "Please do this if it's convenient, but don't
worry about it if it's not".

Richard Braakman

Reply to: