[PATCH] D157657: [RISCV] Support R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128 for .uleb128 directives

Vincent Palatin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 26 23:51:35 PDT 2023


vpalatin added inline comments.
Herald added a subscriber: sunshaoce.


================
Comment at: llvm/lib/MC/MCAssembler.cpp:1020-1022
+  bool Abs = LF.getValue().evaluateAsAbsolute(Value, Layout);
   if (!Abs) {
+    if (!getBackend().relaxLEB128(LF, Layout, Value)) {
----------------
I'm seeing a failure on 'lld :: MachO/compact-unwind-lsda-folding.s' with this part of the change


```
******************** TEST 'lld :: MachO/compact-unwind-lsda-folding.s' FAILED ********************
Script:
--
: 'RUN: at line 6';   rm -rf build.ASSERT/tools/lld/test/MachO/Output/compact-unwind-lsda-folding.s.tmp; mkdir build.ASSERT/tools/lld/test/MachO/Output/compact-unwind-lsda-folding.s.tmp
: 'RUN: at line 7';   build.ASSERT/bin/llvm-mc -filetype=obj -triple=x86_64-apple-macos11.0 -emit-compact-unwind-non-canonical=true -o build.ASSERT/tools/lld/test/MachO/Output/compact-unwind-lsda-folding.s.tmp/lsda.o lld/test/MachO/compact-unwind-lsda-folding.s
: 'RUN: at line 8';   ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings -dylib --icf=all -lSystem -lc++ -o build.ASSERT/tools/lld/test/MachO/Output/compact-unwind-lsda-folding.s.tmp/liblsda.dylib build.ASSERT/tools/lld/test/MachO/Output/compact-unwind-lsda-folding.s.tmp/lsda.o
: 'RUN: at line 9';   build.ASSERT/bin/llvm-objdump --macho --syms --unwind-info build.ASSERT/tools/lld/test/MachO/Output/compact-unwind-lsda-folding.s.tmp/liblsda.dylib | build.ASSERT/bin/FileCheck lld/test/MachO/compact-unwind-lsda-folding.s
--
Exit Code: 1

Command Output (stderr):
--
lld/test/MachO/compact-unwind-lsda-folding.s:87:21: error: .uleb128 expression is not absolute
        .uleb128 Lfunc_end0-Ltmp1               ##   Call between Ltmp1 and Lfunc_end0
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157657/new/

https://reviews.llvm.org/D157657



More information about the llvm-commits mailing list