Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2013-03-20 12:44:44 +0400
committerCorinna Vinschen <corinna@vinschen.de>2013-03-20 12:44:44 +0400
commit1dd531d537f519d5583c310904f2f76b7581e673 (patch)
tree409d53309ac0e69ef9590acbacde3777e08d8579
parentb9233cede2e884452d79afdfe1f2c8335ed46519 (diff)
* lib/_cygwin_crt0_common.cc: Fix mangled operator new names for x86_64.
-rw-r--r--winsup/cygwin/ChangeLog.64bit4
-rw-r--r--winsup/cygwin/lib/_cygwin_crt0_common.cc32
2 files changed, 28 insertions, 8 deletions
diff --git a/winsup/cygwin/ChangeLog.64bit b/winsup/cygwin/ChangeLog.64bit
index 51600bd51..82a4243b6 100644
--- a/winsup/cygwin/ChangeLog.64bit
+++ b/winsup/cygwin/ChangeLog.64bit
@@ -1,3 +1,7 @@
+2013-03-20 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * lib/_cygwin_crt0_common.cc: Fix mangled operator new names for x86_64.
+
2013-03-19 Corinna Vinschen <corinna@vinschen.de>
* exceptions.cc (stack_info::init): Don't attempt to dereference NULL
diff --git a/winsup/cygwin/lib/_cygwin_crt0_common.cc b/winsup/cygwin/lib/_cygwin_crt0_common.cc
index fb0847d43..b22859ec0 100644
--- a/winsup/cygwin/lib/_cygwin_crt0_common.cc
+++ b/winsup/cygwin/lib/_cygwin_crt0_common.cc
@@ -17,26 +17,42 @@ details. */
unnecessarily. */
#define WEAK __attribute__ ((weak))
+#ifdef __x86_64__
+#define REAL_ZNWX "__real__Znwm"
+#define REAL_ZNAX "__real__Znam"
+#define REAL_ZNWX_NOTHROW_T "__real__ZnwmRKSt9nothrow_t"
+#define REAL_ZNAX_NOTHROW_T "__real__ZnamRKSt9nothrow_t"
+#else
+#define REAL_ZNWX "___real__Znwj"
+#define REAL_ZNAX "___real__Znaj"
+#define REAL_ZNWX_NOTHROW_T "___real__ZnwjRKSt9nothrow_t"
+#define REAL_ZNAX_NOTHROW_T "___real__ZnajRKSt9nothrow_t"
+#endif
+#define REAL_ZDLPV _SYMSTR (__real__ZdlPv)
+#define REAL_ZDAPV _SYMSTR (__real__ZdaPv)
+#define REAL_ZDLPV_NOTHROW_T _SYMSTR (__real__ZdlPvRKSt9nothrow_t)
+#define REAL_ZDAPV_NOTHROW_T _SYMSTR (__real__ZdaPvRKSt9nothrow_t)
+
/* Use asm names to bypass the --wrap that is being applied to redirect all other
references to these operators toward the redirectors in the Cygwin DLL; this
way we can record what definitions were visible at final link time but still
send all calls to the redirectors. */
extern WEAK void *operator new(std::size_t sz) throw (std::bad_alloc)
- __asm__ (_SYMSTR (__real__Znwj));
+ __asm__ (REAL_ZNWX);
extern WEAK void *operator new[](std::size_t sz) throw (std::bad_alloc)
- __asm__ (_SYMSTR (__real__Znaj));
+ __asm__ (REAL_ZNAX);
extern WEAK void operator delete(void *p) throw()
- __asm__ (_SYMSTR (__real__ZdlPv ));
+ __asm__ (REAL_ZDLPV);
extern WEAK void operator delete[](void *p) throw()
- __asm__ (_SYMSTR (__real__ZdaPv));
+ __asm__ (REAL_ZDAPV);
extern WEAK void *operator new(std::size_t sz, const std::nothrow_t &nt) throw()
- __asm__ (_SYMSTR (__real__ZnwjRKSt9nothrow_t));
+ __asm__ (REAL_ZNWX_NOTHROW_T);
extern WEAK void *operator new[](std::size_t sz, const std::nothrow_t &nt) throw()
- __asm__ (_SYMSTR (__real__ZnajRKSt9nothrow_t));
+ __asm__ (REAL_ZNAX_NOTHROW_T);
extern WEAK void operator delete(void *p, const std::nothrow_t &nt) throw()
- __asm__ (_SYMSTR (__real__ZdlPvRKSt9nothrow_t));
+ __asm__ (REAL_ZDLPV_NOTHROW_T);
extern WEAK void operator delete[](void *p, const std::nothrow_t &nt) throw()
- __asm__ (_SYMSTR (__real__ZdaPvRKSt9nothrow_t));
+ __asm__ (REAL_ZDAPV_NOTHROW_T);
/* Avoid an info message from linker when linking applications. */
extern __declspec(dllimport) struct _reent *_impure_ptr;