[PATCH] D127581: [ELF] Relax R_RISCV_ALIGN

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 12:38:05 PDT 2022


MaskRay marked 2 inline comments as done.
MaskRay added inline comments.


================
Comment at: lld/ELF/LinkerScript.cpp:949-950
 
 // This function assigns offsets to input sections and an output section
 // for a single sections command (e.g. ".text { *(.text); }").
+bool LinkerScript::assignOffsets(OutputSection *sec) {
----------------
luismarques wrote:
> Document return
I think assignOffsets does not need a change. Removed


================
Comment at: lld/ELF/LinkerScript.cpp:1326
     }
-    assignOffsets(&cast<OutputDesc>(cmd)->osec);
+    addrChanged |= assignOffsets(&cast<OutputDesc>(cmd)->osec);
   }
----------------
luismarques wrote:
> We don't have test coverage for this.
I removed this change.

If we exit the loop with
```
relaxOnce => true
assignAddresses   # address updated with correct section size information
relaxOnce => false   # instruction relaxation output does not change
```
It has converged.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127581



More information about the llvm-commits mailing list