summaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2013-03-21 14:05:29 +0000
committerKai Tietz <kai.tietz@onevision.com>2013-03-21 14:05:29 +0000
commit20d668f1f4a10f96fe914c7a6a2375d8860d6e1b (patch)
treefaa1270091ad2add385a4434ace3d4dcbec41308 /ld
parent4588448fd2e464250f6be3f62d35cd9ac29e309d (diff)
downloadbinutils-redhat-20d668f1f4a10f96fe914c7a6a2375d8860d6e1b.tar.gz
* pe-dll.c (process_def_file_and_drectve): Don't handle VC
generated C++-symbols as stdcall/fastcall.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/pe-dll.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 9d5a23dc48..e73314721b 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-21 Kai Tietz <ktietz@redhat.com>
+
+ * pe-dll.c (process_def_file_and_drectve): Don't handle VC
+ generated C++-symbols as stdcall/fastcall.
+
2013-03-18 Alan Modra <amodra@gmail.com>
* ld.texinfo (--as-needed): Update.
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index 76a1ce3d25..bd3195f41d 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -782,14 +782,17 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
{
for (i = 0; i < NE; i++)
{
- if (strchr (pe_def_file->exports[i].name, '@'))
+ /* Check for fastcall/stdcall-decoration, but ignore
+ C++ mangled names. */
+ if (pe_def_file->exports[i].name[0] != '?'
+ && strchr (pe_def_file->exports[i].name, '@'))
{
/* This will preserve internal_name, which may have been
pointing to the same memory as name, or might not
have. */
int lead_at = (*pe_def_file->exports[i].name == '@');
char *tmp = xstrdup (pe_def_file->exports[i].name + lead_at);
- char *tmp_at = strchr (tmp, '@');
+ char *tmp_at = strrchr (tmp, '@');
if (tmp_at)
*tmp_at = 0;