diff options
author | midipix <writeonce@midipix.org> | 2024-02-20 03:55:49 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-02-20 03:55:49 +0000 |
commit | 28398220532389d9f1c16bf78adc17ac49750e84 (patch) | |
tree | fcbcd274aa16e167195ad2ca92a5085f5d9b0f35 /src | |
parent | 403e071dd8974a862756aaebe692c0967961a89d (diff) | |
download | slibtool-28398220532389d9f1c16bf78adc17ac49750e84.tar.bz2 slibtool-28398220532389d9f1c16bf78adc17ac49750e84.tar.xz |
slbt_au_output_symbols(): also filter out coff weak symbols.
Diffstat (limited to 'src')
-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); |