diff --git a/bolt/lib/Core/BinaryContext.cpp b/bolt/lib/Core/BinaryContext.cpp index 6761771a2ee6f18f224398de5c4b5a3e70d7176f..521e62a59a25954b9a65a2e1f0257965e409c113 100644 --- a/bolt/lib/Core/BinaryContext.cpp +++ b/bolt/lib/Core/BinaryContext.cpp @@ -1769,10 +1769,10 @@ void BinaryContext::printCFI(raw_ostream &OS, const MCCFIInstruction &Inst) { } MarkerSymType BinaryContext::getMarkerType(const SymbolRef &Symbol) const { - // For aarch64 and riscv, the ABI defines mapping symbols so we identify data - // in the code section (see IHI0056B). $x identifies a symbol starting code or - // the end of a data chunk inside code, $d indentifies start of data. - if ((!isAArch64() && !isRISCV()) || ELFSymbolRef(Symbol).getSize()) + // For aarch64, the ABI defines mapping symbols so we identify data in the + // code section (see IHI0056B). $x identifies a symbol starting code or the + // end of a data chunk inside code, $d indentifies start of data. + if (!isAArch64() || ELFSymbolRef(Symbol).getSize()) return MarkerSymType::NONE; Expected NameOrError = Symbol.getName(); diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp index 7063b243b52dcc7f5fb5dc06a6c3773efd2bbb76..735645c9022d21e4e692ad5415d71fa071881d49 100644 --- a/bolt/lib/Rewrite/RewriteInstance.cpp +++ b/bolt/lib/Rewrite/RewriteInstance.cpp @@ -884,7 +884,7 @@ void RewriteInstance::discoverFileObjects() { } }; - if (BC->isAArch64() || BC->isRISCV()) { + if (BC->isAArch64()) { addExtraDataMarkerPerSymbol(); LastSymbol = std::stable_partition( SortedSymbols.begin(), SortedSymbols.end(), diff --git a/bolt/test/RISCV/mapping-syms.s b/bolt/test/RISCV/mapping-syms.s deleted file mode 100644 index e8fdeb0c7572dea6c7b0d2b7293121b40237c511..0000000000000000000000000000000000000000 --- a/bolt/test/RISCV/mapping-syms.s +++ /dev/null @@ -1,27 +0,0 @@ -/// FIXME llvm-mc is used instead of clang because we need a recent change in -/// the RISC-V MC layer (D153260). Once that one is released, we can switch to -/// clang. (Note that the pre-merge check buildbots use the system's clang). -// RUN: llvm-mc -triple riscv64 -mattr=+c -filetype obj -o %t.o %s -// RUN: ld.lld -o %t %t.o -// RUN: llvm-bolt --print-cfg --print-only=_start -o %t.bolt %t 2>&1 | FileCheck %s -// RUN: llvm-objdump -d %t.bolt | FileCheck --check-prefix=CHECK-OBJDUMP %s - -// CHECK-NOT: BOLT-WARNING - -/// Check that .word is not disassembled by BOLT -// CHECK: 00000000: nop -// CHECK: 00000002: ret - -/// Check .word is still present in output -// CHECK-OBJDUMP: <_start>: -// CHECK-OBJDUMP-NEXT: nop -// CHECK-OBJDUMP-NEXT: unimp -// CHECK-OBJDUMP-NEXT: unimp -// CHECK-OBJDUMP-NEXT: ret - .text - .globl _start - .p2align 1 -_start: - nop - .word 0x0 - ret