]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: check_range_relocations should rather be in check_debug_loc_range
authorPetr Machata <pmachata@redhat.com>
Tue, 21 Sep 2010 19:51:22 +0000 (21:51 +0200)
committerPetr Machata <pmachata@redhat.com>
Tue, 21 Sep 2010 19:51:22 +0000 (21:51 +0200)
dwarflint/check_debug_loc_range.cc
dwarflint/check_debug_loc_range.hh
dwarflint/reloc.cc
dwarflint/reloc.h

index a71ef27845400422b498c8396f7bf436d5c5877f..c348fd3c3b1f9b875a507aa805bb7ba0996479a1 100644 (file)
@@ -1076,3 +1076,21 @@ found_hole (uint64_t start, uint64_t length, void *data)
 
   return true;
 }
+
+void
+check_range_relocations (enum message_category cat,
+                        struct where *where,
+                        struct elf_file const *file,
+                        GElf_Sym *begin_symbol,
+                        GElf_Sym *end_symbol,
+                        const char *description)
+{
+  if (begin_symbol != NULL
+      && end_symbol != NULL
+      && begin_symbol->st_shndx != end_symbol->st_shndx)
+    wr_message (cat | mc_impact_2 | mc_reloc, where,
+               ": %s relocated against different sections (%s and %s).\n",
+               description,
+               file->sec[begin_symbol->st_shndx].name,
+               file->sec[end_symbol->st_shndx].name);
+}
index 2f8138f9714083ec12869ebdd15fe979c1f1cf29..182f6d3fe3613697e4d49a56537632b74afd77be 100644 (file)
@@ -1,5 +1,5 @@
 /* Low-level checking of .debug_loc and .debug_range.
-   Copyright (C) 2009 Red Hat, Inc.
+   Copyright (C) 2009, 2010 Red Hat, Inc.
    This file is part of Red Hat elfutils.
 
    Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -66,12 +66,19 @@ struct hole_info
 
 /* DATA has to be a pointer to an instance of struct hole_info.
    DATA->data has to point at d_buf of section in question.  */
-extern bool found_hole (uint64_t start, uint64_t length, void *data);
+bool found_hole (uint64_t start, uint64_t length, void *data);
 
-extern bool check_location_expression (elf_file const &file,
-                                      struct read_ctx *parent_ctx,
-                                      struct cu *cu,
-                                      uint64_t init_off,
-                                      struct relocation_data *reloc,
-                                      size_t length,
-                                      struct where *wh);
+bool check_location_expression (elf_file const &file,
+                               struct read_ctx *parent_ctx,
+                               struct cu *cu,
+                               uint64_t init_off,
+                               struct relocation_data *reloc,
+                               size_t length,
+                               struct where *wh);
+
+void check_range_relocations (enum message_category cat,
+                             struct where *where,
+                             struct elf_file const *file,
+                             GElf_Sym *begin_symbol,
+                             GElf_Sym *end_symbol,
+                             const char *description);
index f271185a3089b820571ccd8bdea327fd875243e4..df7164ead61b8889f3c85af2777e07cd43572ee0 100644 (file)
@@ -434,21 +434,3 @@ read_rel (struct elf_file *file,
         sizeof (*sec->rel.rel), &compare_rel);
   return true;
 }
-
-void
-check_range_relocations (enum message_category cat,
-                        struct where *where,
-                        struct elf_file const *file,
-                        GElf_Sym *begin_symbol,
-                        GElf_Sym *end_symbol,
-                        const char *description)
-{
-  if (begin_symbol != NULL
-      && end_symbol != NULL
-      && begin_symbol->st_shndx != end_symbol->st_shndx)
-    wr_message (cat | mc_impact_2 | mc_reloc, where,
-               ": %s relocated against different sections (%s and %s).\n",
-               description,
-               file->sec[begin_symbol->st_shndx].name,
-               file->sec[end_symbol->st_shndx].name);
-}
index 9f4442f18d986708a8303a44be15ab21f253689c..5d65f3852c3bcc01e3016e1219ba9252e94c9104 100644 (file)
@@ -31,9 +31,6 @@
 #include <libelf.h>
 #include <gelf.h>
 
-// xxx remove
-#include "messages.h"
-
 #ifdef __cplusplus
 extern "C"
 {
@@ -96,13 +93,6 @@ extern "C"
                     struct where const *where,
                     enum section_id offset_into, GElf_Sym **symptr);
 
-  void check_range_relocations (enum message_category cat,
-                               struct where *where,
-                               struct elf_file const *file,
-                               GElf_Sym *begin_symbol,
-                               GElf_Sym *end_symbol,
-                               const char *description);
-
 #define PRI_LACK_RELOCATION ": %s seems to lack a relocation.\n"
 
 #ifdef __cplusplus