diff options
-rw-r--r-- | ldso/ldso/arm/dl-syscalls.h | 3 | ||||
-rw-r--r-- | ldso/ldso/arm/ld_syscalls.h | 3 | ||||
-rw-r--r-- | ldso/ldso/i386/dl-syscalls.h | 1 | ||||
-rw-r--r-- | ldso/ldso/i386/ld_syscalls.h | 1 | ||||
-rw-r--r-- | ldso/ldso/ld_hash.h | 2 | ||||
-rw-r--r-- | ldso/ldso/ld_syscall.h | 31 | ||||
-rw-r--r-- | ldso/ldso/m68k/dl-syscalls.h | 3 | ||||
-rw-r--r-- | ldso/ldso/m68k/ld_syscalls.h | 3 | ||||
-rw-r--r-- | ldso/ldso/powerpc/dl-syscalls.h | 3 | ||||
-rw-r--r-- | ldso/ldso/powerpc/ld_syscalls.h | 3 | ||||
-rw-r--r-- | ldso/ldso/sparc/dl-syscalls.h | 3 | ||||
-rw-r--r-- | ldso/ldso/sparc/ld_syscalls.h | 3 | ||||
-rw-r--r-- | ldso/ldso/sparc/sdiv.S | 8 | ||||
-rw-r--r-- | ldso/ldso/sparc/udiv.S | 8 | ||||
-rw-r--r-- | ldso/ldso/sparc/urem.S | 8 |
15 files changed, 40 insertions, 43 deletions
diff --git a/ldso/ldso/arm/dl-syscalls.h b/ldso/ldso/arm/dl-syscalls.h index aa08421a5..016eb09b0 100644 --- a/ldso/ldso/arm/dl-syscalls.h +++ b/ldso/ldso/arm/dl-syscalls.h @@ -1,5 +1,3 @@ -#include <sys/types.h> - /* * This file contains the system call macros and syscall * numbers used by the shared library loader. @@ -16,6 +14,7 @@ #define __NR_geteuid (__NR_SYSCALL_BASE+ 49) #define __NR_getgid (__NR_SYSCALL_BASE+ 47) #define __NR_getegid (__NR_SYSCALL_BASE+ 50) +#define __NR_readlink (__NR_SYSCALL_BASE+ 85) #define __NR_mmap (__NR_SYSCALL_BASE+ 90) #define __NR_munmap (__NR_SYSCALL_BASE+ 91) #define __NR_stat (__NR_SYSCALL_BASE+106) diff --git a/ldso/ldso/arm/ld_syscalls.h b/ldso/ldso/arm/ld_syscalls.h index aa08421a5..016eb09b0 100644 --- a/ldso/ldso/arm/ld_syscalls.h +++ b/ldso/ldso/arm/ld_syscalls.h @@ -1,5 +1,3 @@ -#include <sys/types.h> - /* * This file contains the system call macros and syscall * numbers used by the shared library loader. @@ -16,6 +14,7 @@ #define __NR_geteuid (__NR_SYSCALL_BASE+ 49) #define __NR_getgid (__NR_SYSCALL_BASE+ 47) #define __NR_getegid (__NR_SYSCALL_BASE+ 50) +#define __NR_readlink (__NR_SYSCALL_BASE+ 85) #define __NR_mmap (__NR_SYSCALL_BASE+ 90) #define __NR_munmap (__NR_SYSCALL_BASE+ 91) #define __NR_stat (__NR_SYSCALL_BASE+106) diff --git a/ldso/ldso/i386/dl-syscalls.h b/ldso/ldso/i386/dl-syscalls.h index dc9c6934b..572d9bf21 100644 --- a/ldso/ldso/i386/dl-syscalls.h +++ b/ldso/ldso/i386/dl-syscalls.h @@ -12,6 +12,7 @@ #define __NR_geteuid 49 #define __NR_getgid 47 #define __NR_getegid 50 +#define __NR_readlink 85 #define __NR_mmap 90 #define __NR_munmap 91 #define __NR_stat 106 diff --git a/ldso/ldso/i386/ld_syscalls.h b/ldso/ldso/i386/ld_syscalls.h index dc9c6934b..572d9bf21 100644 --- a/ldso/ldso/i386/ld_syscalls.h +++ b/ldso/ldso/i386/ld_syscalls.h @@ -12,6 +12,7 @@ #define __NR_geteuid 49 #define __NR_getgid 47 #define __NR_getegid 50 +#define __NR_readlink 85 #define __NR_mmap 90 #define __NR_munmap 91 #define __NR_stat 106 diff --git a/ldso/ldso/ld_hash.h b/ldso/ldso/ld_hash.h index 01b3a4c33..c0b3e0409 100644 --- a/ldso/ldso/ld_hash.h +++ b/ldso/ldso/ld_hash.h @@ -1,7 +1,7 @@ #ifndef _HASH_H_ #define _HASH_H_ -#include <elf.h> +#include "linuxelf.h" /* Header file that describes the internal data structures used by the * ELF dynamic linker. */ diff --git a/ldso/ldso/ld_syscall.h b/ldso/ldso/ld_syscall.h index 2542bc3e5..ba94d7598 100644 --- a/ldso/ldso/ld_syscall.h +++ b/ldso/ldso/ld_syscall.h @@ -1,13 +1,38 @@ +/* Pull in compiler and arch stuff */ +#include <stdarg.h> /* Pull in the arch specific type information */ #include <sys/types.h> /* Pull in the arch specific syscall implementation */ #include "ld_syscalls.h" /* For MAP_ANONYMOUS -- differs between platforms */ -#include <sys/mman.h> +#include <asm/mman.h> /* Pull in whatever this particular arch's kernel thinks the kernel version of * struct stat should look like. It turns out that each arch has a different * opinion on the subject, and different kernel revs use different names... */ -#include <sys/stat.h> +#define _SYS_STAT_H +#include <asm/stat.h> + + +/* Encoding of the file mode. */ +#define S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define S_IFDIR 0040000 /* Directory. */ +#define S_IFCHR 0020000 /* Character device. */ +#define S_IFBLK 0060000 /* Block device. */ +#define S_IFREG 0100000 /* Regular file. */ +#define S_IFIFO 0010000 /* FIFO. */ +#define S_IFLNK 0120000 /* Symbolic link. */ +#define S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define S_ISUID 04000 /* Set user ID on execution. */ +#define S_ISGID 02000 /* Set group ID on execution. */ +#define S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define S_IREAD 0400 /* Read by owner. */ +#define S_IWRITE 0200 /* Write by owner. */ +#define S_IEXEC 0100 /* Execute by owner. */ /* Here are the definitions for some syscalls that are used @@ -120,3 +145,5 @@ static inline int _dl_suid_ok(void) return 0; } +#define __NR__dl_readlink __NR_readlink +static inline _syscall3(int, _dl_readlink, const char *, path, char *, buf, size_t, bufsiz); diff --git a/ldso/ldso/m68k/dl-syscalls.h b/ldso/ldso/m68k/dl-syscalls.h index 5ffb61bac..1fb2cccd2 100644 --- a/ldso/ldso/m68k/dl-syscalls.h +++ b/ldso/ldso/m68k/dl-syscalls.h @@ -1,5 +1,3 @@ -#include <sys/types.h> - /* * This file contains the system call macros and syscall * numbers used by the shared library loader. @@ -14,6 +12,7 @@ #define __NR_geteuid 49 #define __NR_getgid 47 #define __NR_getegid 50 +#define __NR_readlink 85 #define __NR_mmap 90 #define __NR_munmap 91 #define __NR_stat 106 diff --git a/ldso/ldso/m68k/ld_syscalls.h b/ldso/ldso/m68k/ld_syscalls.h index 5ffb61bac..1fb2cccd2 100644 --- a/ldso/ldso/m68k/ld_syscalls.h +++ b/ldso/ldso/m68k/ld_syscalls.h @@ -1,5 +1,3 @@ -#include <sys/types.h> - /* * This file contains the system call macros and syscall * numbers used by the shared library loader. @@ -14,6 +12,7 @@ #define __NR_geteuid 49 #define __NR_getgid 47 #define __NR_getegid 50 +#define __NR_readlink 85 #define __NR_mmap 90 #define __NR_munmap 91 #define __NR_stat 106 diff --git a/ldso/ldso/powerpc/dl-syscalls.h b/ldso/ldso/powerpc/dl-syscalls.h index ae37aa822..c3e4bfdd5 100644 --- a/ldso/ldso/powerpc/dl-syscalls.h +++ b/ldso/ldso/powerpc/dl-syscalls.h @@ -1,5 +1,3 @@ -#include <sys/types.h> - /* * This file contains the system call macros and syscall * numbers used by the shared library loader. @@ -14,6 +12,7 @@ #define __NR_geteuid 49 #define __NR_getgid 47 #define __NR_getegid 50 +#define __NR_readlink 85 #define __NR_mmap 90 #define __NR_munmap 91 #define __NR_stat 106 diff --git a/ldso/ldso/powerpc/ld_syscalls.h b/ldso/ldso/powerpc/ld_syscalls.h index ae37aa822..c3e4bfdd5 100644 --- a/ldso/ldso/powerpc/ld_syscalls.h +++ b/ldso/ldso/powerpc/ld_syscalls.h @@ -1,5 +1,3 @@ -#include <sys/types.h> - /* * This file contains the system call macros and syscall * numbers used by the shared library loader. @@ -14,6 +12,7 @@ #define __NR_geteuid 49 #define __NR_getgid 47 #define __NR_getegid 50 +#define __NR_readlink 85 #define __NR_mmap 90 #define __NR_munmap 91 #define __NR_stat 106 diff --git a/ldso/ldso/sparc/dl-syscalls.h b/ldso/ldso/sparc/dl-syscalls.h index d7cd3734b..27ae2905c 100644 --- a/ldso/ldso/sparc/dl-syscalls.h +++ b/ldso/ldso/sparc/dl-syscalls.h @@ -1,5 +1,3 @@ -#include <sys/types.h> - /* * This file contains the system call macros and syscall * numbers used by the shared library loader. @@ -14,6 +12,7 @@ #define __NR_getgid 47 #define __NR_geteuid 49 #define __NR_getegid 50 +#define __NR_readlink 58 #define __NR_mmap 71 #define __NR_munmap 73 #define __NR_stat 38 diff --git a/ldso/ldso/sparc/ld_syscalls.h b/ldso/ldso/sparc/ld_syscalls.h index d7cd3734b..27ae2905c 100644 --- a/ldso/ldso/sparc/ld_syscalls.h +++ b/ldso/ldso/sparc/ld_syscalls.h @@ -1,5 +1,3 @@ -#include <sys/types.h> - /* * This file contains the system call macros and syscall * numbers used by the shared library loader. @@ -14,6 +12,7 @@ #define __NR_getgid 47 #define __NR_geteuid 49 #define __NR_getegid 50 +#define __NR_readlink 58 #define __NR_mmap 71 #define __NR_munmap 73 #define __NR_stat 38 diff --git a/ldso/ldso/sparc/sdiv.S b/ldso/ldso/sparc/sdiv.S index 5e52e1959..549cfa02c 100644 --- a/ldso/ldso/sparc/sdiv.S +++ b/ldso/ldso/sparc/sdiv.S @@ -38,15 +38,7 @@ #include "DEFS.h" -#ifndef __linux__ -#ifdef __svr4__ -#include <sys/trap.h> -#else -#include "/usr/include/machine/trap.h" -#endif -#else #include <asm/traps.h> -#endif FUNC(_dl_div) ! compute sign of result; if neither is negative, no problem diff --git a/ldso/ldso/sparc/udiv.S b/ldso/ldso/sparc/udiv.S index df4e5385e..bfa2fcb8f 100644 --- a/ldso/ldso/sparc/udiv.S +++ b/ldso/ldso/sparc/udiv.S @@ -37,15 +37,7 @@ #include "DEFS.h" -#ifndef __linux__ -#ifdef __svr4__ -#include <sys/trap.h> -#else -#include "/usr/include/machine/trap.h" -#endif -#else #include <asm/traps.h> -#endif FUNC(_dl_udiv) diff --git a/ldso/ldso/sparc/urem.S b/ldso/ldso/sparc/urem.S index 8d304038b..072e6a8c9 100644 --- a/ldso/ldso/sparc/urem.S +++ b/ldso/ldso/sparc/urem.S @@ -38,15 +38,7 @@ #include "DEFS.h" -#ifdef __linux__ #include <asm/traps.h> -#else -#ifdef __svr4__ -#include <sys/trap.h> -#else -#include "/usr/include/machine/trap.h" -#endif -#endif FUNC(_dl_urem) |