]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lld/ELF/AArch64ErrataFix.h
Upgrade Unbound to 1.8.0. More to follow.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lld / ELF / AArch64ErrataFix.h
1 //===- AArch64ErrataFix.h ---------------------------------------*- C++ -*-===//
2 //
3 //                             The LLVM Linker
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLD_ELF_AARCH64ERRATAFIX_H
11 #define LLD_ELF_AARCH64ERRATAFIX_H
12
13 #include "lld/Common/LLVM.h"
14
15 #include <map>
16 #include <vector>
17
18 namespace lld {
19 namespace elf {
20
21 class Defined;
22 class InputSection;
23 struct InputSectionDescription;
24 class OutputSection;
25 class Patch843419Section;
26
27 class AArch64Err843419Patcher {
28 public:
29   // return true if Patches have been added to the OutputSections.
30   bool createFixes();
31
32 private:
33   std::vector<Patch843419Section *>
34   patchInputSectionDescription(InputSectionDescription &ISD);
35
36   void insertPatches(InputSectionDescription &ISD,
37                      std::vector<Patch843419Section *> &Patches);
38
39   void init();
40
41   // A cache of the mapping symbols defined by the InputSecion sorted in order
42   // of ascending value with redundant symbols removed. These describe
43   // the ranges of code and data in an executable InputSection.
44   std::map<InputSection *, std::vector<const Defined *>> SectionMap;
45
46   bool Initialized = false;
47 };
48
49 } // namespace elf
50 } // namespace lld
51
52 #endif