Page MenuHomePhabricator

[ELF][MIPS] Calculate combined addend for R_MIPS_GOT16 against local symbol

Authored by atanasyan on Feb 25 2016, 8:32 AM.



R_MIPS_GOT16 relocation against local symbol requires index of a local GOT entry which contains page address corresponds to sum of the symbol address and addend. The addend in that case is calculated using addends from the R_MIPS_GOT16 and paired R_MIPS_LO16 relocations.

Diff Detail


Event Timeline

atanasyan updated this revision to Diff 49069.Feb 25 2016, 8:32 AM
atanasyan retitled this revision from to [ELF][MIPS] Calculate combined addend for R_MIPS_GOT16 against local symbol.
atanasyan updated this object.
atanasyan added reviewers: ruiu, rafael.
atanasyan set the repository for this revision to rL LLVM.
atanasyan added a project: lld.
atanasyan added a subscriber: llvm-commits.
ruiu accepted this revision.Feb 25 2016, 11:11 AM
ruiu edited edge metadata.

This seems to be yet another oddity of the MIPS ABI, but the code LGTM.

256 ↗(On Diff #49069)

You can remove 0xffff, no? In SignExtend64<16>(X), only the least significant 16 bits in X matters, I think.

This revision is now accepted and ready to land.Feb 25 2016, 11:11 AM
This revision was automatically updated to reflect the committed changes.