diff options
| author | ruki <[email protected]> | 2025-12-12 23:44:56 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-12-12 23:44:56 +0800 |
| commit | e0637f873e9c43aa5e521d8c8db9969a45ea7e3f (patch) | |
| tree | 8429bcbe7af9a04287847299d2afc8a9341e1870 /core/src | |
| parent | 0865857ff1d5635bcf9f7e40409493b2f1e4837a (diff) | |
fix deplibs for macho
Diffstat (limited to 'core/src')
| -rw-r--r-- | core/src/xmake/binutils/macho/deplibs.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/src/xmake/binutils/macho/deplibs.c b/core/src/xmake/binutils/macho/deplibs.c index fbea979c7..a18cb8488 100644 --- a/core/src/xmake/binutils/macho/deplibs.c +++ b/core/src/xmake/binutils/macho/deplibs.c @@ -104,12 +104,14 @@ tb_bool_t xm_binutils_macho_deplibs(tb_stream_ref_t istream, tb_hize_t base_offs } xm_binutils_macho_swap_load_command(&lc, swap); - // check for LC_LOAD_DYLIB, LC_LOAD_WEAK_DYLIB, LC_REEXPORT_DYLIB - // LC_LOAD_DYLIB = 0xc - // LC_LOAD_WEAK_DYLIB = 0x18 | 0x80000000 - // LC_REEXPORT_DYLIB = 0x1f | 0x80000000 + /* check for LC_LOAD_DYLIB, LC_LOAD_WEAK_DYLIB, LC_REEXPORT_DYLIB, LC_ID_DYLIB + * LC_LOAD_DYLIB = 0xc + * LC_ID_DYLIB = 0xd + * LC_LOAD_WEAK_DYLIB = 0x18 | 0x80000000 + * LC_REEXPORT_DYLIB = 0x1f | 0x80000000 + */ - if (lc.cmd == 0xc || lc.cmd == (0x18 | 0x80000000) || lc.cmd == (0x1f | 0x80000000)) { + if (lc.cmd == 0xc || lc.cmd == 0xd || lc.cmd == (0x18 | 0x80000000) || lc.cmd == (0x1f | 0x80000000)) { xm_macho_dylib_command_t dc; if (tb_stream_seek(istream, current_cmd_offset)) { |
