diff options
author | midipix <writeonce@midipix.org> | 2024-02-20 03:51:44 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-02-20 03:51:44 +0000 |
commit | 403e071dd8974a862756aaebe692c0967961a89d (patch) | |
tree | 91e15226167c99c80ef73e9e7c193573725eda87 /src | |
parent | db80f8870d6922462e7073f7da1140140087ca76 (diff) | |
download | slibtool-403e071dd8974a862756aaebe692c0967961a89d.tar.bz2 slibtool-403e071dd8974a862756aaebe692c0967961a89d.tar.xz |
slbt_ar_create_mapfile(): also filter out coff weak symbols.
Diffstat (limited to 'src')
-rw-r--r-- | src/arbits/slbt_archive_mapfile.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/arbits/slbt_archive_mapfile.c b/src/arbits/slbt_archive_mapfile.c index 08ef3f9..5bfa0f7 100644 --- a/src/arbits/slbt_archive_mapfile.c +++ b/src/arbits/slbt_archive_mapfile.c @@ -24,6 +24,11 @@ /* an underscore (where relevant) is not necessary. */ /********************************************************/ +static int slbt_is_strong_coff_symbol(const char * sym) +{ + return strncmp(sym,"__imp_",6) && strncmp(sym,".weak.",6); +} + static int slbt_ar_output_mapfile_impl( const struct slbt_driver_ctx * dctx, struct slbt_archive_meta_impl * mctx, @@ -73,7 +78,7 @@ static int slbt_ar_output_mapfile_impl( 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 (fcoff || fmach) { if (slbt_dprintf(fdout,"%s\n",*symv) < 0) |