about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/m68k/sysdep.h
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>1998-06-10 01:37:21 +0000
committerAndreas Schwab <schwab@suse.de>1998-06-10 01:37:21 +0000
commit4bec453640d6ed6e9cd066347bc8199fb9dea28e (patch)
treea39c20aefe8c5195f43c1403d2556a749ed019a4 /sysdeps/unix/sysv/linux/m68k/sysdep.h
parent9e2c0dae9be993530623d0088b95f1278b2686c0 (diff)
downloadglibc-4bec453640d6ed6e9cd066347bc8199fb9dea28e.tar.gz
glibc-4bec453640d6ed6e9cd066347bc8199fb9dea28e.tar.xz
glibc-4bec453640d6ed6e9cd066347bc8199fb9dea28e.zip
* sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_LABEL): New
definition. 
(PSEUDO, SYSCALL_ERROR_HANDLER): Use it instead of syscall_error. 
* sysdeps/unix/sysv/linux/m68k/clone.S: Likewise. 
* sysdeps/unix/sysv/linux/m68k/mmap.S: Likewise. 
* sysdeps/unix/sysv/linux/m68k/socket.S: Likewise. 
* sysdeps/unix/sysv/linux/m68k/syscall.S: Likewise.
	* sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_LABEL): New
	definition.
	(PSEUDO, SYSCALL_ERROR_HANDLER): Use it instead of syscall_error.
	* sysdeps/unix/sysv/linux/m68k/clone.S: Likewise.
	* sysdeps/unix/sysv/linux/m68k/mmap.S: Likewise.
	* sysdeps/unix/sysv/linux/m68k/socket.S: Likewise.
	* sysdeps/unix/sysv/linux/m68k/syscall.S: Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/m68k/sysdep.h')
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sysdep.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 8fdd26f52f..4094172587 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -43,13 +43,22 @@
    for a real error by making sure the value in %d0 is a real error
    number.  Linus said he will make sure the no syscall returns a value
    in -1 .. -4095 as a valid result so we can savely test with -4095.  */
+
+/* We don't want the label for the error handler to be visible in the symbol
+   table when we define it here.  */
+#ifdef PIC
+#define SYSCALL_ERROR_LABEL .Lsyscall_error
+#else
+#define SYSCALL_ERROR_LABEL __syscall_error
+#endif
+
 #undef PSEUDO
 #define	PSEUDO(name, syscall_name, args)				      \
   .text;								      \
   ENTRY (name)								      \
     DO_CALL (syscall_name, args);					      \
     cmp.l &-4095, %d0;							      \
-    jcc syscall_error
+    jcc SYSCALL_ERROR_LABEL
 
 #undef PSEUDO_END
 #define PSEUDO_END(name)						      \
@@ -60,7 +69,7 @@
 /* Store (- %d0) into errno through the GOT.  */
 #ifdef _LIBC_REENTRANT
 #define SYSCALL_ERROR_HANDLER						      \
-syscall_error:								      \
+SYSCALL_ERROR_LABEL:							      \
     neg.l %d0;								      \
     move.l %d0, -(%sp);							      \
     jbsr __errno_location@PLTPC;					      \
@@ -70,9 +79,9 @@ syscall_error:								      \
        a pointer (e.g., mmap).  */					      \
     move.l %d0, %a0;							      \
     rts;
-#else
+#else /* !_LIBC_REENTRANT */
 #define SYSCALL_ERROR_HANDLER						      \
-syscall_error:								      \
+SYSCALL_ERROR_LABEL:							      \
     move.l (errno@GOTPC, %pc), %a0;					      \
     neg.l %d0;								      \
     move.l %d0, (%a0);							      \