From czankel at uclibc.org Tue Feb 5 15:04:14 2008 From: czankel at uclibc.org (czankel at uclibc.org) Date: Tue, 5 Feb 2008 15:04:14 -0800 (PST) Subject: svn commit: trunk/uClibc Message-ID: <20080205230414.CBB6212C6CE@busybox.net> Author: czankel Date: 2008-02-05 15:04:09 -0800 (Tue, 05 Feb 2008) New Revision: 20946 Log: Add myself as the maintainer for the Xtensa architecture. Signed-off-by: Chris Zankel Modified: trunk/uClibc/MAINTAINERS Changeset: Modified: trunk/uClibc/MAINTAINERS =================================================================== --- trunk/uClibc/MAINTAINERS 2008-02-04 13:23:53 UTC (rev 20945) +++ trunk/uClibc/MAINTAINERS 2008-02-05 23:04:09 UTC (rev 20946) @@ -132,3 +132,10 @@ X86_64 S: Unmaintained + +XTENSA +P: Chris Zankel +E: chris at zankel.net +W: http://linux-xtensa.org/ +S: Maintained + From carmelo at uclibc.org Wed Feb 6 23:06:50 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Wed, 6 Feb 2008 23:06:50 -0800 (PST) Subject: svn commit: trunk/uClibc/libc/stdio Message-ID: <20080207070650.92C9B12C5FC@busybox.net> Author: carmelo Date: 2008-02-06 23:06:49 -0800 (Wed, 06 Feb 2008) New Revision: 20952 Log: Fix stack overflow in _ppfs_parsespec Modified: trunk/uClibc/libc/stdio/_vfprintf.c Changeset: Modified: trunk/uClibc/libc/stdio/_vfprintf.c =================================================================== --- trunk/uClibc/libc/stdio/_vfprintf.c 2008-02-07 00:53:36 UTC (rev 20951) +++ trunk/uClibc/libc/stdio/_vfprintf.c 2008-02-07 07:06:49 UTC (rev 20952) @@ -898,7 +898,7 @@ ) { return -1; } - } while (buf[i++]); + } while (buf[i++] && (i < sizeof(buf))); buf[sizeof(buf)-1] = 0; } #else /* __UCLIBC_HAS_WCHAR__ */ From carmelo at uclibc.org Thu Feb 7 08:17:17 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Thu, 7 Feb 2008 08:17:17 -0800 (PST) Subject: svn commit: trunk/uClibc/libc/inet Message-ID: <20080207161717.410FD12C6A5@busybox.net> Author: carmelo Date: 2008-02-07 08:17:14 -0800 (Thu, 07 Feb 2008) New Revision: 20954 Log: Added AI_NUMERICSERV flag and check if the string is not just a number when AI_NUMERICSERV flag set. Signed-off-by: Filippo Arcidiacono Modified: trunk/uClibc/libc/inet/getaddrinfo.c Changeset: Modified: trunk/uClibc/libc/inet/getaddrinfo.c =================================================================== --- trunk/uClibc/libc/inet/getaddrinfo.c 2008-02-07 10:59:00 UTC (rev 20953) +++ trunk/uClibc/libc/inet/getaddrinfo.c 2008-02-07 16:17:14 UTC (rev 20954) @@ -823,7 +823,7 @@ hints = &default_hints; if (hints->ai_flags & ~(AI_PASSIVE|AI_CANONNAME|AI_NUMERICHOST| - AI_ADDRCONFIG|AI_V4MAPPED|AI_ALL)) + AI_ADDRCONFIG|AI_V4MAPPED|AI_NUMERICSERV|AI_ALL)) return EAI_BADFLAGS; if ((hints->ai_flags & AI_CANONNAME) && name == NULL) @@ -834,8 +834,12 @@ char *c; gaih_service.name = service; gaih_service.num = strtoul (gaih_service.name, &c, 10); - if (*c) + if (*c != '\0') { + if (hints->ai_flags & AI_NUMERICSERV) + return EAI_NONAME; + gaih_service.num = -1; + } else /* * Can't specify a numerical socket unless a protocol From bugs at busybox.net Thu Feb 7 19:30:48 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Thu, 7 Feb 2008 19:30:48 -0800 Subject: [uClibc 0002064]: Library assumes presence of several syscalls Message-ID: <614b9c703fece6d3401aa660b1c9ef23@bugs.uclibc.org> The following issue has been SUBMITTED. ====================================================================== http://busybox.net/bugs/view.php?id=2064 ====================================================================== Reported By: michael_d Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2064 Category: Other Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 02-07-2008 19:30 PST Last Modified: 02-07-2008 19:30 PST ====================================================================== Summary: Library assumes presence of several syscalls Description: When compiled against unmodified Linux-2.0.40 headers, uClibc fails to compile because it assumes several 2.2+ syscalls are present. The syscalls in question are __NR_lchown, __NR_prctl, __NR_sendfile, __NR_setresuid, __NR_setresgid, __NR_sched_getaffinity, and __NR_sched_setaffinity. (I'm aware there's already a patch in buildroot for the last two.) It looks like there was an attempt to conditionally include setresuid() and setresgid(). But it doesn't work, as compilation fails with "'__EI_setresuid' aliased to undefined symbol '__GI_setresuid'". I've worked around the problem by modifying before building uClibc. For all syscalls except lchown(), letting them fail with ENOSYS produces results no more broken than glibc on the same kernel. lchown() wasn't a problem for me, as I've privately backported syscall 182 to my kernel. Note that problem http://busybox.net/bugs/view.php?id=1874 also needs to be fixed before compilation on Linux 2.0.40 can complete. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 02-07-08 19:30 michael_d New Issue 02-07-08 19:30 michael_d Status new => assigned 02-07-08 19:30 michael_d Assigned To => uClibc ====================================================================== From bugs at busybox.net Thu Feb 7 19:49:21 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Thu, 7 Feb 2008 19:49:21 -0800 Subject: [uClibc 0002074]: poll() does not work on Linux 2.0.40 Message-ID: The following issue has been SUBMITTED. ====================================================================== http://busybox.net/bugs/view.php?id=2074 ====================================================================== Reported By: michael_d Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2074 Category: Other Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 02-07-2008 19:49 PST Last Modified: 02-07-2008 19:49 PST ====================================================================== Summary: poll() does not work on Linux 2.0.40 Description: When compiled for Linux 2.0.40, the poll() function will not work, always returning ENOSYS. While that kernel does not implement the poll syscall, there is a complete emulation within uClibc's source, which works fine but is not normally compiled in. The problem is that this kernel's defines __NR_poll, even though it does not implement the syscall. uClibc blindly assumes that the call will work if its number is defined, and discards the emulation to save space. To fix this, the library needs to check for the presence of the header, rather than just seeing if the syscall number is defined. I've worked around this locally by editing to remove __NR_poll. (Note that fixes for issues http://busybox.net/bugs/view.php?id=1874 and http://busybox.net/bugs/view.php?id=2064 must be applied before compilation of uClibc is possible on this platform.) ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 02-07-08 19:49 michael_d New Issue 02-07-08 19:49 michael_d Status new => assigned 02-07-08 19:49 michael_d Assigned To => uClibc ====================================================================== From bugs at busybox.net Thu Feb 7 20:00:38 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Thu, 7 Feb 2008 20:00:38 -0800 Subject: [uClibc 0002084]: SysVIPC does not work on old kernels Message-ID: <709f946a7e71ca8cd404dc6f548c476c@bugs.uclibc.org> The following issue has been SUBMITTED. ====================================================================== http://busybox.net/bugs/view.php?id=2084 ====================================================================== Reported By: michael_d Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2084 Category: Other Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 02-07-2008 20:00 PST Last Modified: 02-07-2008 20:00 PST ====================================================================== Summary: SysVIPC does not work on old kernels Description: The functions shmctl(), semctl(), and msgctl() unconditionally or their subcommand argument with __IPC_64. That flag was only added in Linux 2.4, so they will always fail on older kernels. I've prepared a patch to allow IPC to work on old kernels. Since __IPC_64 signals a different format of the syscall arguments and I haven't changed the userspace structures, a significant amount of marshalling code needed to be added. The patch does need some adaptation before it can go into the mainline. Since it is not safe to include , I cannot probe whether the current kernel supports __IPC_64 or not. Thus, this patch will unconditionally use old kernel structures. I've left a "#if 0" in libc/misc/sysvipc/ipc.h that can be flipped to produce a library for 2.4+. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 02-07-08 20:00 michael_d New Issue 02-07-08 20:00 michael_d Status new => assigned 02-07-08 20:00 michael_d Assigned To => uClibc 02-07-08 20:00 michael_d File Added: uClibc-0.9.29-ipc32.diff ====================================================================== From bernds at uclibc.org Fri Feb 8 05:43:40 2008 From: bernds at uclibc.org (bernds at uclibc.org) Date: Fri, 8 Feb 2008 05:43:40 -0800 (PST) Subject: svn commit: trunk/uClibc/ldso: include ldso ldso/bfin libdl Message-ID: <20080208134340.C94B4120112@busybox.net> Author: bernds Date: 2008-02-08 05:43:39 -0800 (Fri, 08 Feb 2008) New Revision: 20959 Log: Fix the recent dladdr changes so that they compile on FD-PIC targets. Modified: trunk/uClibc/ldso/include/dl-hash.h trunk/uClibc/ldso/ldso/bfin/dl-sysdep.h trunk/uClibc/ldso/ldso/dl-hash.c trunk/uClibc/ldso/ldso/ldso.c trunk/uClibc/ldso/libdl/libdl.c Changeset: Modified: trunk/uClibc/ldso/include/dl-hash.h =================================================================== --- trunk/uClibc/ldso/include/dl-hash.h 2008-02-08 09:32:23 UTC (rev 20958) +++ trunk/uClibc/ldso/include/dl-hash.h 2008-02-08 13:43:39 UTC (rev 20959) @@ -34,7 +34,7 @@ struct elf_resolve * next; struct elf_resolve * prev; /* Nothing after this address is used by gdb. */ - DL_LOADADDR_TYPE mapaddr; /* Address at which ELF segments (either main app and DSO) are mapped into */ + ElfW(Addr) mapaddr; /* Address at which ELF segments (either main app and DSO) are mapped into */ enum {elf_lib, elf_executable,program_interpreter, loaded_file} libtype; struct dyn_elf * symbol_scope; unsigned short usage_count; Modified: trunk/uClibc/ldso/ldso/bfin/dl-sysdep.h =================================================================== --- trunk/uClibc/ldso/ldso/bfin/dl-sysdep.h 2008-02-08 09:32:23 UTC (rev 20958) +++ trunk/uClibc/ldso/ldso/bfin/dl-sysdep.h 2008-02-08 13:43:39 UTC (rev 20959) @@ -95,7 +95,7 @@ #define DL_LOADADDR_TYPE struct elf32_fdpic_loadaddr #define DL_RELOC_ADDR(LOADADDR, ADDR) \ - (__reloc_pointer ((void*)(ADDR), (LOADADDR).map)) + ((ElfW(Addr))__reloc_pointer ((void*)(ADDR), (LOADADDR).map)) #define DL_ADDR_TO_FUNC_PTR(ADDR, LOADADDR) \ ((void(*)(void)) _dl_funcdesc_for ((void*)(ADDR), (LOADADDR).got_value)) @@ -189,7 +189,7 @@ #define DL_FIND_HASH_VALUE(TPNT, TYPE_CLASS, SYM) \ (((TYPE_CLASS) & ELF_RTYPE_CLASS_DLSYM) \ && ELF32_ST_TYPE((SYM)->st_info) == STT_FUNC \ - ? _dl_funcdesc_for (DL_RELOC_ADDR ((TPNT)->loadaddr, (SYM)->st_value), \ + ? _dl_funcdesc_for ((void *)DL_RELOC_ADDR ((TPNT)->loadaddr, (SYM)->st_value), \ (TPNT)->loadaddr.got_value) \ : DL_RELOC_ADDR ((TPNT)->loadaddr, (SYM)->st_value)) Modified: trunk/uClibc/ldso/ldso/dl-hash.c =================================================================== --- trunk/uClibc/ldso/ldso/dl-hash.c 2008-02-08 09:32:23 UTC (rev 20958) +++ trunk/uClibc/ldso/ldso/dl-hash.c 2008-02-08 13:43:39 UTC (rev 20959) @@ -152,7 +152,8 @@ hash_addr += tpnt->nbucket; tpnt->chains = hash_addr; } - tpnt->loadaddr = tpnt->mapaddr = loadaddr; + tpnt->loadaddr = loadaddr; + tpnt->mapaddr = DL_RELOC_ADDR(loadaddr, 0); for (i = 0; i < DYNAMIC_SIZE; i++) tpnt->dynamic_info[i] = dynamic_info[i]; return tpnt; Modified: trunk/uClibc/ldso/ldso/ldso.c =================================================================== --- trunk/uClibc/ldso/ldso/ldso.c 2008-02-08 09:32:23 UTC (rev 20958) +++ trunk/uClibc/ldso/ldso/ldso.c 2008-02-08 13:43:39 UTC (rev 20959) @@ -135,7 +135,7 @@ char **argv DL_GET_READY_TO_RUN_EXTRA_PARMS) { - DL_LOADADDR_TYPE app_loadaddr = NULL; + ElfW(Addr) app_mapaddr = 0; ElfW(Phdr) *ppnt; ElfW(Dyn) *dpnt; char *lpntstr; @@ -277,8 +277,8 @@ relro_addr = ppnt->p_vaddr; relro_size = ppnt->p_memsz; } - if (!app_loadaddr && (ppnt->p_type == PT_LOAD)) { - app_loadaddr = ppnt->p_vaddr; + if (!app_mapaddr && (ppnt->p_type == PT_LOAD)) { + app_mapaddr = DL_RELOC_ADDR (app_tpnt->loadaddr, ppnt->p_vaddr); } if (ppnt->p_type == PT_DYNAMIC) { dpnt = (ElfW(Dyn) *) DL_RELOC_ADDR(app_tpnt->loadaddr, ppnt->p_vaddr); @@ -326,7 +326,7 @@ _dl_symbol_tables = rpnt = (struct dyn_elf *) _dl_malloc(sizeof(struct dyn_elf)); _dl_memset(rpnt, 0, sizeof(struct dyn_elf)); rpnt->dyn = _dl_loaded_modules; - app_tpnt->mapaddr = app_loadaddr; + app_tpnt->mapaddr = app_mapaddr; app_tpnt->rtld_flags = unlazy | RTLD_GLOBAL; app_tpnt->usage_count++; app_tpnt->symbol_scope = _dl_symbol_tables; Modified: trunk/uClibc/ldso/libdl/libdl.c =================================================================== --- trunk/uClibc/ldso/libdl/libdl.c 2008-02-08 09:32:23 UTC (rev 20958) +++ trunk/uClibc/ldso/libdl/libdl.c 2008-02-08 13:43:39 UTC (rev 20959) @@ -743,7 +743,7 @@ /* Set the info for the object the address lies in */ __info->dli_fname = pelf->libname; - __info->dli_fbase = (void *) DL_LOADADDR_BASE(pelf->mapaddr); + __info->dli_fbase = pelf->mapaddr; symtab = (ElfW(Sym) *) (pelf->dynamic_info[DT_SYMTAB]); strtab = (char *) (pelf->dynamic_info[DT_STRTAB]); From czankel at uclibc.org Mon Feb 11 15:16:36 2008 From: czankel at uclibc.org (czankel at uclibc.org) Date: Mon, 11 Feb 2008 15:16:36 -0800 (PST) Subject: svn commit: trunk/uClibc/libc Message-ID: <20080211231636.60914120111@busybox.net> Author: czankel Date: 2008-02-11 15:16:35 -0800 (Mon, 11 Feb 2008) New Revision: 20985 Log: Omit adding 'OUTPUT_FORMAT' to the libc.so linker script if the architecture didn't provide one (Xtensa, for example, is such an architecture). Signed-off-by: Chris Zankel Modified: trunk/uClibc/libc/Makefile.in Changeset: Modified: trunk/uClibc/libc/Makefile.in =================================================================== --- trunk/uClibc/libc/Makefile.in 2008-02-11 18:10:06 UTC (rev 20984) +++ trunk/uClibc/libc/Makefile.in 2008-02-11 23:16:35 UTC (rev 20985) @@ -54,7 +54,7 @@ lib-so-y += $(libc) objclean-y += libc_clean -OUTPUT_FORMAT = $(CC) $(CFLAGS) -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p' +OUTPUT_FORMAT = $(CC) $(CFLAGS) -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/OUTPUT_FORMAT ( \1 )/p' ifeq ($(DOMULTI),n) $(libc:.$(MAJOR_VERSION)=): $(libc_OUT)/libc_so.a $(LIBS-libc.so) @@ -66,7 +66,7 @@ endif $(Q)$(RM) $@ $(Q)cp $(top_srcdir)extra/scripts/format.lds $@ - $(Q)echo "OUTPUT_FORMAT ( $(shell $(OUTPUT_FORMAT)) )" >> $@ + $(Q)echo "$(shell $(OUTPUT_FORMAT))" >> $@ ifeq ($(COMPAT_ATEXIT),y) $(Q)echo "GROUP ( $(NONSHARED_LIBNAME) $(SHARED_MAJORNAME) $(ASNEEDED) )" >> $@ else From bernds at uclibc.org Tue Feb 12 05:23:23 2008 From: bernds at uclibc.org (bernds at uclibc.org) Date: Tue, 12 Feb 2008 05:23:23 -0800 (PST) Subject: svn commit: trunk/uClibc/ldso/libdl Message-ID: <20080212132323.876E312013D@busybox.net> Author: bernds Date: 2008-02-12 05:23:19 -0800 (Tue, 12 Feb 2008) New Revision: 20993 Log: Use DL_RELOC_ADDR when dealing with DL_LOADADDR_TYPE types. Fixes gnu-hash compilation on Blackfin. Modified: trunk/uClibc/ldso/libdl/libdl.c Changeset: Modified: trunk/uClibc/ldso/libdl/libdl.c =================================================================== --- trunk/uClibc/ldso/libdl/libdl.c 2008-02-12 10:12:18 UTC (rev 20992) +++ trunk/uClibc/ldso/libdl/libdl.c 2008-02-12 13:23:19 UTC (rev 20993) @@ -761,7 +761,7 @@ do { ElfW(Addr) symbol_addr; - symbol_addr = (ElfW(Addr)) pelf->loadaddr + symtab[si].st_value; + symbol_addr = (ElfW(Addr)) DL_RELOC_ADDR(pelf->loadaddr, symtab[si].st_value); if (symbol_addr <= (ElfW(Addr))__address && (!sf || sa < symbol_addr)) { sa = symbol_addr; sn = si; From vda at uclibc.org Tue Feb 12 12:31:46 2008 From: vda at uclibc.org (vda at uclibc.org) Date: Tue, 12 Feb 2008 12:31:46 -0800 (PST) Subject: svn commit: trunk/uClibc/libc: inet inet/rpc misc/mntent misc/regex mis etc... Message-ID: <20080212203146.0584C120126@busybox.net> Author: vda Date: 2008-02-12 12:31:44 -0800 (Tue, 12 Feb 2008) New Revision: 21001 Log: add hidden_proto's for __uc_malloc (patch by Bernd Schmidt ) Modified: trunk/uClibc/libc/inet/getnetent.c trunk/uClibc/libc/inet/getproto.c trunk/uClibc/libc/inet/getservice.c trunk/uClibc/libc/inet/resolv.c trunk/uClibc/libc/inet/rpc/ruserpass.c trunk/uClibc/libc/misc/mntent/mntent.c trunk/uClibc/libc/misc/regex/regex_old.c trunk/uClibc/libc/misc/ttyent/getttyent.c trunk/uClibc/libc/misc/utmp/utent.c trunk/uClibc/libc/pwd_grp/pwd_grp.c trunk/uClibc/libc/stdlib/__uc_malloc.c trunk/uClibc/libc/unistd/getpass.c Changeset: Modified: trunk/uClibc/libc/inet/getnetent.c =================================================================== --- trunk/uClibc/libc/inet/getnetent.c 2008-02-12 19:01:34 UTC (rev 21000) +++ trunk/uClibc/libc/inet/getnetent.c 2008-02-12 20:31:44 UTC (rev 21001) @@ -29,7 +29,9 @@ libc_hidden_proto(rewind) libc_hidden_proto(fgets) libc_hidden_proto(abort) +libc_hidden_proto(__uc_malloc) + #include __UCLIBC_MUTEX_STATIC(mylock, PTHREAD_MUTEX_INITIALIZER); Modified: trunk/uClibc/libc/inet/getproto.c =================================================================== --- trunk/uClibc/libc/inet/getproto.c 2008-02-12 19:01:34 UTC (rev 21000) +++ trunk/uClibc/libc/inet/getproto.c 2008-02-12 20:31:44 UTC (rev 21001) @@ -70,6 +70,7 @@ libc_hidden_proto(fgets) libc_hidden_proto(fclose) libc_hidden_proto(abort) +libc_hidden_proto(__uc_malloc) #include __UCLIBC_MUTEX_STATIC(mylock, PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP); Modified: trunk/uClibc/libc/inet/getservice.c =================================================================== --- trunk/uClibc/libc/inet/getservice.c 2008-02-12 19:01:34 UTC (rev 21000) +++ trunk/uClibc/libc/inet/getservice.c 2008-02-12 20:31:44 UTC (rev 21001) @@ -72,6 +72,7 @@ libc_hidden_proto(rewind) libc_hidden_proto(fgets) libc_hidden_proto(abort) +libc_hidden_proto(__uc_malloc) #include __UCLIBC_MUTEX_STATIC(mylock, PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP); Modified: trunk/uClibc/libc/inet/resolv.c =================================================================== --- trunk/uClibc/libc/inet/resolv.c 2008-02-12 19:01:34 UTC (rev 21000) +++ trunk/uClibc/libc/inet/resolv.c 2008-02-12 20:31:44 UTC (rev 21001) @@ -221,6 +221,7 @@ #elif __UCLIBC_HAS_CTYPE_TABLES__ libc_hidden_proto(__ctype_b) #endif +libc_hidden_proto(__uc_malloc) Modified: trunk/uClibc/libc/inet/rpc/ruserpass.c =================================================================== --- trunk/uClibc/libc/inet/rpc/ruserpass.c 2008-02-12 19:01:34 UTC (rev 21000) +++ trunk/uClibc/libc/inet/rpc/ruserpass.c 2008-02-12 20:31:44 UTC (rev 21001) @@ -65,6 +65,7 @@ libc_hidden_proto(fclose) libc_hidden_proto(getc_unlocked) libc_hidden_proto(__fgetc_unlocked) +libc_hidden_proto(__uc_malloc) #define _(X) (X) /* #include "ftp_var.h" */ Modified: trunk/uClibc/libc/misc/mntent/mntent.c =================================================================== --- trunk/uClibc/libc/misc/mntent/mntent.c 2008-02-12 19:01:34 UTC (rev 21000) +++ trunk/uClibc/libc/misc/mntent/mntent.c 2008-02-12 20:31:44 UTC (rev 21001) @@ -26,6 +26,7 @@ libc_hidden_proto(fgets) libc_hidden_proto(abort) libc_hidden_proto(fprintf) +libc_hidden_proto(__uc_malloc) /* Reentrant version of getmntent. */ struct mntent *getmntent_r (FILE *filep, Modified: trunk/uClibc/libc/misc/regex/regex_old.c =================================================================== --- trunk/uClibc/libc/misc/regex/regex_old.c 2008-02-12 19:01:34 UTC (rev 21000) +++ trunk/uClibc/libc/misc/regex/regex_old.c 2008-02-12 20:31:44 UTC (rev 21001) @@ -48,6 +48,7 @@ #ifdef __USE_GNU libc_hidden_proto(mempcpy) #endif +libc_hidden_proto(__uc_malloc) /* AIX requires this to be the first thing in the file. */ #if defined _AIX && !defined REGEX_MALLOC Modified: trunk/uClibc/libc/misc/ttyent/getttyent.c =================================================================== --- trunk/uClibc/libc/misc/ttyent/getttyent.c 2008-02-12 19:01:34 UTC (rev 21000) +++ trunk/uClibc/libc/misc/ttyent/getttyent.c 2008-02-12 20:31:44 UTC (rev 21001) @@ -55,6 +55,7 @@ #elif __UCLIBC_HAS_CTYPE_TABLES__ libc_hidden_proto(__ctype_b) #endif +libc_hidden_proto(__uc_malloc) static char zapchar; static FILE *tf; Modified: trunk/uClibc/libc/misc/utmp/utent.c =================================================================== --- trunk/uClibc/libc/misc/utmp/utent.c 2008-02-12 19:01:34 UTC (rev 21000) +++ trunk/uClibc/libc/misc/utmp/utent.c 2008-02-12 20:31:44 UTC (rev 21001) @@ -30,6 +30,7 @@ libc_hidden_proto(fcntl) libc_hidden_proto(close) libc_hidden_proto(lseek) +libc_hidden_proto(__uc_malloc) #include __UCLIBC_MUTEX_STATIC(utmplock, PTHREAD_MUTEX_INITIALIZER); Modified: trunk/uClibc/libc/pwd_grp/pwd_grp.c =================================================================== --- trunk/uClibc/libc/pwd_grp/pwd_grp.c 2008-02-12 19:01:34 UTC (rev 21000) +++ trunk/uClibc/libc/pwd_grp/pwd_grp.c 2008-02-12 20:31:44 UTC (rev 21001) @@ -54,6 +54,7 @@ #elif __UCLIBC_HAS_CTYPE_TABLES__ libc_hidden_proto(__ctype_b) #endif +libc_hidden_proto(__uc_malloc) /**********************************************************************/ /* Prototypes for internal functions. */ Modified: trunk/uClibc/libc/stdlib/__uc_malloc.c =================================================================== --- trunk/uClibc/libc/stdlib/__uc_malloc.c 2008-02-12 19:01:34 UTC (rev 21000) +++ trunk/uClibc/libc/stdlib/__uc_malloc.c 2008-02-12 20:31:44 UTC (rev 21001) @@ -22,6 +22,7 @@ #include #include +libc_hidden_proto(_exit); libc_hidden_proto(__uc_malloc); libc_hidden_proto(__uc_malloc_failed); Modified: trunk/uClibc/libc/unistd/getpass.c =================================================================== --- trunk/uClibc/libc/unistd/getpass.c 2008-02-12 19:01:34 UTC (rev 21000) +++ trunk/uClibc/libc/unistd/getpass.c 2008-02-12 20:31:44 UTC (rev 21001) @@ -37,6 +37,7 @@ libc_hidden_proto(fputc) libc_hidden_proto(putc) libc_hidden_proto(__fputc_unlocked) +libc_hidden_proto(__uc_malloc) /* It is desirable to use this bit on systems that have it. The only bit of terminal state we want to twiddle is echoing, which is From bugs at busybox.net Fri Feb 15 15:35:07 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Fri, 15 Feb 2008 15:35:07 -0800 Subject: [uClibc 0002064]: Library assumes presence of several syscalls Message-ID: <0aae398c5c40d9841acef277e682d3de@busybox.net> A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=2064 ====================================================================== Reported By: michael_d Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2064 Category: Other Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 02-07-2008 19:30 PST Last Modified: 02-15-2008 15:35 PST ====================================================================== Summary: Library assumes presence of several syscalls Description: When compiled against unmodified Linux-2.0.40 headers, uClibc fails to compile because it assumes several 2.2+ syscalls are present. The syscalls in question are __NR_lchown, __NR_prctl, __NR_sendfile, __NR_setresuid, __NR_setresgid, __NR_sched_getaffinity, and __NR_sched_setaffinity. (I'm aware there's already a patch in buildroot for the last two.) It looks like there was an attempt to conditionally include setresuid() and setresgid(). But it doesn't work, as compilation fails with "'__EI_setresuid' aliased to undefined symbol '__GI_setresuid'". I've worked around the problem by modifying before building uClibc. For all syscalls except lchown(), letting them fail with ENOSYS produces results no more broken than glibc on the same kernel. lchown() wasn't a problem for me, as I've privately backported syscall 182 to my kernel. Note that problem http://busybox.net/bugs/view.php?id=1874 also needs to be fixed before compilation on Linux 2.0.40 can complete. ====================================================================== ---------------------------------------------------------------------- vapier - 02-15-08 15:35 ---------------------------------------------------------------------- ive updated the FAQ to cover our policy for things older than linux-2.4 is: we dont care that is to say, we arent going to fix it ourselves. if you can post a nice patch that works for you, we'll look at merging it. Issue History Date Modified Username Field Change ====================================================================== 02-07-08 19:30 michael_d New Issue 02-07-08 19:30 michael_d Status new => assigned 02-07-08 19:30 michael_d Assigned To => uClibc 02-15-08 15:35 vapier Note Added: 0004914 ====================================================================== From bugs at busybox.net Fri Feb 15 15:39:57 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Fri, 15 Feb 2008 15:39:57 -0800 Subject: [uClibc 0002074]: poll() does not work on Linux 2.0.40 Message-ID: <7ebb9b5ca7059c1d717e03aad1fd608a@busybox.net> A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=2074 ====================================================================== Reported By: michael_d Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2074 Category: Other Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 02-07-2008 19:49 PST Last Modified: 02-15-2008 15:39 PST ====================================================================== Summary: poll() does not work on Linux 2.0.40 Description: When compiled for Linux 2.0.40, the poll() function will not work, always returning ENOSYS. While that kernel does not implement the poll syscall, there is a complete emulation within uClibc's source, which works fine but is not normally compiled in. The problem is that this kernel's defines __NR_poll, even though it does not implement the syscall. uClibc blindly assumes that the call will work if its number is defined, and discards the emulation to save space. To fix this, the library needs to check for the presence of the header, rather than just seeing if the syscall number is defined. I've worked around this locally by editing to remove __NR_poll. (Note that fixes for issues http://busybox.net/bugs/view.php?id=1874 and http://busybox.net/bugs/view.php?id=2064 must be applied before compilation of uClibc is possible on this platform.) ====================================================================== ---------------------------------------------------------------------- vapier - 02-15-08 15:39 ---------------------------------------------------------------------- please see the FAQ: http://uclibc.org/FAQ.html#upstream_versions in other words, please post a patch that addresses the issue for you Issue History Date Modified Username Field Change ====================================================================== 02-07-08 19:49 michael_d New Issue 02-07-08 19:49 michael_d Status new => assigned 02-07-08 19:49 michael_d Assigned To => uClibc 02-15-08 15:39 vapier Note Added: 0004924 ====================================================================== From bugs at busybox.net Fri Feb 15 15:41:54 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Fri, 15 Feb 2008 15:41:54 -0800 Subject: [uClibc 0002084]: SysVIPC does not work on old kernels Message-ID: A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=2084 ====================================================================== Reported By: michael_d Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2084 Category: Other Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 02-07-2008 20:00 PST Last Modified: 02-15-2008 15:41 PST ====================================================================== Summary: SysVIPC does not work on old kernels Description: The functions shmctl(), semctl(), and msgctl() unconditionally or their subcommand argument with __IPC_64. That flag was only added in Linux 2.4, so they will always fail on older kernels. I've prepared a patch to allow IPC to work on old kernels. Since __IPC_64 signals a different format of the syscall arguments and I haven't changed the userspace structures, a significant amount of marshalling code needed to be added. The patch does need some adaptation before it can go into the mainline. Since it is not safe to include , I cannot probe whether the current kernel supports __IPC_64 or not. Thus, this patch will unconditionally use old kernel structures. I've left a "#if 0" in libc/misc/sysvipc/ipc.h that can be flipped to produce a library for 2.4+. ====================================================================== ---------------------------------------------------------------------- vapier - 02-15-08 15:41 ---------------------------------------------------------------------- make the code conditional on the versions of the kernel headers being compiled against Issue History Date Modified Username Field Change ====================================================================== 02-07-08 20:00 michael_d New Issue 02-07-08 20:00 michael_d Status new => assigned 02-07-08 20:00 michael_d Assigned To => uClibc 02-07-08 20:00 michael_d File Added: uClibc-0.9.29-ipc32.diff 02-15-08 15:41 vapier Note Added: 0004934 ====================================================================== From bugs at busybox.net Fri Feb 15 21:24:26 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Fri, 15 Feb 2008 21:24:26 -0800 Subject: [uClibc 0002194]: fadvise64 has issues Message-ID: The following issue has been SUBMITTED. ====================================================================== http://busybox.net/bugs/view.php?id=2194 ====================================================================== Reported By: skinkie Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2194 Category: Architecture Specific Reproducibility: always Severity: trivial Priority: normal Status: assigned ====================================================================== Date Submitted: 02-15-2008 21:24 PST Last Modified: 02-15-2008 21:24 PST ====================================================================== Summary: fadvise64 has issues Description: It seems that libc/sysdeps/linux/common/posix_fadvise64.c has some textual glitches. Firstly one may notice that advice in the function call is spelled differently in the INTERNAL_SYSCALL. Of course this broks the compiler, saying that the last is not present. Decide if advi(c|s)e is spelled with a c or an s. Next to this the number 6 seems to confuse the compiler also. I do not understand the code, but if I decrease the value by one to 5, it will compile. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 02-15-08 21:24 skinkie New Issue 02-15-08 21:24 skinkie Status new => assigned 02-15-08 21:24 skinkie Assigned To => uClibc ====================================================================== From vapier at uclibc.org Sat Feb 16 00:24:02 2008 From: vapier at uclibc.org (vapier at uclibc.org) Date: Sat, 16 Feb 2008 00:24:02 -0800 (PST) Subject: svn commit: trunk/uClibc/libc/sysdeps/linux/common Message-ID: <20080216082402.B2DE612C4B4@busybox.net> Author: vapier Date: 2008-02-16 00:24:02 -0800 (Sat, 16 Feb 2008) New Revision: 21034 Log: fix typo pointed out by skinkie in #2194 Modified: trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise64.c Changeset: Modified: trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise64.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise64.c 2008-02-15 23:35:06 UTC (rev 21033) +++ trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise64.c 2008-02-16 08:24:02 UTC (rev 21034) @@ -34,7 +34,7 @@ int ret = INTERNAL_SYSCALL (posix_fadvise64, err, 6, fd, __LONG_LONG_PAIR ((long) (offset >> 32), (long) offset), - (off_t) len, advise); + (off_t) len, advice); if (!INTERNAL_SYSCALL_ERROR_P (ret, err)) return 0; return INTERNAL_SYSCALL_ERRNO (ret, err); From vapier at uclibc.org Sat Feb 16 00:33:49 2008 From: vapier at uclibc.org (vapier at uclibc.org) Date: Sat, 16 Feb 2008 00:33:49 -0800 (PST) Subject: svn commit: trunk/uClibc/libc/sysdeps/linux/common Message-ID: <20080216083349.538BC12C63E@busybox.net> Author: vapier Date: 2008-02-16 00:33:48 -0800 (Sat, 16 Feb 2008) New Revision: 21035 Log: posix_fadvise64 on 64bit systems take 5 arguments, not 6, as pointed out by skinkie in #2194 Modified: trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise64.c Changeset: Modified: trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise64.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise64.c 2008-02-16 08:24:02 UTC (rev 21034) +++ trunk/uClibc/libc/sysdeps/linux/common/posix_fadvise64.c 2008-02-16 08:33:48 UTC (rev 21035) @@ -31,7 +31,7 @@ if (len != (off_t) len) return EOVERFLOW; INTERNAL_SYSCALL_DECL (err); - int ret = INTERNAL_SYSCALL (posix_fadvise64, err, 6, fd, + int ret = INTERNAL_SYSCALL (posix_fadvise64, err, 5, fd, __LONG_LONG_PAIR ((long) (offset >> 32), (long) offset), (off_t) len, advice); From bugs at busybox.net Sat Feb 16 00:34:29 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Sat, 16 Feb 2008 00:34:29 -0800 Subject: [uClibc 0002194]: fadvise64 has issues Message-ID: The following issue has been CLOSED ====================================================================== http://busybox.net/bugs/view.php?id=2194 ====================================================================== Reported By: skinkie Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2194 Category: Architecture Specific Reproducibility: always Severity: trivial Priority: normal Status: closed Resolution: fixed Fixed in Version: ====================================================================== Date Submitted: 02-15-2008 21:24 PST Last Modified: 02-16-2008 00:34 PST ====================================================================== Summary: fadvise64 has issues Description: It seems that libc/sysdeps/linux/common/posix_fadvise64.c has some textual glitches. Firstly one may notice that advice in the function call is spelled differently in the INTERNAL_SYSCALL. Of course this broks the compiler, saying that the last is not present. Decide if advi(c|s)e is spelled with a c or an s. Next to this the number 6 seems to confuse the compiler also. I do not understand the code, but if I decrease the value by one to 5, it will compile. ====================================================================== ---------------------------------------------------------------------- vapier - 02-16-08 00:34 ---------------------------------------------------------------------- should be fixed now in svn in the future, please describe your configuration ... what target, toolchain, etc... Issue History Date Modified Username Field Change ====================================================================== 02-15-08 21:24 skinkie New Issue 02-15-08 21:24 skinkie Status new => assigned 02-15-08 21:24 skinkie Assigned To => uClibc 02-16-08 00:34 vapier Note Added: 0004964 02-16-08 00:34 vapier Status assigned => closed 02-16-08 00:34 vapier Resolution open => fixed ====================================================================== From bugs at busybox.net Sun Feb 17 04:51:43 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Sun, 17 Feb 2008 04:51:43 -0800 Subject: [uClibc 0002204]: fpclassify and similar functions assume wrong double format Message-ID: <025dcd529b5104adcc44408a0d66e7c3@busybox.net> The following issue has been SUBMITTED. ====================================================================== http://busybox.net/bugs/view.php?id=2204 ====================================================================== Reported By: ambro Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2204 Category: Math Library Reproducibility: always Severity: major Priority: normal Status: assigned ====================================================================== Date Submitted: 02-17-2008 04:51 PST Last Modified: 02-17-2008 04:51 PST ====================================================================== Summary: fpclassify and similar functions assume wrong double format Description: On ARM, little endian, softfloat, OABI, the __fpclassify function assumes wrong double format, the regular little endian format also used on x86. However the actual float format (at least on my system) is different. This leads to fpclassify and related macros failing miserably. E.g. valid values like 6250.47070227514860000 are being reported as NAN by isnan(). I've been looking into this hard and found out what double format is in use on my system and what uClibc expects: s = sign bit e1,e2 = exponent m1,m2,m3 = mantissa uClibc code expets: < LOW PART > < HIGH PART > -------- -------- -------- -------- -------- -------- -------- -------- < m3 > < m2 > s< e1 > REALITY in softfloat ARM little endian, OABI: < LOW PART > < HIGH PART > -------- -------- -------- -------- -------- -------- -------- -------- < m2 > s< e1 > < m3 > meaning that low and high part are reversed. I've come across this bug quite some time in the past but now I've tracked it down. I've attached a workaround that seems to work, however I do not know the exact circumstances when the format is reversed. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 02-17-08 04:51 ambro New Issue 02-17-08 04:51 ambro Status new => assigned 02-17-08 04:51 ambro Assigned To => uClibc 02-17-08 04:51 ambro File Added: 140-float-arm.patch ====================================================================== From bugs at busybox.net Sun Feb 17 04:54:43 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Sun, 17 Feb 2008 04:54:43 -0800 Subject: [uClibc 0002204]: fpclassify and similar functions assume wrong double format Message-ID: <04e2d348e0d78617ed300301360c8781@busybox.net> A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=2204 ====================================================================== Reported By: ambro Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2204 Category: Math Library Reproducibility: always Severity: major Priority: normal Status: assigned ====================================================================== Date Submitted: 02-17-2008 04:51 PST Last Modified: 02-17-2008 04:54 PST ====================================================================== Summary: fpclassify and similar functions assume wrong double format Description: On ARM, little endian, softfloat, OABI, the __fpclassify function assumes wrong double format, the regular little endian format also used on x86. However the actual float format (at least on my system) is different. This leads to fpclassify and related macros failing miserably. E.g. valid values like 6250.47070227514860000 are being reported as NAN by isnan(). I've been looking into this hard and found out what double format is in use on my system and what uClibc expects: s = sign bit e1,e2 = exponent m1,m2,m3 = mantissa uClibc code expets: < LOW PART > < HIGH PART > -------- -------- -------- -------- -------- -------- -------- -------- < m3 > < m2 > s< e1 > REALITY in softfloat ARM little endian, OABI: < LOW PART > < HIGH PART > -------- -------- -------- -------- -------- -------- -------- -------- < m2 > s< e1 > < m3 > meaning that low and high part are reversed. I've come across this bug quite some time in the past but now I've tracked it down. I've attached a workaround that seems to work, however I do not know the exact circumstances when the format is reversed. ====================================================================== ---------------------------------------------------------------------- ambro - 02-17-08 04:54 ---------------------------------------------------------------------- I'm attaching the text file describing the format, it got messed up Issue History Date Modified Username Field Change ====================================================================== 02-17-08 04:51 ambro New Issue 02-17-08 04:51 ambro Status new => assigned 02-17-08 04:51 ambro Assigned To => uClibc 02-17-08 04:51 ambro File Added: 140-float-arm.patch 02-17-08 04:54 ambro File Added: double-arm 02-17-08 04:54 ambro Note Added: 0004974 ====================================================================== From czankel at uclibc.org Tue Feb 19 16:30:55 2008 From: czankel at uclibc.org (czankel at uclibc.org) Date: Tue, 19 Feb 2008 16:30:55 -0800 (PST) Subject: svn commit: trunk/uClibc/libc/sysdeps/linux/xtensa Message-ID: <20080220003055.6656D120125@busybox.net> Author: czankel Date: 2008-02-19 16:30:54 -0800 (Tue, 19 Feb 2008) New Revision: 21072 Log: Xtensa: Provide an architecture specific sigaction and sa_restorer function in libc to avoid having to place executable code on stack. Signed-off-by: Chris Zankel Added: trunk/uClibc/libc/sysdeps/linux/xtensa/sigaction.c trunk/uClibc/libc/sysdeps/linux/xtensa/sigrestorer.S Modified: trunk/uClibc/libc/sysdeps/linux/xtensa/Makefile.arch Changeset: Modified: trunk/uClibc/libc/sysdeps/linux/xtensa/Makefile.arch =================================================================== --- trunk/uClibc/libc/sysdeps/linux/xtensa/Makefile.arch 2008-02-19 23:42:22 UTC (rev 21071) +++ trunk/uClibc/libc/sysdeps/linux/xtensa/Makefile.arch 2008-02-20 00:30:54 UTC (rev 21072) @@ -1,14 +1,14 @@ # Makefile for uClibc # -# Copyright (C) 2007 Tensilica Inc. +# Copyright (C) 2007, 2008 Tensilica Inc. # # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # CSRC := brk.c fork.c posix_fadvise.c posix_fadvise64.c pread_write.c \ - __syscall_error.c + sigaction.c __syscall_error.c SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S \ - syscall.S mmap.S windowspill.S __longjmp.S vfork.S + sigrestorer.S syscall.S mmap.S windowspill.S __longjmp.S vfork.S include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch Added: trunk/uClibc/libc/sysdeps/linux/xtensa/sigaction.c =================================================================== --- trunk/uClibc/libc/sysdeps/linux/xtensa/sigaction.c (rev 0) +++ trunk/uClibc/libc/sysdeps/linux/xtensa/sigaction.c 2008-02-20 00:30:54 UTC (rev 21072) @@ -0,0 +1,59 @@ +/* vi: set sw=4 ts=4: */ +/* + * sigaction() for Xtensa uClibc + * + * Copyright (C) 2007, 2008 Tensilica Inc. + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + +#include +#include +#include +#include +#include + +#define SA_RESTORER 0x04000000 + +extern void __default_sa_restorer (void); + +libc_hidden_proto(memcpy) + +int __libc_sigaction (int signum, const struct sigaction *act, + struct sigaction *oldact) +{ + struct kernel_sigaction kact, koldact; + int result; + + if (act) { + kact.k_sa_handler = act->sa_handler; + memcpy(&kact.sa_mask, &act->sa_mask, sizeof (kact.sa_mask)); + kact.sa_flags = act->sa_flags; + + if (kact.sa_flags & SA_RESTORER) { + kact.sa_restorer = act->sa_restorer; + } else { + kact.sa_restorer = __default_sa_restorer; + kact.sa_flags |= SA_RESTORER; + } + } + + result = __syscall_rt_sigaction(signum, act ? __ptrvalue (&kact) : NULL, + oldact ? __ptrvalue (&koldact) : NULL, + _NSIG / 8); + + if (oldact && result >= 0) { + oldact->sa_handler = koldact.k_sa_handler; + memcpy(&oldact->sa_mask, &koldact.sa_mask, sizeof(oldact->sa_mask)); + oldact->sa_flags = koldact.sa_flags; + oldact->sa_restorer = koldact.sa_restorer; + } + + return result; +} + +#ifndef LIBC_SIGACTION +libc_hidden_proto (sigaction) +weak_alias (__libc_sigaction, sigaction) +libc_hidden_weak (sigaction) +#endif Added: trunk/uClibc/libc/sysdeps/linux/xtensa/sigrestorer.S =================================================================== --- trunk/uClibc/libc/sysdeps/linux/xtensa/sigrestorer.S (rev 0) +++ trunk/uClibc/libc/sysdeps/linux/xtensa/sigrestorer.S 2008-02-20 00:30:54 UTC (rev 21072) @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2008 Tensilica Inc. + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + +#include + +#if __NR_rt_sigreturn > 255 +# error value of __NR_rt_sigreturn is too big! +#endif + + .text + .align 4 + .global __default_sa_restorer + .type __default_sa_restorer, @function +__default_sa_restorer: + movi a2, __NR_rt_sigreturn + syscall From bugs at busybox.net Wed Feb 20 03:29:30 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Wed, 20 Feb 2008 03:29:30 -0800 Subject: [uClibc 0002264]: pthread issues with 0.9.29 Message-ID: The following issue has been SUBMITTED. ====================================================================== http://busybox.net/bugs/view.php?id=2264 ====================================================================== Reported By: kannappan Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2264 Category: Posix Threads Reproducibility: always Severity: major Priority: normal Status: assigned ====================================================================== Date Submitted: 02-20-2008 03:29 PST Last Modified: 02-20-2008 03:29 PST ====================================================================== Summary: pthread issues with 0.9.29 Description: I am using uclibc0.9.29, binutils 2.18 for ARM926T I am facing problems executing applications which uses pthread. when including pthread library my application crashes giving message "segmentation fault". But the same is working with glibc . When I debugged using strace It gave following error message # strace ./run_loop execve("./run_loop", ["./run_loop"], [/* 16 vars */]) = -1 ENOEXEC (Exec format error) write(2, "strace: exec: Exec format error\n", 32strace: exec: Exec format error ) = 32 exit(1) = ? Process 738 detached ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 02-20-08 03:29 kannappan New Issue 02-20-08 03:29 kannappan Status new => assigned 02-20-08 03:29 kannappan Assigned To => uClibc ====================================================================== From bugs at busybox.net Wed Feb 20 04:40:45 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Wed, 20 Feb 2008 04:40:45 -0800 Subject: [uClibc 0002264]: pthread issues with 0.9.29 Message-ID: <52dd7f3df1ca58cd23a5abd58f646072@busybox.net> The following issue requires your FEEDBACK. ====================================================================== http://busybox.net/bugs/view.php?id=2264 ====================================================================== Reported By: kannappan Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2264 Category: Posix Threads Reproducibility: always Severity: major Priority: normal Status: feedback ====================================================================== Date Submitted: 02-20-2008 03:29 PST Last Modified: 02-20-2008 04:40 PST ====================================================================== Summary: pthread issues with 0.9.29 Description: I am using uclibc0.9.29, binutils 2.18 for ARM926T I am facing problems executing applications which uses pthread. when including pthread library my application crashes giving message "segmentation fault". But the same is working with glibc . When I debugged using strace It gave following error message # strace ./run_loop execve("./run_loop", ["./run_loop"], [/* 16 vars */]) = -1 ENOEXEC (Exec format error) write(2, "strace: exec: Exec format error\n", 32strace: exec: Exec format error ) = 32 exit(1) = ? Process 738 detached ====================================================================== ---------------------------------------------------------------------- carmelo73 - 02-20-08 04:40 ---------------------------------------------------------------------- From egtvedt at uclibc.org Wed Feb 20 06:27:12 2008 From: egtvedt at uclibc.org (egtvedt at uclibc.org) Date: Wed, 20 Feb 2008 06:27:12 -0800 (PST) Subject: svn commit: trunk/uClibc/libc: string/avr32 sysdeps/linux/avr32 Message-ID: <20080220142712.C100812C554@busybox.net> Author: egtvedt Date: 2008-02-20 06:27:12 -0800 (Wed, 20 Feb 2008) New Revision: 21073 Log: Use HIDDEN_JUMPTARGET define instead of __GI_ directly in AVR32 files This patch uses the HIDDEN_JUMPTARGET instead of the __GI_ prefix in AVR32 assembler files. This is done to follow the code style in uClibc. Signed-off-by: Hans-Christian Egtvedt Modified: trunk/uClibc/libc/string/avr32/bcopy.S trunk/uClibc/libc/string/avr32/memmove.S trunk/uClibc/libc/sysdeps/linux/avr32/bsd-_setjmp.S trunk/uClibc/libc/sysdeps/linux/avr32/bsd-setjmp.S Changeset: Modified: trunk/uClibc/libc/string/avr32/bcopy.S =================================================================== --- trunk/uClibc/libc/string/avr32/bcopy.S 2008-02-20 00:30:54 UTC (rev 21072) +++ trunk/uClibc/libc/string/avr32/bcopy.S 2008-02-20 14:27:12 UTC (rev 21073) @@ -19,7 +19,7 @@ eor r11, r12 eor r12, r11 eor r11, r12 - rjmp __GI_memmove + rjmp HIDDEN_JUMPTARGET(memmove) .size bcopy, . - bcopy Modified: trunk/uClibc/libc/string/avr32/memmove.S =================================================================== --- trunk/uClibc/libc/string/avr32/memmove.S 2008-02-20 00:30:54 UTC (rev 21072) +++ trunk/uClibc/libc/string/avr32/memmove.S 2008-02-20 14:27:12 UTC (rev 21073) @@ -15,7 +15,7 @@ .type memmove, @function memmove: cp.w src, dst - brge __GI_memcpy + brge HIDDEN_JUMPTARGET(memcpy) add dst, len add src, len Modified: trunk/uClibc/libc/sysdeps/linux/avr32/bsd-_setjmp.S =================================================================== --- trunk/uClibc/libc/sysdeps/linux/avr32/bsd-_setjmp.S 2008-02-20 00:30:54 UTC (rev 21072) +++ trunk/uClibc/libc/sysdeps/linux/avr32/bsd-_setjmp.S 2008-02-20 14:27:12 UTC (rev 21073) @@ -12,5 +12,5 @@ .align 1 _setjmp: mov r11, 0 - bral __GI___sigsetjmp + bral HIDDEN_JUMPTARGET(__sigsetjmp) .size _setjmp, . - _setjmp Modified: trunk/uClibc/libc/sysdeps/linux/avr32/bsd-setjmp.S =================================================================== --- trunk/uClibc/libc/sysdeps/linux/avr32/bsd-setjmp.S 2008-02-20 00:30:54 UTC (rev 21072) +++ trunk/uClibc/libc/sysdeps/linux/avr32/bsd-setjmp.S 2008-02-20 14:27:12 UTC (rev 21073) @@ -12,5 +12,5 @@ .align 1 setjmp: mov r11, 1 - bral __GI___sigsetjmp + bral HIDDEN_JUMPTARGET(__sigsetjmp) .size setjmp, . - setjmp From czankel at uclibc.org Wed Feb 20 09:57:00 2008 From: czankel at uclibc.org (czankel at uclibc.org) Date: Wed, 20 Feb 2008 09:57:00 -0800 (PST) Subject: svn commit: trunk/uClibc/libc/sysdeps/linux/xtensa/sys Message-ID: <20080220175700.7F50112C717@busybox.net> Author: czankel Date: 2008-02-20 09:56:59 -0800 (Wed, 20 Feb 2008) New Revision: 21075 Log: xtensa: the size of the elf_gregset_t array is actually 128. Signed-off-by: Chris Zankel Modified: trunk/uClibc/libc/sysdeps/linux/xtensa/sys/procfs.h Changeset: Modified: trunk/uClibc/libc/sysdeps/linux/xtensa/sys/procfs.h =================================================================== --- trunk/uClibc/libc/sysdeps/linux/xtensa/sys/procfs.h 2008-02-20 16:38:54 UTC (rev 21074) +++ trunk/uClibc/libc/sysdeps/linux/xtensa/sys/procfs.h 2008-02-20 17:56:59 UTC (rev 21075) @@ -38,7 +38,7 @@ /* Type for a general-purpose register. */ typedef unsigned long elf_greg_t; -#define ELF_NGREG 32 +#define ELF_NGREG 128 typedef elf_greg_t elf_gregset_t[ELF_NGREG]; /* Register set for the floating-point registers. */ From carmelo at uclibc.org Wed Feb 20 12:20:01 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Wed, 20 Feb 2008 12:20:01 -0800 (PST) Subject: svn commit: trunk/uClibc/ldso/ldso Message-ID: <20080220202001.47BA012C77F@busybox.net> Author: carmelo Date: 2008-02-20 12:20:00 -0800 (Wed, 20 Feb 2008) New Revision: 21077 Log: Do not call _dl_de ug_state() before recording ld.so. Signed-off-by: Daniel Jacobowit Modified: trunk/uClibc/ldso/ldso/ldso.c Changeset: Modified: trunk/uClibc/ldso/ldso/ldso.c =================================================================== --- trunk/uClibc/ldso/ldso/ldso.c 2008-02-20 18:31:36 UTC (rev 21076) +++ trunk/uClibc/ldso/ldso/ldso.c 2008-02-20 20:20:00 UTC (rev 21077) @@ -427,9 +427,7 @@ debug_addr->r_brk = (unsigned long) &_dl_debug_state; _dl_debug_addr = debug_addr; - /* Notify the debugger we are in a consistant state */ - _dl_debug_addr->r_state = RT_CONSISTENT; - _dl_debug_state(); + /* Do notify the debugger untile the interpreter is in the list */ /* OK, we now have the application in the list, and we have some * basic stuff in place. Now search through the list for other shared From carmelo at uclibc.org Wed Feb 20 12:26:42 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Wed, 20 Feb 2008 12:26:42 -0800 (PST) Subject: svn commit: trunk/uClibc/ldso/ldso Message-ID: <20080220202642.BB08F12C7A9@busybox.net> Author: carmelo Date: 2008-02-20 12:26:42 -0800 (Wed, 20 Feb 2008) New Revision: 21078 Log: Fix typos in comment Modified: trunk/uClibc/ldso/ldso/ldso.c Changeset: Modified: trunk/uClibc/ldso/ldso/ldso.c =================================================================== --- trunk/uClibc/ldso/ldso/ldso.c 2008-02-20 20:20:00 UTC (rev 21077) +++ trunk/uClibc/ldso/ldso/ldso.c 2008-02-20 20:26:42 UTC (rev 21078) @@ -427,7 +427,7 @@ debug_addr->r_brk = (unsigned long) &_dl_debug_state; _dl_debug_addr = debug_addr; - /* Do notify the debugger untile the interpreter is in the list */ + /* Do not notify the debugger until the interpreter is in the list */ /* OK, we now have the application in the list, and we have some * basic stuff in place. Now search through the list for other shared From bugs at busybox.net Fri Feb 22 00:06:21 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Fri, 22 Feb 2008 00:06:21 -0800 Subject: [uClibc 0002264]: pthread issues with 0.9.29 Message-ID: A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=2264 ====================================================================== Reported By: kannappan Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2264 Category: Posix Threads Reproducibility: always Severity: major Priority: normal Status: feedback ====================================================================== Date Submitted: 02-20-2008 03:29 PST Last Modified: 02-22-2008 00:06 PST ====================================================================== Summary: pthread issues with 0.9.29 Description: I am using uclibc0.9.29, binutils 2.18 for ARM926T I am facing problems executing applications which uses pthread. when including pthread library my application crashes giving message "segmentation fault". But the same is working with glibc . When I debugged using strace It gave following error message # strace ./run_loop execve("./run_loop", ["./run_loop"], [/* 16 vars */]) = -1 ENOEXEC (Exec format error) write(2, "strace: exec: Exec format error\n", 32strace: exec: Exec format error ) = 32 exit(1) = ? Process 738 detached ====================================================================== ---------------------------------------------------------------------- carmelo73 - 02-20-08 04:40 ---------------------------------------------------------------------- From bugs at busybox.net Fri Feb 22 00:13:35 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Fri, 22 Feb 2008 00:13:35 -0800 Subject: [uClibc 0002264]: pthread issues with 0.9.29 Message-ID: <3877ee6f5a00657b2709352ad538646d@busybox.net> A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=2264 ====================================================================== Reported By: kannappan Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2264 Category: Posix Threads Reproducibility: always Severity: major Priority: normal Status: feedback ====================================================================== Date Submitted: 02-20-2008 03:29 PST Last Modified: 02-22-2008 00:13 PST ====================================================================== Summary: pthread issues with 0.9.29 Description: I am using uclibc0.9.29, binutils 2.18 for ARM926T I am facing problems executing applications which uses pthread. when including pthread library my application crashes giving message "segmentation fault". But the same is working with glibc . When I debugged using strace It gave following error message # strace ./run_loop execve("./run_loop", ["./run_loop"], [/* 16 vars */]) = -1 ENOEXEC (Exec format error) write(2, "strace: exec: Exec format error\n", 32strace: exec: Exec format error ) = 32 exit(1) = ? Process 738 detached ====================================================================== ---------------------------------------------------------------------- carmelo73 - 02-20-08 04:40 ---------------------------------------------------------------------- From bugs at busybox.net Fri Feb 22 17:25:33 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Fri, 22 Feb 2008 17:25:33 -0800 Subject: [uClibc 0002264]: pthread issues with 0.9.29 Message-ID: <14553ec3d4f38374c6b387fac0d1aeb1@busybox.net> A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=2264 ====================================================================== Reported By: kannappan Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2264 Category: Posix Threads Reproducibility: always Severity: major Priority: normal Status: feedback ====================================================================== Date Submitted: 02-20-2008 03:29 PST Last Modified: 02-22-2008 17:25 PST ====================================================================== Summary: pthread issues with 0.9.29 Description: I am using uclibc0.9.29, binutils 2.18 for ARM926T I am facing problems executing applications which uses pthread. when including pthread library my application crashes giving message "segmentation fault". But the same is working with glibc . When I debugged using strace It gave following error message # strace ./run_loop execve("./run_loop", ["./run_loop"], [/* 16 vars */]) = -1 ENOEXEC (Exec format error) write(2, "strace: exec: Exec format error\n", 32strace: exec: Exec format error ) = 32 exit(1) = ? Process 738 detached ====================================================================== ---------------------------------------------------------------------- carmelo73 - 02-20-08 04:40 ---------------------------------------------------------------------- From vapier at uclibc.org Fri Feb 22 17:28:28 2008 From: vapier at uclibc.org (vapier at uclibc.org) Date: Fri, 22 Feb 2008 17:28:28 -0800 (PST) Subject: svn commit: trunk/uClibc/libc/inet Message-ID: <20080223012828.E2A5012C79C@busybox.net> Author: vapier Date: 2008-02-22 17:28:28 -0800 (Fri, 22 Feb 2008) New Revision: 21091 Log: Ricard Wanderlof writes: The following definitions in getaddrinfo.c seem redundant as they _are_ defined in the public netdb.h header, contrary to the comment. AI_DEFAULT is not, however it is not used in the file either so can be safely removed. Modified: trunk/uClibc/libc/inet/getaddrinfo.c Changeset: Modified: trunk/uClibc/libc/inet/getaddrinfo.c =================================================================== --- trunk/uClibc/libc/inet/getaddrinfo.c 2008-02-23 01:25:38 UTC (rev 21090) +++ trunk/uClibc/libc/inet/getaddrinfo.c 2008-02-23 01:28:28 UTC (rev 21091) @@ -90,15 +90,6 @@ libc_hidden_proto(in6addr_loopback) #endif -/* The following declarations and definitions have been removed from - * the public header since we don't want people to use them. */ -#define AI_V4MAPPED 0x0008 /* IPv4-mapped addresses are acceptable. */ -#define AI_ALL 0x0010 /* Return both IPv4 and IPv6 addresses. */ -#define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose - returned address type. */ -#define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG) - - #define GAIH_OKIFUNSPEC 0x0100 #define GAIH_EAI ~(GAIH_OKIFUNSPEC) From bugs at busybox.net Fri Feb 22 22:18:40 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Fri, 22 Feb 2008 22:18:40 -0800 Subject: [uClibc 0002204]: fpclassify and similar functions assume wrong double format Message-ID: <42d7910f04c640a3d64b6b4b539f3c68@busybox.net> A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=2204 ====================================================================== Reported By: ambro Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2204 Category: Math Library Reproducibility: always Severity: major Priority: normal Status: assigned ====================================================================== Date Submitted: 02-17-2008 04:51 PST Last Modified: 02-22-2008 22:18 PST ====================================================================== Summary: fpclassify and similar functions assume wrong double format Description: On ARM, little endian, softfloat, OABI, the __fpclassify function assumes wrong double format, the regular little endian format also used on x86. However the actual float format (at least on my system) is different. This leads to fpclassify and related macros failing miserably. E.g. valid values like 6250.47070227514860000 are being reported as NAN by isnan(). I've been looking into this hard and found out what double format is in use on my system and what uClibc expects: s = sign bit e1,e2 = exponent m1,m2,m3 = mantissa uClibc code expets: < LOW PART > < HIGH PART > -------- -------- -------- -------- -------- -------- -------- -------- < m3 > < m2 > s< e1 > REALITY in softfloat ARM little endian, OABI: < LOW PART > < HIGH PART > -------- -------- -------- -------- -------- -------- -------- -------- < m2 > s< e1 > < m3 > meaning that low and high part are reversed. I've come across this bug quite some time in the past but now I've tracked it down. I've attached a workaround that seems to work, however I do not know the exact circumstances when the format is reversed. ====================================================================== ---------------------------------------------------------------------- ambro - 02-17-08 04:54 ---------------------------------------------------------------------- I'm attaching the text file describing the format, it got messed up ---------------------------------------------------------------------- vapier - 02-22-08 22:18 ---------------------------------------------------------------------- yes, this will break some combinations as some floating point is big endian on arm even if the cpu is little endian try looking in glibc and/or gcc and/or the uClibc/.../arm directory to see if you can find a good combination Issue History Date Modified Username Field Change ====================================================================== 02-17-08 04:51 ambro New Issue 02-17-08 04:51 ambro Status new => assigned 02-17-08 04:51 ambro Assigned To => uClibc 02-17-08 04:51 ambro File Added: 140-float-arm.patch 02-17-08 04:54 ambro File Added: double-arm 02-17-08 04:54 ambro Note Added: 0004974 02-22-08 22:18 vapier Note Added: 0005264 ====================================================================== From bugs at busybox.net Mon Feb 25 20:57:13 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Mon, 25 Feb 2008 20:57:13 -0800 Subject: [uClibc 0002354]: Fixing uClibc-0.9.29 ldso bug Message-ID: The following issue has been SUBMITTED. ====================================================================== http://busybox.net/bugs/view.php?id=2354 ====================================================================== Reported By: Joe Lin Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2354 Category: Architecture Specific Reproducibility: always Severity: minor Priority: normal Status: assigned ====================================================================== Date Submitted: 02-25-2008 20:57 PST Last Modified: 02-25-2008 20:57 PST ====================================================================== Summary: Fixing uClibc-0.9.29 ldso bug Description: When a program is a shard executable (PT_DYNAMIC), ld-uClibc fails to execute, resulting in a Segmentation Fault. I have located and fixed the bug. Here is the patch. ------------------------------------------ diff -Naurd uClibc-0.9.29/ldso/ldso/ldso.c uClibc-0.9.29-p1/ldso/ldso/ldso.c --- uClibc-0.9.29/ldso/ldso/ldso.c 2007-03-31 21:42:48.000000000 +0800 +++ uClibc-0.9.29-p1/ldso/ldso/ldso.c 2008-02-25 14:15:22.000000000 +0800 @@ -286,6 +286,7 @@ _dl_debug_early("calling mprotect on the application program\n"); /* Now cover the application program. */ if (app_tpnt->dynamic_info[DT_TEXTREL]) { + ElfW(Phdr) *ppnt; /* Don't affect outside ppnt */ ppnt = (ElfW(Phdr) *) auxvt[AT_PHDR].a_un.a_val; for (i = 0; i < auxvt[AT_PHNUM].a_un.a_val; i++, ppnt++) { if (ppnt->p_type == PT_LOAD && !(ppnt->p_flags & PF_W)) ------------------------------------------ ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 02-25-08 20:57 Joe Lin New Issue 02-25-08 20:57 Joe Lin Status new => assigned 02-25-08 20:57 Joe Lin Assigned To => uClibc ====================================================================== From bugs at busybox.net Tue Feb 26 00:10:39 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Tue, 26 Feb 2008 00:10:39 -0800 Subject: [uClibc 0002354]: Fixing uClibc-0.9.29 ldso bug Message-ID: The following issue has been RESOLVED. ====================================================================== http://busybox.net/bugs/view.php?id=2354 ====================================================================== Reported By: Joe Lin Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2354 Category: Architecture Specific Reproducibility: always Severity: minor Priority: normal Status: resolved Resolution: fixed Fixed in Version: ====================================================================== Date Submitted: 02-25-2008 20:57 PST Last Modified: 02-26-2008 00:10 PST ====================================================================== Summary: Fixing uClibc-0.9.29 ldso bug Description: When a program is a shard executable (PT_DYNAMIC), ld-uClibc fails to execute, resulting in a Segmentation Fault. I have located and fixed the bug. Here is the patch. ------------------------------------------ diff -Naurd uClibc-0.9.29/ldso/ldso/ldso.c uClibc-0.9.29-p1/ldso/ldso/ldso.c --- uClibc-0.9.29/ldso/ldso/ldso.c 2007-03-31 21:42:48.000000000 +0800 +++ uClibc-0.9.29-p1/ldso/ldso/ldso.c 2008-02-25 14:15:22.000000000 +0800 @@ -286,6 +286,7 @@ _dl_debug_early("calling mprotect on the application program\n"); /* Now cover the application program. */ if (app_tpnt->dynamic_info[DT_TEXTREL]) { + ElfW(Phdr) *ppnt; /* Don't affect outside ppnt */ ppnt = (ElfW(Phdr) *) auxvt[AT_PHDR].a_un.a_val; for (i = 0; i < auxvt[AT_PHNUM].a_un.a_val; i++, ppnt++) { if (ppnt->p_type == PT_LOAD && !(ppnt->p_flags & PF_W)) ------------------------------------------ ====================================================================== ---------------------------------------------------------------------- carmelo73 - 02-26-08 00:10 ---------------------------------------------------------------------- Already fixed in SVN r20438 See change at http://www.uclibc.org/cgi-bin/viewcvs.cgi/trunk/uClibc/ldso/ldso/ldso.c?rev=20438&r1=18293&r2=20438&diff_format=h Issue History Date Modified Username Field Change ====================================================================== 02-25-08 20:57 Joe Lin New Issue 02-25-08 20:57 Joe Lin Status new => assigned 02-25-08 20:57 Joe Lin Assigned To => uClibc 02-26-08 00:10 carmelo73 Status assigned => resolved 02-26-08 00:10 carmelo73 Resolution open => fixed 02-26-08 00:10 carmelo73 Note Added: 0005324 ====================================================================== From bugs at busybox.net Tue Feb 26 00:12:56 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Tue, 26 Feb 2008 00:12:56 -0800 Subject: [uClibc 0002354]: Fixing uClibc-0.9.29 ldso bug Message-ID: <254fc4293b48a2184d645c8006fd18e7@bugs.uclibc.org> The following issue has been CLOSED ====================================================================== http://busybox.net/bugs/view.php?id=2354 ====================================================================== Reported By: Joe Lin Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2354 Category: Architecture Specific Reproducibility: always Severity: minor Priority: normal Status: closed Resolution: fixed Fixed in Version: ====================================================================== Date Submitted: 02-25-2008 20:57 PST Last Modified: 02-26-2008 00:12 PST ====================================================================== Summary: Fixing uClibc-0.9.29 ldso bug Description: When a program is a shard executable (PT_DYNAMIC), ld-uClibc fails to execute, resulting in a Segmentation Fault. I have located and fixed the bug. Here is the patch. ------------------------------------------ diff -Naurd uClibc-0.9.29/ldso/ldso/ldso.c uClibc-0.9.29-p1/ldso/ldso/ldso.c --- uClibc-0.9.29/ldso/ldso/ldso.c 2007-03-31 21:42:48.000000000 +0800 +++ uClibc-0.9.29-p1/ldso/ldso/ldso.c 2008-02-25 14:15:22.000000000 +0800 @@ -286,6 +286,7 @@ _dl_debug_early("calling mprotect on the application program\n"); /* Now cover the application program. */ if (app_tpnt->dynamic_info[DT_TEXTREL]) { + ElfW(Phdr) *ppnt; /* Don't affect outside ppnt */ ppnt = (ElfW(Phdr) *) auxvt[AT_PHDR].a_un.a_val; for (i = 0; i < auxvt[AT_PHNUM].a_un.a_val; i++, ppnt++) { if (ppnt->p_type == PT_LOAD && !(ppnt->p_flags & PF_W)) ------------------------------------------ ====================================================================== ---------------------------------------------------------------------- carmelo73 - 02-26-08 00:10 ---------------------------------------------------------------------- Already fixed in SVN r20438 See change at http://www.uclibc.org/cgi-bin/viewcvs.cgi/trunk/uClibc/ldso/ldso/ldso.c?rev=20438&r1=18293&r2=20438&diff_format=h Issue History Date Modified Username Field Change ====================================================================== 02-25-08 20:57 Joe Lin New Issue 02-25-08 20:57 Joe Lin Status new => assigned 02-25-08 20:57 Joe Lin Assigned To => uClibc 02-26-08 00:10 carmelo73 Status assigned => resolved 02-26-08 00:10 carmelo73 Resolution open => fixed 02-26-08 00:10 carmelo73 Note Added: 0005324 02-26-08 00:12 carmelo73 Status resolved => closed ====================================================================== From carmelo at uclibc.org Thu Feb 28 01:56:29 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Thu, 28 Feb 2008 01:56:29 -0800 (PST) Subject: svn commit: trunk/uClibc: include/netinet libc/inet test/inet Message-ID: <20080228095629.DBF6E120154@busybox.net> Author: carmelo Date: 2008-02-28 01:56:28 -0800 (Thu, 28 Feb 2008) New Revision: 21132 Log: Added support for ether_line, ether_ntohost and ether_hostton. Added related test cases. Signed-off-by: Matthew Wilcox Hacked-by: Carmelo Amoroso Added: trunk/uClibc/libc/inet/ethers.c trunk/uClibc/test/inet/tst-ethers-line.c trunk/uClibc/test/inet/tst-ethers.c Modified: trunk/uClibc/include/netinet/ether.h trunk/uClibc/libc/inet/Makefile.in Changeset: Modified: trunk/uClibc/include/netinet/ether.h =================================================================== --- trunk/uClibc/include/netinet/ether.h 2008-02-28 02:19:38 UTC (rev 21131) +++ trunk/uClibc/include/netinet/ether.h 2008-02-28 09:56:28 UTC (rev 21132) @@ -25,6 +25,8 @@ /* Get definition of `struct ether_addr'. */ #include +#define ETHER_FILE_NAME "/etc/ethers" + __BEGIN_DECLS /* Convert 48 bit Ethernet ADDRess to ASCII. */ Modified: trunk/uClibc/libc/inet/Makefile.in =================================================================== --- trunk/uClibc/libc/inet/Makefile.in 2008-02-28 02:19:38 UTC (rev 21131) +++ trunk/uClibc/libc/inet/Makefile.in 2008-02-28 09:56:28 UTC (rev 21132) @@ -23,7 +23,7 @@ res_query.c gethostbyaddr.c read_etc_hosts_r.c get_hosts_byname_r.c \ get_hosts_byaddr_r.c gethostbyname2.c getnameinfo.c gethostent.c \ gethostbyname_r.c gethostbyname2_r.c gethostbyaddr_r.c \ - res_comp.c ns_name.c + res_comp.c ns_name.c ethers.c # unused ATM CSRC += encodep.c decodep.c formquery.c Added: trunk/uClibc/libc/inet/ethers.c =================================================================== --- trunk/uClibc/libc/inet/ethers.c (rev 0) +++ trunk/uClibc/libc/inet/ethers.c 2008-02-28 09:56:28 UTC (rev 21132) @@ -0,0 +1,122 @@ +/* + * libc/inet/ethers.c + * + * Programmatic interface for the /etc/ethers file + * + * Copyright 2007 by Matthew Wilcox + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + +#include +#include +#include +#include + +#define ETHER_LINE_LEN 256 + +/* + * Internal function which returns a pointer to the part of the line + * with the start of the hostname, or NULL if we couldn't parse the line. + * Note that this line may have a comment symbol on it somewhere; if so + * it will return NULL if the # is before or within the ether_addr, and + * succeed if the # is before or within the host. It's up to the callers + * to be aware of this. + * + * I would have preferred to write a NUL to the location of the comment + * character, but ether_line takes a const argument. See __ether_line_w. + */ +static const char *__ether_line(const char *line, struct ether_addr *addr) +{ + struct ether_addr *res = ether_aton_r(line, addr); + if (!res) + return NULL; + + while (*line && (*line != ' ') && (*line != '\t')) + line++; + while (*line && ((*line == ' ') || (*line == '\t'))) + line++; + return (*line) ? line : NULL; +} + +/* + * Strips out the comment before calling __ether_line. We can do this, + * since we know the buffer is writable. + */ +static const char *__ether_line_w(char *line, struct ether_addr *addr) +{ + char *end = strchr(line, '#'); + if (!end) + end = strchr(line, '\n'); + if (end) + *end = '\0'; + return __ether_line(line, addr); +} + +int ether_line(const char *line, struct ether_addr *addr, char *hostname) +{ + const char *name = __ether_line(line, addr); + if (!name) + return -1; + + while (*name) { + if ((*name == '#') || isspace(*name)) + break; + *hostname++ = *name++; + } + *hostname = '\0'; + + return 0; +} + +int ether_ntohost(char *hostname, const struct ether_addr *addr) +{ + int res = -1; + FILE *fp; + char buf[ETHER_LINE_LEN]; + + fp = fopen(ETHER_FILE_NAME, "r"); + if (!fp) + return -1; + + while (fgets(buf, sizeof(buf), fp)) { + struct ether_addr tmp_addr; + const char *cp = __ether_line_w(buf, &tmp_addr); + if (!cp) + continue; + if (memcmp(addr, &tmp_addr, sizeof(tmp_addr))) + continue; + + strcpy(hostname, cp); + res = 0; + break; + } + + fclose(fp); + return res; +} + +int ether_hostton(const char *hostname, struct ether_addr *addr) +{ + int res = -1; + FILE *fp; + char buf[ETHER_LINE_LEN]; + + fp = fopen(ETHER_FILE_NAME, "r"); + if (!fp) + return -1; + + while (fgets(buf, sizeof(buf), fp)) { + const char *cp = __ether_line_w(buf, addr); + if (!cp) + continue; + if (strcasecmp(hostname, cp)) + continue; + + res = 0; + break; + } + + fclose(fp); + return res; +} Property changes on: trunk/uClibc/libc/inet/ethers.c ___________________________________________________________________ Name: svn:executable + * Added: trunk/uClibc/test/inet/tst-ethers-line.c =================================================================== --- trunk/uClibc/test/inet/tst-ethers-line.c (rev 0) +++ trunk/uClibc/test/inet/tst-ethers-line.c 2008-02-28 09:56:28 UTC (rev 21132) @@ -0,0 +1,45 @@ +#include +#include +#include +#include +#include +#include +#include + +#define ETHER_LINE_LEN 256 + +int main(void) +{ + struct ether_addr addr; + char hostname[ETHER_LINE_LEN]; + int fd, i; + const char *ethers; + struct stat statb; + + if ((fd = open(ETHER_FILE_NAME, O_RDONLY)) == -1) { + perror ("Cannot open file"); + exit(1); + } + + if (fstat(fd, &statb)) { + perror("Stat failed"); + exit(1); + } + ethers = mmap(NULL, statb.st_size, PROT_READ, MAP_SHARED, fd, 0); + + if (ethers == MAP_FAILED) { + perror("File mapping failed"); + exit(1); + } + + ether_line(ethers, &addr, hostname); + + for (i = 0; i < 6; i++) { + printf("%02x", addr.ether_addr_octet[i]); + if (i < 5) + printf(":"); + } + printf(" %s\n", hostname); + + return 0; +} Property changes on: trunk/uClibc/test/inet/tst-ethers-line.c ___________________________________________________________________ Name: svn:executable + * Added: trunk/uClibc/test/inet/tst-ethers.c =================================================================== --- trunk/uClibc/test/inet/tst-ethers.c (rev 0) +++ trunk/uClibc/test/inet/tst-ethers.c 2008-02-28 09:56:28 UTC (rev 21132) @@ -0,0 +1,28 @@ +#include +#include + +#define ETHER_LINE_LEN 256 + +int main(void) +{ + struct ether_addr addr; + char host[ETHER_LINE_LEN]; + int i; + int res = ether_hostton("teeth", &addr); + + if (res) + return 1; + + for (i = 0; i < 6; i++) { + printf("%02x", addr.ether_addr_octet[i]); + if (i < 5) + printf(":"); + } + + res = ether_ntohost(host, &addr); + if (res) + return 1; + printf(" %s\n", host); + + return 0; +} Property changes on: trunk/uClibc/test/inet/tst-ethers.c ___________________________________________________________________ Name: svn:executable + * From carmelo at uclibc.org Thu Feb 28 02:01:11 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Thu, 28 Feb 2008 02:01:11 -0800 (PST) Subject: svn commit: trunk/uClibc/test/inet Message-ID: <20080228100111.18BBE120154@busybox.net> Author: carmelo Date: 2008-02-28 02:01:09 -0800 (Thu, 28 Feb 2008) New Revision: 21133 Log: Fix file permissions Modified: trunk/uClibc/test/inet/tst-ethers-line.c trunk/uClibc/test/inet/tst-ethers.c Changeset: Property changes on: trunk/uClibc/test/inet/tst-ethers-line.c ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/uClibc/test/inet/tst-ethers.c ___________________________________________________________________ Name: svn:executable - * From carmelo at uclibc.org Thu Feb 28 02:05:23 2008 From: carmelo at uclibc.org (carmelo at uclibc.org) Date: Thu, 28 Feb 2008 02:05:23 -0800 (PST) Subject: svn commit: trunk/uClibc/libc/inet Message-ID: <20080228100523.5A39E120154@busybox.net> Author: carmelo Date: 2008-02-28 02:05:14 -0800 (Thu, 28 Feb 2008) New Revision: 21134 Log: Fix file permissions Modified: trunk/uClibc/libc/inet/ethers.c Changeset: Property changes on: trunk/uClibc/libc/inet/ethers.c ___________________________________________________________________ Name: svn:executable - * From bugs at busybox.net Thu Feb 28 02:32:21 2008 From: bugs at busybox.net (bugs at busybox.net) Date: Thu, 28 Feb 2008 02:32:21 -0800 Subject: [uClibc 0002264]: pthread issues with 0.9.29 Message-ID: <0a7cf10106998f0d344aab5412d8a938@bugs.uclibc.org> A NOTE has been added to this issue. ====================================================================== http://busybox.net/bugs/view.php?id=2264 ====================================================================== Reported By: kannappan Assigned To: uClibc ====================================================================== Project: uClibc Issue ID: 2264 Category: Posix Threads Reproducibility: always Severity: major Priority: normal Status: feedback ====================================================================== Date Submitted: 02-20-2008 03:29 PST Last Modified: 02-28-2008 02:32 PST ====================================================================== Summary: pthread issues with 0.9.29 Description: I am using uclibc0.9.29, binutils 2.18 for ARM926T I am facing problems executing applications which uses pthread. when including pthread library my application crashes giving message "segmentation fault". But the same is working with glibc . When I debugged using strace It gave following error message # strace ./run_loop execve("./run_loop", ["./run_loop"], [/* 16 vars */]) = -1 ENOEXEC (Exec format error) write(2, "strace: exec: Exec format error\n", 32strace: exec: Exec format error ) = 32 exit(1) = ? Process 738 detached ====================================================================== ---------------------------------------------------------------------- carmelo73 - 02-20-08 04:40 ----------------------------------------------------------------------