diff options
-rw-r--r-- | README | 75 | ||||
-rw-r--r-- | Rules.mak | 6 | ||||
-rw-r--r-- | libc/sysdeps/linux/powerpc/sys/ptrace.h | 93 | ||||
-rw-r--r-- | libc/sysdeps/linux/sparc/sys/ptrace.h | 97 | ||||
-rw-r--r-- | test/nptl/tst-unload.c | 6 |
5 files changed, 214 insertions, 63 deletions
@@ -1,73 +1,48 @@ + uClibc-ng - a small C Library for Linux - uClibc - a Small C Library for Linux - Erik Andersen <andersen@codepoet.org> +uClibc-ng (aka µClibc-ng/pronounced yew-see-lib-see-next-generation) is a C +library for developing embedded Linux systems. It is much smaller than the GNU +C Library, but nearly all applications supported by glibc also work perfectly +with uClibc-ng. -uClibc (aka µClibc/pronounced yew-see-lib-see) is a C library for -developing embedded Linux systems. It is much smaller than the -GNU C Library, but nearly all applications supported by glibc -also work perfectly with uClibc. Porting applications from glibc -to uClibc typically involves just recompiling the source code. -uClibc even supports shared libraries and threading. It currently -runs on standard Linux and MMU-less (also known as µClinux) -systems with support for alpha, ARM, cris, e1, h8300, i386, i960, -m68k, microblaze, mips/mipsel, PowerPC, SH, SPARC, and v850 -processors. +uClibc-ng is a spin-off of uClibc from http://www.uclibc.org +from Erik Andersen and others. + +Porting applications from glibc to uClibc-ng typically involves just +recompiling the source code. uClibc-ng even supports shared libraries and +threading. It currently runs on standard Linux and MMU-less (also +known as µClinux) systems with support for ARC, ARM, Blackfin, i386, M68K/Coldfire +MIPS, MIPS64, PowerPC, SH, Sparc, X86_64 and XTENSA processors. If you are building an embedded Linux system and you find that glibc is eating up too much space, you should consider using -uClibc. If you are building a huge fileserver with 12 Terabytes +uClibc-ng. If you are building a huge fileserver with 12 Terabytes of storage, then using glibc may make more sense. Unless, for example, that 12 Terabytes will be Network Attached Storage and you plan to burn Linux into the system's firmware... -uClibc is maintained by Erik Andersen and is licensed under the +uClibc-ng is maintained by Waldemar Brodkorb and is licensed under the GNU LESSER GENERAL PUBLIC LICENSE. This license allows you to make closed source commercial applications using an unmodified -version of uClibc (Please consider sharing some of the money you -make ;-). You do not need to give away all your source code just -because you use uClibc and/or run on Linux. You should, however, +version of uClibc-ng. You do not need to give away all your source code just +because you use uClibc-ng and/or run on Linux. You should, however, carefuly review the license and make certain you understand and abide by it strictly. - For installation instructions, see the file INSTALL. -uClibc strives to be standards compliant, which means that most +uClibc-ng strives to be standards compliant, which means that most documentation written for SuSv3, or for glibc also applies to -uClibc functions. However, many GNU extensions are not supported +uClibc-ng functions. However, many GNU extensions are not supported because they have not been ported, or more importantly, would -increase the size of uClibc disproportional to the added -functionality. There is some discussion of these differences -in the "docs" directory. +increase the size of uClibc-ng disproportional to the added +functionality. -Additional information (recent releases, FAQ, mailing list, bugs, -etc.) can be found at http://www.uclibc.org/. +Additional information can be found at http://www.uclibc-ng.org/. -uClibc may be freely modified and distributed under the terms of +uClibc-ng may be freely modified and distributed under the terms of the GNU Lesser General Public License, which can be found in the -file COPYING.LIB. - -Please Note: - - There is an unwholesomely huge amount of code out there - that depends on the presence of GNU libc header files. - We have GNU libc compatible header files. So we have - committed a horrible sin in uClibc. We _lie_ and claim - to be GNU libc in order to force these applications to - work as their developers intended. This is IMHO, - pardonable, since these defines are not really intended - to check for the presence of a particular library, but - rather are used to define an _interface_. Some programs - are especially chummy with glibc, and may need this - behavior disabled by adding CFLAGS+=-D__FORCE_NOGLIBC - - If you want to make special exceptions in your code which are - specifically for uClibc, you can make certain to include features.h, - and then have your code check for uClibc as follows: - - #ifdef __UCLIBC__ - do_something_special(); - #endif +file COPYING. And most of all, be sure to have some fun! :-) - -Erik + -Waldemar @@ -127,9 +127,9 @@ export RUNTIME_PREFIX DEVEL_PREFIX KERNEL_HEADERS MULTILIB_DIR # Now config hard core -MAJOR_VERSION := 0 -MINOR_VERSION := 9 -SUBLEVEL := 34 +MAJOR_VERSION := 1 +MINOR_VERSION := 0 +SUBLEVEL := 0 EXTRAVERSION :=-git VERSION := $(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL) ABI_VERSION := $(MAJOR_VERSION) diff --git a/libc/sysdeps/linux/powerpc/sys/ptrace.h b/libc/sysdeps/linux/powerpc/sys/ptrace.h index 02c303c24..dd81efc28 100644 --- a/libc/sysdeps/linux/powerpc/sys/ptrace.h +++ b/libc/sysdeps/linux/powerpc/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux version. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001-2014 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 @@ -20,6 +20,7 @@ #define _SYS_PTRACE_H 1 #include <features.h> +#include <bits/types.h> __BEGIN_DECLS @@ -78,8 +79,96 @@ enum __ptrace_request #define PT_DETACH PTRACE_DETACH /* Continue and stop at the next (return from) syscall. */ - PTRACE_SYSCALL = 24 + PTRACE_SYSCALL = 24, #define PT_SYSCALL PTRACE_SYSCALL + + /* 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 + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + PTRACE_PEEKSIGINFO = 0x4209 +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO +}; + + +/* Flag for PTRACE_LISTEN. */ +enum __ptrace_flags +{ + PTRACE_SEIZE_DEVEL = 0x80000000 +}; + +/* Options set using PTRACE_SETOPTIONS. */ +enum __ptrace_setoptions +{ + PTRACE_O_TRACESYSGOOD = 0x00000001, + PTRACE_O_TRACEFORK = 0x00000002, + PTRACE_O_TRACEVFORK = 0x00000004, + PTRACE_O_TRACECLONE = 0x00000008, + PTRACE_O_TRACEEXEC = 0x00000010, + PTRACE_O_TRACEVFORKDONE = 0x00000020, + PTRACE_O_TRACEEXIT = 0x00000040, + PTRACE_O_TRACESECCOMP = 0x00000080, + PTRACE_O_EXITKILL = 0x00100000, + PTRACE_O_MASK = 0x001000ff +}; + +/* Wait extended result codes for the above trace options. */ +enum __ptrace_eventcodes +{ + PTRACE_EVENT_FORK = 1, + PTRACE_EVENT_VFORK = 2, + PTRACE_EVENT_CLONE = 3, + PTRACE_EVENT_EXEC = 4, + PTRACE_EVENT_VFORK_DONE = 5, + PTRACE_EVENT_EXIT = 6, + PTRACE_EVENT_SECCOMP = 7 +}; + +/* Arguments for PTRACE_PEEKSIGINFO. */ +struct __ptrace_peeksiginfo_args +{ + __uint64_t off; /* From which siginfo to start. */ + __uint32_t flags; /* Flags for peeksiginfo. */ + __int32_t nr; /* How many siginfos to take. */ +}; + +enum __ptrace_peeksiginfo_flags +{ + /* Read signals from a shared (process wide) queue. */ + PTRACE_PEEKSIGINFO_SHARED = (1 << 0) }; /* Perform process tracing functions. REQUEST is one of the values diff --git a/libc/sysdeps/linux/sparc/sys/ptrace.h b/libc/sysdeps/linux/sparc/sys/ptrace.h index 26fa4b38d..0f6c2ccae 100644 --- a/libc/sysdeps/linux/sparc/sys/ptrace.h +++ b/libc/sysdeps/linux/sparc/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/SPARC version. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996-2014 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 @@ -20,7 +20,7 @@ #define _SYS_PTRACE_H 1 #include <features.h> - +#include <bits/types.h> #include <bits/wordsize.h> /* Linux/SPARC kernels up to 2.3.18 do not care much @@ -147,12 +147,11 @@ 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, @@ -160,10 +159,98 @@ 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 + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + PTRACE_PEEKSIGINFO = 0x4209 +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO +}; + + +/* Flag for PTRACE_LISTEN. */ +enum __ptrace_flags +{ + PTRACE_SEIZE_DEVEL = 0x80000000 +}; + +/* Options set using PTRACE_SETOPTIONS. */ +enum __ptrace_setoptions +{ + PTRACE_O_TRACESYSGOOD = 0x00000001, + PTRACE_O_TRACEFORK = 0x00000002, + PTRACE_O_TRACEVFORK = 0x00000004, + PTRACE_O_TRACECLONE = 0x00000008, + PTRACE_O_TRACEEXEC = 0x00000010, + PTRACE_O_TRACEVFORKDONE = 0x00000020, + PTRACE_O_TRACEEXIT = 0x00000040, + PTRACE_O_TRACESECCOMP = 0x00000080, + PTRACE_O_EXITKILL = 0x00100000, + PTRACE_O_MASK = 0x001000ff +}; + +/* Wait extended result codes for the above trace options. */ +enum __ptrace_eventcodes +{ + PTRACE_EVENT_FORK = 1, + PTRACE_EVENT_VFORK = 2, + PTRACE_EVENT_CLONE = 3, + PTRACE_EVENT_EXEC = 4, + PTRACE_EVENT_VFORK_DONE = 5, + PTRACE_EVENT_EXIT = 6, + PTRACE_EVENT_SECCOMP = 7 +}; + +/* Arguments for PTRACE_PEEKSIGINFO. */ +struct __ptrace_peeksiginfo_args +{ + __uint64_t off; /* From which siginfo to start. */ + __uint32_t flags; /* Flags for peeksiginfo. */ + __int32_t nr; /* How many siginfos to take. */ +}; + +enum __ptrace_peeksiginfo_flags +{ + /* Read signals from a shared (process wide) queue. */ + PTRACE_PEEKSIGINFO_SHARED = (1 << 0) }; /* Perform process tracing functions. REQUEST is one of the values diff --git a/test/nptl/tst-unload.c b/test/nptl/tst-unload.c index c7de2cb91..74a714ecb 100644 --- a/test/nptl/tst-unload.c +++ b/test/nptl/tst-unload.c @@ -23,17 +23,17 @@ static int do_test (void) { - void *p = dlopen ("libpthread.so.0", RTLD_LAZY); + void *p = dlopen ("libpthread.so.1", RTLD_LAZY); if (p == NULL) { - puts ("failed to load libpthread.so.0"); + puts ("failed to load libpthread.so.1"); return 1; } if (dlclose (p) != 0) { - puts ("dlclose (libpthread.so.0) failed"); + puts ("dlclose (libpthread.so.1) failed"); return 1; } |