summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2013-01-11 21:19:45 +0000
committermiod <miod@openbsd.org>2013-01-11 21:19:45 +0000
commitf53e872e178190686302a0c999fbc2da3f3dd3a9 (patch)
tree3522b612abd31d97adfe2f3a1259fe2700e4d276
parentProper bounds checking for DT_xxx values in _dl_boot_bind(). Turned out to be (diff)
downloadwireguard-openbsd-f53e872e178190686302a0c999fbc2da3f3dd3a9.tar.xz
wireguard-openbsd-f53e872e178190686302a0c999fbc2da3f3dd3a9.zip
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):