Revert unrelated chunk committed by accident in r236334.
authorDavide Italiano <davide@freebsd.org>
Fri, 1 May 2015 19:24:29 +0000 (19:24 +0000)
committerDavide Italiano <davide@freebsd.org>
Fri, 1 May 2015 19:24:29 +0000 (19:24 +0000)
The change is likely to be correct, but unrelated to the aforementioned
commit and needs a test to gets shipped. Sorry.

llvm-svn: 236336

lld/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.cpp

index 7a7a1dc..b5f6493 100644 (file)
@@ -24,7 +24,7 @@ static void reloc64(uint8_t *location, uint64_t P, uint64_t S, int64_t A) {
 /// \brief R_X86_64_PC32 - word32: S + A - P
 static void relocPC32(uint8_t *location, uint64_t P, uint64_t S, int64_t A) {
   uint32_t result = (uint32_t)(S + A - P);
-  write32le(location, result | read32le(location));
+  write32le(location, result + read32le(location));
 }
 
 /// \brief R_X86_64_32 - word32:  S + A