[PATCH] D23655: [ELF] - Fix for PR28976 - Corrupted section contents when using linker scripts

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 13:25:16 PDT 2016


ruiu added inline comments.

================
Comment at: ELF/Relocations.cpp:559
@@ -558,3 +558,3 @@
         continue;
       Offset = PieceI->OutputOff + RI.r_offset - PieceI->InputOff;
     } else {
----------------
This seems a cool fix, but is it safe? Specifically, my concern is on this line.

We used to call `getOffset` only in the following path. If `PieceI != PieceE`, `getOffset` was not called. Now you call `getOffset` on both paths. Didn't change the behavior?


https://reviews.llvm.org/D23655





More information about the llvm-commits mailing list