diff --git a/macho-go/internal/wrapper/action/save_imports.go b/macho-go/internal/wrapper/action/save_imports.go index 2d80397..245906d 100644 --- a/macho-go/internal/wrapper/action/save_imports.go +++ b/macho-go/internal/wrapper/action/save_imports.go @@ -1,9 +1,9 @@ package action import ( - // "fmt" "sort" "strings" + // log "github.com/sirupsen/logrus" . "ios-wrapper/internal/wrapper/ofile" @@ -57,6 +57,14 @@ func (action *saveImports) saveToInfo(mf *MachoFile) error { current_lib_idx := -1 current_symbol_idx := -1 + intlSymbols := []string{} + for _, symbol := range symbols_raw { + if symbol.Dylib() == "/usr/local/opt/gettext/lib/libintl.8.dylib" { + intlSymbols = append(intlSymbols, symbol.Name()) + } + } + action.keepSymbols = append(action.keepSymbols, intlSymbols...) + // now we expect everything is sorted and easier to build strings tables // this is not fully optimized, there can be repeated symbol name in different libraries for _, symbol := range symbols_raw {