OSDN Git Service
Carmelo Amoroso [Fri, 16 Nov 2007 14:26:46 +0000 (14:26 -0000)]
Added AVR32 support to uClibc. Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Ricard Wanderlof [Mon, 12 Nov 2007 12:08:31 +0000 (12:08 -0000)]
CRIS/CRISv32 architecture specific memcpy, memmove and memset.
Khem Raj [Sat, 10 Nov 2007 06:42:45 +0000 (06:42 -0000)]
Do not return error when fprintf returns 0 in addmntent().
fprintf is considered failing if the return is less than 0
Carmelo Amoroso [Fri, 9 Nov 2007 13:04:26 +0000 (13:04 -0000)]
Fix build system to generate locale data instead of using pregenerated ones
Carmelo Amoroso [Fri, 9 Nov 2007 09:17:35 +0000 (09:17 -0000)]
Define _dl_assert in libdl only if __DOASSERTS__ is defined. Thanks to Peter Mazinger
Bernhard Reutner-Fischer [Wed, 7 Nov 2007 20:35:37 +0000 (20:35 -0000)]
- fix whitespace
Carmelo Amoroso [Wed, 7 Nov 2007 15:14:50 +0000 (15:14 -0000)]
Added support for GNU hash style into dynamic linker
Bernhard Reutner-Fischer [Wed, 24 Oct 2007 22:29:30 +0000 (22:29 -0000)]
- fix order of link-flags
On cygwin one has to pass
make menuconfig HOST_LOADLIBES="-lcurses -lintl"
otherwise just curses is linked in and some symbols that live in intl are
unresolved. Closes #1554 and possibly a couple of other reports.
Joakim Tjernlund [Tue, 23 Oct 2007 11:47:01 +0000 (11:47 -0000)]
Poll with zero timeout
Jean-Christian de Rivaz writes:
The attached patch solve an issue I faced while using the libdbus-glib
waiting for a D-Bus message or the end of a glib timer at the same time.
This specific case of use generate a poll call with a zero timeout. On
platformes with the glibc a zero timeout poll return immetiately even if
there is no file descriptor event. But on platformes with uClibc a zero
timeout poll block until a file descriptor event occurs.
Joakim Tjernlund [Sun, 21 Oct 2007 15:36:17 +0000 (15:36 -0000)]
Handle STT_COMMON symbols too. Following binutils release
will set the type of common symbols to STT_COMMON
instead of STT_OBJECTS, so the dynamic linker needs
to handle this type os symbols too.
Same changes have been added to glibc (See: bugzilla #5104).
This patch ensures the uclibc will work with later bintuils.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Bernhard Reutner-Fischer [Sat, 20 Oct 2007 18:17:18 +0000 (18:17 -0000)]
- commentary typo fix
Bernhard Reutner-Fischer [Tue, 16 Oct 2007 11:51:51 +0000 (11:51 -0000)]
- move UCLIBC_EXTRA_LDFLAGS below pinning LDFLAGS
Bernhard Reutner-Fischer [Sat, 13 Oct 2007 14:50:43 +0000 (14:50 -0000)]
- use the compiler-driver instead of the linker
- adjust setting flags accordingly to use (hardcoded, see below) -Wl,
Potential improvements:
*) --warn-unresolved-symbols should perhaps be used for all libs
*) eventually rename LDFLAGS to CC_LDFLAGS
*) probe for compiler driver's notion of flag to use for passing in
linker flags (i.e. don't hardcode "-Wl,")
Bernhard Reutner-Fischer [Sat, 13 Oct 2007 14:41:46 +0000 (14:41 -0000)]
- allow for passing in UCLIBC_EXTRA_LDFLAGS
Mike Frysinger [Mon, 8 Oct 2007 02:03:48 +0000 (02:03 -0000)]
Do string comparisos as late as possible during symbol lookup.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Bernhard Reutner-Fischer [Sun, 30 Sep 2007 19:30:40 +0000 (19:30 -0000)]
- Fix compilation for mips ABI64 with no LFS.
Bernhard Reutner-Fischer [Sun, 30 Sep 2007 19:29:19 +0000 (19:29 -0000)]
- Fix compilation for mips ABI64 with no LFS.
This wants a stub_enosys(readahead) line later on, like many, many others need..
Mike Frysinger [Fri, 28 Sep 2007 21:17:53 +0000 (21:17 -0000)]
This patch will fix a problem when the same host is defined with both IPv4 and
IPv6 entries in /etc/hosts. Previous only the first of these host would work,
as uClibc would read the /etc/hosts file from top to bottom, failing if the
first hit did not match the IP type.
Now uClibc will continue reading, even if the first correct entry name, but wrong IP
type fails. Thus, allowing a second correct entry name with correct IP type
will result in a name resolve.
Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Mike Frysinger [Fri, 28 Sep 2007 20:42:24 +0000 (20:42 -0000)]
do not check the pointer before freeing it since free(NULL) works just fine
Mike Frysinger [Fri, 28 Sep 2007 20:39:18 +0000 (20:39 -0000)]
cleanup code style
Mike Frysinger [Fri, 28 Sep 2007 20:14:36 +0000 (20:14 -0000)]
Make sure that the DSO has an hash table into its elf, otherwise skip
the lookup over next DSO.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Mike Frysinger [Fri, 21 Sep 2007 19:49:04 +0000 (19:49 -0000)]
Jie Zhang writes:
GCC 4.3 will put fixed headers in a seperate include-fixed directory.
And I don't think that there are people who are still using the 'stupid'
GCC which cannot handle -iwithprefix, at least it works with gcc-3.3.x.
Mike Frysinger [Fri, 21 Sep 2007 08:19:27 +0000 (08:19 -0000)]
drop LDFLAGS from OUTPUT_FORMAT until LD/LDFLAGS can be fixed in general
Bernhard Reutner-Fischer [Thu, 20 Sep 2007 12:07:10 +0000 (12:07 -0000)]
- spelling fix
Denis Vlasenko [Wed, 19 Sep 2007 08:23:09 +0000 (08:23 -0000)]
Fix author name and copyright notice in __uc_malloc.c
Denis Vlasenko [Wed, 19 Sep 2007 07:57:22 +0000 (07:57 -0000)]
fix assembler error. libc_hidden_data_def cannot work on COMMONs,
thus need to initialize stuff with 0 to force it into bss.
All hell can again break loose if future gcc will be smart enough
to ignore it.
Denis Vlasenko [Sat, 15 Sep 2007 21:10:52 +0000 (21:10 -0000)]
add libc_hidden_xxxx for __uc_malloc
Mike Frysinger [Sat, 15 Sep 2007 20:42:37 +0000 (20:42 -0000)]
from Blue Swirl: fixup sparc a bit more
Mike Frysinger [Sat, 15 Sep 2007 11:05:11 +0000 (11:05 -0000)]
pull from Blackfin repo: optimized byteswap funcs!
Mike Frysinger [Sat, 15 Sep 2007 11:04:21 +0000 (11:04 -0000)]
pull from Blackfin repo: cleanup string funcs
Mike Frysinger [Sat, 15 Sep 2007 11:04:08 +0000 (11:04 -0000)]
forgot to add this with previous sparc commit ...
Mike Frysinger [Sat, 15 Sep 2007 11:02:36 +0000 (11:02 -0000)]
use gcc input constraints to avoid often duplicated reloads when making syscalls
Mike Frysinger [Sat, 15 Sep 2007 10:57:09 +0000 (10:57 -0000)]
if __NR__newselect and __NR_select are unavailable, fall back to __NR_pselect6
Mike Frysinger [Sat, 15 Sep 2007 09:24:42 +0000 (09:24 -0000)]
also fix bug 1012 by moschny in 64bit version of readdir
Mike Frysinger [Sat, 15 Sep 2007 09:12:59 +0000 (09:12 -0000)]
bug 1310: drop hidden aliases to data since some arches crap with this due to copy relocs
Mike Frysinger [Sat, 15 Sep 2007 08:33:08 +0000 (08:33 -0000)]
not sure how this obvious one liner got lost from glibc, but merge it
Mike Frysinger [Sat, 15 Sep 2007 08:14:09 +0000 (08:14 -0000)]
add one more testcase from Natanael Copa
Mike Frysinger [Sat, 15 Sep 2007 08:12:15 +0000 (08:12 -0000)]
switch to a smaller/more robust implementation by Andrey Simonenko and as suggested by Natanael Copa
harvested from: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/92880
Mike Frysinger [Sat, 15 Sep 2007 08:11:30 +0000 (08:11 -0000)]
add more tests as suggested by Natanael Copa and as harvested from:
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/92880
Mike Frysinger [Sat, 15 Sep 2007 07:50:58 +0000 (07:50 -0000)]
Blue Swirl writes:
I got the library to compile with the attached patches, though dynamic
loader crashes early.
In buildroot I changed the architecture name by hand from sparc to
sparc64, otherwise the compiler produced 32-bit files with V9 (64-bit)
instructions. This configuration is not supported by QEMU, so I aimed
for pure 64-bit. I think Sparc64 option needs to be added to
buildroot.
The _Qp_ ops seem to be required by the ABI. This and setjmp patches
are just hacks to get the compilation further. The _Qp_ ops can be
found in glibc, would it be OK to use those?
V9 assembler requires declarations for global register use.
The mem* functions in sparc32 directory did not work. They are
actually used only by the hybrid 32-bit + V9 CPU configuration.
Mike Frysinger [Sat, 15 Sep 2007 07:42:01 +0000 (07:42 -0000)]
simplify binutils as-needed support and enable it all the time regardless of ssp
Mike Frysinger [Sat, 15 Sep 2007 07:40:58 +0000 (07:40 -0000)]
setup OUTPUT_FORMAT() in linker script (helps with multilib)
Mike Frysinger [Sat, 15 Sep 2007 07:25:54 +0000 (07:25 -0000)]
Atsushi Nemoto writes:
In MIPS syscall(2), .cpload was added to an the error path, but it was
not enough for ABIs other then O32. Use SETUP_GP, SETUP_GP64 and
RESTORE_GP64 to handle all ABIs. This patch fixes an error path of
MIPS pipe(2) too.
Mike Frysinger [Sat, 15 Sep 2007 06:50:02 +0000 (06:50 -0000)]
sync with glibc
Mike Frysinger [Sat, 15 Sep 2007 03:58:20 +0000 (03:58 -0000)]
actually update errors variable when a test fails
Mike Frysinger [Sat, 15 Sep 2007 00:52:56 +0000 (00:52 -0000)]
add strerror_r symbol alias as some autotool based packages simply use AC_CHECK_LIB() to see if a function exists rather than checking the headers
Mike Frysinger [Sat, 15 Sep 2007 00:36:49 +0000 (00:36 -0000)]
drop __user hack for crappy kernel headers and document the __linux__ grease
Mike Frysinger [Sat, 15 Sep 2007 00:26:11 +0000 (00:26 -0000)]
fix from Kevin Day to make sure we use strchr() rather than index()
Denis Vlasenko [Wed, 1 Aug 2007 10:19:51 +0000 (10:19 -0000)]
sgetspent: add missing free/__uc_malloc calls
(spotted by Peter S. Mazinger <ps.m@gmx.net>)
Denis Vlasenko [Mon, 30 Jul 2007 17:02:06 +0000 (17:02 -0000)]
make regex_old.c, ruserpass.c use __uc_malloc,
replace "buf = malloc(BUFSIZ); if (!buf) abort();" by __uc_malloc
elsewhere.
With last 7 patches together uclibc has 3k of static data total
with fairly big .config and with 2k being used for 2 x BUFSIZ stdio buffer:
text data bss dec hex filename
114 132 2048 2294 8f6 _stdio.o (ex lib/libc.a)
total data 593
total bss 3062
Denis Vlasenko [Mon, 30 Jul 2007 16:55:05 +0000 (16:55 -0000)]
make getnetent.c, md5.c use __uc_malloc
Denis Vlasenko [Mon, 30 Jul 2007 16:54:31 +0000 (16:54 -0000)]
make utent.c, getpass.c use __uc_malloc
Denis Vlasenko [Mon, 30 Jul 2007 16:54:07 +0000 (16:54 -0000)]
make pwd_grp.c use __uc_malloc
Denis Vlasenko [Mon, 30 Jul 2007 16:53:44 +0000 (16:53 -0000)]
patch #3: make resolv.c use __uc_malloc
Denis Vlasenko [Mon, 30 Jul 2007 16:52:23 +0000 (16:52 -0000)]
convert des.c to use __uc_malloc (-70 kbytes of bss)
Denis Vlasenko [Mon, 30 Jul 2007 16:51:48 +0000 (16:51 -0000)]
introduce __uc_malloc, so that users can intercept libc internal OOM.
Denis Vlasenko [Sun, 29 Jul 2007 14:45:26 +0000 (14:45 -0000)]
Remove stray code alignment (.align 16 and .align 4 directives)
from i386 and x86_64.
Denis Vlasenko [Wed, 18 Jul 2007 22:32:40 +0000 (22:32 -0000)]
execXp should go to next PATH dir on any error except ENOEXEC,
not just on ENOENT (in particular, on EPERM). At least glibc does so.
Fixing this.
Denis Vlasenko [Wed, 18 Jul 2007 22:31:31 +0000 (22:31 -0000)]
include/sys/mman.h says that msync exists only on MMU.
Make msync.c agree on this.
Denis Vlasenko [Wed, 18 Jul 2007 22:30:43 +0000 (22:30 -0000)]
des.c: move 0.5k of static data on stack, they are used only temporarily
by des_init.
"Steven J. Hill" [Wed, 18 Jul 2007 03:16:05 +0000 (03:16 -0000)]
Enable all of the remaining baud rates. All of the other architectures have them enabled, so let's go all the way. There was a quick discussion on IRC about making the max baud rate configurable. That requires a bunch of #ifdef salting throughout all of the 'termios.h' files for the pre-processor to chew on. I'm going to pass on that for now.
"Steven J. Hill" [Wed, 18 Jul 2007 03:08:36 +0000 (03:08 -0000)]
Apply patch as submitted by Blue Smurfy Swirly <blauwirbel@gmail.com> for Sparc32.
Denis Vlasenko [Sat, 14 Jul 2007 14:52:24 +0000 (14:52 -0000)]
syslog.h: allow prioritynames[]/facilitynames[] to be defined const
(selectable by #defining SYSLOG_NAMES_CONST)
"Steven J. Hill" [Thu, 12 Jul 2007 00:58:41 +0000 (00:58 -0000)]
Fix broken syscall() function since the original patch did not work.
Mike Frysinger [Fri, 29 Jun 2007 08:19:22 +0000 (08:19 -0000)]
tweak msync prototype to match header
Bernhard Reutner-Fischer [Sun, 24 Jun 2007 17:23:54 +0000 (17:23 -0000)]
- make sure to define _LIBC in libc-symbols.h before including anything
else.
- internal_function is only used inside libc, so do not define it in
uClibc_arch_features.h on i386 if we are outside of libc.
Mike Frysinger [Fri, 22 Jun 2007 16:00:45 +0000 (16:00 -0000)]
as noted by psm, make sure we accumulate PICFLAG-y back into PICFLAG
Mike Frysinger [Fri, 22 Jun 2007 07:11:53 +0000 (07:11 -0000)]
pull from Blackfin repo: add -mid-shared-library for UCLIBC_FORMAT_SHARED_FLAT and -msep-data for UCLIBC_FORMAT_FLAT_SEP_DATA
Joakim Tjernlund [Wed, 13 Jun 2007 16:23:59 +0000 (16:23 -0000)]
Carmelo AMOROSO <carmelo.amoroso@st.com> writes:
Hi All,
this patch fixes a mismatch in ucontext struct between uClibc and kernel.
In this way a signal handler installed by sigaction can access
to the whole machine state correctly.
This can be applied both to trunk and nptl branch
Joakim Tjernlund [Mon, 4 Jun 2007 22:16:54 +0000 (22:16 -0000)]
Correct return value. Pointed out by psm.
Mike Frysinger [Fri, 1 Jun 2007 19:17:36 +0000 (19:17 -0000)]
change the auxvt code from being dependent on MMU to !LDSO as auxvt things are ELF-specific, not MMU-specific
Mike Frysinger [Thu, 31 May 2007 08:26:29 +0000 (08:26 -0000)]
Bernd Schmidt writes: make sure custom stacks work properly for no-mmu
Mike Frysinger [Thu, 31 May 2007 08:22:35 +0000 (08:22 -0000)]
Atsushi Nemoto writes:
Current MIPS readahead(), posix_fadvise(), posix_fadvise64() do not
match with kernel on all ABIs.
On O32 ABI, a padding is needed before a long long argument.
On N32/N64, a long long argument should be passed via a single register.
Mike Frysinger [Thu, 31 May 2007 08:21:38 +0000 (08:21 -0000)]
Atsushi Nemoto writes:
http://www.opengroup.org/onlinepubs/
009695399/functions/posix_fadvise.html
states it returns error code instead of setting errno.
Mike Frysinger [Fri, 25 May 2007 18:34:46 +0000 (18:34 -0000)]
Jean-Christian de Rivaz writes:
I actually suspect this code into the file uClibc/libc/sysdeps/linux/common/poll.c:
tval.tv_nsec = (timeout % 1000) *1000; <==== make only usec!
From milisecond this really needs a *
1000000 to make nanosecond. Without this
a 1100 milisecond timeout is converted into a 1 seconde and 100 microsecond
timeout! This can explain the weird result of the test code.
Joakim Tjernlund [Fri, 25 May 2007 18:06:02 +0000 (18:06 -0000)]
Remove the arch specific mmap impl. for Powerpc. The common one will do.
Mike Frysinger [Thu, 24 May 2007 04:37:20 +0000 (04:37 -0000)]
use POSIX -eq rather than bash == #1360
"Steven J. Hill" [Thu, 24 May 2007 03:00:08 +0000 (03:00 -0000)]
Fix MIPS syscall() and pipe functions to set errno correctly as reported by Daniel Jacobowitz on the mailing list. More information available at <uclibc.org/lists/uclibc/2007-May/017968.html> .
"Steven J. Hill" [Thu, 24 May 2007 02:56:59 +0000 (02:56 -0000)]
Fix ARM EABI signal unwinding to accomodate signal frame layout between Linux kernel versions as reported by Joseph S. Myers on the mailing list. More information available at <uclibc.org/lists/uclibc/2007-May/017971.html> .
Peter Kjellerstedt [Tue, 15 May 2007 12:05:06 +0000 (12:05 -0000)]
Restored indentation.
Peter Kjellerstedt [Tue, 15 May 2007 11:58:37 +0000 (11:58 -0000)]
Made it compile again.
Khem Raj [Tue, 15 May 2007 00:37:02 +0000 (00:37 -0000)]
Fix arm mmap when using mmap2 syscall. Fixes bug #1303
Khem Raj [Tue, 15 May 2007 00:35:00 +0000 (00:35 -0000)]
Remove preprocessor warning due to missing definition of USE_TLS
Mike Frysinger [Sun, 6 May 2007 09:18:39 +0000 (09:18 -0000)]
Nickolai Zeldovich writes: if the temp name already exists, then the retry code does not create a new temp name as the code to do so is outside of the retry loop
Bernhard Reutner-Fischer [Fri, 4 May 2007 14:13:17 +0000 (14:13 -0000)]
- commentary typo fix
Mike Frysinger [Thu, 3 May 2007 23:13:04 +0000 (23:13 -0000)]
give proper prototypes
Mike Frysinger [Wed, 2 May 2007 18:20:58 +0000 (18:20 -0000)]
cancellation-points needs librt
Mike Frysinger [Wed, 2 May 2007 08:10:22 +0000 (08:10 -0000)]
exercise all required POSIX pthread cancellation points
Mike Frysinger [Wed, 2 May 2007 08:05:09 +0000 (08:05 -0000)]
Nickolai Zeldovich writes:
Currently, tcgetpgrp() in uClibc uses an int to store a PID (fetched
via ioctl TIOCGPGRP). This causes problems on platforms where pid_t
is defined to be larger (e.g., uint64_t). Other functions in termios,
such as tcgetsid() and tcsetpgrp(), already pass a pid_t to ioctl(),
so the following patch does the same in tcgetpgrp() as well.
Mike Frysinger [Wed, 2 May 2007 08:03:22 +0000 (08:03 -0000)]
Daniel Jacobowitz: sleep()/usleep() relies on nanosleep() being a cancellation
point but the files have "libc_hidden_proto(nanosleep)" which means it always
calls the libc.so version, never the wrapped version in libpthread.so that's a
cancellation point.
Mike Frysinger [Mon, 30 Apr 2007 21:23:22 +0000 (21:23 -0000)]
Carmelo AMOROSO writes:
running LTP test suite on uClibc-nptl for sh4 I found a bug into pread
and pwrite functions. When the offset is negative it is not correctly
handled due to a missing shift operation, so it is passed to the
syscall as the highest unsigned positive value.
Mike Frysinger [Tue, 24 Apr 2007 05:24:08 +0000 (05:24 -0000)]
fix from Bernd Schmidt for realloc shrinkage bug
Bernhard Reutner-Fischer [Mon, 23 Apr 2007 17:01:05 +0000 (17:01 -0000)]
- include stdbool.h
"Steven J. Hill" [Sat, 21 Apr 2007 19:42:21 +0000 (19:42 -0000)]
This test needs XLOCALE to work.
Rob Landley [Wed, 18 Apr 2007 16:26:16 +0000 (16:26 -0000)]
Bugfix from Atsushi Nemoto: return nonzero error code on failure
(without which busybox ping segfaults on error). Broken during locking
changes in in svn 16801.
Mike Frysinger [Tue, 17 Apr 2007 23:08:20 +0000 (23:08 -0000)]
if chroot() failed, then reset "chroot_dir" to "." so that after we do our fallback chdir(), we dont continue to prefix the chroot path ... fixes `ldconfig.host -r some/dir/`
Mike Frysinger [Tue, 17 Apr 2007 22:31:01 +0000 (22:31 -0000)]
cleanup style; no functional changes
Mike Frysinger [Tue, 17 Apr 2007 21:54:11 +0000 (21:54 -0000)]
fix ld.so.cache handling on no-mmu setups
Bernhard Reutner-Fischer [Tue, 17 Apr 2007 17:24:29 +0000 (17:24 -0000)]
- shrink resolver code
Mike Frysinger [Tue, 17 Apr 2007 13:34:11 +0000 (13:34 -0000)]
force ourselves to write proper code and develop testscases