[Object/ELF] - Fix a position calculation expression in ELFFile<ELFT>::getEntry().
authorGeorgii Rymar <grimar@accesssoftek.com>
Thu, 5 Mar 2020 09:41:42 +0000 (12:41 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Thu, 5 Mar 2020 09:49:31 +0000 (12:49 +0300)
commite258ad51293f9c363aee8f9b990c6502dd4d14ac
tree9c379e95905baa7334579bae12db36f57c1bc54d
parentaafd65ad9ff0def1e79889074687f7d0b05313e2
[Object/ELF] - Fix a position calculation expression in ELFFile<ELFT>::getEntry().

It fixes now what 1c991f907a43d7a56e82dd67a76514843841ed9a tried to fix.
(A test case failture on 32-bit Arch Linux)

On 32-bit hosts it still fails (because it truncates the `Pos` value to 32 bits).
It seems happens because of `sizeof` that returns `size_t`, which has a
different size on 32/64 bits hosts.

I've tested on a 32-bit host and verified that relocation-errors.test test and
other LLVM tools tests pass now.
llvm/include/llvm/Object/ELF.h