LIEF: Library to Instrument Executable Formats Version 2.0.0
Loading...
Searching...
No Matches
SymbolVersionAux.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2026 R. Thomas
2 * Copyright 2017 - 2026 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_SYMBOL_VERSION_AUX_H
17#define LIEF_ELF_SYMBOL_VERSION_AUX_H
18
19#include <string_view>
20#include <ostream>
21#include <string>
22
23#include "LIEF/Object.hpp"
25#include "LIEF/visibility.h"
26
27
28namespace LIEF::ELF {
29class Parser;
30
33 friend class Parser;
34
35 public:
36 SymbolVersionAux(std::string name) :
37 name_(std::move(name)) {}
38 SymbolVersionAux() = default;
39 ~SymbolVersionAux() override = default;
40
43
45 std::string_view name() const LIEF_LIFETIMEBOUND {
46 return name_;
47 }
48
49 void name(std::string name) {
50 name_ = std::move(name);
51 }
52
53 void accept(Visitor& visitor) const override;
54
55 LIEF_API friend std::ostream& operator<<(std::ostream& os,
56 const SymbolVersionAux& aux) {
57 os << aux.name();
58 return os;
59 }
60
61 protected:
62 std::string name_;
63};
64
65}
66
67#endif
Class which parses and transforms an ELF file into a ELF::Binary object.
Definition ELF/Parser.hpp:45
~SymbolVersionAux() override=default
void name(std::string name)
Definition SymbolVersionAux.hpp:49
friend std::ostream & operator<<(std::ostream &os, const SymbolVersionAux &aux)
Definition SymbolVersionAux.hpp:55
SymbolVersionAux & operator=(const SymbolVersionAux &)=default
void accept(Visitor &visitor) const override
std::string_view name() const
Symbol's aux name (e.g. GLIBC_2.2.5).
Definition SymbolVersionAux.hpp:45
SymbolVersionAux(const SymbolVersionAux &)=default
friend class Parser
Definition SymbolVersionAux.hpp:33
SymbolVersionAux(std::string name)
Definition SymbolVersionAux.hpp:36
Definition Visitor.hpp:212
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Namespace related to the LIEF's ELF module.
Definition Abstract/Header.hpp:28
#define LIEF_API
Definition visibility.h:45