From 28398220532389d9f1c16bf78adc17ac49750e84 Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 20 Feb 2024 03:55:49 +0000 Subject: slbt_au_output_symbols(): also filter out coff weak symbols. --- src/arbits/output/slbt_au_output_symbols.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3