save import libintl.8.dylib

This commit is contained in:
cocay 2024-01-03 22:08:57 +07:00
parent 011abfd8db
commit 4dea12dd9e

View File

@ -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 {