OSDN Git Service
Khem Raj [Tue, 6 Jul 2010 17:50:39 +0000 (10:50 -0700)]
nptl: Filter out gen_tcb-offsets.c from CSRC for libpthread.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Bernhard Reutner-Fischer [Thu, 1 Jul 2010 08:28:46 +0000 (10:28 +0200)]
nptl: fix buildsys
Now automatically picks the correct (arch and subarch specific) impls in
favour of generic impls.
make O=/tmp/objs PREFIX=/my/sysroot -j
works now as expected (both out-of-tree as well as parallel-safe).
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 13 Jun 2010 07:52:45 +0000 (09:52 +0200)]
nptl: fix subdirs handling
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 12 Jun 2010 11:29:14 +0000 (13:29 +0200)]
nptl: simplify buildsys
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Austin Foxley [Tue, 6 Jul 2010 15:30:00 +0000 (08:30 -0700)]
Revert "don't make __errno_location / __h_errno_location hidden"
This reverts commit
0d6ee549bc86fd330672a79d9a87d2c3825eea67.
We need to find a solution that will work in shared and static libraries
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Peter Korsgaard [Mon, 5 Jul 2010 12:12:22 +0000 (14:12 +0200)]
don't make __errno_location / __h_errno_location hidden
Closes #2089 (https://bugs.busybox.net/show_bug.cgi?id=2089)
__errno_location / __h_errno_location access has to go through the PLT
like malloc/free, so the linuxthread variants gets used instead when
compiling with -pthread.
Based on http://github.com/mat-c/uClibc/commit/
328d392c54aa5dc2b8e7f398a419087de497de2b
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Austin Foxley [Sat, 3 Jul 2010 16:26:16 +0000 (09:26 -0700)]
remove extra comma in lock macro
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Timo Teräs [Wed, 30 Jun 2010 11:46:37 +0000 (14:46 +0300)]
more workarounds for GCC PR32219
Commit
2e53dd645d5348f207cec7f8595969dc566c5a55 workarounds GCC
bug when accessing _locale_init and _stdio_init. We need the same
fix for __errno_location and __h_errno_location otherwise we crash
calling null with static and non-threaded builds.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Khem Raj [Wed, 30 Jun 2010 11:10:37 +0000 (04:10 -0700)]
mips/syscall-error: Choose the correct version for setting up errno.
* Current function is a C protype and PSEUDO macro does not
transfer syscall return parameters to correct argument registers
for a C function. This causes problem with syscalls setting wrong
value for errno when they encounter an error.
* Fixes PR/2089 for mips/nptl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj [Wed, 30 Jun 2010 11:09:20 +0000 (04:09 -0700)]
nptl/errno: Use a separate __errno_location for libpthread.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj [Wed, 30 Jun 2010 11:06:26 +0000 (04:06 -0700)]
nptl/generic: Build generic libc-tls.c for non-mips architectures.
* mips has it own variant.
* we dont need to build dl-tls.c here its already
built as part of ldso.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj [Tue, 29 Jun 2010 14:57:23 +0000 (07:57 -0700)]
arm/nptl: Use the old C version of _Unwind_Resume in thumb mode.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Bernhard Reutner-Fischer [Mon, 28 Jun 2010 22:00:59 +0000 (00:00 +0200)]
remove redundant args to do_ln
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 25 Jun 2010 08:12:58 +0000 (10:12 +0200)]
test/nptl: move eintr.c to where it belongs
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 25 Jun 2010 08:10:16 +0000 (10:10 +0200)]
test: silence shadow warning
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 24 Jun 2010 13:50:02 +0000 (15:50 +0200)]
nptl: arm: make it compile again
blame
6cbeaa5dd11a1b506a8a97b4dfb4e632240f9953
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 24 Jun 2010 13:10:48 +0000 (15:10 +0200)]
use uniform form of C99 keywords
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 21 Jun 2010 09:05:53 +0000 (11:05 +0200)]
intl, nptl_db: fix prerequisites
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 20 Jun 2010 10:16:49 +0000 (12:16 +0200)]
buildsys: add brief mode; show defines and ld-flags
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 20 Jun 2010 09:20:11 +0000 (11:20 +0200)]
libc: silence warnings about undefined cpp tokens
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 21 Jun 2010 09:25:11 +0000 (11:25 +0200)]
fix race condition when generating linker scripts
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Khem Raj [Wed, 23 Jun 2010 23:30:54 +0000 (16:30 -0700)]
arm/nptl: Sync unwinding with glibc.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj [Wed, 23 Jun 2010 22:02:53 +0000 (15:02 -0700)]
arm/nptl: sysdep-cancel.h needs syscall handing for EABI
* Synced with eabi version of sysdep-cancel.h from glibc.
we have been using OABI version which does not work
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Abdoulaye Walsimou Gaye [Tue, 22 Jun 2010 14:36:41 +0000 (16:36 +0200)]
MIPS: Fix build error with linuxthreads.old
This patch avoid the following build error:
AS libc/sysdeps/linux/mips/vfork.os
In file included from libc/sysdeps/linux/mips/vfork.S:22:
./libc/sysdeps/linux/mips/sysdep.h:41:20: error: regdef.h: No such file
or directory
libc/sysdeps/linux/mips/vfork.S: Assembler messages:
libc/sysdeps/linux/mips/vfork.S:40: Warning: Unrecognized register name `sp'
libc/sysdeps/linux/mips/vfork.S:40: Warning: Bad .frame directive
libc/sysdeps/linux/mips/vfork.S:40: Error: junk at end of line, first
unrecognized character is `s'
libc/sysdeps/linux/mips/vfork.S:44: Error: illegal operands `dsubu
sp,FRAMESZ'
libc/sysdeps/linux/mips/vfork.S:45: Error: bad or irreducible absolute
expression
libc/sysdeps/linux/mips/vfork.S:65: Error: illegal operands `daddu
sp,FRAMESZ'
libc/sysdeps/linux/mips/vfork.S:69: Error: illegal operands `li a0,0x4112'
libc/sysdeps/linux/mips/vfork.S:70: Error: illegal operands `move a1,sp'
libc/sysdeps/linux/mips/vfork.S:73: Error: illegal operands `li
v0,(5000+55)'
libc/sysdeps/linux/mips/vfork.S:78: Error: illegal operands `bnez
a3,.Lerror'
libc/sysdeps/linux/mips/vfork.S:88: Error: illegal operands `dla
t9,__syscall_error'
libc/sysdeps/linux/mips/vfork.S:90: Error: illegal operands `jr t9'
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Mirko Vogt [Mon, 21 Jun 2010 18:23:14 +0000 (20:23 +0200)]
avoid using c99 syntax
Signed-off-by: Mirko Vogt <dev@nanl.de>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Austin Foxley [Mon, 21 Jun 2010 16:55:46 +0000 (09:55 -0700)]
get rid of needless c99 construct
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Bernhard Reutner-Fischer [Thu, 17 Jun 2010 17:49:54 +0000 (19:49 +0200)]
nptl: i386 needs atomic.h for atomic_exchange_acq
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 17 Jun 2010 17:46:29 +0000 (19:46 +0200)]
nptl: fix order of includes for out-of-tree builds
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 17 Jun 2010 17:44:58 +0000 (19:44 +0200)]
libc: define cfi_personality and cfi_lsda
required for proper, current subarch handling
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 17 Jun 2010 17:27:00 +0000 (19:27 +0200)]
librt: fix linking WRT pthreads
Linking order matters. Always did and still does today.
See how this makes the ugly and wrong hack to put pthread symbols into
librt _and_ linking librt against pthread moot?
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Carmelo Amoroso [Thu, 17 Jun 2010 17:10:26 +0000 (19:10 +0200)]
libc: Fix non-NPTL threads build
This patch fixes some issues building uclibc with linuxthreads, that seem to have
been introduced by the NPTL changes.
Signed-off-by: Andrew Stubbs <ams@codesourcery.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Bernhard Reutner-Fischer [Thu, 17 Jun 2010 16:40:14 +0000 (18:40 +0200)]
librt: simplify handling LDFLAGS
plus a few cosmetic touch-ups
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 15 Jun 2010 21:46:53 +0000 (23:46 +0200)]
libm: typo fix NO_LONG_DOUBLE variant of gamma_r
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Carmelo Amoroso [Mon, 14 Jun 2010 07:39:44 +0000 (09:39 +0200)]
sh4: Fixes for SH-4 without an FPU
This patch disables SH-4 optimizations that rely on the FPU when
building for variants that don't have an FPU, such as SH-4AL.
Signed-off-by: Andrew Stubbs <ams@codesourcery.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Bernhard Reutner-Fischer [Sun, 13 Jun 2010 08:57:58 +0000 (10:57 +0200)]
handle i386 TARGET_SUBARCH
so we can pick the correct nptl locking impls
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 13 Jun 2010 07:47:54 +0000 (09:47 +0200)]
nptl: fix symlinking headers
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 12 Jun 2010 13:40:56 +0000 (15:40 +0200)]
nptl: avoid spurious rebuilds of libpthread*.a
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 12 Jun 2010 13:40:21 +0000 (15:40 +0200)]
nptl: handle PTHREADS_DEBUG_SUPPORT properly
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 12 Jun 2010 13:37:31 +0000 (15:37 +0200)]
nptl: fix race condition when generating libpthread.so
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 11 Jun 2010 18:23:09 +0000 (20:23 +0200)]
hcreate_r: silence warning in helper func
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 11 Jun 2010 18:15:56 +0000 (20:15 +0200)]
wordexp: silence warning
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 11 Jun 2010 17:33:09 +0000 (19:33 +0200)]
nptl: remove relocation in pthread_rwlock_init()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 11 Jun 2010 17:22:42 +0000 (19:22 +0200)]
silence some warnings about missing prototypes
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 11 Jun 2010 17:20:50 +0000 (19:20 +0200)]
testsuite: disable some tests for !LFS
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 11 Jun 2010 13:49:26 +0000 (15:49 +0200)]
nptl: fix wrong path to nptl_db
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 11 Jun 2010 13:35:57 +0000 (15:35 +0200)]
lxdialog: fix ncursesw include detection
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 11 Jun 2010 10:10:14 +0000 (12:10 +0200)]
buildsys: fix clean vs. headerclean
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 11 Jun 2010 09:50:48 +0000 (11:50 +0200)]
buildsys: conceal install_headers
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 11 Jun 2010 09:08:59 +0000 (11:08 +0200)]
buildsys: fix lib/ directory prerequisite
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Roman I Khimov [Wed, 26 May 2010 11:13:01 +0000 (15:13 +0400)]
libm: unbreak scalbn for 64-bit processors
Obvious typo.
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 10 Jun 2010 20:26:29 +0000 (22:26 +0200)]
testsuite: .gitignore symlink
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 10 Jun 2010 20:24:43 +0000 (22:24 +0200)]
testsuite: do not run inet tests if !ipv4 && !ipv6
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 10 Jun 2010 20:20:17 +0000 (22:20 +0200)]
lgamma: fix sign handling
add testcase from
http://sourceware.org/bugzilla/show_bug.cgi?id=4407
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Roman I Khimov [Thu, 10 Jun 2010 20:17:04 +0000 (22:17 +0200)]
libm: unhide signgam
Fixes signgam checks in math tests on x86_64. It's R_X86_64_COPY for program,
so the program didn't see any changes from libm.
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 8 Jun 2010 21:21:09 +0000 (23:21 +0200)]
do not generate garbled interp
for parallel make
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 8 Jun 2010 21:05:48 +0000 (23:05 +0200)]
nptl: fix for !ipv4 && !ipv6
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Khem Raj [Mon, 7 Jun 2010 19:46:01 +0000 (12:46 -0700)]
mips/socket.h: add SOCK_CLOEXEC and SOCK_NONBLOCK definitions for mips
* __ss_aligntype is defined to unsigned long int
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Denys Vlasenko [Fri, 4 Jun 2010 11:36:30 +0000 (13:36 +0200)]
strverscmp: I forgot to export it
Result was:
strverscmp.o:
000000ec T __GI_strverscmp
i.e. no plain "strverscmp"!
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Khem Raj [Wed, 2 Jun 2010 17:17:40 +0000 (10:17 -0700)]
ldso/mips: Fix relocation parsing so that they work on both mips32/mips64
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Rob Landley <rob@landley.net>
Vladimir Zapolskiy [Tue, 1 Jun 2010 16:02:54 +0000 (20:02 +0400)]
inotify: add inotify_init1 system call support
This patch introduces support for inotify_init1 system call, found
since Linux 2.6.27.
Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Vladimir Zapolskiy [Tue, 1 Jun 2010 16:02:39 +0000 (20:02 +0400)]
bits/socket.h: add SOCK_CLOEXEC and SOCK_NONBLOCK support
This patch adds support for SOCK_CLOEXEC and SOCK_NONBLOCK socket
descriptor flags, which are introduced since Linux 2.6.27
Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Natanael Copa [Mon, 24 May 2010 07:07:45 +0000 (09:07 +0200)]
utils: Fix ldd segfault
Fixes ldd segfault on this testcase:
extern void _dl_getenv(void);
void foo(void)
{
printf("foo: %x\n", &_dl_getenv);
}
linked as -shared
It fixes bug #1507
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Khem Raj [Wed, 19 May 2010 22:59:50 +0000 (15:59 -0700)]
mips: Add vfork to libc
* When using NPTL get clone.o from nptl.
* Only use vfork if syscall is there.
* Add libc_a_SSRC to LINUX_LIBC_ARCH_OBJ.
* Use CLEAN_* for clean target.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj [Wed, 19 May 2010 22:32:30 +0000 (15:32 -0700)]
mips/bits/pthreadtypes.h: Re-include sgidefs.h
* This was dropped accidently in last merge
removal meant a lot of warnings about undefined
_ABI64.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Timo Teräs [Mon, 17 May 2010 08:01:49 +0000 (11:01 +0300)]
static build: define pthreads wrappers only for threaded builds
Otherwise we get compiler errors due to undefined prototypes
as noticed by Denys.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Austin Foxley [Mon, 17 May 2010 14:15:24 +0000 (07:15 -0700)]
some (all?) archs don't define asm, so use builtin __asm__
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Rob Landley [Sun, 16 May 2010 21:41:36 +0000 (16:41 -0500)]
Fix fcntl64 for 64 bit targets.
64 bit targets often don't have a separate fcntl64() system call, because they don't need one.
Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Denys Vlasenko [Mon, 17 May 2010 13:56:19 +0000 (15:56 +0200)]
workaround GCC PR32219
we ended up calling 0
Fixes bug #1033
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Denys Vlasenko [Sun, 16 May 2010 04:39:16 +0000 (06:39 +0200)]
resolv.h: fix wring indentation of #ifdef/#endif pairs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Khem Raj [Tue, 11 May 2010 21:07:04 +0000 (14:07 -0700)]
utils/Makefile.in: Define GETCONF_DIR for host builds of getconf.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj [Mon, 10 May 2010 06:00:39 +0000 (23:00 -0700)]
powerpc/Makefile.arch: Add objclean and headers_clean targets for NPTL.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj [Thu, 6 May 2010 05:50:19 +0000 (22:50 -0700)]
powerpc: Add TLS and NPTL support
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Khem Raj [Fri, 7 May 2010 19:39:08 +0000 (12:39 -0700)]
mips/Makefile.arch: Remove -f option to $(do_awk)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Timo Teras [Fri, 7 May 2010 14:19:20 +0000 (17:19 +0300)]
resolv: various memory corruption and off by one fixes
Fixes resolution of names with AAAA entries and gethostbyaddr issues.
Signed-off-by: Timo Teras <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Timo Teras [Fri, 7 May 2010 14:19:19 +0000 (17:19 +0300)]
static build: fix internal locking weaks to get pulled in always
Linker is smart and does not pull in weaks.os, ever. This happens
because that compilation unit does not get strong references and
ld eliminates dead code. We really need the weaks for static build
in a compilation unit that is always there, otherwise it won't work.
Signed-off-by: Timo Teras <timo.teras@iki.fi>
Acked-by: Roman I Khimov <khimov@altell.ru>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Roman I Khimov [Tue, 4 May 2010 10:00:47 +0000 (14:00 +0400)]
ldso: fix x86_64 R_X86_64_TPOFF64 and R_X86_64_DTPOFF64 relocations
R_X86_64_TPOFF64 revealed by trivial testcase:
===================================================================
#include <stdio.h>
#include <errno.h>
int main() {
void *a = &errno;
printf("errno addr: %llx\n", a);
__asm__("movq errno@gottpoff(%%rip), %0;\n"
"add %%fs:0x0,%0;" : "=r"(a) );
printf("got errno addr: %llx\n", a);
return 0;
}
===================================================================
The addresses application got with R_X86_64_TPOFF64 was different than the once libc
internal __errno_location returned.
R_X86_64_DTPOFF64 testcase is even simpler than that:
===================================================================
#include <stdio.h>
#include <errno.h>
#include <netdb.h>
#undef h_errno
extern __thread int h_errno;
int main() {
printf("h_errno addr: %llx\n", &h_errno);
printf("__h_errno_location addr: %llx\n", __h_errno_location());
return 0;
}
===================================================================
but needs to be linked with "-lpthread". This way we've got h_errno relocation via
R_X86_64_TPOFF64 in application and h_errno relocation via R_X86_64_DTPOFF64 in
libpthread which has its own __h_errno_location() (probably we can kill it later?).
And addresses were different again.
The problem is that both relocations resolve symbols in external modules and thus
should use symbol_addr instead of sym->st_value.
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Andy Gibbs [Wed, 5 May 2010 06:49:18 +0000 (08:49 +0200)]
Fix gen_wc8bit support for finding a UTF8 locale on host.
gen_wc8bit was previously patched to support UTF8 locales other than the
default en_US.UTF-8 by patch id
0e14b8f425c562749d3821a42414b1ce6b3b0923.
This was incomplete in its implementation and still failed where item(s)
in the list returned by 'locale -a' already had 'UTF8' appended to the
name. This patch rectifies this situation, plus adds an extra fix to
avoid trimming '\n' from an empty line which could cause a segfault.
Signed-off-by: Andy Gibbs <andyg1001@hotmail.co.uk>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Roman I Khimov [Fri, 30 Apr 2010 14:18:32 +0000 (18:18 +0400)]
nptl: use arch-specific pthread_cond_timedwait and pthread_cond_wait on x86_64
Generic ones were broken on x86_64, pthread/ex2 test failed while pthread/ex5
worked fine. So use arch-specific functions and fix linkage failure with
__pthread_mutex_cond_lock_adjust.
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Roman I Khimov [Fri, 30 Apr 2010 14:18:31 +0000 (18:18 +0400)]
nptl: use arch-specific cancellation routines for x86_64
They were present in sources, but not compiled in. Generic routines are
broken badly on x86_64, even basic threading test like pthread/ex1 didn't
work with them.
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Roman I Khimov [Sun, 2 May 2010 19:45:27 +0000 (23:45 +0400)]
nptl: fix sem_open with O_CREAT
Temporary file name template passed to __gen_tempname had no "XXXXXX" in it,
so __gen_tempname returned EINVAL which led to sem_open failure.
Fixes NPTL tests tst-sem4, tst-sem7, tst-sem8, tst-sem9.
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Denys Vlasenko [Thu, 29 Apr 2010 15:22:45 +0000 (17:22 +0200)]
time.c: fix unreadable code style: assignments within if(), misplaced comments
No logic changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko [Thu, 29 Apr 2010 15:17:18 +0000 (17:17 +0200)]
optional /etc/localtime support
This patch teaches uclibc to use /etc/localtime.
This is possible since recent TZif2 file format contains
TZ-like ASCII string at the end.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Austin Foxley [Wed, 28 Apr 2010 18:34:32 +0000 (11:34 -0700)]
include dlfcn.h in ldso.h to get RTLD_NODELETE definition
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Austin Foxley [Wed, 28 Apr 2010 17:35:55 +0000 (10:35 -0700)]
fix a few build errors for the no threads case
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Tony Wu [Wed, 28 Apr 2010 09:56:03 +0000 (17:56 +0800)]
Fix typo (OPTIMIZATIONS -> OPTIMIZATION)
Signed-off-by: Tony Wu <tung7970@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Gabor Juhos [Tue, 6 Apr 2010 15:56:11 +0000 (17:56 +0200)]
MIPS: restore INLINE_SYSCALL macro
The MIPS specific INLINE_SYSCALL macro has been renamed to
INLINE_SYSCALL_NCS with:
763bbf9e9a27426c9be8322dca5ddf2cb4dbc464
syscall: unify part 2: NCS variety
Declare common NCS (non-constant syscall) variants and convert the
existing ports over to this.
This change breaks system calls. The code generated with using of the
new macro does not obey the restartable syscall convention used by the
linux kernel. When it tries to restart the syscall the errno value is
not being replaced by the syscall number.
This causes weird behaviour of the 'ping' command in busybox for
example:
root@OpenWrt:/# ping 192.168.1.254
PING 192.168.1.254 (192.168.1.254): 56 data bytes
64 bytes from 192.168.1.254: seq=0 ttl=128 time=6.292 ms
ping: recvfrom: Function not implemented
64 bytes from 192.168.1.254: seq=1 ttl=128 time=0.719 ms
ping: recvfrom: Function not implemented
64 bytes from 192.168.1.254: seq=2 ttl=128 time=0.489 ms
ping: recvfrom: Function not implemented
64 bytes from 192.168.1.254: seq=3 ttl=128 time=0.486 ms
ping: recvfrom: Function not implemented
64 bytes from 192.168.1.254: seq=4 ttl=128 time=0.487 ms
ping: recvfrom: Function not implemented
64 bytes from 192.168.1.254: seq=5 ttl=128 time=0.939 ms
ping: recvfrom: Function not implemented
64 bytes from 192.168.1.254: seq=6 ttl=128 time=0.971 ms
ping: recvfrom: Function not implemented
64 bytes from 192.168.1.254: seq=7 ttl=128 time=0.488 ms
ping: recvfrom: Funct^C
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Andreas Schultz [Tue, 27 Apr 2010 15:43:43 +0000 (08:43 -0700)]
nptl: mips needs updated clone() implementation
Signed-off-by: Andreas Schultz <andreas.schultz@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Roman I Khimov [Tue, 27 Apr 2010 11:19:15 +0000 (15:19 +0400)]
libc/x86_64: use ELF-compatible definitions for assembler
Fixes open/read/write/close breakage with NPTL on x86_64 (due to missing
'.type' declaration).
Done this way because there are already ELF-style definitions in assemebler
code for x86_64 and looks like HAVE_ELF is not defined and used this days.
Or the other way around, it'd be a bit strange for x86_64 not to have ELF.
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Roman I Khimov [Tue, 27 Apr 2010 11:22:07 +0000 (15:22 +0400)]
libc/regex: fix internal_function declarations
Build failed with
| In file included from libc/misc/regex/regex.c:59:
| libc/misc/regex/regexec.c:315: error: conflicting types for 're_search_2_stub'
| libc/misc/regex/regexec.c:44: note: previous declaration of 're_search_2_stub' was here
| libc/misc/regex/regexec.c:358: error: conflicting types for 're_search_stub'
| libc/misc/regex/regexec.c:49: note: previous declaration of 're_search_stub' was here
.... etc
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Roman I Khimov [Tue, 27 Apr 2010 14:04:24 +0000 (18:04 +0400)]
libpthread/x86_64: fix clean
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Austin Foxley [Mon, 26 Apr 2010 05:06:36 +0000 (22:06 -0700)]
enable building __fcntl_nocancel, as it used unconditionally now
also sync up not-cancel.h headers between all three thread libraries
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Roman I Khimov [Sun, 25 Apr 2010 18:55:11 +0000 (22:55 +0400)]
Makefile.in: install sgtty.h
Proper and useful header, for example used by pacemaker.
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Carmelo Amoroso [Sun, 25 Apr 2010 18:38:19 +0000 (20:38 +0200)]
nptl: Harmonize objects and headers makefile clean targets
Update all the nptl clean targets (both objects and headers) to
use the new syntax using CLEAN_<full_path> and HEADER_<full_path>.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Sun, 25 Apr 2010 14:15:26 +0000 (16:15 +0200)]
build: Fix infinite loop when no threading support is enabled
The build loops forever due to when invoking make $(pregen-headers-y)
and $(pregen-headers-y) is empty (no thread support).
Parallel build should continue to work as well.
It fixes Bugzilla #1633.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Roman I Khimov [Sun, 25 Apr 2010 11:04:59 +0000 (15:04 +0400)]
libpthread/nptl_db: define NOT_IN_libc
NPTL build for x86_64 failed with
LD libthread_db-0.9.32-git.so
.../ld: libpthread/nptl_db/libthread_db_so.a(td_ta_event_getmsg.oS): relocation R_X86_64_PC32 against undefined symbol `__GI_memset' can not be used when making a shared object; recompile with -fPIC
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Carmelo Amoroso [Sun, 25 Apr 2010 08:37:01 +0000 (10:37 +0200)]
nptl_db: Remove compiler warning due to old-style function definition
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Sun, 25 Apr 2010 08:36:37 +0000 (10:36 +0200)]
nptl: Remove compiler warning due to old-style function definition
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Sun, 25 Apr 2010 08:14:48 +0000 (10:14 +0200)]
libc: Remove compiler warning due to old-style function definition
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Austin Foxley [Fri, 23 Apr 2010 14:27:50 +0000 (07:27 -0700)]
change ABI_VERSION back to just include the major number
By default, GCC hard codes the name for ld.so to /lib/ld-uClibc.so.0
so our default should match that. If distribution makers want to change
it, they need to change the default gcc configuration as well.
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Austin Foxley [Fri, 23 Apr 2010 13:55:42 +0000 (06:55 -0700)]
Merge commit 'origin/master' into nptl
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>