macho/macho-go/internal/wrapper/action/add_rpath.go
2023-05-31 16:17:03 +07:00

32 lines
543 B
Go

package action
import (
log "github.com/sirupsen/logrus"
. "ios-wrapper/internal/wrapper/ofile"
)
type addRpath struct {
rpath []string
}
func (action *addRpath) withMacho(mf *MachoFile) error {
for _, rpath := range action.rpath {
mf.Context().AddRPath(rpath)
log.WithFields(log.Fields{
"rpath": rpath,
}).Info("Add Rpath Command")
}
return nil
}
func (action *addRpath) withFat(ff *FatFile) error {
return defaultWithFat(action, ff)
}
func NewAddRpathAction(rpath []string) *addRpath {
return &addRpath{
rpath,
}
}