This is an archive of the discontinued LLVM Phabricator instance.

[02/10] ELF/AArch64: Add support for checking PREL32 for overflow
ClosedPublic

Authored by zatrazz on Apr 7 2015, 7:21 AM.

Details

Summary

Hi ruiu, shankarke,

This is re-post of a previous attempt. This patch adds support for overflow checking when processing R_AARCH64_PREL32 relocations and add tests.

Patch by Will Newton.

Diff Detail

Event Timeline

zatrazz updated this revision to Diff 23328.Apr 7 2015, 7:21 AM
zatrazz retitled this revision from to [02/10] ELF/AArch64: Add support for checking PREL32 for overflow.
zatrazz updated this object.
zatrazz edited the test plan for this revision. (Show Details)
zatrazz added reviewers: ruiu, shankarke.
zatrazz added a project: lld.
zatrazz added a subscriber: lld.
zatrazz added a subscriber: Unknown Object (MLST).Apr 7 2015, 7:21 AM
This revision is now accepted and ready to land.Apr 7 2015, 7:24 AM
ruiu accepted this revision.Apr 7 2015, 9:21 AM
ruiu edited edge metadata.

LGTM

lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.cpp
77

withinSignedUnsignedRange's definition looks strange to me, so I checked the spec and confirmed that what the function is doing is correct. Can you add a one line note to the function comment for readers like me saying that this is what the spec actually requires?

zatrazz closed this revision.Apr 21 2015, 11:15 AM