This is an archive of the discontinued LLVM Phabricator instance.

[ELF][MIPS] Check for overflow when writing R_MIPS_CALL16 and R_MIPS_TLS_GOTTPREL
ClosedPublic

Authored by arichardson on Oct 6 2017, 3:14 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

arichardson created this revision.Oct 6 2017, 3:14 AM
arichardson edited the summary of this revision. (Show Details)Oct 6 2017, 3:16 AM
arichardson added a reviewer: atanasyan.
arichardson set the repository for this revision to rL LLVM.
arichardson added a project: lld.

+llvm-commits

Patches have to be CC'd to the relevant commits list.

arichardson edited the summary of this revision. (Show Details)

Added a test case.

I noticed that test case no longer works with https://reviews.llvm.org/D31528 (Multi-GOT) and I'm not sure how to create one that works with it.

atanasyan accepted this revision.Oct 6 2017, 7:46 AM

LGTM

I think it will be impossible to write a test case for this change when multi-GOT is implemented. The only option is to implement a "debug" command line option for disabling multi-GOT. Additional flag is redundant, but my patch has mips-got-size flag. I consider to treat a zero argument of this flag as a special value.

This revision is now accepted and ready to land.Oct 6 2017, 7:46 AM
This revision was automatically updated to reflect the committed changes.