From 1bca02ebaf072df133f15f48b57678729a3fd46e Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Mon, 30 Nov 2009 16:55:28 +0100 Subject: [PATCH] dwarflint: Hide a couple classes in an anonymous namespace --- src/dwarflint/checks-low.cc | 61 +++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/src/dwarflint/checks-low.cc b/src/dwarflint/checks-low.cc index 714d4bd0f..16f377bec 100644 --- a/src/dwarflint/checks-low.cc +++ b/src/dwarflint/checks-low.cc @@ -37,36 +37,6 @@ #include #include -struct secentry -{ - Elf_Data *reldata; /* Relocation data if any found. */ - size_t reltype; /* SHT_REL or SHT_RELA. We need this - temporary store to be able to resolve - relocation section appearing before - relocated section. */ - size_t secndx; /* Index into file->sec or 0 if not yet loaded. */ - section_id id; /* Section type. */ - - explicit secentry (section_id a_id = sec_invalid) - : reldata (NULL) - , reltype (0) - , secndx (0) - , id (a_id) - {} -}; - -struct secinfo_map - : public std::map -{ - secentry *get (const char *name) - { - iterator it = find (std::string (name)); - if (it == end ()) - return NULL; - else - return &it->second; - } -}; namespace { @@ -193,6 +163,37 @@ namespace return elf; } + struct secentry + { + Elf_Data *reldata; /* Relocation data if any found. */ + size_t reltype; /* SHT_REL or SHT_RELA. We need this + temporary store to be able to resolve + relocation section appearing before + relocated section. */ + size_t secndx; /* Index into file->sec or 0 if not yet loaded. */ + section_id id; /* Section type. */ + + explicit secentry (section_id a_id = sec_invalid) + : reldata (NULL) + , reltype (0) + , secndx (0) + , id (a_id) + {} + }; + + struct secinfo_map + : public std::map + { + secentry *get (const char *name) + { + iterator it = find (std::string (name)); + if (it == end ()) + return NULL; + else + return &it->second; + } + }; + bool elf_file_init (struct elf_file *file, int fd) { -- 2.47.2