mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
This commit is contained in:
4
sysdeps/unix/sysv/linux/sparc/Dist
Normal file
4
sysdeps/unix/sysv/linux/sparc/Dist
Normal file
@ -0,0 +1,4 @@
|
||||
kernel_termios.h
|
||||
sys/trap.h
|
||||
ldd-rewrite.sed
|
||||
sys/procfs.h
|
@ -1,5 +1 @@
|
||||
64bit-predefine = __sparc_v9__ __arch64__
|
||||
|
||||
ifeq ($(subdir),rt)
|
||||
librt-routines += rt-sysdep
|
||||
endif
|
||||
|
@ -1,7 +1,8 @@
|
||||
libc {
|
||||
# The comment lines with "#errlist-compat" are magic; see errlist-compat.awk.
|
||||
# When you get an error from errlist-compat.awk, you need to add a new
|
||||
# version here.
|
||||
# version here. Don't do this blindly, since this means changing the ABI
|
||||
# for all GNU/Linux configurations.
|
||||
|
||||
GLIBC_2.0 {
|
||||
#errlist-compat 127
|
||||
@ -15,10 +16,6 @@ libc {
|
||||
#errlist-compat 128
|
||||
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
|
||||
}
|
||||
GLIBC_2.4 {
|
||||
#errlist-compat 134
|
||||
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
|
||||
}
|
||||
}
|
||||
librt {
|
||||
GLIBC_2.3 {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Error constants. Linux/Sparc specific version.
|
||||
Copyright (C) 1996,1997,1998,1999,2002,2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -31,12 +31,6 @@
|
||||
# define ECANCELED 127
|
||||
# endif
|
||||
|
||||
/* Support for error codes to support robust mutexes was added later, too. */
|
||||
# ifndef EOWNERDEAD
|
||||
# define EOWNERDEAD 132
|
||||
# define ENOTRECOVERABLE 133
|
||||
# endif
|
||||
|
||||
# ifndef __ASSEMBLER__
|
||||
/* Function to get address of global `errno' variable. */
|
||||
extern int *__errno_location (void) __THROW __attribute__ ((__const__));
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* O_*, F_*, FD_* bit values for Linux/SPARC.
|
||||
Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004, 2006
|
||||
Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -24,9 +24,6 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <bits/wordsize.h>
|
||||
#ifdef __USE_GNU
|
||||
# include <bits/uio.h>
|
||||
#endif
|
||||
|
||||
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
|
||||
located on an ext2 file system */
|
||||
@ -116,7 +113,7 @@
|
||||
# define F_SETLKW64 14 /* Set record locking info (blocking). */
|
||||
#endif
|
||||
|
||||
/* for F_[GET|SET]FD */
|
||||
/* for F_[GET|SET]FL */
|
||||
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
|
||||
|
||||
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
|
||||
@ -202,55 +199,10 @@ struct flock64
|
||||
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __USE_GNU
|
||||
/* Flags for SYNC_FILE_RANGE. */
|
||||
# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
|
||||
in the range before performing the
|
||||
write. */
|
||||
# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
|
||||
dirty pages in the range which are
|
||||
not presently under writeback. */
|
||||
# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
|
||||
the range after performing the
|
||||
write. */
|
||||
|
||||
/* Flags for SPLICE and VMSPLICE. */
|
||||
# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
|
||||
# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
|
||||
(but we may still block on the fd
|
||||
we splice from/to). */
|
||||
# define SPLICE_F_MORE 4 /* Expect more data. */
|
||||
# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#ifdef __USE_GNU
|
||||
|
||||
/* Provide kernel hint to read ahead. */
|
||||
extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
|
||||
__THROW;
|
||||
|
||||
|
||||
/* Selective file content synch'ing. */
|
||||
extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
|
||||
unsigned int __flags);
|
||||
|
||||
|
||||
/* Splice address range into a pipe. */
|
||||
extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
|
||||
unsigned int __flags);
|
||||
|
||||
/* Splice two files together. */
|
||||
extern int splice (int __fdin, __off64_t *__offin, int __fdout,
|
||||
__off64_t *__offout, size_t __len, unsigned int __flags)
|
||||
__THROW;
|
||||
|
||||
/* In-kernel implementation of tee for pipe buffers. */
|
||||
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
|
||||
__THROW;
|
||||
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Definitions for POSIX memory map interface. Linux/SPARC version.
|
||||
Copyright (C) 1997,1999,2000,2003,2005,2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1999, 2000, 2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -57,14 +57,12 @@
|
||||
|
||||
/* These are Linux-specific. */
|
||||
#ifdef __USE_MISC
|
||||
# define MAP_GROWSDOWN 0x0200 /* Stack-like segment. */
|
||||
# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */
|
||||
# define MAP_DENYWRITE 0x0800 /* ETXTBSY */
|
||||
# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */
|
||||
# define MAP_LOCKED 0x0100 /* Lock the mapping. */
|
||||
# define MAP_NORESERVE 0x0040 /* Don't check for reservations. */
|
||||
# define _MAP_NEW 0x80000000 /* Binary compatibility with SunOS. */
|
||||
# define MAP_POPULATE 0x8000 /* Populate (prefault) pagetables. */
|
||||
# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
|
||||
#endif
|
||||
|
||||
/* Flags to `msync'. */
|
||||
@ -80,7 +78,6 @@
|
||||
/* Flags for `mremap'. */
|
||||
#ifdef __USE_GNU
|
||||
# define MREMAP_MAYMOVE 1
|
||||
# define MREMAP_FIXED 2
|
||||
#endif
|
||||
|
||||
/* Advice to `madvise'. */
|
||||
@ -90,10 +87,6 @@
|
||||
# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
|
||||
# define MADV_WILLNEED 3 /* Will need these pages. */
|
||||
# define MADV_DONTNEED 4 /* Don't need these pages. */
|
||||
# define MADV_FREE 5 /* Content can be freed (Solaris). */
|
||||
# define MADV_REMOVE 9 /* Remove these pages and resources. */
|
||||
# define MADV_DONTFORK 10 /* Do not inherit across fork. */
|
||||
# define MADV_DOFORK 11 /* Do inherit across fork. */
|
||||
#endif
|
||||
|
||||
/* The POSIX people had to invent similar names for the same things. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1997, 2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -35,13 +35,6 @@
|
||||
# define POLLWRBAND 0x100 /* Priority data may be written. */
|
||||
#endif
|
||||
|
||||
#ifdef __USE_GNU
|
||||
/* These are extensions for Linux. */
|
||||
# define POLLMSG 0x200
|
||||
# define POLLREMOVE 0x400
|
||||
# define POLLRDHUP 0x800
|
||||
#endif
|
||||
|
||||
/* Event types always implicitly polled for. These bits need not be set in
|
||||
`events', but they will appear in `revents' to indicate the status of
|
||||
the file descriptor. */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Bit values & structures for resource limits. Linux/SPARC version.
|
||||
Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005
|
||||
Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -89,18 +89,7 @@ enum __rlimit_resource
|
||||
__RLIMIT_MSGQUEUE = 12,
|
||||
#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE
|
||||
|
||||
/* Maximum nice priority allowed to raise to.
|
||||
Nice levels 19 .. -20 correspond to 0 .. 39
|
||||
values of this resource limit. */
|
||||
__RLIMIT_NICE = 13,
|
||||
#define RLIMIT_NICE __RLIMIT_NICE
|
||||
|
||||
/* Maximum realtime priority allowed for non-priviledged
|
||||
processes. */
|
||||
__RLIMIT_RTPRIO = 14,
|
||||
#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
|
||||
|
||||
__RLIMIT_NLIMITS = 15,
|
||||
__RLIMIT_NLIMITS = 13,
|
||||
__RLIM_NLIMITS = __RLIMIT_NLIMITS
|
||||
#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
|
||||
#define RLIM_NLIMITS __RLIM_NLIMITS
|
||||
|
@ -1,5 +1,4 @@
|
||||
/* Copyright (C) 1997, 1999, 2000, 2003, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1997,1999,2000,2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -58,12 +57,28 @@ typedef struct __sparc64_jmp_buf
|
||||
} __jmp_buf[1];
|
||||
#endif
|
||||
|
||||
/* Test if longjmp to JMPBUF would unwind the frame
|
||||
containing a local variable at ADDRESS. */
|
||||
#define _JMPBUF_UNWINDS(jmpbuf, address) \
|
||||
((unsigned long int) (address) < (jmpbuf)->uc_mcontext.mc_fp)
|
||||
|
||||
#else
|
||||
|
||||
#if defined __USE_MISC || defined _ASM
|
||||
# define JB_SP 0
|
||||
# define JB_FP 1
|
||||
# define JB_PC 2
|
||||
#endif
|
||||
|
||||
#ifndef _ASM
|
||||
typedef int __jmp_buf[3];
|
||||
#endif
|
||||
|
||||
/* Test if longjmp to JMPBUF would unwind the frame
|
||||
containing a local variable at ADDRESS. */
|
||||
#define _JMPBUF_UNWINDS(jmpbuf, address) \
|
||||
((int) (address) < (jmpbuf)[JB_SP])
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* bits/setjmp.h */
|
||||
|
@ -81,7 +81,6 @@ struct shmid_ds
|
||||
# define SHM_DEST 01000 /* segment will be destroyed on last detach */
|
||||
# define SHM_LOCKED 02000 /* segment will not be swapped */
|
||||
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
|
||||
# define SHM_NORESERVE 010000 /* don't check for reservations */
|
||||
|
||||
struct shminfo
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
/* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2006
|
||||
Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -61,7 +60,15 @@ struct stat
|
||||
#else
|
||||
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
|
||||
#endif
|
||||
#ifdef __USE_MISC
|
||||
#if __WORDSIZE == 64
|
||||
__time_t st_atime; /* Time of last access. */
|
||||
unsigned long int __unused1;
|
||||
__time_t st_mtime; /* Time of last modification. */
|
||||
unsigned long int __unused2;
|
||||
__time_t st_ctime; /* Time of last status change. */
|
||||
unsigned long int __unused3;
|
||||
#else
|
||||
# ifdef __USE_MISC
|
||||
/* Nanosecond resolution timestamps are stored in a format
|
||||
equivalent to 'struct timespec'. This is the type used
|
||||
whenever possible but the Unix namespace rules do not allow the
|
||||
@ -71,16 +78,17 @@ struct stat
|
||||
struct timespec st_atim; /* Time of last access. */
|
||||
struct timespec st_mtim; /* Time of last modification. */
|
||||
struct timespec st_ctim; /* Time of last status change. */
|
||||
# define st_atime st_atim.tv_sec /* Backward compatibility. */
|
||||
# define st_mtime st_mtim.tv_sec
|
||||
# define st_ctime st_ctim.tv_sec
|
||||
#else
|
||||
# define st_atime st_atim.tv_sec /* Backward compatibility. */
|
||||
# define st_mtime st_mtim.tv_sec
|
||||
# define st_ctime st_ctim.tv_sec
|
||||
# else
|
||||
__time_t st_atime; /* Time of last access. */
|
||||
unsigned long int st_atimensec; /* Nscecs of last access. */
|
||||
__time_t st_mtime; /* Time of last modification. */
|
||||
unsigned long int st_mtimensec; /* Nsecs of last modification. */
|
||||
__time_t st_ctime; /* Time of last status change. */
|
||||
unsigned long int st_ctimensec; /* Nsecs of last status change. */
|
||||
# endif
|
||||
#endif
|
||||
unsigned long int __unused4;
|
||||
unsigned long int __unused5;
|
||||
@ -104,7 +112,15 @@ struct stat64
|
||||
__blksize_t st_blksize; /* Optimal block size for I/O. */
|
||||
|
||||
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
|
||||
#ifdef __USE_MISC
|
||||
#if __WORDSIZE == 64
|
||||
__time_t st_atime; /* Time of last access. */
|
||||
unsigned long int __unused1;
|
||||
__time_t st_mtime; /* Time of last modification. */
|
||||
unsigned long int __unused2;
|
||||
__time_t st_ctime; /* Time of last status change. */
|
||||
unsigned long int __unused3;
|
||||
#else
|
||||
# ifdef __USE_MISC
|
||||
/* Nanosecond resolution timestamps are stored in a format
|
||||
equivalent to 'struct timespec'. This is the type used
|
||||
whenever possible but the Unix namespace rules do not allow the
|
||||
@ -114,16 +130,17 @@ struct stat64
|
||||
struct timespec st_atim; /* Time of last access. */
|
||||
struct timespec st_mtim; /* Time of last modification. */
|
||||
struct timespec st_ctim; /* Time of last status change. */
|
||||
# define st_atime st_atim.tv_sec /* Backward compatibility. */
|
||||
# define st_mtime st_mtim.tv_sec
|
||||
# define st_ctime st_ctim.tv_sec
|
||||
#else
|
||||
# define st_atime st_atim.tv_sec /* Backward compatibility. */
|
||||
# define st_mtime st_mtim.tv_sec
|
||||
# define st_ctime st_ctim.tv_sec
|
||||
# else
|
||||
__time_t st_atime; /* Time of last access. */
|
||||
unsigned long int st_atimensec; /* Nscecs of last access. */
|
||||
__time_t st_mtime; /* Time of last modification. */
|
||||
unsigned long int st_mtimensec; /* Nsecs of last modification. */
|
||||
__time_t st_ctime; /* Time of last status change. */
|
||||
unsigned long int st_ctimensec; /* Nsecs of last status change. */
|
||||
# endif
|
||||
#endif
|
||||
unsigned long int __unused4;
|
||||
unsigned long int __unused5;
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* termios type and macro definitions. Linux/SPARC version.
|
||||
Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000, 2005
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -85,41 +84,34 @@ struct termios
|
||||
#define ONLRET 0x00000020
|
||||
#define OFILL 0x00000040
|
||||
#define OFDEL 0x00000080
|
||||
#if defined __USE_MISC || defined __USE_XOPEN
|
||||
# define NLDLY 0x00000100
|
||||
# define NL0 0x00000000
|
||||
# define NL1 0x00000100
|
||||
# define CRDLY 0x00000600
|
||||
# define CR0 0x00000000
|
||||
# define CR1 0x00000200
|
||||
# define CR2 0x00000400
|
||||
# define CR3 0x00000600
|
||||
# define TABDLY 0x00001800
|
||||
# define TAB0 0x00000000
|
||||
# define TAB1 0x00000800
|
||||
# define TAB2 0x00001000
|
||||
# define TAB3 0x00001800
|
||||
# define BSDLY 0x00002000
|
||||
# define BS0 0x00000000
|
||||
# define BS1 0x00002000
|
||||
#define FFDLY 0x00008000
|
||||
#define FF0 0x00000000
|
||||
#define FF1 0x00008000
|
||||
#endif
|
||||
#define NLDLY 0x00000100
|
||||
#define NL0 0x00000000
|
||||
#define NL1 0x00000100
|
||||
#define CRDLY 0x00000600
|
||||
#define CR0 0x00000000
|
||||
#define CR1 0x00000200
|
||||
#define CR2 0x00000400
|
||||
#define CR3 0x00000600
|
||||
#define TABDLY 0x00001800
|
||||
#define TAB0 0x00000000
|
||||
#define TAB1 0x00000800
|
||||
#define TAB2 0x00001000
|
||||
#define TAB3 0x00001800
|
||||
#define XTABS 0x00001800
|
||||
#define BSDLY 0x00002000
|
||||
#define BS0 0x00000000
|
||||
#define BS1 0x00002000
|
||||
#define VTDLY 0x00004000
|
||||
#define VT0 0x00000000
|
||||
#define VT1 0x00004000
|
||||
#define FFDLY 0x00008000
|
||||
#define FF0 0x00000000
|
||||
#define FF1 0x00008000
|
||||
#define PAGEOUT 0x00010000 /* SUNOS specific */
|
||||
#define WRAP 0x00020000 /* SUNOS specific */
|
||||
|
||||
#ifdef __USE_MISC
|
||||
# define XTABS 0x00001800
|
||||
#endif
|
||||
|
||||
/* c_cflag bit meaning */
|
||||
#ifdef __USE_MISC
|
||||
# define CBAUD 0x0000100f
|
||||
#endif
|
||||
#define CBAUD 0x0000100f
|
||||
#define B0 0x00000000 /* hang up */
|
||||
#define B50 0x00000001
|
||||
#define B75 0x00000002
|
||||
@ -136,10 +128,8 @@ struct termios
|
||||
#define B9600 0x0000000d
|
||||
#define B19200 0x0000000e
|
||||
#define B38400 0x0000000f
|
||||
#ifdef __USE_MISC
|
||||
# define EXTA B19200
|
||||
# define EXTB B38400
|
||||
#endif
|
||||
#define EXTA B19200
|
||||
#define EXTB B38400
|
||||
#define CSIZE 0x00000030
|
||||
#define CS5 0x00000000
|
||||
#define CS6 0x00000010
|
||||
@ -151,9 +141,7 @@ struct termios
|
||||
#define PARODD 0x00000200
|
||||
#define HUPCL 0x00000400
|
||||
#define CLOCAL 0x00000800
|
||||
#ifdef __USE_MISC
|
||||
# define CBAUDEX 0x00001000
|
||||
#endif
|
||||
#define CBAUDEX 0x00001000
|
||||
#define B57600 0x00001001
|
||||
#define B115200 0x00001002
|
||||
#define B230400 0x00001003
|
||||
@ -171,32 +159,26 @@ struct termios
|
||||
#define B2000000 0x0000100f
|
||||
#define __MAX_BAUD B2000000
|
||||
|
||||
#ifdef __USE_MISC
|
||||
# define CIBAUD 0x100f0000 /* input baud rate (not used) */
|
||||
# define CMSPAR 0x40000000 /* mark or space (stick) parity */
|
||||
# define CRTSCTS 0x80000000 /* flow control */
|
||||
#endif
|
||||
#define CIBAUD 0x100f0000 /* input baud rate (not used) */
|
||||
#define CMSPAR 0x40000000 /* mark or space (stick) parity */
|
||||
#define CRTSCTS 0x80000000 /* flow control */
|
||||
|
||||
/* c_lflag bits */
|
||||
#define ISIG 0x00000001
|
||||
#define ICANON 0x00000002
|
||||
#if defined __USE_MISC || defined __USE_XOPEN
|
||||
# define XCASE 0x00000004
|
||||
#endif
|
||||
#define XCASE 0x00000004
|
||||
#define ECHO 0x00000008
|
||||
#define ECHOE 0x00000010
|
||||
#define ECHOK 0x00000020
|
||||
#define ECHONL 0x00000040
|
||||
#define NOFLSH 0x00000080
|
||||
#define TOSTOP 0x00000100
|
||||
#ifdef __USE_MISC
|
||||
# define ECHOCTL 0x00000200
|
||||
# define ECHOPRT 0x00000400
|
||||
# define ECHOKE 0x00000800
|
||||
# define DEFECHO 0x00001000 /* SUNOS thing, what is it? */
|
||||
# define FLUSHO 0x00002000
|
||||
# define PENDIN 0x00004000
|
||||
#endif
|
||||
#define ECHOCTL 0x00000200
|
||||
#define ECHOPRT 0x00000400
|
||||
#define ECHOKE 0x00000800
|
||||
#define DEFECHO 0x00001000 /* SUNOS thing, what is it? */
|
||||
#define FLUSHO 0x00002000
|
||||
#define PENDIN 0x00004000
|
||||
#define IEXTEN 0x00008000
|
||||
|
||||
/* modem lines */
|
||||
|
@ -1,20 +0,0 @@
|
||||
/* Determine the wordsize from the preprocessor defines. */
|
||||
|
||||
#if defined __arch64__ || defined __sparcv9
|
||||
# define __WORDSIZE 64
|
||||
#else
|
||||
# define __WORDSIZE 32
|
||||
#endif
|
||||
|
||||
#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
|
||||
|
||||
# if __WORDSIZE == 32
|
||||
/* Signal that in 32bit ABI we didn't used to have a `long double'.
|
||||
The changes all the `long double' function variants to be redirects
|
||||
to the double functions. */
|
||||
# define __LONG_DOUBLE_MATH_OPTIONAL 1
|
||||
# ifndef __LONG_DOUBLE_128__
|
||||
# define __NO_LONG_DOUBLE_MATH 1
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1999, 2001, 2005 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Andreas Jaeger <aj@suse.de>, 1999 and
|
||||
Jakub Jelinek <jakub@redhat.com>, 1999.
|
||||
@ -53,10 +53,10 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
|
||||
#undef process_elf_file
|
||||
#define process_elf_file process_elf32_file
|
||||
#define __ELF_NATIVE_CLASS 32
|
||||
#include "elf/readelflib.c"
|
||||
#include "sysdeps/generic/readelflib.c"
|
||||
|
||||
#undef __ELF_NATIVE_CLASS
|
||||
#undef process_elf_file
|
||||
#define process_elf_file process_elf64_file
|
||||
#define __ELF_NATIVE_CLASS 64
|
||||
#include "elf/readelflib.c"
|
||||
#include "sysdeps/generic/readelflib.c"
|
||||
|
@ -1 +0,0 @@
|
||||
#include <sysdep.c>
|
4
sysdeps/unix/sysv/linux/sparc/sparc32/Dist
Normal file
4
sysdeps/unix/sysv/linux/sparc/sparc32/Dist
Normal file
@ -0,0 +1,4 @@
|
||||
clone.S
|
||||
kernel_stat.h
|
||||
setfsuid.c
|
||||
setfsgid.c
|
@ -1,3 +0,0 @@
|
||||
# These supply the ABI compatibility for when long double was double.
|
||||
ieee754/ldbl-64-128
|
||||
ieee754/ldbl-opt
|
@ -4,18 +4,8 @@ LD += -melf32_sparc
|
||||
|
||||
# When I get this to work, this is the right thing
|
||||
ifeq ($(subdir),elf)
|
||||
CFLAGS-rtld.c += -mcpu=v8
|
||||
CFLAGS-rtld.c += -mv8
|
||||
#rtld-routines += dl-sysdepsparc
|
||||
sysdep-others += lddlibc4
|
||||
install-bin += lddlibc4
|
||||
endif # elf
|
||||
|
||||
ifeq ($(subdir),math)
|
||||
# These 2 routines are normally in libgcc{.a,_s.so.1}.
|
||||
# However, sparc32 -mlong-double-128 libgcc relies on
|
||||
# glibc providing _Q_* routines and without these files
|
||||
# glibc relies on __multc3/__divtc3 only provided
|
||||
# by libgcc if configured with -mlong-double-128.
|
||||
# Provide these routines here as well.
|
||||
libm-routines += multc3 divtc3
|
||||
endif # math
|
||||
|
@ -1 +1 @@
|
||||
#include <sysdeps/unix/sysv/linux/sh/chown.c>
|
||||
#include <sysdeps/unix/sysv/linux/m68k/chown.c>
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <asm/errno.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <tcb-offsets.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
#define CLONE_VM 0x00000100
|
||||
#define CLONE_THREAD 0x00010000
|
||||
@ -33,26 +32,19 @@
|
||||
pid_t *ptid, void *tls, pid_t *ctid); */
|
||||
|
||||
.text
|
||||
ENTRY (__clone)
|
||||
.align 4
|
||||
.globl __clone
|
||||
.type __clone,@function
|
||||
|
||||
__clone:
|
||||
save %sp,-96,%sp
|
||||
cfi_def_cfa_register(%fp)
|
||||
cfi_window_save
|
||||
cfi_register(%o7, %i7)
|
||||
|
||||
/* sanity check arguments */
|
||||
orcc %i0,%g0,%g2
|
||||
tst %i0
|
||||
be .Lerror
|
||||
orcc %i1,%g0,%o1
|
||||
be .Lerror
|
||||
mov %i2,%o0
|
||||
|
||||
/* The child_stack is the top of the stack, allocate one
|
||||
whole stack frame from that as this is what the kernel
|
||||
expects. */
|
||||
sub %o1, 96, %o1
|
||||
mov %i3, %g3
|
||||
mov %i2, %g4
|
||||
|
||||
/* ptid */
|
||||
mov %i4,%o2
|
||||
/* tls */
|
||||
@ -67,43 +59,39 @@ ENTRY (__clone)
|
||||
tst %o1
|
||||
bne __thread_start
|
||||
nop
|
||||
jmpl %i7 + 8, %g0
|
||||
ret
|
||||
restore %o0,%g0,%o0
|
||||
|
||||
.Lerror:
|
||||
call __errno_location
|
||||
or %g0,EINVAL,%i0
|
||||
st %i0,[%o0]
|
||||
jmpl %i7 + 8, %g0
|
||||
ret
|
||||
restore %g0,-1,%o0
|
||||
END(__clone)
|
||||
|
||||
.size __clone, .-__clone
|
||||
|
||||
.type __thread_start,@function
|
||||
__thread_start:
|
||||
cfi_startproc
|
||||
|
||||
__thread_start:
|
||||
#ifdef RESET_PID
|
||||
sethi %hi(CLONE_THREAD), %l0
|
||||
andcc %g4, %l0, %g0
|
||||
andcc %i2, %l0, %g0
|
||||
bne 1f
|
||||
andcc %g4, CLONE_VM, %g0
|
||||
andcc %i2, CLONE_VM, %g0
|
||||
bne,a 2f
|
||||
mov -1,%o0
|
||||
set __NR_getpid,%g1
|
||||
ta 0x10
|
||||
2:
|
||||
st %o0,[%g7 + PID]
|
||||
2: st %o0,[%g7 + PID]
|
||||
st %o0,[%g7 + TID]
|
||||
1:
|
||||
#endif
|
||||
mov %g0, %fp /* terminate backtrace */
|
||||
call %g2
|
||||
mov %g3,%o0
|
||||
call %i0
|
||||
mov %i3,%o0
|
||||
call _exit,0
|
||||
nop
|
||||
|
||||
cfi_endproc
|
||||
|
||||
.size __thread_start, .-__thread_start
|
||||
|
||||
weak_alias (__clone, clone)
|
||||
weak_alias(__clone, clone)
|
||||
|
64
sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c
Normal file
64
sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c
Normal file
@ -0,0 +1,64 @@
|
||||
/* Data for Linux/sparc32 version of processor capability information.
|
||||
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
/* This information must be kept in sync with the _DL_HWCAP_COUNT
|
||||
definition in procinfo.h.
|
||||
|
||||
If anything should be added here check whether the size of each string
|
||||
is still ok with the given array size.
|
||||
|
||||
All the #ifdefs in the definitions ar equite irritating but
|
||||
necessary if we want to avoid duplicating the information. There
|
||||
are three different modes:
|
||||
|
||||
- PROCINFO_DECL is defined. This means we are only interested in
|
||||
declarations.
|
||||
|
||||
- PROCINFO_DECL is not defined:
|
||||
|
||||
+ if SHARED is defined the file is included in an array
|
||||
initializer. The .element = { ... } syntax is needed.
|
||||
|
||||
+ if SHARED is not defined a normal array initialization is
|
||||
needed.
|
||||
*/
|
||||
|
||||
#ifndef PROCINFO_CLASS
|
||||
#define PROCINFO_CLASS
|
||||
#endif
|
||||
|
||||
#if !defined PROCINFO_DECL && defined SHARED
|
||||
._dl_sparc32_cap_flags
|
||||
#else
|
||||
PROCINFO_CLASS const char _dl_sparc32_cap_flags[6][7]
|
||||
#endif
|
||||
#ifndef PROCINFO_DECL
|
||||
= {
|
||||
"flush", "stbar", "swap", "muldiv", "v9", "ultra3"
|
||||
}
|
||||
#endif
|
||||
#if !defined SHARED || defined PROCINFO_DECL
|
||||
;
|
||||
#else
|
||||
,
|
||||
#endif
|
||||
|
||||
#undef PROCINFO_DECL
|
||||
#undef PROCINFO_CLASS
|
75
sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h
Normal file
75
sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h
Normal file
@ -0,0 +1,75 @@
|
||||
/* Linux/sparc32 version of processor capability information handling macros.
|
||||
Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Jakub Jelinek <jj@ultra.linux.cz>, 1999.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifndef _DL_PROCINFO_H
|
||||
#define _DL_PROCINFO_H 1
|
||||
|
||||
#include <ldsodefs.h>
|
||||
|
||||
#define _DL_HWCAP_COUNT 6
|
||||
|
||||
static inline int
|
||||
__attribute__ ((unused))
|
||||
_dl_procinfo (int word)
|
||||
{
|
||||
int i;
|
||||
|
||||
_dl_printf ("AT_HWCAP: ");
|
||||
|
||||
for (i = 0; i < _DL_HWCAP_COUNT; ++i)
|
||||
if (word & (1 << i))
|
||||
_dl_printf (" %s", GLRO(dl_sparc32_cap_flags)[i]);
|
||||
|
||||
_dl_printf ("\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline const char *
|
||||
__attribute__ ((unused))
|
||||
_dl_hwcap_string (int idx)
|
||||
{
|
||||
return GLRO(dl_sparc32_cap_flags)[idx];
|
||||
};
|
||||
|
||||
static inline int
|
||||
__attribute__ ((unused, always_inline))
|
||||
_dl_string_hwcap (const char *str)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < _DL_HWCAP_COUNT; i++)
|
||||
{
|
||||
if (strcmp (str, GLRO(dl_sparc32_cap_flags) [i]) == 0)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
|
||||
#define HWCAP_IMPORTANT (HWCAP_SPARC_V9|HWCAP_SPARC_ULTRA3)
|
||||
|
||||
/* There are no different platforms defined. */
|
||||
#define _dl_platform_string(idx) ""
|
||||
|
||||
/* There're no platforms to filter out. */
|
||||
#define _DL_HWCAP_PLATFORM 0
|
||||
|
||||
#define _dl_string_platform(str) (-1)
|
||||
|
||||
#endif /* dl-procinfo.h */
|
@ -1 +0,0 @@
|
||||
#include <sysdeps/unix/sysv/linux/i386/fchownat.c>
|
@ -1,2 +0,0 @@
|
||||
# We must list this here to move it ahead of the ldbl-opt code.
|
||||
sparc/sparc32/fpu
|
@ -1 +0,0 @@
|
||||
#include <sysdeps/unix/sysv/linux/i386/fxstatat.c>
|
@ -1,8 +0,0 @@
|
||||
/* ABI version for long double switch.
|
||||
This is used by the Versions and math_ldbl_opt.h files in
|
||||
sysdeps/ieee754/ldbl-opt/. It gives the ABI version where
|
||||
long double == double was replaced with proper long double
|
||||
for libm *l functions and libc functions using long double. */
|
||||
|
||||
#define NLDBL_VERSION GLIBC_2.4
|
||||
#define LONG_DOUBLE_COMPAT_VERSION GLIBC_2_4
|
@ -19,22 +19,20 @@
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
.text
|
||||
.globl __syscall_error
|
||||
ENTRY(__libc_pipe)
|
||||
mov %o0, %o2 /* Save PIPEDES. */
|
||||
mov SYS_ify(pipe),%g1
|
||||
ta 0x10
|
||||
bcc 1f
|
||||
mov %o7, %g1
|
||||
call __syscall_error
|
||||
mov %g1, %o7
|
||||
1: st %o0, [%o2] /* PIPEDES[0] = %o0; */
|
||||
st %o1, [%o2 + 4] /* PIPEDES[1] = %o1; */
|
||||
.globl __libc_pipe
|
||||
ENTRY (__libc_pipe)
|
||||
mov %o0, %o2 /* Save PIPEDES. */
|
||||
mov SYS_ify(pipe),%g1
|
||||
ta 0x10
|
||||
bcs __syscall_error_handler
|
||||
nop
|
||||
st %o0, [%o2] /* PIPEDES[0] = %o0; */
|
||||
st %o1, [%o2 + 4] /* PIPEDES[1] = %o1; */
|
||||
retl
|
||||
clr %o0
|
||||
END(__libc_pipe)
|
||||
clr %o0
|
||||
SYSCALL_ERROR_HANDLER
|
||||
|
||||
PSEUDO_END (__libc_pipe)
|
||||
weak_alias (__libc_pipe, __pipe)
|
||||
libc_hidden_def (__pipe)
|
||||
weak_alias (__libc_pipe, pipe)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Semctl for architectures where word sized unions are passed indirectly
|
||||
Copyright (C) 1995,1997,1998,2000,2002,2003,2004,2006
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1997, 1998, 2000, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#include <kernel-features.h>
|
||||
#include "kernel-features.h"
|
||||
#include <shlib-compat.h>
|
||||
|
||||
struct __old_semid_ds
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* POSIX.1 sigaction call for Linux/SPARC.
|
||||
Copyright (C) 1997-2000,2002,2003,2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997,1998,1999,2000,2002,2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Miguel de Icaza (miguel@nuclecu.unam.mx), 1997.
|
||||
|
||||
@ -132,10 +132,6 @@ __libc_sigaction (int sig, __const struct sigaction *act,
|
||||
}
|
||||
libc_hidden_def (__libc_sigaction)
|
||||
|
||||
#ifdef WRAPPER_INCLUDE
|
||||
# include WRAPPER_INCLUDE
|
||||
#endif
|
||||
|
||||
#ifndef LIBC_SIGACTION
|
||||
weak_alias (__libc_sigaction, __sigaction);
|
||||
libc_hidden_weak (__sigaction)
|
||||
|
@ -40,14 +40,10 @@
|
||||
The .S files for the other calls just #define socket and #include this. */
|
||||
|
||||
#ifndef __socket
|
||||
# ifndef NO_WEAK_ALIAS
|
||||
# define __socket P(__,socket)
|
||||
# else
|
||||
# define __socket socket
|
||||
# endif
|
||||
#define __socket P(__,socket)
|
||||
#endif
|
||||
|
||||
.globl __syscall_error
|
||||
.globl __socket
|
||||
ENTRY (__socket)
|
||||
|
||||
/* Drop up to 6 arguments (recvfrom) into the memory allocated by
|
||||
@ -76,19 +72,18 @@ ENTRY (__socket)
|
||||
add %sp, 68, %o1 /* arg 2: parameter block */
|
||||
LOADSYSCALL(socketcall)
|
||||
t 0x10
|
||||
bcc 1f
|
||||
mov %o7, %g1
|
||||
call __syscall_error
|
||||
mov %g1, %o7
|
||||
1: jmpl %o7 + 8, %g0
|
||||
bcs __syscall_error_handler
|
||||
nop
|
||||
retl
|
||||
nop
|
||||
|
||||
#if defined NEED_CANCELLATION && defined CENABLE
|
||||
.Lsocket_cancel:
|
||||
cfi_startproc
|
||||
save %sp, -96, %sp
|
||||
cfi_def_cfa_register(%fp)
|
||||
cfi_def_cfa_register (%fp)
|
||||
cfi_window_save
|
||||
cfi_register(%o7, %i7)
|
||||
cfi_register (%o7, %i7)
|
||||
CENABLE
|
||||
nop
|
||||
mov %o0, %l0
|
||||
@ -96,22 +91,18 @@ ENTRY (__socket)
|
||||
mov P(SOCKOP_,socket), %o0
|
||||
LOADSYSCALL(socketcall)
|
||||
t 0x10
|
||||
bcc 1f
|
||||
bcs __syscall_error_handler2
|
||||
mov %o0, %l1
|
||||
CDISABLE;
|
||||
mov %l0, %o0;
|
||||
call __syscall_error;
|
||||
mov %l1, %o0;
|
||||
b 1f
|
||||
mov -1, %l1;
|
||||
1: CDISABLE
|
||||
CDISABLE
|
||||
mov %l0, %o0
|
||||
2: jmpl %i7 + 8, %g0
|
||||
jmpl %i7 + 8, %g0
|
||||
restore %g0, %l1, %o0
|
||||
cfi_endproc
|
||||
SYSCALL_ERROR_HANDLER2
|
||||
#endif
|
||||
|
||||
SYSCALL_ERROR_HANDLER
|
||||
|
||||
END (__socket)
|
||||
|
||||
#ifndef NO_WEAK_ALIAS
|
||||
weak_alias (__socket, socket)
|
||||
#endif
|
||||
|
1
sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9b/Implies
Normal file
1
sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9b/Implies
Normal file
@ -0,0 +1 @@
|
||||
unix/sysv/linux/sparc/sparc32/sparcv9
|
@ -17,10 +17,8 @@
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
.text
|
||||
.globl __syscall_error
|
||||
ENTRY(syscall)
|
||||
ENTRY (syscall)
|
||||
mov %o0, %g1
|
||||
mov %o1, %o0
|
||||
mov %o2, %o1
|
||||
@ -28,10 +26,10 @@ ENTRY(syscall)
|
||||
mov %o4, %o3
|
||||
mov %o5, %o4
|
||||
ta 0x10
|
||||
bcc 1f
|
||||
mov %o7, %g1
|
||||
call __syscall_error
|
||||
mov %g1, %o7
|
||||
1: retl
|
||||
bcs __syscall_error_handler
|
||||
nop
|
||||
END(syscall)
|
||||
retl
|
||||
nop
|
||||
SYSCALL_ERROR_HANDLER
|
||||
|
||||
PSEUDO_END (syscall)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1997, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1997, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Miguel de Icaza <miguel@gnu.ai.mit.edu>, January 1997.
|
||||
|
||||
@ -38,54 +38,131 @@
|
||||
#undef PSEUDO
|
||||
#undef PSEUDO_NOERRNO
|
||||
#undef PSEUDO_ERRVAL
|
||||
#undef PSEUDO_END
|
||||
#undef ENTRY
|
||||
#undef END
|
||||
#undef LOC
|
||||
|
||||
#define ENTRY(name) \
|
||||
.align 4; \
|
||||
.global C_SYMBOL_NAME(name); \
|
||||
.type name, @function; \
|
||||
C_LABEL(name) \
|
||||
cfi_startproc;
|
||||
#define ENTRY(name) \
|
||||
.global C_SYMBOL_NAME(name); \
|
||||
.align 4;\
|
||||
C_LABEL(name);\
|
||||
.type name,@function;
|
||||
|
||||
#define END(name) \
|
||||
cfi_endproc; \
|
||||
#define END(name) \
|
||||
.size name, . - name
|
||||
|
||||
#define LOC(name) .L##name
|
||||
|
||||
/* If the offset to __syscall_error fits into a signed 22-bit
|
||||
* immediate branch offset, the linker will relax the call into
|
||||
* a normal branch.
|
||||
*/
|
||||
#define PSEUDO(name, syscall_name, args) \
|
||||
.text; \
|
||||
.globl __syscall_error; \
|
||||
ENTRY(name); \
|
||||
LOADSYSCALL(syscall_name); \
|
||||
ta 0x10; \
|
||||
bcc 1f; \
|
||||
mov %o7, %g1; \
|
||||
call __syscall_error; \
|
||||
mov %g1, %o7; \
|
||||
1:
|
||||
#ifdef LINKER_HANDLES_R_SPARC_WDISP22
|
||||
/* Unfortunately, we cannot do this yet. Linker doesn't seem to
|
||||
handle R_SPARC_WDISP22 against non-STB_LOCAL symbols properly . */
|
||||
# define SYSCALL_ERROR_HANDLER_ENTRY(handler) \
|
||||
.section .gnu.linkonce.t.handler,"ax",@progbits; \
|
||||
.globl handler; \
|
||||
.hidden handler; \
|
||||
.type handler,@function; \
|
||||
handler:
|
||||
#else
|
||||
# define SYSCALL_ERROR_HANDLER_ENTRY(handler) \
|
||||
.subsection 3; \
|
||||
handler:
|
||||
#endif
|
||||
|
||||
#define PSEUDO_NOERRNO(name, syscall_name, args)\
|
||||
.text; \
|
||||
ENTRY(name); \
|
||||
LOADSYSCALL(syscall_name); \
|
||||
ta 0x10;
|
||||
#if RTLD_PRIVATE_ERRNO
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
.section .gnu.linkonce.t.__sparc_get_pic_l7,"ax",@progbits; \
|
||||
.globl __sparc_get_pic_l7; \
|
||||
.hidden __sparc_get_pic_l7; \
|
||||
.type __sparc_get_pic_l7,@function; \
|
||||
__sparc_get_pic_l7: \
|
||||
retl; \
|
||||
add %o7, %l7, %l7; \
|
||||
.previous; \
|
||||
SYSCALL_ERROR_HANDLER_ENTRY(__syscall_error_handler) \
|
||||
save %sp,-96,%sp; \
|
||||
sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7; \
|
||||
call __sparc_get_pic_l7; \
|
||||
add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7; \
|
||||
ld [%l7 + rtld_errno], %l0; \
|
||||
st %i0, [%l0]; \
|
||||
jmpl %i7+8, %g0; \
|
||||
restore %g0, -1, %o0; \
|
||||
.previous;
|
||||
#elif USE___THREAD
|
||||
# ifndef NOT_IN_libc
|
||||
# define SYSCALL_ERROR_ERRNO __libc_errno
|
||||
# else
|
||||
# define SYSCALL_ERROR_ERRNO errno
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
.section .gnu.linkonce.t.__sparc_get_pic_l7,"ax",@progbits; \
|
||||
.globl __sparc_get_pic_l7; \
|
||||
.hidden __sparc_get_pic_l7; \
|
||||
.type __sparc_get_pic_l7,@function; \
|
||||
__sparc_get_pic_l7: \
|
||||
retl; \
|
||||
add %o7, %l7, %l7; \
|
||||
.previous; \
|
||||
SYSCALL_ERROR_HANDLER_ENTRY(__syscall_error_handler) \
|
||||
save %sp,-96,%sp; \
|
||||
sethi %tie_hi22(SYSCALL_ERROR_ERRNO), %l1; \
|
||||
sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7; \
|
||||
call __sparc_get_pic_l7; \
|
||||
add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7; \
|
||||
add %l1, %tie_lo10(SYSCALL_ERROR_ERRNO), %l1; \
|
||||
ld [%l7 + %l1], %l1, %tie_ld(SYSCALL_ERROR_ERRNO); \
|
||||
st %i0, [%g7 + %l1], %tie_add(SYSCALL_ERROR_ERRNO); \
|
||||
jmpl %i7+8, %g0; \
|
||||
restore %g0, -1, %o0; \
|
||||
.previous;
|
||||
# else
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
SYSCALL_ERROR_HANDLER_ENTRY(__syscall_error_handler) \
|
||||
sethi %tie_hi22(SYSCALL_ERROR_ERRNO), %g1; \
|
||||
sethi %hi(_GLOBAL_OFFSET_TABLE_), %g2; \
|
||||
add %g1, %tie_lo10(SYSCALL_ERROR_ERRNO), %g1; \
|
||||
add %g2, %lo(_GLOBAL_OFFSET_TABLE_), %g2; \
|
||||
ld [%g2 + %g1], %g1, %tie_ld(SYSCALL_ERROR_ERRNO); \
|
||||
st %o0, [%g7 + %g1], %tie_add(SYSCALL_ERROR_ERRNO); \
|
||||
jmpl %o7+8, %g0; \
|
||||
mov -1, %o0; \
|
||||
.previous;
|
||||
# endif
|
||||
#else
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
SYSCALL_ERROR_HANDLER_ENTRY(__syscall_error_handler) \
|
||||
.global __errno_location; \
|
||||
.type __errno_location,@function; \
|
||||
save %sp, -96, %sp; \
|
||||
call __errno_location; \
|
||||
nop; \
|
||||
st %i0, [%o0]; \
|
||||
jmpl %i7+8, %g0; \
|
||||
restore %g0, -1, %o0; \
|
||||
.previous;
|
||||
#endif
|
||||
|
||||
#define PSEUDO_ERRVAL(name, syscall_name, args) \
|
||||
.text; \
|
||||
ENTRY(name); \
|
||||
LOADSYSCALL(syscall_name); \
|
||||
ta 0x10;
|
||||
#define PSEUDO(name, syscall_name, args) \
|
||||
.text; \
|
||||
ENTRY(name); \
|
||||
LOADSYSCALL(syscall_name); \
|
||||
ta 0x10; \
|
||||
bcs __syscall_error_handler; \
|
||||
nop; \
|
||||
SYSCALL_ERROR_HANDLER
|
||||
|
||||
#define PSEUDO_END(name) \
|
||||
END(name)
|
||||
#define PSEUDO_NOERRNO(name, syscall_name, args) \
|
||||
.text; \
|
||||
ENTRY(name); \
|
||||
LOADSYSCALL(syscall_name); \
|
||||
ta 0x10
|
||||
|
||||
#define PSEUDO_ERRVAL(name, syscall_name, args) \
|
||||
.text; \
|
||||
ENTRY(name); \
|
||||
LOADSYSCALL(syscall_name); \
|
||||
ta 0x10
|
||||
|
||||
#else /* __ASSEMBLER__ */
|
||||
|
||||
@ -137,24 +214,4 @@ ENTRY(name); \
|
||||
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
/* Pointer mangling support. */
|
||||
#if defined NOT_IN_libc && defined IS_IN_rtld
|
||||
/* We cannot use the thread descriptor because in ld.so we use setjmp
|
||||
earlier than the descriptor is initialized. */
|
||||
#else
|
||||
# ifdef __ASSEMBLER__
|
||||
# define PTR_MANGLE(dreg, reg, tmpreg) \
|
||||
ld [%g7 + POINTER_GUARD], tmpreg; \
|
||||
xor reg, tmpreg, dreg
|
||||
# define PTR_DEMANGLE(dreg, reg, tmpreg) PTR_MANGLE (dreg, reg, tmpreg)
|
||||
# define PTR_MANGLE2(dreg, reg, tmpreg) \
|
||||
xor reg, tmpreg, dreg
|
||||
# define PTR_DEMANGLE2(dreg, reg, tmpreg) PTR_MANGLE2 (dreg, reg, tmpreg)
|
||||
# else
|
||||
# define PTR_MANGLE(var) \
|
||||
(var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
|
||||
# define PTR_DEMANGLE(var) PTR_MANGLE (var)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* linux/sparc/sysdep.h */
|
||||
|
7
sysdeps/unix/sysv/linux/sparc/sparc64/Dist
Normal file
7
sysdeps/unix/sysv/linux/sparc/sparc64/Dist
Normal file
@ -0,0 +1,7 @@
|
||||
clone.S
|
||||
dl-brk.S
|
||||
kernel_stat.h
|
||||
getcontext.S
|
||||
setcontext.S
|
||||
sizes.h
|
||||
ucontext_i.h
|
@ -37,11 +37,8 @@ __curbrk: .skip 8
|
||||
#endif
|
||||
|
||||
.text
|
||||
ENTRY (__brk)
|
||||
ENTRY(__brk)
|
||||
save %sp, -192, %sp
|
||||
cfi_def_cfa_register(%fp)
|
||||
cfi_window_save
|
||||
cfi_register(%o7, %i7)
|
||||
#ifdef PIC
|
||||
1: call 2f
|
||||
sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
|
||||
@ -93,6 +90,7 @@ ENTRY (__brk)
|
||||
sub %g0, 1, %i0
|
||||
jmpl %i7+8, %g0
|
||||
restore
|
||||
END (__brk)
|
||||
|
||||
.size __brk, .-__brk
|
||||
|
||||
weak_alias (__brk, brk)
|
||||
|
@ -22,52 +22,34 @@
|
||||
|
||||
#include <asm/errno.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <tcb-offsets.h>
|
||||
#include <sysdep.h>
|
||||
|
||||
#define CLONE_VM 0x00000100
|
||||
#define CLONE_THREAD 0x00010000
|
||||
|
||||
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
|
||||
pid_t *ptid, void *tls, pid_t *ctid); */
|
||||
|
||||
.register %g2,#scratch
|
||||
.register %g3,#scratch
|
||||
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
|
||||
|
||||
.text
|
||||
.align 4
|
||||
.globl __clone
|
||||
.type __clone,@function
|
||||
|
||||
ENTRY (__clone)
|
||||
__clone:
|
||||
save %sp, -192, %sp
|
||||
cfi_def_cfa_register(%fp)
|
||||
cfi_window_save
|
||||
cfi_register(%o7, %i7)
|
||||
|
||||
/* sanity check arguments */
|
||||
brz,pn %i0, 99f /* fn non-NULL? */
|
||||
mov %i0, %g2
|
||||
brz,pn %i1, 99f /* child_stack non-NULL? */
|
||||
mov %i2, %o0 /* clone flags */
|
||||
|
||||
/* The child_stack is the top of the stack, allocate one
|
||||
whole stack frame from that as this is what the kernel
|
||||
expects. Also, subtract STACK_BIAS. */
|
||||
sub %i1, 192 + 0x7ff, %o1
|
||||
mov %i3, %g3
|
||||
mov %i2, %g4
|
||||
|
||||
mov %i4,%o2 /* PTID */
|
||||
mov %i5,%o3 /* TLS */
|
||||
ldx [%fp+0x7ff+176],%o4 /* CTID */
|
||||
brz,pn %i0, 99f
|
||||
mov %i0, %l0 /* save fn */
|
||||
brz,pn %i1, 99f
|
||||
mov %i3, %l3 /* save arg */
|
||||
|
||||
/* Do the system call */
|
||||
sub %i1, 0x7ff, %o1
|
||||
mov %i2, %o0
|
||||
set __NR_clone, %g1
|
||||
ta 0x6d
|
||||
bcs,pn %xcc, 99f
|
||||
nop
|
||||
brnz,pn %o1, __thread_start
|
||||
nop
|
||||
jmpl %i7 + 8, %g0
|
||||
restore %o0, %g0, %o0
|
||||
mov %o0, %i0
|
||||
ret
|
||||
restore
|
||||
99:
|
||||
#ifndef _LIBC_REENTRANT
|
||||
#ifdef PIC
|
||||
@ -89,33 +71,18 @@ ENTRY (__clone)
|
||||
nop
|
||||
st %i0, [%o0]
|
||||
#endif
|
||||
jmpl %i7 + 8, %g0
|
||||
ret
|
||||
restore %g0,-1,%o0
|
||||
END(__clone)
|
||||
.size __clone, .-__clone
|
||||
|
||||
.type __thread_start,@function
|
||||
__thread_start:
|
||||
cfi_startproc
|
||||
#ifdef RESET_PID
|
||||
sethi %hi(CLONE_THREAD), %l0
|
||||
andcc %g4, %l0, %g0
|
||||
bne,pt %icc, 1f
|
||||
andcc %g4, CLONE_VM, %g0
|
||||
bne,a,pn %icc, 2f
|
||||
mov -1,%o0
|
||||
set __NR_getpid,%g1
|
||||
ta 0x6d
|
||||
2: st %o0,[%g7 + PID]
|
||||
st %o0,[%g7 + TID]
|
||||
1:
|
||||
#endif
|
||||
mov %g0, %fp /* terminate backtrace */
|
||||
call %g2
|
||||
mov %g3,%o0
|
||||
sub %sp, 6*8, %sp /* provide arg storage */
|
||||
call %l0
|
||||
mov %l3,%o0
|
||||
call _exit,0
|
||||
nop
|
||||
cfi_endproc
|
||||
.size __thread_start, .-__thread_start
|
||||
|
||||
.size __thread_start, .-__thread_start
|
||||
|
||||
weak_alias (__clone, clone)
|
||||
weak_alias(__clone, clone)
|
||||
|
64
sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c
Normal file
64
sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c
Normal file
@ -0,0 +1,64 @@
|
||||
/* Data for Linux/sparc64 version of processor capability information.
|
||||
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
/* This information must be kept in sync with the _DL_HWCAP_COUNT
|
||||
definition in procinfo.h.
|
||||
|
||||
If anything should be added here check whether the size of each string
|
||||
is still ok with the given array size.
|
||||
|
||||
All the #ifdefs in the definitions ar equite irritating but
|
||||
necessary if we want to avoid duplicating the information. There
|
||||
are three different modes:
|
||||
|
||||
- PROCINFO_DECL is defined. This means we are only interested in
|
||||
declarations.
|
||||
|
||||
- PROCINFO_DECL is not defined:
|
||||
|
||||
+ if SHARED is defined the file is included in an array
|
||||
initializer. The .element = { ... } syntax is needed.
|
||||
|
||||
+ if SHARED is not defined a normal array initialization is
|
||||
needed.
|
||||
*/
|
||||
|
||||
#ifndef PROCINFO_CLASS
|
||||
#define PROCINFO_CLASS
|
||||
#endif
|
||||
|
||||
#if !defined PROCINFO_DECL && defined SHARED
|
||||
._dl_sparc64_cap_flags
|
||||
#else
|
||||
PROCINFO_CLASS const char _dl_sparc64_cap_flags[6][7]
|
||||
#endif
|
||||
#ifndef PROCINFO_DECL
|
||||
= {
|
||||
"flush", "stbar", "swap", "muldiv", "v9", "ultra3"
|
||||
}
|
||||
#endif
|
||||
#if !defined SHARED || defined PROCINFO_DECL
|
||||
;
|
||||
#else
|
||||
,
|
||||
#endif
|
||||
|
||||
#undef PROCINFO_DECL
|
||||
#undef PROCINFO_CLASS
|
76
sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h
Normal file
76
sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h
Normal file
@ -0,0 +1,76 @@
|
||||
/* Linux/sparc64 version of processor capability information handling macros.
|
||||
Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Jakub Jelinek <jj@ultra.linux.cz>, 1999.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifndef _DL_PROCINFO_H
|
||||
#define _DL_PROCINFO_H 1
|
||||
|
||||
#include <ldsodefs.h>
|
||||
|
||||
#define _DL_HWCAP_COUNT 6
|
||||
|
||||
static inline int
|
||||
__attribute__ ((unused))
|
||||
_dl_procinfo (int word)
|
||||
{
|
||||
int i;
|
||||
|
||||
_dl_printf ("AT_HWCAP: ");
|
||||
|
||||
for (i = 0; i < _DL_HWCAP_COUNT; ++i)
|
||||
if (word & (1 << i))
|
||||
_dl_printf (" %s", GLRO(dl_sparc64_cap_flags)[i]);
|
||||
|
||||
_dl_printf ("\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline const char *
|
||||
__attribute__ ((unused))
|
||||
_dl_hwcap_string (int idx)
|
||||
{
|
||||
return GLRO(dl_sparc64_cap_flags)[idx];
|
||||
};
|
||||
|
||||
|
||||
static inline int
|
||||
__attribute__ ((unused))
|
||||
_dl_string_hwcap (const char *str)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < _DL_HWCAP_COUNT; i++)
|
||||
{
|
||||
if (strcmp (str, GLRO(dl_sparc64_cap_flags) [i]) == 0)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
|
||||
#define HWCAP_IMPORTANT (HWCAP_SPARC_ULTRA3)
|
||||
|
||||
/* There are no different platforms defined. */
|
||||
#define _dl_platform_string(idx) ""
|
||||
|
||||
/* There're no platforms to filter out. */
|
||||
#define _DL_HWCAP_PLATFORM 0
|
||||
|
||||
#define _dl_string_platform(str) (-1)
|
||||
|
||||
#endif /* dl-procinfo.h */
|
@ -1 +0,0 @@
|
||||
#include "../../i386/fxstatat.c"
|
@ -62,4 +62,4 @@ ENTRY(__getcontext)
|
||||
|
||||
END(__getcontext)
|
||||
|
||||
weak_alias (__getcontext, getcontext)
|
||||
weak_alias(__getcontext, getcontext)
|
||||
|
@ -9,39 +9,31 @@ struct kernel_stat
|
||||
unsigned int st_gid;
|
||||
unsigned int st_rdev;
|
||||
long int st_size;
|
||||
long int st_atime_sec;
|
||||
long int st_mtime_sec;
|
||||
long int st_ctime_sec;
|
||||
long int st_atime;
|
||||
long int st_mtime;
|
||||
long int st_ctime;
|
||||
long int st_blksize;
|
||||
long int st_blocks;
|
||||
unsigned long int __unused1;
|
||||
unsigned long int __unused2;
|
||||
};
|
||||
|
||||
/* Definition of `struct stat64' used in the kernel. */
|
||||
struct kernel_stat64
|
||||
{
|
||||
unsigned long int st_dev;
|
||||
unsigned long int st_ino;
|
||||
unsigned long int st_nlink;
|
||||
#define _HAVE___UNUSED1
|
||||
#define _HAVE___UNUSED2
|
||||
|
||||
unsigned int st_mode;
|
||||
unsigned int st_uid;
|
||||
unsigned int st_gid;
|
||||
unsigned int __pad0;
|
||||
|
||||
unsigned long int st_rdev;
|
||||
long int st_size;
|
||||
long int st_blksize;
|
||||
long int st_blocks;
|
||||
|
||||
unsigned long int st_atime_sec;
|
||||
unsigned long int st_atime_nsec;
|
||||
unsigned long int st_mtime_sec;
|
||||
unsigned long int st_mtime_nsec;
|
||||
unsigned long int st_ctime_sec;
|
||||
unsigned long int st_ctime_nsec;
|
||||
long int __unused[3];
|
||||
};
|
||||
#define _HAVE_STAT___UNUSED1
|
||||
#define _HAVE_STAT___UNUSED2
|
||||
#define _HAVE_STAT___UNUSED3
|
||||
#define _HAVE_STAT___UNUSED4
|
||||
#define _HAVE_STAT___UNUSED5
|
||||
#define _HAVE_STAT___PAD1
|
||||
#define _HAVE_STAT___PAD2
|
||||
#define _HAVE_STAT64___UNUSED1
|
||||
#define _HAVE_STAT64___UNUSED2
|
||||
#define _HAVE_STAT64___UNUSED3
|
||||
#define _HAVE_STAT64___UNUSED4
|
||||
#define _HAVE_STAT64___UNUSED5
|
||||
#define _HAVE_STAT64___PAD1
|
||||
#define _HAVE_STAT64___PAD2
|
||||
|
||||
#define XSTAT_IS_XSTAT64 1
|
||||
|
@ -47,6 +47,6 @@ END(__libc_siglongjmp)
|
||||
strong_alias(__libc_siglongjmp, __longjmp)
|
||||
strong_alias(__libc_siglongjmp, __libc_longjmp)
|
||||
libc_hidden_def (__libc_longjmp)
|
||||
weak_alias (__libc_siglongjmp, longjmp)
|
||||
weak_alias (__libc_siglongjmp, _longjmp)
|
||||
weak_alias (__libc_siglongjmp, siglongjmp)
|
||||
weak_alias(__libc_siglongjmp, longjmp)
|
||||
weak_alias(__libc_siglongjmp, _longjmp)
|
||||
weak_alias(__libc_siglongjmp, siglongjmp)
|
||||
|
@ -1 +1 @@
|
||||
#include "../../i386/lxstat.c"
|
||||
#include "../../lxstat.c"
|
||||
|
@ -1,9 +1 @@
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <sysdep-cancel.h>
|
||||
|
||||
#define __sigprocmask(how, set, oset) \
|
||||
INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset, _NSIG / 8)
|
||||
|
||||
#include <sysdeps/posix/pause.c>
|
||||
|
@ -19,22 +19,18 @@
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
.text
|
||||
|
||||
.globl __syscall_error
|
||||
ENTRY(__libc_pipe)
|
||||
ENTRY (__libc_pipe)
|
||||
mov %o0, %o2 /* Save PIPEDES. */
|
||||
LOADSYSCALL(pipe)
|
||||
ta 0x6d
|
||||
bcc,pt %xcc, 1f
|
||||
mov %o7, %g1
|
||||
call __syscall_error
|
||||
mov %g1, %o7
|
||||
1: st %o0, [%o2] /* PIPEDES[0] = %o0; */
|
||||
bcs,pn %xcc, __syscall_error_handler
|
||||
nop
|
||||
st %o0, [%o2] /* PIPEDES[0] = %o0; */
|
||||
st %o1, [%o2 + 4] /* PIPEDES[1] = %o1; */
|
||||
retl
|
||||
clr %o0
|
||||
END(__libc_pipe)
|
||||
SYSCALL_ERROR_HANDLER
|
||||
PSEUDO_END (__libc_pipe)
|
||||
|
||||
weak_alias (__libc_pipe, __pipe)
|
||||
libc_hidden_def (__pipe)
|
||||
|
@ -24,15 +24,12 @@
|
||||
.weak setcontext
|
||||
ENTRY(setcontext)
|
||||
|
||||
ba,pt %xcc, 1f
|
||||
mov 1, %o1
|
||||
|
||||
END(setcontext)
|
||||
mov 1, %o1
|
||||
|
||||
/* int __setcontext(ucontext_t *ctx, int restoremask); */
|
||||
ENTRY(__setcontext)
|
||||
|
||||
1: ldx [%o0 + UC_SIGMASK], %o2
|
||||
ldx [%o0 + UC_SIGMASK], %o2
|
||||
stx %o2, [%o0 + __UC_SIGMASK]
|
||||
ta 0x6f
|
||||
|
||||
|
@ -39,8 +39,7 @@ libc_hidden_def (_setjmp)
|
||||
/* int setjmp(jmp_buf) */
|
||||
|
||||
ENTRY(setjmp)
|
||||
ba,pt %xcc, __sigsetjmp_local
|
||||
set 1, %o1
|
||||
set 1, %o1
|
||||
END(setjmp)
|
||||
|
||||
/* int __sigsetjmp(jmp_buf, savemask) */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* POSIX.1 sigaction call for Linux/SPARC64.
|
||||
Copyright (C) 1997-2000,2002,2003,2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997,1998,1999,2000,2002,2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Miguel de Icaza (miguel@nuclecu.unam.mx) and
|
||||
Jakub Jelinek (jj@ultra.linux.cz).
|
||||
@ -65,10 +65,6 @@ __libc_sigaction (int sig, __const struct sigaction *act,
|
||||
}
|
||||
libc_hidden_def (__libc_sigaction)
|
||||
|
||||
#ifdef WRAPPER_INCLUDE
|
||||
# include WRAPPER_INCLUDE
|
||||
#endif
|
||||
|
||||
#ifndef LIBC_SIGACTION
|
||||
weak_alias (__libc_sigaction, __sigaction);
|
||||
libc_hidden_weak (__sigaction)
|
||||
|
1
sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c
Normal file
1
sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c
Normal file
@ -0,0 +1 @@
|
||||
#include "../../ia64/sigsuspend.c"
|
@ -40,15 +40,11 @@
|
||||
The .S files for the other calls just #define socket and #include this. */
|
||||
|
||||
#ifndef __socket
|
||||
# ifndef NO_WEAK_ALIAS
|
||||
# define __socket P(__,socket)
|
||||
# else
|
||||
# define __socket socket
|
||||
# endif
|
||||
#define __socket P(__,socket)
|
||||
#endif
|
||||
|
||||
.globl __syscall_error
|
||||
ENTRY(__socket)
|
||||
.globl __socket
|
||||
ENTRY (__socket)
|
||||
|
||||
/* Drop up to 6 arguments (recvfrom) into the memory allocated by
|
||||
the caller for varargs, since that's really what we have. */
|
||||
@ -77,15 +73,14 @@ ENTRY(__socket)
|
||||
LOADSYSCALL(socketcall)
|
||||
ta 0x6d
|
||||
|
||||
bcc,pt %xcc, 1f
|
||||
mov %o7, %g1
|
||||
call __syscall_error
|
||||
mov %g1, %o7
|
||||
1: retl
|
||||
bcs,pn %xcc, __syscall_error_handler
|
||||
nop
|
||||
retl
|
||||
nop
|
||||
|
||||
#if defined NEED_CANCELLATION && defined CENABLE
|
||||
.Lsocket_cancel:
|
||||
cfi_startproc
|
||||
save %sp, -160, %sp
|
||||
cfi_def_cfa_register (%fp)
|
||||
cfi_window_save
|
||||
@ -98,22 +93,18 @@ ENTRY(__socket)
|
||||
LOADSYSCALL(socketcall)
|
||||
ta 0x6d
|
||||
|
||||
bcc,pt %xcc, 1f
|
||||
bcs,pn %xcc, __syscall_error_handler2
|
||||
mov %o0, %l1
|
||||
CDISABLE;
|
||||
mov %l0, %o0;
|
||||
call __syscall_error;
|
||||
mov %l1, %o0;
|
||||
ba,pt %xcc, 2f
|
||||
mov -1, %l1;
|
||||
1: CDISABLE
|
||||
CDISABLE
|
||||
mov %l0, %o0
|
||||
2: jmpl %i7 + 8, %g0
|
||||
jmpl %i7 + 8, %g0
|
||||
restore %g0, %l1, %o0
|
||||
cfi_endproc
|
||||
SYSCALL_ERROR_HANDLER2
|
||||
#endif
|
||||
|
||||
END(__socket)
|
||||
SYSCALL_ERROR_HANDLER
|
||||
|
||||
END (__socket)
|
||||
|
||||
#ifndef NO_WEAK_ALIAS
|
||||
weak_alias (__socket, socket)
|
||||
#endif
|
||||
|
@ -19,8 +19,8 @@
|
||||
#include <sysdep.h>
|
||||
.text
|
||||
|
||||
.globl __syscall_error
|
||||
ENTRY(syscall)
|
||||
ENTRY (syscall)
|
||||
|
||||
mov %o0,%g1
|
||||
mov %o1,%o0
|
||||
mov %o2,%o1
|
||||
@ -30,10 +30,11 @@ ENTRY(syscall)
|
||||
|
||||
ta 0x6d
|
||||
|
||||
bcc,pt %xcc, 1f
|
||||
mov %o7, %g1
|
||||
call __syscall_error
|
||||
mov %g1, %o7
|
||||
1: retl
|
||||
bcs,pn %xcc,__syscall_error_handler
|
||||
nop
|
||||
END(syscall)
|
||||
retl
|
||||
nop
|
||||
|
||||
SYSCALL_ERROR_HANDLER
|
||||
|
||||
PSEUDO_END (syscall)
|
||||
|
@ -1,5 +1,4 @@
|
||||
/* Copyright (C) 1997, 2000, 2002, 2003, 2004, 2006
|
||||
Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1997, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997.
|
||||
|
||||
@ -26,7 +25,6 @@
|
||||
#ifdef IS_IN_rtld
|
||||
# include <dl-sysdep.h> /* Defines RTLD_PRIVATE_ERRNO. */
|
||||
#endif
|
||||
#include <tls.h>
|
||||
|
||||
#undef SYS_ify
|
||||
#define SYS_ify(syscall_name) __NR_##syscall_name
|
||||
@ -49,52 +47,99 @@
|
||||
#undef PSEUDO
|
||||
#undef PSEUDO_NOERRNO
|
||||
#undef PSEUDO_ERRVAL
|
||||
#undef PSEUDO_END
|
||||
#undef ENTRY
|
||||
|
||||
#define ENTRY(name) \
|
||||
.global C_SYMBOL_NAME(name); \
|
||||
.align 2; \
|
||||
C_LABEL(name); \
|
||||
.type name,@function;
|
||||
|
||||
#ifdef LINKER_HANDLES_R_SPARC_WDISP22
|
||||
/* Unfortunately, we cannot do this yet. Linker doesn't seem to
|
||||
handle R_SPARC_WDISP22 against non-STB_LOCAL symbols properly . */
|
||||
# define SYSCALL_ERROR_HANDLER_ENTRY(handler) \
|
||||
.section .gnu.linkonce.t.handler,"ax",@progbits; \
|
||||
.globl handler; \
|
||||
.hidden handler; \
|
||||
.type handler,@function; \
|
||||
handler:
|
||||
#else
|
||||
# define SYSCALL_ERROR_HANDLER_ENTRY(handler) \
|
||||
.subsection 3; \
|
||||
handler:
|
||||
#endif
|
||||
|
||||
#if RTLD_PRIVATE_ERRNO
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
.section .gnu.linkonce.t.__sparc64.get_pic.l7,"ax",@progbits; \
|
||||
.globl __sparc64.get_pic.l7; \
|
||||
.hidden __sparc64.get_pic.l7; \
|
||||
.type __sparc64.get_pic.l7,@function; \
|
||||
__sparc64.get_pic.l7: \
|
||||
retl; \
|
||||
add %o7, %l7, %l7; \
|
||||
.previous; \
|
||||
SYSCALL_ERROR_HANDLER_ENTRY(__syscall_error_handler) \
|
||||
save %sp, -192, %sp; \
|
||||
sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7; \
|
||||
call __sparc64.get_pic.l7; \
|
||||
add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7; \
|
||||
ldx [%l7 + rtld_errno], %l0; \
|
||||
st %i0, [%l0]; \
|
||||
jmpl %i7+8, %g0; \
|
||||
restore %g0, -1, %o0; \
|
||||
.previous;
|
||||
#else
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
SYSCALL_ERROR_HANDLER_ENTRY(__syscall_error_handler) \
|
||||
.global __errno_location; \
|
||||
.type __errno_location,@function; \
|
||||
save %sp, -192, %sp; \
|
||||
call __errno_location; \
|
||||
nop; \
|
||||
st %i0, [%o0]; \
|
||||
jmpl %i7+8, %g0; \
|
||||
restore %g0, -1, %o0; \
|
||||
.previous;
|
||||
#endif
|
||||
|
||||
#define PSEUDO(name, syscall_name, args) \
|
||||
.text; \
|
||||
ENTRY(name); \
|
||||
LOADSYSCALL(syscall_name); \
|
||||
ta 0x6d; \
|
||||
bcs,pn %xcc, __syscall_error_handler; \
|
||||
nop; \
|
||||
SYSCALL_ERROR_HANDLER
|
||||
|
||||
#define PSEUDO_NOERRNO(name, syscall_name, args) \
|
||||
.text; \
|
||||
ENTRY(name); \
|
||||
LOADSYSCALL(syscall_name); \
|
||||
ta 0x6d
|
||||
|
||||
#define PSEUDO_ERRVAL(name, syscall_name, args) \
|
||||
.text; \
|
||||
ENTRY(name); \
|
||||
LOADSYSCALL(syscall_name); \
|
||||
ta 0x6d
|
||||
|
||||
#undef PSEUDO_END
|
||||
#define PSEUDO_END(name) \
|
||||
.size name,.-name
|
||||
|
||||
#undef PSEUDO_END_NOERRNO
|
||||
#define PSEUDO_END_NOERRNO(name) \
|
||||
.size name,.-name
|
||||
|
||||
#undef PSEUDO_END_ERRVAL
|
||||
#define PSEUDO_END_ERRVAL(name) \
|
||||
.size name,.-name
|
||||
|
||||
#undef END
|
||||
|
||||
#define ENTRY(name) \
|
||||
.align 4; \
|
||||
.global C_SYMBOL_NAME(name); \
|
||||
.type name, @function; \
|
||||
C_LABEL(name) \
|
||||
cfi_startproc;
|
||||
|
||||
#define END(name) \
|
||||
cfi_endproc; \
|
||||
.size name, . - name
|
||||
|
||||
/* If the offset to __syscall_error fits into a signed 22-bit
|
||||
* immediate branch offset, the linker will relax the call into
|
||||
* a normal branch.
|
||||
*/
|
||||
#define PSEUDO(name, syscall_name, args) \
|
||||
.text; \
|
||||
.globl __syscall_error; \
|
||||
ENTRY(name); \
|
||||
LOADSYSCALL(syscall_name); \
|
||||
ta 0x6d; \
|
||||
bcc,pt %xcc, 1f; \
|
||||
mov %o7, %g1; \
|
||||
call __syscall_error; \
|
||||
mov %g1, %o7; \
|
||||
1:
|
||||
|
||||
#define PSEUDO_NOERRNO(name, syscall_name, args)\
|
||||
.text; \
|
||||
ENTRY(name); \
|
||||
LOADSYSCALL(syscall_name); \
|
||||
ta 0x6d;
|
||||
|
||||
#define PSEUDO_ERRVAL(name, syscall_name, args) \
|
||||
.text; \
|
||||
ENTRY(name); \
|
||||
LOADSYSCALL(syscall_name); \
|
||||
ta 0x6d;
|
||||
|
||||
#define PSEUDO_END(name) \
|
||||
END(name)
|
||||
|
||||
#define END(name) \
|
||||
.size name,.-name
|
||||
|
||||
/* Careful here! This "ret" define can interfere; use jmpl if unsure. */
|
||||
#define ret retl; nop
|
||||
@ -152,24 +197,4 @@ ENTRY(name); \
|
||||
register windows. So if you poke stack memory directly you add this. */
|
||||
#define STACK_BIAS 2047
|
||||
|
||||
/* Pointer mangling support. */
|
||||
#if defined NOT_IN_libc && defined IS_IN_rtld
|
||||
/* We cannot use the thread descriptor because in ld.so we use setjmp
|
||||
earlier than the descriptor is initialized. */
|
||||
#else
|
||||
# ifdef __ASSEMBLER__
|
||||
# define PTR_MANGLE(dreg, reg, tmpreg) \
|
||||
ldx [%g7 + POINTER_GUARD], tmpreg; \
|
||||
xor reg, tmpreg, dreg
|
||||
# define PTR_DEMANGLE(dreg, reg, tmpreg) PTR_MANGLE (dreg, reg, tmpreg)
|
||||
# define PTR_MANGLE2(dreg, reg, tmpreg) \
|
||||
xor reg, tmpreg, dreg
|
||||
# define PTR_DEMANGLE2(dreg, reg, tmpreg) PTR_MANGLE2 (dreg, reg, tmpreg)
|
||||
# else
|
||||
# define PTR_MANGLE(var) \
|
||||
(var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
|
||||
# define PTR_DEMANGLE(var) PTR_MANGLE (var)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* linux/sparc64/sysdep.h */
|
||||
|
@ -1,8 +1 @@
|
||||
#include "../../i386/xstat.c"
|
||||
|
||||
#ifdef __NR_stat64
|
||||
# if __ASSUME_STAT64_SYSCALL == 0
|
||||
/* The variable is shared between all wrappers around *stat{,64} calls. */
|
||||
int __have_no_stat64;
|
||||
# endif
|
||||
#endif
|
||||
#include "../../xstat.c"
|
||||
|
@ -1,127 +0,0 @@
|
||||
/* Convert between the kernel's `struct stat' format, and libc's.
|
||||
Copyright (C) 1991, 1995, 1996, 1997, 2000, 2002, 2003, 2006
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <kernel_stat.h>
|
||||
#include <string.h>
|
||||
#include <kernel-features.h>
|
||||
|
||||
int
|
||||
__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
|
||||
{
|
||||
switch (vers)
|
||||
{
|
||||
case _STAT_VER_KERNEL:
|
||||
/* Nothing to do. The struct is in the form the kernel expects.
|
||||
We should have short-circuted before we got here, but for
|
||||
completeness... */
|
||||
*(struct kernel_stat *) ubuf = *kbuf;
|
||||
break;
|
||||
|
||||
case _STAT_VER_LINUX:
|
||||
{
|
||||
struct stat *buf = ubuf;
|
||||
|
||||
/* Convert to current kernel version of `struct stat'. */
|
||||
buf->st_dev = kbuf->st_dev;
|
||||
buf->__pad1 = 0;
|
||||
buf->st_ino = kbuf->st_ino;
|
||||
buf->st_mode = kbuf->st_mode;
|
||||
buf->st_nlink = kbuf->st_nlink;
|
||||
buf->st_uid = kbuf->st_uid;
|
||||
buf->st_gid = kbuf->st_gid;
|
||||
buf->st_rdev = kbuf->st_rdev;
|
||||
buf->__pad2 = 0;
|
||||
buf->st_size = kbuf->st_size;
|
||||
buf->st_blksize = kbuf->st_blksize;
|
||||
buf->st_blocks = kbuf->st_blocks;
|
||||
buf->st_atim.tv_sec = kbuf->st_atime_sec;
|
||||
buf->st_atim.tv_nsec = 0;
|
||||
buf->st_mtim.tv_sec = kbuf->st_mtime_sec;
|
||||
buf->st_mtim.tv_nsec = 0;
|
||||
buf->st_ctim.tv_sec = kbuf->st_ctime_sec;
|
||||
buf->st_ctim.tv_nsec = 0;
|
||||
buf->__unused4 = 0;
|
||||
buf->__unused5 = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
__set_errno (EINVAL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
__xstat32_conv (int vers, struct stat64 *sbuf, struct stat *buf)
|
||||
{
|
||||
struct kernel_stat64 *kbuf;
|
||||
|
||||
/* *stat64 syscalls on sparc64 really fill in struct kernel_stat64,
|
||||
rather than struct stat64. But it is the same size as
|
||||
struct kernel_stat64, so use this hack so that we can reuse
|
||||
i386 {,f,l}xstat{,at}.c routines. */
|
||||
__asm ("" : "=r" (kbuf) : "0" (sbuf));
|
||||
assert (sizeof (struct stat) == sizeof (struct stat64));
|
||||
assert (sizeof (struct stat64) >= sizeof (struct kernel_stat64));
|
||||
|
||||
switch (vers)
|
||||
{
|
||||
case _STAT_VER_LINUX:
|
||||
{
|
||||
/* Convert current kernel version of `struct stat64' to
|
||||
`struct stat'. */
|
||||
buf->st_dev = kbuf->st_dev;
|
||||
buf->__pad1 = 0;
|
||||
buf->st_ino = kbuf->st_ino;
|
||||
buf->st_mode = kbuf->st_mode;
|
||||
buf->st_nlink = kbuf->st_nlink;
|
||||
buf->st_uid = kbuf->st_uid;
|
||||
buf->st_gid = kbuf->st_gid;
|
||||
buf->st_rdev = kbuf->st_rdev;
|
||||
buf->__pad2 = 0;
|
||||
buf->st_size = kbuf->st_size;
|
||||
buf->st_blksize = kbuf->st_blksize;
|
||||
buf->st_blocks = kbuf->st_blocks;
|
||||
buf->st_atim.tv_sec = kbuf->st_atime_sec;
|
||||
buf->st_atim.tv_nsec = kbuf->st_atime_nsec;
|
||||
buf->st_mtim.tv_sec = kbuf->st_mtime_sec;
|
||||
buf->st_mtim.tv_nsec = kbuf->st_mtime_nsec;
|
||||
buf->st_ctim.tv_sec = kbuf->st_ctime_sec;
|
||||
buf->st_ctim.tv_nsec = kbuf->st_ctime_nsec;
|
||||
buf->__unused4 = 0;
|
||||
buf->__unused5 = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
/* If struct stat64 is different from struct stat then
|
||||
_STAT_VER_KERNEL does not make sense. */
|
||||
case _STAT_VER_KERNEL:
|
||||
default:
|
||||
__set_errno (EINVAL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
/* `ptrace' debugger support interface. Linux/SPARC version.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -149,11 +148,12 @@ enum __ptrace_request
|
||||
#endif
|
||||
|
||||
/* Continue and stop at the next (return from) syscall. */
|
||||
PTRACE_SYSCALL = 24,
|
||||
PTRACE_SYSCALL = 24
|
||||
#define PTRACE_SYSCALL PTRACE_SYSCALL
|
||||
|
||||
#if __WORDSIZE == 64
|
||||
|
||||
,
|
||||
/* Get all floating point registers used by a processes.
|
||||
This is not supported on all machines. */
|
||||
PTRACE_GETFPREGS = 25,
|
||||
@ -161,26 +161,10 @@ enum __ptrace_request
|
||||
|
||||
/* Set all floating point registers used by a processes.
|
||||
This is not supported on all machines. */
|
||||
PTRACE_SETFPREGS = 26,
|
||||
PTRACE_SETFPREGS = 26
|
||||
#define PT_SETFPREGS PTRACE_SETFPREGS
|
||||
|
||||
#endif
|
||||
|
||||
/* Set ptrace filter options. */
|
||||
PTRACE_SETOPTIONS = 0x4200,
|
||||
#define PT_SETOPTIONS PTRACE_SETOPTIONS
|
||||
|
||||
/* Get last ptrace message. */
|
||||
PTRACE_GETEVENTMSG = 0x4201,
|
||||
#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
|
||||
|
||||
/* Get siginfo for process. */
|
||||
PTRACE_GETSIGINFO = 0x4202,
|
||||
#define PT_GETSIGINFO PTRACE_GETSIGINFO
|
||||
|
||||
/* Set new siginfo for process. */
|
||||
PTRACE_SETSIGINFO = 0x4203
|
||||
#define PT_SETSIGINFO PTRACE_SETSIGINFO
|
||||
};
|
||||
|
||||
/* Perform process tracing functions. REQUEST is one of the values
|
||||
|
1
sysdeps/unix/sysv/linux/sparc/sysdep.S
Normal file
1
sysdeps/unix/sysv/linux/sparc/sysdep.S
Normal file
@ -0,0 +1 @@
|
||||
/* Nothing to do here. */
|
@ -1 +0,0 @@
|
||||
#include <sysdeps/unix/sysv/linux/powerpc/sysdep.c>
|
Reference in New Issue
Block a user