[PATCH] D127581: [ELF] Relax R_RISCV_ALIGN

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 3 21:35:19 PDT 2022


MaskRay added inline comments.


================
Comment at: lld/ELF/Arch/RISCV.cpp:491
+  // 0).
+  SmallVector<int32_t, 0> relocDeltas;
+};
----------------
MaskRay wrote:
> jrtc27 wrote:
> > Should this not be Elf_Sword or similar? ELFCLASS64 _can_ overflow this, even if you really really really shouldn't.
> There are precedents using int32_t in many places. Elf_Sword is not used. Since relocations aren't that many, just switched to int64_t.
Hmm. I guess the original int32_t or uint32_t may be better.


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