Page MenuHomePhabricator

[lld-macho] Implement -segprot
ClosedPublic

Authored by int3 on Mar 25 2021, 4:08 PM.

Details

Reviewers
oontvoo
Group Reviewers
Restricted Project
Commits
rGa43f588e0128: [lld-macho] Implement -segprot
Summary

Addresses llvm.org/PR49405.

Diff Detail

Event Timeline

int3 created this revision.Mar 25 2021, 4:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2021, 4:08 PM
Herald added a subscriber: dang. · View Herald Transcript
int3 requested review of this revision.Mar 25 2021, 4:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2021, 4:08 PM
int3 edited the summary of this revision. (Show Details)Mar 25 2021, 4:09 PM
int3 edited the summary of this revision. (Show Details)
oontvoo accepted this revision.Mar 29 2021, 10:09 AM
oontvoo added a subscriber: oontvoo.
oontvoo added inline comments.
lld/MachO/Driver.cpp
993–995

Maybe I'm being paranoid - but should you check NumValues() to ensure they're 3 (and ignore the option if it's not) to avoid index-out-of-bounds?

This revision is now accepted and ready to land.Mar 29 2021, 10:09 AM
int3 marked an inline comment as done.Mar 29 2021, 10:59 AM
int3 added inline comments.
lld/MachO/Driver.cpp
993–995

The option parser already handles that :)

I'll add a test to make sure.

int3 updated this revision to Diff 333933.Mar 29 2021, 10:59 AM
int3 marked an inline comment as done.

test

oontvoo accepted this revision.Mar 29 2021, 11:05 AM
oontvoo added inline comments.
lld/MachO/Driver.cpp
993–995

Ah! That's right - you've already declared 3 values in the .td file.
Thanks for adding the test anyway.

This revision was landed with ongoing or failed builds.Mar 29 2021, 11:08 AM
This revision was automatically updated to reflect the committed changes.