From e37dde8d18d932e70e00506d2fe707c6dbf5f166 Mon Sep 17 00:00:00 2001 From: George Rimar Date: Thu, 21 Jul 2016 15:35:06 +0000 Subject: [PATCH] [ELF] - Fixed 3 testases failtures on win32 configuration. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Had 3 testcases failtures: ELF/eh-frame-merge.s ELF/gc-sections-eh.s ELF/gc-sections-lsda.s​ Problem was that OutputOff is size_t, which is 32 for this configuration and next condition never was checked correctly: if (PieceI->OutputOff == (uintX_t)-1) continue; llvm-svn: 276296 --- lld/ELF/Relocations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp index f0a2d170f5f4..7df92d50c853 100644 --- a/lld/ELF/Relocations.cpp +++ b/lld/ELF/Relocations.cpp @@ -554,7 +554,7 @@ static void scanRelocs(InputSectionBase &C, ArrayRef Rels) { uintX_t Offset; if (PieceI != PieceE) { assert(PieceI->InputOff <= RI.r_offset && "Relocation not in any piece"); - if (PieceI->OutputOff == (uintX_t)-1) + if (PieceI->OutputOff == (size_t)-1) continue; Offset = PieceI->OutputOff + RI.r_offset - PieceI->InputOff; } else {