[BOLT] Fix relocation verification
Summary: We verify that relocation information matches a value stored in a binary, i.e. "ExtractedValue == SymbolValue + Addend". However, because of the size of the relocation, and the fact that an addend is always of type int64_t, we have to sign-extend the extracted value, and then we might get mismatch in higher bits in certain scenarios. Hence, we should only compare values that are truncated to a relocation size. Discovered while processing hhvm binary with modified compiler flags. (cherry picked from FBD7462559)
Loading
Please sign in to comment