<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 17, 2014 at 11:57 AM, Jonathan Roelofs <span dir="ltr"><<a href="mailto:jonathan@codesourcery.com" target="_blank">jonathan@codesourcery.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">================<br>
Comment at: test/cxa_thread_atexit_test.cpp:15<br>
@@ +14,3 @@<br>
+<br>
+extern "C" int __cxa_thread_atexit_impl(void (*dtor)(void *), void *obj,<br>
+                                        void *dso_symbol) {<br>
----------------<br>
What about when the libc provides this symbol? Is it normally weak?<br></blockquote><div><br></div><div>The dynamic linker satisfies the symbol from the main executable first, even if there is a strong symbol in another shared object.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
================<br>
Comment at: test/cxa_thread_atexit_test.cpp:16<br>
@@ +15,3 @@<br>
+extern "C" int __cxa_thread_atexit_impl(void (*dtor)(void *), void *obj,<br>
+                                        void *dso_symbol) {<br>
+  assert(dtor == reinterpret_cast<void (*)(void *)>(1));<br>
----------------<br>
to have the same signature, this needs throw().</blockquote><div><br></div><div>This is the _impl function, which doesn't have the throw() specifier (since it's C code). I suppose the throw() on the non-impl version of this is actually unnecessary since it's in extern "C". I had just match the Apple functions above my decl in cxxabi.h.</div></div></div></div>