LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
AArch64PAuth.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_NOTE_DETAILS_PROPERTIES_AARCH64_PAUTH_H
17#define LIEF_ELF_NOTE_DETAILS_PROPERTIES_AARCH64_PAUTH_H
18
19#include "LIEF/visibility.h"
21
22namespace LIEF {
23class BinaryStream;
24
25namespace ELF {
26
33 public: uint64_t platform() const {
39 return platform_;
40 }
41 uint64_t version() const {
44 return version_;
45 }
46
47 static bool classof(const NoteGnuProperty::Property* prop) {
48 return prop->type() == NoteGnuProperty::Property::TYPE::AARCH64_PAUTH;
49 }
50
51 static std::unique_ptr<AArch64PAuth> create(BinaryStream& stream);
52
53 void dump(std::ostream &os) const override;
54
55 ~AArch64PAuth() override = default;
56
57 protected:
58 AArch64PAuth() :
59 NoteGnuProperty::Property(NoteGnuProperty::Property::TYPE::AARCH64_PAUTH)
60 {}
61
62 AArch64PAuth(uint64_t platform, uint64_t version) :
63 NoteGnuProperty::Property(NoteGnuProperty::Property::TYPE::AARCH64_PAUTH),
64 platform_(platform),
65 version_(version)
66 {}
67
68 uint64_t platform_ = 0;
69 uint64_t version_ = 0;
70};
71
72}
73}
74
75
76#endif
NoteGnuProperty.hpp
LIEF::BinaryStream
Class that is used to a read stream of data from different sources.
Definition BinaryStream.hpp:33
LIEF::ELF::AArch64PAuth
This class represents the GNU_PROPERTY_AARCH64_FEATURE_PAUTH property.
Definition AArch64PAuth.hpp:32
LIEF::ELF::AArch64PAuth::create
static std::unique_ptr< AArch64PAuth > create(BinaryStream &stream)
LIEF::ELF::AArch64PAuth::classof
static bool classof(const NoteGnuProperty::Property *prop)
Definition AArch64PAuth.hpp:47
LIEF::ELF::AArch64PAuth::version
uint64_t version() const
64-bit value that identifies the signing schema used by the ELF file.
Definition AArch64PAuth.hpp:43
LIEF::ELF::AArch64PAuth::dump
void dump(std::ostream &os) const override
LIEF::ELF::AArch64PAuth::platform
uint64_t platform() const
64-bit value that specifies the platform vendor.
Definition AArch64PAuth.hpp:38
LIEF::ELF::AArch64PAuth::~AArch64PAuth
~AArch64PAuth() override=default
LIEF::ELF::NoteGnuProperty::Property
This class wraps the different properties that can be used in a NT_GNU_PROPERTY_TYPE_0 note.
Definition NoteGnuProperty.hpp:35
LIEF::ELF::NoteGnuProperty::Property::type
TYPE type() const
Return the LIEF's mirror type of the note.
Definition NoteGnuProperty.hpp:52
LIEF::ELF
Namespace related to the LIEF's ELF module.
Definition Abstract/Header.hpp:28
LIEF
LIEF namespace.
Definition Abstract/Binary.hpp:36
visibility.h
LIEF_API
#define LIEF_API
Definition visibility.h:41