summaryrefslogtreecommitdiffhomepage
path: root/src/arbits
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-20 03:55:49 +0000
committermidipix <writeonce@midipix.org>2024-02-20 03:55:49 +0000
commit28398220532389d9f1c16bf78adc17ac49750e84 (patch)
treefcbcd274aa16e167195ad2ca92a5085f5d9b0f35 /src/arbits
parent403e071dd8974a862756aaebe692c0967961a89d (diff)
downloadslibtool-28398220532389d9f1c16bf78adc17ac49750e84.tar.bz2
slibtool-28398220532389d9f1c16bf78adc17ac49750e84.tar.xz
slbt_au_output_symbols(): also filter out coff weak symbols.
Diffstat (limited to 'src/arbits')
-rw-r--r--src/arbits/output/slbt_au_output_symbols.c7
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(&regctx,*symv,1,pmatch,0))
if (slbt_dprintf(fdout,"%s\n",*symv) < 0)
return SLBT_SYSTEM_ERROR(dctx,0);