* [PATCH 64bit] Fix ONDEE for 64bit, part 2
@ 2013-03-20 6:22 Yaakov (Cygwin/X)
2013-03-20 8:46 ` Corinna Vinschen
0 siblings, 1 reply; 2+ messages in thread
From: Yaakov (Cygwin/X) @ 2013-03-20 6:22 UTC (permalink / raw)
To: cygwin-patches
[-- Attachment #1: Type: text/plain, Size: 97 bytes --]
Unfortunately I missed something last time when I tried fixing ONDEE.
Patch attached.
--
Yaakov
[-- Attachment #2: cygwin-ondee-64bit-part2.patch --]
[-- Type: application/octet-stream, Size: 2285 bytes --]
2013-03-20 Yaakov Selkowitz <yselkowitz@...>
* lib/_cygwin_crt0_common.cc: Fix mangled operator new names for x86_64.
Index: lib/_cygwin_crt0_common.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/lib/_cygwin_crt0_common.cc,v
retrieving revision 1.24.2.4
diff -u -p -r1.24.2.4 _cygwin_crt0_common.cc
--- lib/_cygwin_crt0_common.cc 5 Mar 2013 14:29:30 -0000 1.24.2.4
+++ lib/_cygwin_crt0_common.cc 20 Mar 2013 06:17:36 -0000
@@ -17,22 +17,34 @@ 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
+
/* 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 ));
extern WEAK void operator delete[](void *p) throw()
__asm__ (_SYMSTR (__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));
extern WEAK void operator delete[](void *p, const std::nothrow_t &nt) throw()
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 64bit] Fix ONDEE for 64bit, part 2
2013-03-20 6:22 [PATCH 64bit] Fix ONDEE for 64bit, part 2 Yaakov (Cygwin/X)
@ 2013-03-20 8:46 ` Corinna Vinschen
0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2013-03-20 8:46 UTC (permalink / raw)
To: cygwin-patches
On Mar 20 01:22, Yaakov (Cygwin/X) wrote:
> Unfortunately I missed something last time when I tried fixing ONDEE.
> Patch attached.
I checked it in with a small change. I thought it might look a bit
more clear if all symbols are defined using a REAL_foo define. Please
have a look if that's ok as I did it.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-20 8:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-20 6:22 [PATCH 64bit] Fix ONDEE for 64bit, part 2 Yaakov (Cygwin/X)
2013-03-20 8:46 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).