aboutsummaryrefslogtreecommitdiff
path: root/ld/pe-dll.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/pe-dll.c')
-rw-r--r--ld/pe-dll.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index a95b85c..b45c530 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -3340,6 +3340,14 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *linfo)
false, false, false);
if (blhe)
is_undef = (blhe->type == bfd_link_hash_undefined);
+
+ if (is_cdecl && (!blhe || !is_undef))
+ {
+ blhe = pe_find_cdecl_alias_match (linfo, name + 6);
+ include_jmp_stub = true;
+ if (blhe)
+ is_undef = (blhe->type == bfd_link_hash_undefined);
+ }
}
else
{
@@ -3347,16 +3355,6 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *linfo)
is_undef = (blhe->type == bfd_link_hash_undefined);
}
- if (is_cdecl
- && (!blhe || (blhe && blhe->type != bfd_link_hash_undefined)))
- {
- sprintf (name, "%s%s",U (""), imp[i].internal_name);
- blhe = pe_find_cdecl_alias_match (linfo, name);
- include_jmp_stub = true;
- if (blhe)
- is_undef = (blhe->type == bfd_link_hash_undefined);
- }
-
free (name);
if (is_undef)