From: Alan Modra Date: Wed, 19 Sep 2018 03:35:17 +0000 (+0930) Subject: Tweak map file output for pei386_auto_import X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aa654ee8f830ca0d4d31bad0ff18b9e6261267fd;p=binutils-gdb.git Tweak map file output for pei386_auto_import * ldmain.c (add_archive_element): Handle auto-inport symbols when printing map. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index d0e75595f8e..bf5441f6954 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2018-09-19 Alan Modra + + * ldmain.c (add_archive_element): Handle auto-inport symbols + when printing map. + 2018-09-17 Alan Modra * testsuite/ld-elf/comm-data5.d: Remove notarget for hppa. diff --git a/ld/ldmain.c b/ld/ldmain.c index f31eeb29c3c..aca9b1bb5d0 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;