<div dir="ltr">On Fri, Aug 1, 2014 at 3:02 PM, Jonathan Roelofs <span dir="ltr"><<a href="mailto:jonathan@codesourcery.com" target="_blank">jonathan@codesourcery.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: jroelofs<br>
Date: Fri Aug  1 17:02:21 2014<br>
New Revision: 214573<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=214573&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=214573&view=rev</a><br>
Log:<br>
[unwinder] Tell the assembler that functions are functions so that the linker knows how to link them.<br>
<br>
This fixes an interworking problem when the unwinder/libcxxabi is built for<br>
Thumb. When unw_getcontext is not marked as a function, 'bl' is used for the<br>
branch instead of 'bx'.<br>
<br>
Modified:<br>
    libcxxabi/trunk/src/Unwind/assembly.h<br>
<br>
Modified: libcxxabi/trunk/src/Unwind/assembly.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/Unwind/assembly.h?rev=214573&r1=214572&r2=214573&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/Unwind/assembly.h?rev=214573&r1=214572&r2=214573&view=diff</a><br>

==============================================================================<br>
--- libcxxabi/trunk/src/Unwind/assembly.h (original)<br>
+++ libcxxabi/trunk/src/Unwind/assembly.h Fri Aug  1 17:02:21 2014<br>
@@ -34,13 +34,32 @@<br>
 #define GLUE(a, b) GLUE2(a, b)<br>
 #define SYMBOL_NAME(name) GLUE(__USER_LABEL_PREFIX__, name)<br>
<br>
+#if defined(__APPLE__)<br>
+#define SYMBOL_IS_FUNC(name)<br>
+#elif defined(__ELF__)<br>
+#define LOCAL_LABEL(name) .L_##name<br></blockquote><div><br></div><div>Why is defined for ELF only?  Was this just an accidental copy?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

+#if defined(__arm__)<br>
+#define SYMBOL_IS_FUNC(name) .type name,%function<br>
+#else<br>
+#define SYMBOL_IS_FUNC(name) .type name,@function<br>
+#endif<br>
+#else<br>
+#define SYMBOL_IS_FUNC(name)                                                   \<br>
+  .def name SEPARATOR                                                          \<br>
+    .scl 2 SEPARATOR                                                           \<br>
+    .type 32 SEPARATOR                                                         \<br>
+  .endef<br>
+#endif<br>
+<br>
 #define DEFINE_LIBUNWIND_FUNCTION(name)                   \<br>
   .globl SYMBOL_NAME(name) SEPARATOR                      \<br>
+  SYMBOL_IS_FUNC(SYMBOL_NAME(name)) SEPARATOR             \<br>
   SYMBOL_NAME(name):<br>
<br>
 #define DEFINE_LIBUNWIND_PRIVATE_FUNCTION(name)           \<br>
   .globl SYMBOL_NAME(name) SEPARATOR                      \<br>
   HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR            \<br>
+  SYMBOL_IS_FUNC(SYMBOL_NAME(name)) SEPARATOR             \<br>
   SYMBOL_NAME(name):<br>
<br>
 #endif /* UNWIND_ASSEMBLY_H */ </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org
</div></div>