File indexing completed on 2024-05-12 05:43:29

0001 /*
0002     Copyright (C) 2015 Volker Krause <vkrause@kde.org>
0003 
0004     This program is free software; you can redistribute it and/or modify it
0005     under the terms of the GNU Library General Public License as published by
0006     the Free Software Foundation; either version 2 of the License, or (at your
0007     option) any later version.
0008 
0009     This program is distributed in the hope that it will be useful, but WITHOUT
0010     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0011     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
0012     License for more details.
0013 
0014     You should have received a copy of the GNU General Public License
0015     along with this program.  If not, see <https://www.gnu.org/licenses/>.
0016 */
0017 
0018 #ifndef ELFGNUSYMBOLVERSIONDEFINITIONAUXILIARYENTRY_H
0019 #define ELFGNUSYMBOLVERSIONDEFINITIONAUXILIARYENTRY_H
0020 
0021 #include <elf.h>
0022 
0023 class ElfGNUSymbolVersionDefinition;
0024 
0025 /** Auxiliary entries for ElfGNUSymbolVersionDefinition. */
0026 class ElfGNUSymbolVersionDefinitionAuxiliaryEntry
0027 {
0028 public:
0029     ElfGNUSymbolVersionDefinitionAuxiliaryEntry(const ElfGNUSymbolVersionDefinitionAuxiliaryEntry&) = delete;
0030     explicit ElfGNUSymbolVersionDefinitionAuxiliaryEntry(ElfGNUSymbolVersionDefinition *verDef, uint32_t offset);
0031     ~ElfGNUSymbolVersionDefinitionAuxiliaryEntry();
0032 
0033     ElfGNUSymbolVersionDefinitionAuxiliaryEntry& operator=(const ElfGNUSymbolVersionDefinitionAuxiliaryEntry&) = delete;
0034 
0035     const ElfGNUSymbolVersionDefinition* versionDefinition() const;
0036 
0037     const char* name() const;
0038     uint32_t nextAuxiliaryEntryOffset() const;
0039 
0040 private:
0041     const ElfGNUSymbolVersionDefinition *m_verDef;
0042     const Elf64_Verdaux *const m_auxEntry;
0043 };
0044 
0045 #endif // ELFGNUSYMBOLVERSIONDEFINITIONAUXILIARYENTRY_H