[lld] [ELF] Support relocatable files using CREL (PR #98115)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 09:17:13 PDT 2024


================
@@ -324,6 +324,8 @@ bool ICF<ELFT>::equalsConstant(const InputSection *a, const InputSection *b) {
 
   const RelsOrRelas<ELFT> ra = a->template relsOrRelas<ELFT>();
   const RelsOrRelas<ELFT> rb = b->template relsOrRelas<ELFT>();
+  if (ra.areRelocsCrel())
----------------
MaskRay wrote:

Not needed. The double rel check is for 686cff17cc310884e48ae963bf7507f96950cc90 .

An early `areRelocsCrel()` issue would not run into that issue.

https://github.com/llvm/llvm-project/pull/98115


More information about the llvm-commits mailing list