Index: ELF/Target.cpp =================================================================== --- ELF/Target.cpp +++ ELF/Target.cpp @@ -518,12 +518,12 @@ switch (Type) { case R_386_8: case R_386_PC8: - checkInt<8>(Loc, Val, Type); + checkUInt<8>(Loc, Val, Type); *Loc = Val; break; case R_386_16: case R_386_PC16: - checkInt<16>(Loc, Val, Type); + checkUInt<16>(Loc, Val, Type); write16le(Loc, Val); break; default: Index: test/ELF/i386-pc16.test =================================================================== --- test/ELF/i386-pc16.test +++ test/ELF/i386-pc16.test @@ -5,7 +5,7 @@ # RUN: llvm-objdump -s -section=.text %t.exe 2>&1 | FileCheck %s # CHECK: Contents of section .text: -# CHECK-NEXT: 0000 45231111 41231111 +# CHECK-NEXT: 0000 11ff1111 0dff1111 !ELF FileHeader: @@ -36,5 +36,5 @@ - Name: _start Type: STT_FUNC Section: .text - Value: 0x1234 + Value: 0xEE00 Size: 4 Index: test/ELF/i386-pc8.s =================================================================== --- test/ELF/i386-pc8.s +++ test/ELF/i386-pc8.s @@ -5,9 +5,9 @@ # RUN: llvm-objdump -s -section=.text %t.out | FileCheck %s # CHECK: Contents of section .text: -# CHECK-NEXT: 0000 15253748 +# CHECK-NEXT: 0000 f5f5f7f8 -.byte und-.+0x11 -.byte und-.+0x22 -.byte und+0x33 -.byte und+0x44 +.byte und-.+0xF1 +.byte und-.+0xF2 +.byte und+0xF3 +.byte und+0xF4