-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add LC_ENCRYPTION_INFO_64, LC_DYLD_EXPORTS_TRIE, LC_DYLD_CHAINED_FIXUPS
- Loading branch information
Showing
8 changed files
with
515 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package trie | ||
|
||
import "strings" | ||
|
||
type CacheExportFlag int | ||
|
||
const ( | ||
exportSymbolFlagsKindMask CacheExportFlag = 0x03 | ||
exportSymbolFlagsKindRegular CacheExportFlag = 0x00 | ||
exportSymbolFlagsKindThreadLocal CacheExportFlag = 0x01 | ||
exportSymbolFlagsKindAbsolute CacheExportFlag = 0x02 | ||
exportSymbolFlagsWeakDefinition CacheExportFlag = 0x04 | ||
exportSymbolFlagsReexport CacheExportFlag = 0x08 | ||
exportSymbolFlagsStubAndResolver CacheExportFlag = 0x10 | ||
) | ||
|
||
func (f CacheExportFlag) Regular() bool { | ||
return (f & exportSymbolFlagsKindMask) == exportSymbolFlagsKindRegular | ||
} | ||
func (f CacheExportFlag) ThreadLocal() bool { | ||
return (f & exportSymbolFlagsKindMask) == exportSymbolFlagsKindThreadLocal | ||
} | ||
func (f CacheExportFlag) Absolute() bool { | ||
return (f & exportSymbolFlagsKindMask) == exportSymbolFlagsKindAbsolute | ||
} | ||
func (f CacheExportFlag) WeakDefinition() bool { | ||
return f == exportSymbolFlagsWeakDefinition | ||
} | ||
func (f CacheExportFlag) ReExport() bool { | ||
return f == exportSymbolFlagsReexport | ||
} | ||
func (f CacheExportFlag) StubAndResolver() bool { | ||
return f == exportSymbolFlagsStubAndResolver | ||
} | ||
func (f CacheExportFlag) String() string { | ||
var fStr string | ||
if f.Regular() { | ||
fStr += "Regular " | ||
if f.StubAndResolver() { | ||
fStr += "(Has Resolver Function)" | ||
} else if f.WeakDefinition() { | ||
fStr += "(Weak Definition)" | ||
} | ||
} else if f.ThreadLocal() { | ||
fStr += "Thread Local" | ||
} else if f.Absolute() { | ||
fStr += "Absolute" | ||
} | ||
return strings.TrimSpace(fStr) | ||
} |
Oops, something went wrong.