Previously we did not do that. For example, for R_386_PC8,
0xFF addend was not treated as 0xFFFFFFFF(-1),
but was 0x000000FF.
Recently added checks for R_386_PC8/R_386_PC16 failed because of calculation
overflow as a result.
Differential D29490
[ELF] - Use SignExtend when reading R_386_PC8, R_386_PC16 addends. grimar on Feb 3 2017, 5:40 AM. Authored by
Details Previously we did not do that. For example, for R_386_PC8, Recently added checks for R_386_PC8/R_386_PC16 failed because of calculation
Diff Detail Event TimelineComment Actions This does the same thing as https://reviews.llvm.org/D29493. Please merge the two patches. Comment Actions Don't you need to sign-extend not only these two but all operands that have signed values, do you? |