This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Tweak map file output for pei386_auto_import
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 19 Sep 2018 15:01:42 +0930
- Subject: Tweak map file output for pei386_auto_import
Prints the "from" filename.
* ldmain.c (add_archive_element): Handle auto-inport symbols
when printing map.
diff --git a/ld/ldmain.c b/ld/ldmain.c
index f31eeb29c3..aca9b1bb5d 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -850,6 +850,10 @@ add_archive_element (struct bfd_link_info *info,
int len;
h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE);
+ if (h == NULL
+ && info->pei386_auto_import
+ && CONST_STRNEQ (name, "__imp_"))
+ h = bfd_link_hash_lookup (info->hash, name + 6, FALSE, FALSE, TRUE);
if (h == NULL)
from = NULL;
--
Alan Modra
Australia Development Lab, IBM