LIEF: Library to Instrument Executable Formats Version 2.0.0
Loading...
Searching...
No Matches
Needed.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2026 R. Thomas
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#ifndef LIEF_ELF_NOTE_DETAILS_PROPERTIES_NEEDED_H
16#define LIEF_ELF_NOTE_DETAILS_PROPERTIES_NEEDED_H
17#include <vector>
18
20#include "LIEF/visibility.h"
21
22namespace LIEF {
23class BinaryStream;
24
25namespace ELF {
26
31class LIEF_API Needed : public NoteGnuProperty::Property {
32 public:
33 enum class NEED {
34 UNKNOWN = 0,
35 INDIRECT_EXTERN_ACCESS,
36 };
37
39 const std::vector<NEED>& needs() const {
40 return needs_;
41 }
42
43 static bool classof(const NoteGnuProperty::Property* prop) {
45 }
46
47 static std::unique_ptr<Needed> create(BinaryStream& stream);
48
49 void dump(std::ostream& os) const override;
50
51 ~Needed() override = default;
52
53 protected:
54 Needed(std::vector<NEED> needs) :
56 needs_(std::move(needs)) {}
57
58 std::vector<NEED> needs_;
59};
60
62
63}
64}
65
66#endif
Class that is used to a read stream of data from different sources.
Definition BinaryStream.hpp:34
NEED
Definition Needed.hpp:33
void dump(std::ostream &os) const override
static std::unique_ptr< Needed > create(BinaryStream &stream)
const std::vector< NEED > & needs() const
Return the list of needed features.
Definition Needed.hpp:39
~Needed() override=default
static bool classof(const NoteGnuProperty::Property *prop)
Definition Needed.hpp:43
This class wraps the different properties that can be used in a NT_GNU_PROPERTY_TYPE_0 note.
Definition NoteGnuProperty.hpp:33
TYPE
LIEF's mirror types of the original GNU_PROPERTY_ values.
Definition NoteGnuProperty.hpp:38
@ NEEDED
Definition NoteGnuProperty.hpp:62
TYPE type() const
Return the LIEF's mirror type of the note.
Definition NoteGnuProperty.hpp:66
Class that wraps the NT_GNU_PROPERTY_TYPE_0 note.
Definition NoteGnuProperty.hpp:29
Namespace related to the LIEF's ELF module.
Definition Abstract/Header.hpp:27
const char * to_string(DynamicEntry::TAG e)
LIEF namespace.
Definition Abstract/Binary.hpp:41
#define LIEF_API
Definition visibility.h:44