Page MenuHomePhabricator

Fix dyld opcode *_ADD_ADDR_IMM_SCALED error detection.
ClosedPublic

Authored by mtrent on Mar 4 2020, 11:02 AM.

Details

Summary

Move the check for malformed REBASE_OPCODE_ADD_ADDR_IMM_SCALED and
BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED opcodes after the immediate
has been applied to the SegmentOffset. This fixes specious errors
where SegmentOffset is pointing between two sections when trying to
correct the SegmentOffset value.

Update the regression tests to verify the proper error message.

Diff Detail

Event Timeline

mtrent created this revision.Mar 4 2020, 11:02 AM
pete accepted this revision.Mar 4 2020, 5:58 PM

LGTM

This revision is now accepted and ready to land.Mar 4 2020, 5:58 PM
This revision was automatically updated to reflect the committed changes.