1 /*
2     Copyright (C) 2015 Volker Krause <vkrause@kde.org>
3 
4     This program is free software; you can redistribute it and/or modify it
5     under the terms of the GNU Library General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or (at your
7     option) any later version.
8 
9     This program is distributed in the hope that it will be useful, but WITHOUT
10     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
12     License for more details.
13 
14     You should have received a copy of the GNU General Public License
15     along with this program.  If not, see <https://www.gnu.org/licenses/>.
16 */
17 
18 #ifndef ELFPLTSECTION_H
19 #define ELFPLTSECTION_H
20 
21 #include "elfsection.h"
22 #include "elfpltentry.h"
23 
24 #include <QVector>
25 
26 class ElfGotSection;
27 
28 class ElfPltSection : public ElfSection
29 {
30 public:
31     explicit ElfPltSection(ElfFile* file, ElfSectionHeader* shdr);
32     ~ElfPltSection();
33 
34     ElfPltEntry* entry(uint64_t index) const;
35 
36     /** The GOT section used by this PLT section. */
37     ElfGotSection* gotSection() const;
38 
39 private:
40     QVector<ElfPltEntry> m_entries;
41     mutable ElfGotSection *m_gotSection;
42 };
43 
44 #endif // ELFPLTSECTION_H
45