(ENTRY): Use ASM_GLOBAL_DIRECTIVE and ASM_TYPE_DIRECTIVE.
authorroland <roland>
Sat, 22 Jul 1995 09:40:06 +0000 (09:40 +0000)
committerroland <roland>
Sat, 22 Jul 1995 09:40:06 +0000 (09:40 +0000)
(ASM_TYPE_DIRECTIVE): New macro; defined using `.type' #ifdef ELF.

sysdeps/unix/i386/sysdep.h

index 38dd237..eb9d7f0 100644 (file)
@@ -20,11 +20,20 @@ Cambridge, MA 02139, USA.  */
 
 #ifdef ASSEMBLER
 
+/* Define an entry point visible from C.  */
 #define        ENTRY(name)                                                           \
-  .globl C_SYMBOL_NAME(name);                                                \
+  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name);                                  \
+  ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function)                         \
   .align 4;                                                                  \
   C_LABEL(name)
 
+/* For ELF we need the `.type' directive to make shared libs work right.  */
+#ifdef HAVE_ELF
+#define ASM_TYPE_DIRECTIVE(name,type)  .type name,type;
+#else
+#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified.  */
+#endif
+
 #ifdef NO_UNDERSCORES
 /* Since C identifiers are not normally prefixed with an underscore
    on this system, the asm identifier `syscall_error' intrudes on the