add comment on libintl

This commit is contained in:
nganhkhoa 2024-01-04 06:41:05 +07:00
parent 263596b1a1
commit 07f361d8ac

View File

@ -619,7 +619,15 @@ func (mc *MachoContext) RewriteImportsTable(keepSymbols []string) {
// but because we keep a few symbols, we need to rewrite the pointers
// as well as rebuild the import table and strings table, and bind values
// we keep all symbols that are referenced by libintl.8.dylib
// some symbols are annoyingly distributed by another library
// dispite the name asking for X, the dyld loads a Y library
// LC_DYLD_ID of Y is equal to X and dyld can resolve these symbols
// because we do not search for library using LC_DYLD_ID,
// paths are mistaken and will not resolve symbols
//
// the most common library that has this behavior is libintl
// and fixing the resolver takes time, we temporarily ignore this library
// and so we keep symbols referenced by libintl
intlSymbols := []string{}
for _, symbol := range allSymbols {
if symbol.Dylib() == "/usr/local/opt/gettext/lib/libintl.8.dylib" {