comparison lld/ELF/AArch64ErrataFix.h @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 2e18cbf3894f
comparison
equal deleted inserted replaced
147:c2174574ed3a 150:1d019706d866
1 //===- AArch64ErrataFix.h ---------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLD_ELF_AARCH64ERRATAFIX_H
10 #define LLD_ELF_AARCH64ERRATAFIX_H
11
12 #include "lld/Common/LLVM.h"
13 #include <map>
14 #include <vector>
15
16 namespace lld {
17 namespace elf {
18
19 class Defined;
20 class InputSection;
21 struct InputSectionDescription;
22 class OutputSection;
23 class Patch843419Section;
24
25 class AArch64Err843419Patcher {
26 public:
27 // return true if Patches have been added to the OutputSections.
28 bool createFixes();
29
30 private:
31 std::vector<Patch843419Section *>
32 patchInputSectionDescription(InputSectionDescription &isd);
33
34 void insertPatches(InputSectionDescription &isd,
35 std::vector<Patch843419Section *> &patches);
36
37 void init();
38
39 // A cache of the mapping symbols defined by the InputSection sorted in order
40 // of ascending value with redundant symbols removed. These describe
41 // the ranges of code and data in an executable InputSection.
42 std::map<InputSection *, std::vector<const Defined *>> sectionMap;
43
44 bool initialized = false;
45 };
46
47 } // namespace elf
48 } // namespace lld
49
50 #endif