LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
ELF/hash.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2024 R. Thomas
2 * Copyright 2017 - 2024 Quarkslab
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef LIEF_ELF_HASH_H
17#define LIEF_ELF_HASH_H
18
19#include "LIEF/visibility.h"
20#include "LIEF/hash.hpp"
21
22namespace LIEF {
23namespace ELF {
24
25class Binary;
26class Header;
27class Section;
28class Segment;
29class DynamicEntry;
36class Symbol;
37class Relocation;
38class SymbolVersion;
43class Note;
44class NoteDetails;
45class AndroidNote;
46class NoteAbi;
47class NoteGnuProperty;
48class CorePrPsInfo;
49class CorePrStatus;
50class CoreAuxv;
51class CoreSigInfo;
52class CoreFile;
53class GnuHash;
54class SysvHash;
55class LIEF_API Hash : public LIEF::Hash {
59 public:
60 static LIEF::Hash::value_type hash(const Object& obj);
61
62 public:
63 using LIEF::Hash::Hash;
65
66 public:
67 void visit(const Binary& binary) override;
68 void visit(const Header& header) override;
69 void visit(const Section& section) override;
70 void visit(const Segment& segment) override;
71 void visit(const DynamicEntry& entry) override;
72 void visit(const DynamicEntryArray& entry) override;
73 void visit(const DynamicEntryLibrary& entry) override;
74 void visit(const DynamicEntryRpath& entry) override;
75 void visit(const DynamicEntryRunPath& entry) override;
76 void visit(const DynamicSharedObject& entry) override;
77 void visit(const DynamicEntryFlags& entry) override;
78 void visit(const Symbol& symbol) override;
79 void visit(const Relocation& relocation) override;
80 void visit(const SymbolVersion& sv) override;
81 void visit(const SymbolVersionAux& sv) override;
82 void visit(const SymbolVersionAuxRequirement& sv) override;
83 void visit(const SymbolVersionRequirement& svr) override;
84 void visit(const SymbolVersionDefinition& svd) override;
85 void visit(const Note& note) override;
86 void visit(const AndroidIdent& note) override;
87 void visit(const QNXStack& note) override;
88 void visit(const NoteAbi& note) override;
89 void visit(const NoteGnuProperty& note) override;
90 void visit(const CorePrPsInfo& pinfo) override;
91 void visit(const CorePrStatus& pstatus) override;
92 void visit(const CoreAuxv& auxv) override;
93 void visit(const CoreSigInfo& siginfo) override;
94 void visit(const CoreFile& file) override;
95 void visit(const GnuHash& gnuhash) override;
96 void visit(const SysvHash& sysvhash) override;
97
98 ~Hash() override;
99};
100
101}
102}
103
104#endif
Class which represents an ELF binary.
Definition ELF/Binary.hpp:59
Class representing core auxv object.
Definition CoreAuxv.hpp:32
Class representing a core NT_FILE which describes the mapped files of the process.
Definition CoreFile.hpp:31
Class representing the NT_PRPSINFO core note. This kind of note represents general information about ...
Definition CorePrPsInfo.hpp:31
Class representing core PrPsInfo object.
Definition CorePrStatus.hpp:35
Class representing a core siginfo object.
Definition CoreSigInfo.hpp:31
Class that represent an Array in the dynamic table. This entry is associated with constructors:
Definition DynamicEntryArray.hpp:35
Definition DynamicEntryFlags.hpp:29
Class which represents a DT_NEEDED entry in the dynamic table.
Definition DynamicEntryLibrary.hpp:29
Class which represents a DT_RPATH entry. This attribute is deprecated (cf. man ld) in favour of DT_RU...
Definition DynamicEntryRpath.hpp:30
Class that represents a DT_RUNPATH wich is used by the loader to resolve libraries (DynamicEntryLibra...
Definition DynamicEntryRunPath.hpp:30
Class which represents an entry in the dynamic table These entries are located in the ....
Definition DynamicEntry.hpp:36
Class which represents a DT_SONAME entry in the dynamic table This kind of entry is usually used to n...
Definition DynamicSharedObject.hpp:31
Class which provides a view over the GNU Hash implementation. Most of the fields are read-only since ...
Definition GnuHash.hpp:36
Class which implements a visitor to compute a deterministic hash for LIEF ELF objects.
Definition ELF/hash.hpp:58
void visit(const DynamicEntryFlags &entry) override
void visit(const DynamicEntry &entry) override
void visit(const SymbolVersionAuxRequirement &sv) override
void visit(const DynamicEntryRpath &entry) override
void visit(const AndroidIdent &note) override
void visit(const SysvHash &sysvhash) override
void visit(const CoreSigInfo &siginfo) override
void visit(const SymbolVersionDefinition &svd) override
void visit(const Relocation &relocation) override
static LIEF::Hash::value_type hash(const Object &obj)
void visit(const DynamicEntryLibrary &entry) override
void visit(const CoreAuxv &auxv) override
void visit(const SymbolVersionAux &sv) override
void visit(const NoteAbi &note) override
void visit(const QNXStack &note) override
void visit(const Segment &segment) override
void visit(const DynamicEntryArray &entry) override
void visit(const Section &section) override
void visit(const SymbolVersionRequirement &svr) override
void visit(const Binary &binary) override
void visit(const Note &note) override
void visit(const GnuHash &gnuhash) override
void visit(const DynamicSharedObject &entry) override
void visit(const NoteGnuProperty &note) override
void visit(const DynamicEntryRunPath &entry) override
void visit(const Symbol &symbol) override
void visit(const CorePrPsInfo &pinfo) override
void visit(const CorePrStatus &pstatus) override
void visit(const Header &header) override
~Hash() override
void visit(const CoreFile &file) override
void visit(const SymbolVersion &sv) override
Class which represents the ELF's header. This class mirrors the raw ELF Elfxx_Ehdr structure.
Definition ELF/Header.hpp:35
Class that wraps the NT_GNU_ABI_TAG note.
Definition NoteAbi.hpp:30
Class that wraps the NT_GNU_PROPERTY_TYPE_0 note.
Definition NoteGnuProperty.hpp:30
Class which represents an ELF note. This class can be instantiated using the static Note::create func...
Definition Note.hpp:39
Class that represents an ELF relocation.
Definition ELF/Relocation.hpp:40
Class wich represents an ELF Section.
Definition ELF/Section.hpp:48
Class which represents the ELF segments.
Definition Segment.hpp:46
Definition SymbolVersionAuxRequirement.hpp:35
Class which represents an Auxiliary Symbol version.
Definition SymbolVersionAux.hpp:30
Class which represents an entry defined in DT_VERDEF or .gnu.version_d
Definition SymbolVersionDefinition.hpp:37
Class which represents an entry in the DT_VERNEED or .gnu.version_r table.
Definition SymbolVersionRequirement.hpp:39
Class which represents an entry defined in the DT_VERSYM dynamic entry.
Definition SymbolVersion.hpp:32
Class which represents an ELF symbol.
Definition ELF/Symbol.hpp:35
Class which represents the SYSV hash for the symbols resolution.
Definition SysvHash.hpp:39
size_t value_type
Definition hash.hpp:33
virtual void visit(const Object &)
Namespace related to the LIEF's ELF module.
Definition Abstract/Header.hpp:28
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41