[PATCH] D29490: [ELF] - Use SignExtend when reading R_386_PC8 addend.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 07:56:02 PST 2017


George Rimar <grimar at accesssoftek.com> writes:
> I can remove OBJRELOC, but what I wanted to show is 0xFF which is addend.
> No not know other way to show addend for i386 except show disasm.

Please do. Lets keep this about testing lld.

>>> +.code16
>>> +
>>> +.byte  0xeb   # short (2-byte) jump
>>> +.byte  foo-1f
>>> +
>>> +1:
>>> +nop
>>> +nop
>>> +nop
>>> +nop
>>
>>Why do you need the nops after the target?
>
> Just simulated the original issue. I think foo should
> be separated from relocation place with something 
> (not be the just the next instruction).
> So it shows we do some calculation and it is correct.
>
> Do you think it is too excessive ? Actually after your question
> I am not sure that is really usefull anymore. I can leave single nop
> here I think.

It is not clear how this could make a difference. The relocation is to
another section. You should alse be able to simplify the "foo-1f" to
just "foo - number", no?

Cheers,
Rafael


More information about the llvm-commits mailing list