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);
+}
/* 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
/* 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);
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);
-}
#include <libelf.h>
#include <gelf.h>
-// xxx remove
-#include "messages.h"
-
#ifdef __cplusplus
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