This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Simplify lc-linker-option.ll and re-enable it on Windows
ClosedPublic

Authored by int3 on Oct 20 2021, 8:19 PM.

Details

Summary

While attempting to simplify it, I discovered a concerning discrepancy
between our handling of LC_LINKER_OPTION vs ld64's. In particular, ld64
does not appear to check for -all_load nor -ObjC when processing
those options. Thus, if/when we fix this behavior, no duplicate symbol
error will be expected regardless of the use-after-free. As such, I've
removed the test logic that tries to induce the duplicate symbol error.
We can just rely on ASAN to do the verification.

In order to make the test run on Windows, I've removed the symlink
logic. Both ld64 and LLD handle this un-symlinked framework just fine.

I also capitalized the framework name, since that's the typical
convention.

Diff Detail

Event Timeline

int3 created this revision.Oct 20 2021, 8:19 PM
Herald added a project: Restricted Project. · View Herald Transcript
int3 requested review of this revision.Oct 20 2021, 8:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 20 2021, 8:19 PM
int3 updated this revision to Diff 381138.Oct 20 2021, 8:24 PM

remove REQUIRES: shell

oontvoo accepted this revision.Oct 21 2021, 7:58 AM
oontvoo added a subscriber: oontvoo.

THanks!

This revision is now accepted and ready to land.Oct 21 2021, 7:58 AM