]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Drop support for .debug_abbrev and .debug_str from WHERE
authorPetr Machata <pmachata@redhat.com>
Thu, 14 Apr 2011 16:53:15 +0000 (18:53 +0200)
committerPetr Machata <pmachata@redhat.com>
Thu, 14 Apr 2011 16:53:15 +0000 (18:53 +0200)
dwarflint/check_nodebug.cc
dwarflint/sections.cc
dwarflint/where.cc

index a5ed1c19acf86bc2146f107af8e10c0166e66955..e5443976aa610442e867f1ce1a6bf73e7e0c52dc 100644 (file)
@@ -1,5 +1,5 @@
 /* Pedantic checking of DWARF files
-   Copyright (C) 2009,2010 Red Hat, Inc.
+   Copyright (C) 2009,2010,2011 Red Hat, Inc.
    This file is part of Red Hat elfutils.
 
    Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -53,7 +53,7 @@ public:
 private:
   void not_available (section_id sec_id)
   {
-    wr_error (WHERE (sec_id, NULL))
+    wr_error (section_locus (sec_id))
       << "data not found." << std::endl;
   }
 
index 7fd888dce45546c108cbd2f8c4871ad766b3c37d..a1c1aab9514c160d7db0527701219f5a28b38f24 100644 (file)
@@ -386,7 +386,7 @@ namespace
                struct sec *sec = file->sec + cur->secndx;
                sec->rel.type = cur->reltype;
                if (sec->data == NULL)
-                 wr_error (WHERE (sec->id, NULL))
+                 wr_error (section_locus (sec->id))
                    << "this data-less section has a relocation section."
                    << std::endl;
                else if (read_rel (file, sec, cur->reldata, file->addr_64))
@@ -396,7 +396,7 @@ namespace
 
        if (secentry *str = secinfo.get (".debug_str"))
          if (str->reldata != NULL)
-           wr_message (WHERE (sec_str, NULL), mc_impact_2 | mc_elf)
+           wr_message (section_locus (sec_str), mc_impact_2 | mc_elf)
              << "there's a relocation section associated with this section."
              << std::endl;
       }
index f18aaa06bc8a58276dc860403b675664c3e2f491..ef5aef6b13e0f4548be6611dc40045da0e5dc2b4 100644 (file)
@@ -129,9 +129,6 @@ namespace
     {
       add (sec_info, ".debug_info", "CU %"PRId64, "DIE %#"PRIx64);
 
-      add (sec_abbrev, ".debug_abbrev",
-          "section %"PRId64, "abbreviation %"PRId64, "abbr. attribute %#"PRIx64);
-
       add (sec_aranges, ".debug_aranges",
           "table %"PRId64, "arange %#"PRIx64);
 
@@ -141,8 +138,6 @@ namespace
       add (sec_pubtypes, ".debug_pubtypes",
           "pubtype table %"PRId64, "pubtype %#"PRIx64);
 
-      add (sec_str, ".debug_str", "offset %#"PRIx64);
-
       add (sec_line, ".debug_line", "table %"PRId64, "offset %#"PRIx64);
 
       add (sec_loc, ".debug_loc", "loclist %#"PRIx64, "offset %#"PRIx64);
@@ -176,6 +171,8 @@ section_locus::format (bool) const
 where
 WHERE (section_id sec, locus const *next)
 {
+  assert (sec != sec_abbrev);
+  assert (sec != sec_str);
   where::formatter const *fmt = wf_for_section (sec);
   return where (fmt, next);
 }