[lld] r288581 - [ELF] - Implemented R_386_16 and R_386PC16 relocations

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 8 06:00:37 PST 2016


>So, given 2 complement and the fact the x86 is little endian it does
>look like the current code produces the right result, but it is fairly
>confusing. When given
>
>.short foo
>.short 0xffff
>
>it will report having and addend of 0xffff0000. I guess it is still
>theoretically incorrect if the section is at the very end of the file as
>that will read pass the end.
>
>Would you mind changing the code to read only 16 bits for 16 bit
>relocations? It would make it a lot easier to understand.
>
>Cheers,
>Rafael

Done,
https://reviews.llvm.org/rL289046

George.


More information about the llvm-commits mailing list