Permalink
Browse files

Tag functions in asm properly. Thanks to Matthias Klose for debugging…

… the issue.
  • Loading branch information...
1 parent eebaef4 commit 1def456fc12a24c6b6438f9034176f3f5f6e3c56 @jpakkane jpakkane committed with nirbheek Jun 21, 2017
@@ -2,7 +2,10 @@
.text
.globl SYMBOL_NAME(get_retval)
+# ifdef __linux__
+.type get_retval, %function
+#endif
SYMBOL_NAME(get_retval):
- mov r0, #0
- mov pc, lr
+ mov r0, #0
+ mov pc, lr
@@ -2,7 +2,10 @@
.text
.globl SYMBOL_NAME(get_retval)
+# ifdef __linux__
+.type get_retval, %function
+#endif
SYMBOL_NAME(get_retval):
- xorl %eax, %eax
- retl
+ xorl %eax, %eax
+ retl
@@ -2,7 +2,10 @@
.text
.globl SYMBOL_NAME(get_retval)
+# ifdef __linux__
+.type get_retval, %function
+#endif
SYMBOL_NAME(get_retval):
- xorl %eax, %eax
- retq
+ xorl %eax, %eax
+ retq
@@ -2,7 +2,10 @@
.text
.globl SYMBOL_NAME(get_retval)
+# ifdef __linux__
+.type get_retval, %function
+#endif
SYMBOL_NAME(get_retval):
- mov r0, #0
- mov pc, lr
+ mov r0, #0
+ mov pc, lr
@@ -2,7 +2,11 @@
.text
.globl SYMBOL_NAME(get_retval)
+/* Only supported on Linux with GAS */
+# ifdef __linux__
+.type get_retval, %function
+#endif
SYMBOL_NAME(get_retval):
- xorl %eax, %eax
- retl
+ xorl %eax, %eax
+ retl
@@ -2,7 +2,10 @@
.text
.globl SYMBOL_NAME(get_retval)
+# ifdef __linux__
+.type get_retval, %function
+#endif
SYMBOL_NAME(get_retval):
- xorl %eax, %eax
- retq
+ xorl %eax, %eax
+ retq

0 comments on commit 1def456

Please sign in to comment.