mach_o: support two level namespace
Closes https://github.com/dart-lang/sdk/pull/63116 GitOrigin-RevId: 8eb01fcda0586e02ec659285b357412e044b823c Change-Id: I85a2baaa046d207fe1b928043e1e479d3a74a3d2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/493000 Reviewed-by: Ryan Macnak <rmacnak@google.com> Reviewed-by: Nate Biggs <natebiggs@google.com> Commit-Queue: Nate Biggs <natebiggs@google.com>
This commit is contained in:
@@ -103,6 +103,8 @@ static constexpr uint32_t MH_DYLDLINK = 0x4;
|
||||
// The object file does not re-export any of its input dynamic
|
||||
// libraries.
|
||||
static constexpr uint32_t MH_NO_REEXPORTED_DYLIBS = 0x100000;
|
||||
// The object file uses two-level namespace bindings.
|
||||
static constexpr uint32_t MH_TWOLEVEL = 0x80;
|
||||
|
||||
struct load_command {
|
||||
// The tag that specifies the load command for the following
|
||||
|
||||
@@ -1932,7 +1932,7 @@ class MachOHeader : public MachOContents {
|
||||
uint32_t flags() const {
|
||||
if (type_ == SnapshotType::Snapshot) {
|
||||
return mach_o::MH_NOUNDEFS | mach_o::MH_DYLDLINK |
|
||||
mach_o::MH_NO_REEXPORTED_DYLIBS;
|
||||
mach_o::MH_NO_REEXPORTED_DYLIBS | mach_o::MH_TWOLEVEL;
|
||||
}
|
||||
ASSERT(type_ == SnapshotType::DebugInfo || type_ == SnapshotType::Object);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user