Discussion:
Tweak map file output for pei386_auto_import
Alan Modra
2018-09-19 05:31:42 UTC
Permalink
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
Loading...