[ELF][MIPS] Fix .MIPS.options ri_gp_value on MIPS64
authorSimon Atanasyan <simon@atanasyan.com>
Mon, 12 Dec 2016 14:30:18 +0000 (14:30 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Mon, 12 Dec 2016 14:30:18 +0000 (14:30 +0000)
commitb9666655c2d4018a25358ad54dbbb80eda4319fa
tree1dfe6453c0943ce5f770991b3882b16e840e08c8
parent053499841a6d9561446de5b52db62a481b73f9a9
[ELF][MIPS] Fix .MIPS.options ri_gp_value on MIPS64

The VA of _gp was being truncated to 32 bits when calling getVa(), but
for 64bit MIPS we need to write a 64 bit value to .MIPS.options.

Patch by Alexander Richardson.

Differential revision: https://reviews.llvm.org/D27672

llvm-svn: 289432
lld/ELF/SyntheticSections.cpp
lld/ELF/SyntheticSections.h
lld/test/ELF/mips-options.s