diff options
Diffstat (limited to 'src/arbits/output/slbt_au_output_symbols.c')
-rw-r--r-- | src/arbits/output/slbt_au_output_symbols.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/arbits/output/slbt_au_output_symbols.c b/src/arbits/output/slbt_au_output_symbols.c index 7b51a81..f9ee0c5 100644 --- a/src/arbits/output/slbt_au_output_symbols.c +++ b/src/arbits/output/slbt_au_output_symbols.c @@ -19,6 +19,11 @@ | SLBT_PRETTY_POSIX \ | SLBT_PRETTY_HEXDATA) +static int slbt_is_strong_coff_symbol(const char * sym) +{ + return strncmp(sym,"__imp_",6) && strncmp(sym,".weak.",6); +} + static int slbt_au_output_symbols_posix( const struct slbt_driver_ctx * dctx, struct slbt_archive_meta_impl * mctx, @@ -50,7 +55,7 @@ static int slbt_au_output_symbols_posix( symstrv = fsort ? mctx->mapstrv : mctx->symstrv; for (symv=symstrv; *symv; symv++) - if (!fcoff || strncmp(*symv,"__imp_",6)) + if (!fcoff || slbt_is_strong_coff_symbol(*symv)) if (!regex || !regexec(®ctx,*symv,1,pmatch,0)) if (slbt_dprintf(fdout,"%s\n",*symv) < 0) return SLBT_SYSTEM_ERROR(dctx,0); |