add selfbind functionality
This commit is contained in:
@ -15,6 +15,15 @@ type saveImports struct{
|
||||
}
|
||||
|
||||
func (action *saveImports) withMacho(mf *MachoFile) error {
|
||||
action.saveToInfo(mf)
|
||||
mc := mf.Context()
|
||||
if mc.Header().IsDylib() {
|
||||
mc.WriteInfoToData(mf.Info())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (action *saveImports) saveToInfo(mf *MachoFile) error {
|
||||
// calculateHash := func(name string) uint32 {
|
||||
// var h uint32 = 0x811c9dc5
|
||||
// for _, s := range name {
|
||||
|
Reference in New Issue
Block a user