summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-01-11 21:19:46 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-01-11 21:19:46 +0000
commit71219135d26baee06d4b75fc5a4170e5f6254b19 (patch)
tree36ba0fdabd983f2f795c093230522a58c74042bc
parenta34a312227f258b9fc792f1787b6b53a601fafdf (diff)
Make ENTRY() generate a .type @function declaration as well if __ELF__.
Add an END() macro, to be used to match ENTRY(), which produces a .size directive.
-rw-r--r--sys/arch/m88k/include/asm.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/arch/m88k/include/asm.h b/sys/arch/m88k/include/asm.h
index b51a85d3c8f..272ae7af9dc 100644
--- a/sys/arch/m88k/include/asm.h
+++ b/sys/arch/m88k/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.11 2013/01/05 11:20:56 miod Exp $ */
+/* $OpenBSD: asm.h,v 1.12 2013/01/11 21:19:45 miod Exp $ */
/*
* Mach Operating System
@@ -42,12 +42,20 @@
#define _ASM_LABEL(name) name
+#ifdef __ELF__
#define _ENTRY(name) \
- .text; .balign 8; .globl name; name:
+ .text; .align 3; .globl name; .type name,@function; name:
+#else
+#define _ENTRY(name) \
+ .text; .align 8; .globl name; name:
+#endif
#define ENTRY(name) _ENTRY(_C_LABEL(name))
#define ASENTRY(name) _ENTRY(_ASM_LABEL(name))
+#define END(name) \
+ .size name,.-name
+
#define GLOBAL(name) \
.globl _C_LABEL(name); _C_LABEL(name):