From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- lld/ELF/ARMErrataFix.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'lld/ELF/ARMErrataFix.cpp') diff --git a/lld/ELF/ARMErrataFix.cpp b/lld/ELF/ARMErrataFix.cpp index 91cd2b5a2f5f..bd6f689b5844 100644 --- a/lld/ELF/ARMErrataFix.cpp +++ b/lld/ELF/ARMErrataFix.cpp @@ -33,9 +33,8 @@ using namespace llvm::ELF; using namespace llvm::object; using namespace llvm::support; using namespace llvm::support::endian; - -namespace lld { -namespace elf { +using namespace lld; +using namespace lld::elf; // The documented title for Erratum 657417 is: // "A 32bit branch instruction that spans two 4K regions can result in an @@ -71,7 +70,7 @@ namespace elf { // 00001002 2 - bytes padding // 00001004 __CortexA8657417_00000FFE: B.w func -class Patch657417Section : public SyntheticSection { +class elf::Patch657417Section : public SyntheticSection { public: Patch657417Section(InputSection *p, uint64_t off, uint32_t instr, bool isARM); @@ -189,7 +188,7 @@ void Patch657417Section::writeTo(uint8_t *buf) { // been altered to point to us! uint64_t s = getThumbDestAddr(getBranchAddr(), instr); uint64_t p = getVA(4); - target->relocateOne(buf, isARM ? R_ARM_JUMP24 : R_ARM_THM_JUMP24, s - p); + target->relocateNoSym(buf, isARM ? R_ARM_JUMP24 : R_ARM_THM_JUMP24, s - p); } // Given a branch instruction spanning two 4KiB regions, at offset off from the @@ -527,6 +526,3 @@ bool ARMErr657417Patcher::createFixes() { } return addressesChanged; } - -} // namespace elf -} // namespace lld -- cgit v1.2.3