brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · cab0b04 Raw
50 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLD_ELF_AARCH64ERRATAFIX_H10#define LLD_ELF_AARCH64ERRATAFIX_H11 12#include "lld/Common/LLVM.h"13#include "llvm/ADT/DenseMap.h"14#include <vector>15 16namespace lld::elf {17struct Ctx;18class Defined;19class InputSection;20class InputSectionDescription;21class Patch843419Section;22 23class AArch64Err843419Patcher {24public:25  AArch64Err843419Patcher(Ctx &ctx) : ctx(ctx) {}26  // return true if Patches have been added to the OutputSections.27  bool createFixes();28 29private:30  std::vector<Patch843419Section *>31  patchInputSectionDescription(InputSectionDescription &isd);32 33  void insertPatches(InputSectionDescription &isd,34                     std::vector<Patch843419Section *> &patches);35 36  void init();37 38  Ctx &ctx;39  // A cache of the mapping symbols defined by the InputSection sorted in order40  // of ascending value with redundant symbols removed. These describe41  // the ranges of code and data in an executable InputSection.42  llvm::DenseMap<InputSection *, std::vector<const Defined *>> sectionMap;43 44  bool initialized = false;45};46 47} // namespace lld::elf48 49#endif50