annotate lld/ELF/AArch64ErrataFix.h @ 192:d7606dcf6fce

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