macho/macho-go/internal/wrapper/action/rewrite_imports.go
2023-07-12 13:37:54 +07:00

26 lines
474 B
Go

package action
import (
. "ios-wrapper/internal/wrapper/ofile"
)
type rewriteImports struct {
symbols []string
}
func (action *rewriteImports) withMacho(mf *MachoFile) error {
mc := mf.Context()
mc.RewriteImportsTable(action.symbols)
return nil
}
func (action *rewriteImports) withFat(ff *FatFile) error {
return defaultWithFat(action, ff)
}
func NewRewriteImportsWithKeepSymbolsAction(symbols []string) *rewriteImports {
return &rewriteImports{
symbols,
}
}