summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/m68k
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/m68k')
-rw-r--r--sysdeps/unix/sysv/linux/m68k/brk.c3
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sysdep.S16
-rw-r--r--sysdeps/unix/sysv/linux/m68k/sysdep.h2
3 files changed, 9 insertions, 12 deletions
diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c
index 3fd547545e..402dfc56f7 100644
--- a/sysdeps/unix/sysv/linux/m68k/brk.c
+++ b/sysdeps/unix/sysv/linux/m68k/brk.c
@@ -42,11 +42,10 @@ __brk (void *addr)
if (newbrk < addr)
{
- errno = ENOMEM;
+ __set_errno (ENOMEM);
return -1;
}
return 0;
}
weak_alias (__brk, brk)
-
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index b47e167159..407c2d393c 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -16,6 +16,8 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+#include <sysdep.h>
+
/* Because the Linux version is in fact m68k/ELF and the start.? file
for this system (sysdeps/m68k/elf/start.S) is also used by The Hurd
and therefore this files must not contain the definition of the
@@ -31,6 +33,9 @@ errno: .space 4
.globl _errno
.type _errno,@object
_errno = errno /* This name is expected by hj libc.so.5 startup code. */
+ .globl __errno
+ .type __errno,@object
+__errno = errno /* This name is expected by the MT code. */
.text
/* The following code is only used in the shared library when we
@@ -39,14 +44,9 @@ _errno = errno /* This name is expected by hj libc.so.5 startup code. */
#ifndef PIC
-#include <sysdep.h>
-#define _ERRNO_H
-#include <errnos.h>
-
/* The syscall stubs jump here when they detect an error. */
-.globl __syscall_error
-__syscall_error:
+ENTRY(__syscall_error)
neg.l %d0
move.l %d0, errno
#ifdef _LIBC_REENTRANT
@@ -62,9 +62,7 @@ __syscall_error:
.size __syscall_error, . - __syscall_error
#endif /* PIC */
- .globl __errno_location
- .type __errno_location, @function
-__errno_location:
+ERRNO(__errno_location)
#ifdef PIC
move.l (%pc, errno@GOTPC), %a0
#else
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 9de750c326..cfc9b04af0 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -86,7 +86,7 @@ syscall_error: \
neg.l %d0; \
move.l %d0, (%a0); \
move.l %d0, -(%sp); \
- jbsr __errno_location@PLTPC \
+ jbsr __errno_location@PLTPC; \
move.l (%sp)+, (%a0); \
move.l POUND -1, %d0; \
/* Copy return value to %a0 for syscalls that are declared to return \