27 lines
480 B
Go
27 lines
480 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,
|
||
|
}
|
||
|
}
|
||
|
|