summary refs log tree commit diff
path: root/sysdeps/mach/sysdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/sysdep.h')
-rw-r--r--sysdeps/mach/sysdep.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sysdeps/mach/sysdep.h b/sysdeps/mach/sysdep.h
index 9a8dbd5163..d5d370efd0 100644
--- a/sysdeps/mach/sysdep.h
+++ b/sysdeps/mach/sysdep.h
@@ -28,6 +28,17 @@ Cambridge, MA 02139, USA.  */
 #define EXT(x) C_SYMBOL_NAME(x)
 #define LEXT(x) C_SYMBOL_NAME(x##:)
 
+#ifdef HAVE_ELF
+/* For ELF we need to add the `.type' directive to make shared libraries
+   work right.  */
+#undef ENTRY
+#define ENTRY(name) \
+  ASM_GLOBAL_DIRECTIVE name; \
+  .align ALIGN; \
+  .type name,@function; \
+  name:
+#endif
+
 #endif
 
 /* This is invoked by things run when there is random lossage, before they