This is an archive of the discontinued LLVM Phabricator instance.

Correctly detect legacy iOS simulator Mach-O objectfiles
ClosedPublic

Authored by aprantl on Aug 5 2020, 1:56 PM.

Details

Summary

The code in ObjectFileMachO didn't disambiguate between ios and ios-simulator object files for Mach-O objects using the legacy ambiguous LC_VERSION_MIN load commands. This used to not matter before taught ArchSpec that ios and ios-simulator are no longer compatible.

rdar://problem/66545307

Diff Detail

Event Timeline

aprantl requested review of this revision.Aug 5 2020, 1:56 PM
aprantl created this revision.
friss added inline comments.Aug 5 2020, 2:01 PM
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
5029–5030

It seems like this will also mark a binary with LC_VERSION_MIN_MACOSX as a simulator binary?

aprantl updated this revision to Diff 283401.Aug 5 2020, 2:38 PM

Excellent point, Fred!

aprantl marked an inline comment as done.Aug 5 2020, 2:39 PM
aprantl updated this revision to Diff 283404.Aug 5 2020, 2:52 PM

Fix typo in test

aprantl updated this revision to Diff 283405.Aug 5 2020, 2:59 PM

Fix a second mistake in the updated test.

friss accepted this revision.Aug 6 2020, 12:35 PM

LGTM!

This revision is now accepted and ready to land.Aug 6 2020, 12:35 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 6 2020, 12:41 PM