Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/contrib/llvm-project/lld/ELF/ARMErrataFix.h
34914 views
1
//===- ARMErrataFix.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_ARMA8ERRATAFIX_H
10
#define LLD_ELF_ARMA8ERRATAFIX_H
11
12
#include "lld/Common/LLVM.h"
13
#include "llvm/ADT/DenseMap.h"
14
#include <vector>
15
16
namespace lld::elf {
17
18
class Defined;
19
class InputSection;
20
class InputSectionDescription;
21
class Patch657417Section;
22
23
class ARMErr657417Patcher {
24
public:
25
// Return true if Patches have been added to the OutputSections.
26
bool createFixes();
27
28
private:
29
std::vector<Patch657417Section *>
30
patchInputSectionDescription(InputSectionDescription &isd);
31
32
void insertPatches(InputSectionDescription &isd,
33
std::vector<Patch657417Section *> &patches);
34
35
void init();
36
37
// A cache of the mapping symbols defined by the InputSection sorted in order
38
// of ascending value with redundant symbols removed. These describe
39
// the ranges of code and data in an executable InputSection.
40
llvm::DenseMap<InputSection *, std::vector<const Defined *>> sectionMap;
41
42
bool initialized = false;
43
};
44
45
} // namespace lld::elf
46
47
#endif
48
49