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

[lintian] 01/01: c/binaries: Check for .debug_str in detach'ed ELF debug files



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 078a2d09d998434392f7b98cb3d9c231ad8ea721
Author: Niels Thykier <niels@thykier.net>
Date:   Tue Oct 13 22:25:01 2015 +0200

    c/binaries: Check for .debug_str in detach'ed ELF debug files
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/binaries.desc | 5 +++--
 checks/binaries.pm   | 6 ++++--
 debian/changelog     | 4 ++++
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/checks/binaries.desc b/checks/binaries.desc
index 78469a0..5f9c6ba 100644
--- a/checks/binaries.desc
+++ b/checks/binaries.desc
@@ -378,8 +378,9 @@ Ref: #668437
 Info: The binary is installed as a detached "debug symbols" ELF file,
  but it does not appear to have debug information associated with it.
  .
- Implementation detail: Lintian currently checks for the ".debug_line"
- section, which is a part of the DWARF standard.
+ Implementation detail: Lintian checks for the ".debug_line" and the
+ ".debug_str" sections.  If either of these are present, the binary
+ is assumed to contain debug information.
 
 Tag: binary-file-built-without-LFS-support
 Severity: minor
diff --git a/checks/binaries.pm b/checks/binaries.pm
index 574dd6e..7d831e5 100644
--- a/checks/binaries.pm
+++ b/checks/binaries.pm
@@ -464,8 +464,10 @@ sub run {
                 tag 'debug-file-should-use-detached-symbols', $file;
             }
             tag 'debug-file-with-no-debug-symbols', $file
-              unless (exists $objdump->{'SH'}->{'.debug_line'}
-                or exists $objdump->{'SH'}->{'.zdebug_line'});
+              unless (exists $objdump->{'SH'}{'.debug_line'}
+                or exists $objdump->{'SH'}{'.zdebug_line'}
+                or exists $objdump->{'SH'}{'.debug_str'}
+                or exists $objdump->{'SH'}{'.zdebug_str'});
         }
 
         # Detached debugging symbols directly in /usr/lib/debug.
diff --git a/debian/changelog b/debian/changelog
index 096843e..05883c7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,10 @@ lintian (2.5.39) UNRELEASED; urgency=medium
 
   XXX: generate tag summary
 
+  * checks/binaries.{desc,pm}:
+    + [NT] Check for ".debug_str" section in addition to the
+      ".debug_line" section to determine if an ELF file contains
+      detached debug symbols.
   * checks/cruft.pm:
     + [BR] Avoid false positive in minified javascript by
       detecting line with only one colon.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: