summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arbits/slbt_archive_mapfile.c7
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(&regctx,*symv,1,pmatch,0)) {
if (fcoff || fmach) {
if (slbt_dprintf(fdout,"%s\n",*symv) < 0)