From jakub@redhat.com Mon Sep 4 21:28:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 04 Sep 2006 21:28:00 -0000 Subject: [PATCH] Put .hash section at the end of RO segment if --hash-style=both Message-ID: <20060904212811.GR4556@sunsite.mff.cuni.cz> Hi! %subj says it all, if we put in both hash tables, we indend to use .gnu.hash in 99.999% of cases. 2006-09-04 Jakub Jelinek * Makerules (shlib.lds): If have-hash-style, put .hash section at the end of the RO segment. --- libc/Makerules.jj 2006-08-21 23:00:58.000000000 +0200 +++ libc/Makerules 2006-09-04 23:20:24.000000000 +0200 @@ -487,7 +487,13 @@ $(common-objpfx)shlib.lds: $(common-objp -Wl,--verbose 2>&1 | \ sed > $@T \ -e '/^=========/,/^=========/!d;/^=========/d' \ - -e 's/^.*\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \ + $(if $(filter yes,$(have-hash-style)), \ + -e 's/^.*\.gnu\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \ + -e '/^[ ]*\.hash[ ]*:.*$$/{h;d;}' \ + -e '/DATA_SEGMENT_ALIGN/{H;g}' \ + , \ + -e 's/^.*\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \ + ) \ -e 's/^.*\*(\.dynbss).*$$/& \ PROVIDE(__start___libc_freeres_ptrs = .); \ *(__libc_freeres_ptrs) \ Jakub From drepper@redhat.com Tue Sep 5 02:03:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 05 Sep 2006 02:03:00 -0000 Subject: [PATCH] Put .hash section at the end of RO segment if --hash-style=both In-Reply-To: <20060904212811.GR4556@sunsite.mff.cuni.cz> References: <20060904212811.GR4556@sunsite.mff.cuni.cz> Message-ID: <44FCDAE5.3040805@redhat.com> Applied. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From jakub@redhat.com Tue Sep 5 10:28:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 05 Sep 2006 10:28:00 -0000 Subject: [PATCH] Fix initgrcache.c Message-ID: <20060905102751.GS4556@sunsite.mff.cuni.cz> Hi! If malloc fails, it will goto out and use there an uninitialized any_success variable. 2006-09-05 Jakub Jelinek * nscd/initgrcache.c (addinitgroupsX): Move any_success decl before first goto out. --- libc/nscd/initgrcache.c.jj 2006-08-03 19:36:25.000000000 +0200 +++ libc/nscd/initgrcache.c 2006-09-05 12:20:29.000000000 +0200 @@ -107,6 +107,7 @@ addinitgroupsX (struct database_dyn *db, long int start = 0; bool all_tryagain = true; + bool any_success = false; /* This is temporary memory, we need not (ad must not) call mempool_alloc. */ @@ -117,7 +118,6 @@ addinitgroupsX (struct database_dyn *db, goto out; /* Nothing added yet. */ - bool any_success = false; while (! no_more) { long int prev_start = start; Jakub From jakub@redhat.com Tue Sep 5 12:51:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 05 Sep 2006 12:51:00 -0000 Subject: [PATCH] Use DW_CFA_val_expression to describe i?86/x86_64 lock waiting pads Message-ID: <20060905125106.GT4556@sunsite.mff.cuni.cz> Hi! This is something we have been successfully using on the fedora-branch for half a year now. Without this patch, if a thread is waiting on some lock, its backtrace is corrupted because the unwind info doesn't accurately describe it (well, doesn't describe it at all). The corresponding changes went around the same time (early March) into GCC/binutils/elfutils/GDB CVS. 2006-03-04 Jakub Jelinek Roland McGrath * sysdeps/unix/sysv/linux/i386/lowlevellock.h (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END, LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define. (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock, lll_robust_mutex_cond_lock, lll_mutex_timedlock, lll_robust_mutex_timedlock, lll_mutex_unlock, lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them. Add _L_*_ symbols around the subsection. * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info. * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise. 2006-03-03 Jakub Jelinek Roland McGrath * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END, LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define. (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock, lll_robust_mutex_cond_lock, lll_mutex_timedlock, lll_robust_mutex_timedlock, lll_mutex_unlock, lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them. Add _L_*_ symbols around the subsection. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info. * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise. --- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S.jj 2006-06-21 17:36:39.000000000 +0200 +++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S 2006-09-05 13:44:54.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -41,9 +41,16 @@ .hidden __lll_mutex_lock_wait .align 16 __lll_mutex_lock_wait: + cfi_startproc pushl %edx + cfi_adjust_cfa_offset(4) pushl %ebx + cfi_adjust_cfa_offset(4) pushl %esi + cfi_adjust_cfa_offset(4) + cfi_offset(%edx, -8) + cfi_offset(%ebx, -12) + cfi_offset(%esi, -16) movl $2, %edx movl %ecx, %ebx @@ -63,9 +70,16 @@ __lll_mutex_lock_wait: jnz 1b popl %esi + cfi_adjust_cfa_offset(-4) + cfi_restore(%esi) popl %ebx + cfi_adjust_cfa_offset(-4) + cfi_restore(%ebx) popl %edx + cfi_adjust_cfa_offset(-4) + cfi_restore(%edx) ret + cfi_endproc .size __lll_mutex_lock_wait,.-__lll_mutex_lock_wait @@ -75,17 +89,27 @@ __lll_mutex_lock_wait: .hidden __lll_mutex_timedlock_wait .align 16 __lll_mutex_timedlock_wait: + cfi_startproc /* Check for a valid timeout value. */ cmpl $1000000000, 4(%edx) jae 3f pushl %edi + cfi_adjust_cfa_offset(4) pushl %esi + cfi_adjust_cfa_offset(4) pushl %ebx + cfi_adjust_cfa_offset(4) pushl %ebp + cfi_adjust_cfa_offset(4) + cfi_offset(%edi, -8) + cfi_offset(%esi, -12) + cfi_offset(%ebx, -16) + cfi_offset(%ebp, -20) /* Stack frame for the timespec and timeval structs. */ subl $8, %esp + cfi_adjust_cfa_offset(8) movl %ecx, %ebp movl %edx, %edi @@ -140,12 +164,29 @@ __lll_mutex_timedlock_wait: jnz 7f 6: addl $8, %esp + cfi_adjust_cfa_offset(-8) popl %ebp + cfi_adjust_cfa_offset(-4) + cfi_restore(%ebp) popl %ebx + cfi_adjust_cfa_offset(-4) + cfi_restore(%ebx) popl %esi + cfi_adjust_cfa_offset(-4) + cfi_restore(%esi) popl %edi + cfi_adjust_cfa_offset(-4) + cfi_restore(%edi) ret +3: movl $EINVAL, %eax + ret + + cfi_adjust_cfa_offset(24) + cfi_offset(%edi, -8) + cfi_offset(%esi, -12) + cfi_offset(%ebx, -16) + cfi_offset(%ebp, -20) /* Check whether the time expired. */ 7: cmpl $-ETIMEDOUT, %ecx je 5f @@ -157,11 +198,9 @@ __lll_mutex_timedlock_wait: jz 6b jmp 1b -3: movl $EINVAL, %eax - ret - 5: movl $ETIMEDOUT, %eax jmp 6b + cfi_endproc .size __lll_mutex_timedlock_wait,.-__lll_mutex_timedlock_wait #endif @@ -200,9 +239,16 @@ lll_unlock_wake_cb: .hidden __lll_mutex_unlock_wake .align 16 __lll_mutex_unlock_wake: + cfi_startproc pushl %ebx + cfi_adjust_cfa_offset(4) pushl %ecx + cfi_adjust_cfa_offset(4) pushl %edx + cfi_adjust_cfa_offset(4) + cfi_offset(%ebx, -8) + cfi_offset(%ecx, -12) + cfi_offset(%edx, -16) movl %eax, %ebx movl $0, (%eax) @@ -212,9 +258,16 @@ __lll_mutex_unlock_wake: ENTER_KERNEL popl %edx + cfi_adjust_cfa_offset(-4) + cfi_restore(%edx) popl %ecx + cfi_adjust_cfa_offset(-4) + cfi_restore(%ecx) popl %ebx + cfi_adjust_cfa_offset(-4) + cfi_restore(%ebx) ret + cfi_endproc .size __lll_mutex_unlock_wake,.-__lll_mutex_unlock_wake --- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S.jj 2006-03-05 14:32:33.000000000 +0100 +++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S 2006-09-05 13:44:54.000000000 +0200 @@ -44,9 +44,16 @@ .hidden __lll_robust_mutex_lock_wait .align 16 __lll_robust_mutex_lock_wait: + cfi_startproc pushl %edx + cfi_adjust_cfa_offset(4) pushl %ebx + cfi_adjust_cfa_offset(4) pushl %esi + cfi_adjust_cfa_offset(4) + cfi_offset(%edx, -8) + cfi_offset(%ebx, -12) + cfi_offset(%esi, -16) movl %ecx, %ebx xorl %esi, %esi /* No timeout. */ @@ -81,9 +88,16 @@ __lll_robust_mutex_lock_wait: /* NB: %eax == 0 */ 3: popl %esi + cfi_adjust_cfa_offset(-4) + cfi_restore(%esi) popl %ebx + cfi_adjust_cfa_offset(-4) + cfi_restore(%ebx) popl %edx + cfi_adjust_cfa_offset(-4) + cfi_restore(%edx) ret + cfi_endproc .size __lll_robust_mutex_lock_wait,.-__lll_robust_mutex_lock_wait @@ -92,17 +106,27 @@ __lll_robust_mutex_lock_wait: .hidden __lll_robust_mutex_timedlock_wait .align 16 __lll_robust_mutex_timedlock_wait: + cfi_startproc /* Check for a valid timeout value. */ cmpl $1000000000, 4(%edx) jae 3f pushl %edi + cfi_adjust_cfa_offset(4) pushl %esi + cfi_adjust_cfa_offset(4) pushl %ebx + cfi_adjust_cfa_offset(4) pushl %ebp + cfi_adjust_cfa_offset(4) + cfi_offset(%edi, -8) + cfi_offset(%esi, -12) + cfi_offset(%ebx, -16) + cfi_offset(%ebp, -20) /* Stack frame for the timespec and timeval structs. */ subl $12, %esp + cfi_adjust_cfa_offset(12) movl %ecx, %ebp movl %edx, %edi @@ -170,19 +194,34 @@ __lll_robust_mutex_timedlock_wait: jnz 7f 6: addl $12, %esp + cfi_adjust_cfa_offset(-12) popl %ebp + cfi_adjust_cfa_offset(-4) + cfi_restore(%ebp) popl %ebx + cfi_adjust_cfa_offset(-4) + cfi_restore(%ebx) popl %esi + cfi_adjust_cfa_offset(-4) + cfi_restore(%esi) popl %edi + cfi_adjust_cfa_offset(-4) + cfi_restore(%edi) ret +3: movl $EINVAL, %eax + ret + + cfi_adjust_cfa_offset(28) + cfi_offset(%edi, -8) + cfi_offset(%esi, -12) + cfi_offset(%ebx, -16) + cfi_offset(%ebp, -20) /* Check whether the time expired. */ 7: cmpl $-ETIMEDOUT, %ecx jne 1b 8: movl $ETIMEDOUT, %eax jmp 6b - -3: movl $EINVAL, %eax - ret + cfi_endproc .size __lll_robust_mutex_timedlock_wait,.-__lll_robust_mutex_timedlock_wait --- libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h.jj 2006-08-03 19:36:24.000000000 +0200 +++ libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2006-09-05 13:46:06.000000000 +0200 @@ -68,6 +68,82 @@ #define BUSY_WAIT_NOP asm ("rep; nop") +#define LLL_STUB_UNWIND_INFO_START \ + ".section .eh_frame,\"a\",@progbits\n" \ +"5:\t" ".long 7f-6f # Length of Common Information Entry\n" \ +"6:\t" ".long 0x0 # CIE Identifier Tag\n\t" \ + ".byte 0x1 # CIE Version\n\t" \ + ".ascii \"zR\\0\" # CIE Augmentation\n\t" \ + ".uleb128 0x1 # CIE Code Alignment Factor\n\t" \ + ".sleb128 -4 # CIE Data Alignment Factor\n\t" \ + ".byte 0x8 # CIE RA Column\n\t" \ + ".uleb128 0x1 # Augmentation size\n\t" \ + ".byte 0x1b # FDE Encoding (pcrel sdata4)\n\t" \ + ".byte 0xc # DW_CFA_def_cfa\n\t" \ + ".uleb128 0x4\n\t" \ + ".uleb128 0x0\n\t" \ + ".align 4\n" \ +"7:\t" ".long 17f-8f # FDE Length\n" \ +"8:\t" ".long 8b-5b # FDE CIE offset\n\t" \ + ".long 1b-. # FDE initial location\n\t" \ + ".long 4b-1b # FDE address range\n\t" \ + ".uleb128 0x0 # Augmentation size\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x8\n\t" \ + ".uleb128 10f-9f\n" \ +"9:\t" ".byte 0x78 # DW_OP_breg8\n\t" \ + ".sleb128 3b-1b\n" +#define LLL_STUB_UNWIND_INFO_END \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x8\n\t" \ + ".uleb128 12f-11f\n" \ +"11:\t" ".byte 0x78 # DW_OP_breg8\n\t" \ + ".sleb128 3b-2b\n" \ +"12:\t" ".byte 0x40 + (3b-2b-1) # DW_CFA_advance_loc\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x8\n\t" \ + ".uleb128 16f-13f\n" \ +"13:\t" ".byte 0x78 # DW_OP_breg8\n\t" \ + ".sleb128 15f-14f\n\t" \ + ".byte 0x0d # DW_OP_const4s\n" \ +"14:\t" ".4byte 3b-.\n\t" \ + ".byte 0x1c # DW_OP_minus\n\t" \ + ".byte 0x0d # DW_OP_const4s\n" \ +"15:\t" ".4byte 18f-.\n\t" \ + ".byte 0x22 # DW_OP_plus\n" \ +"16:\t" ".align 4\n" \ +"17:\t" ".previous\n" + +/* Unwind info for + 1: lea ..., ... + 2: call ... + 3: jmp 18f + 4: + snippet. */ +#define LLL_STUB_UNWIND_INFO_3 \ +LLL_STUB_UNWIND_INFO_START \ +"10:\t" ".byte 0x40 + (2b-1b) # DW_CFA_advance_loc\n\t" \ +LLL_STUB_UNWIND_INFO_END + +/* Unwind info for + 1: lea ..., ... + 0: movl ..., ... + 2: call ... + 3: jmp 18f + 4: + snippet. */ +#define LLL_STUB_UNWIND_INFO_4 \ +LLL_STUB_UNWIND_INFO_START \ +"10:\t" ".byte 0x40 + (0b-1b) # DW_CFA_advance_loc\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x8\n\t" \ + ".uleb128 20f-19f\n" \ +"19:\t" ".byte 0x78 # DW_OP_breg8\n\t" \ + ".sleb128 3b-0b\n" \ +"20:\t" ".byte 0x40 + (2b-0b) # DW_CFA_advance_loc\n\t" \ +LLL_STUB_UNWIND_INFO_END + + #define lll_futex_wait(futex, val) \ ({ \ int __status; \ @@ -168,13 +244,14 @@ extern int __lll_mutex_unlock_wake (int "jnz _L_mutex_lock_%=\n\t" \ ".subsection 1\n\t" \ ".type _L_mutex_lock_%=,@function\n" \ - "_L_mutex_lock_%=:\n\t" \ - "leal %2, %%ecx\n\t" \ - "call __lll_mutex_lock_wait\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_lock_%=,.-_L_mutex_lock_%=\n" \ + "_L_mutex_lock_%=:\n" \ + "1:\tleal %2, %%ecx\n" \ + "2:\tcall __lll_mutex_lock_wait\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_mutex_lock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=a" (ignore1), "=c" (ignore2), "=m" (futex) \ : "0" (0), "1" (1), "m" (futex) \ : "memory"); }) @@ -183,16 +260,17 @@ extern int __lll_mutex_unlock_wake (int #define lll_robust_mutex_lock(futex, id) \ ({ int result, ignore; \ __asm __volatile (LOCK_INSTR "cmpxchgl %1, %2\n\t" \ - "jnz _L_mutex_lock_%=\n\t" \ + "jnz _L_robust_mutex_lock_%=\n\t" \ ".subsection 1\n\t" \ - ".type _L_mutex_lock_%=,@function\n" \ - "_L_mutex_lock_%=:\n\t" \ - "leal %2, %%ecx\n\t" \ - "call __lll_robust_mutex_lock_wait\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_lock_%=,.-_L_mutex_lock_%=\n" \ + ".type _L_robust_mutex_lock_%=,@function\n" \ + "_L_robust_mutex_lock_%=:\n" \ + "1:\tleal %2, %%ecx\n" \ + "2:\tcall __lll_robust_mutex_lock_wait\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_robust_mutex_lock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=a" (result), "=c" (ignore), "=m" (futex) \ : "0" (0), "1" (id), "m" (futex) \ : "memory"); \ @@ -207,13 +285,14 @@ extern int __lll_mutex_unlock_wake (int "jnz _L_mutex_cond_lock_%=\n\t" \ ".subsection 1\n\t" \ ".type _L_mutex_cond_lock_%=,@function\n" \ - "_L_mutex_cond_lock_%=:\n\t" \ - "leal %2, %%ecx\n\t" \ - "call __lll_mutex_lock_wait\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_cond_lock_%=,.-_L_mutex_cond_lock_%=\n" \ + "_L_mutex_cond_lock_%=:\n" \ + "1:\tleal %2, %%ecx\n" \ + "2:\tcall __lll_mutex_lock_wait\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_mutex_cond_lock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=a" (ignore1), "=c" (ignore2), "=m" (futex) \ : "0" (0), "1" (2), "m" (futex) \ : "memory"); }) @@ -222,16 +301,17 @@ extern int __lll_mutex_unlock_wake (int #define lll_robust_mutex_cond_lock(futex, id) \ ({ int result, ignore; \ __asm __volatile (LOCK_INSTR "cmpxchgl %1, %2\n\t" \ - "jnz _L_mutex_cond_lock_%=\n\t" \ + "jnz _L_robust_mutex_cond_lock_%=\n\t" \ ".subsection 1\n\t" \ - ".type _L_mutex_cond_lock_%=,@function\n" \ - "_L_mutex_cond_lock_%=:\n\t" \ - "leal %2, %%ecx\n\t" \ - "call __lll_robust_mutex_lock_wait\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_cond_lock_%=,.-_L_mutex_cond_lock_%=\n"\ + ".type _L_robust_mutex_cond_lock_%=,@function\n" \ + "_L_robust_mutex_cond_lock_%=:\n" \ + "1:\tleal %2, %%ecx\n" \ + "2:\tcall __lll_robust_mutex_lock_wait\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_robust_mutex_cond_lock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=a" (result), "=c" (ignore), "=m" (futex) \ : "0" (0), "1" (id | FUTEX_WAITERS), "m" (futex) \ : "memory"); \ @@ -244,14 +324,15 @@ extern int __lll_mutex_unlock_wake (int "jnz _L_mutex_timedlock_%=\n\t" \ ".subsection 1\n\t" \ ".type _L_mutex_timedlock_%=,@function\n" \ - "_L_mutex_timedlock_%=:\n\t" \ - "leal %3, %%ecx\n\t" \ - "movl %7, %%edx\n\t" \ - "call __lll_mutex_timedlock_wait\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_timedlock_%=,.-_L_mutex_timedlock_%=\n"\ + "_L_mutex_timedlock_%=:\n" \ + "1:\tleal %3, %%ecx\n" \ + "0:\tmovl %7, %%edx\n" \ + "2:\tcall __lll_mutex_timedlock_wait\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_mutex_timedlock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_4 \ + "18:" \ : "=a" (result), "=c" (ignore1), "=&d" (ignore2), \ "=m" (futex) \ : "0" (0), "1" (1), "m" (futex), "m" (timeout) \ @@ -262,17 +343,18 @@ extern int __lll_mutex_unlock_wake (int #define lll_robust_mutex_timedlock(futex, timeout, id) \ ({ int result, ignore1, ignore2; \ __asm __volatile (LOCK_INSTR "cmpxchgl %1, %3\n\t" \ - "jnz _L_mutex_timedlock_%=\n\t" \ + "jnz _L_robust_mutex_timedlock_%=\n\t" \ ".subsection 1\n\t" \ - ".type _L_mutex_timedlock_%=,@function\n" \ - "_L_mutex_timedlock_%=:\n\t" \ - "leal %3, %%ecx\n\t" \ - "movl %7, %%edx\n\t" \ - "call __lll_robust_mutex_timedlock_wait\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_timedlock_%=,.-_L_mutex_timedlock_%=\n"\ + ".type _L_robust_mutex_timedlock_%=,@function\n" \ + "_L_robust_mutex_timedlock_%=:\n" \ + "1:\tleal %3, %%ecx\n" \ + "0:\tmovl %7, %%edx\n" \ + "2:\tcall __lll_robust_mutex_timedlock_wait\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_robust_mutex_timedlock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_4 \ + "18:" \ : "=a" (result), "=c" (ignore1), "=&d" (ignore2), \ "=m" (futex) \ : "0" (0), "1" (id), "m" (futex), "m" (timeout) \ @@ -286,13 +368,14 @@ extern int __lll_mutex_unlock_wake (int "jne _L_mutex_unlock_%=\n\t" \ ".subsection 1\n\t" \ ".type _L_mutex_unlock_%=,@function\n" \ - "_L_mutex_unlock_%=:\n\t" \ - "leal %0, %%eax\n\t" \ - "call __lll_mutex_unlock_wake\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_unlock_%=,.-_L_mutex_unlock_%=\n" \ + "_L_mutex_unlock_%=:\n" \ + "1:\tleal %0, %%eax\n" \ + "2:\tcall __lll_mutex_unlock_wake\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_mutex_unlock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=m" (futex), "=&a" (ignore) \ : "m" (futex) \ : "memory"); }) @@ -301,16 +384,17 @@ extern int __lll_mutex_unlock_wake (int #define lll_robust_mutex_unlock(futex) \ (void) ({ int ignore; \ __asm __volatile (LOCK_INSTR "andl %2, %0\n\t" \ - "jne _L_mutex_unlock_%=\n\t" \ + "jne _L_robust_mutex_unlock_%=\n\t" \ ".subsection 1\n\t" \ - ".type _L_mutex_unlock_%=,@function\n" \ - "_L_mutex_unlock_%=:\n\t" \ - "leal %0, %%eax\n\t" \ - "call __lll_mutex_unlock_wake\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_unlock_%=,.-_L_mutex_unlock_%=\n" \ + ".type _L_robust_mutex_unlock_%=,@function\n" \ + "_L_robust_mutex_unlock_%=:\n\t" \ + "1:\tleal %0, %%eax\n" \ + "2:\tcall __lll_mutex_unlock_wake\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_robust_mutex_unlock_%=, 4b-1b\n\t"\ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=m" (futex), "=&a" (ignore) \ : "i" (FUTEX_WAITERS), "m" (futex) \ : "memory"); }) @@ -404,16 +488,17 @@ extern int lll_unlock_wake_cb (int *__fu "je 0f\n\t" \ "lock\n" \ "0:\tcmpxchgl %1, %2\n\t" \ - "jnz _L_mutex_lock_%=\n\t" \ + "jnz _L_lock_%=\n\t" \ ".subsection 1\n\t" \ - ".type _L_mutex_lock_%=,@function\n" \ - "_L_mutex_lock_%=:\n\t" \ - "leal %2, %%ecx\n\t" \ - "call __lll_mutex_lock_wait\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_lock_%=,.-_L_mutex_lock_%=\n" \ + ".type _L_lock_%=,@function\n" \ + "_L_lock_%=:\n" \ + "1:\tleal %2, %%ecx\n" \ + "2:\tcall __lll_mutex_lock_wait\n" \ + "3:\tjmp 18f\n" \ + "4:\t.size _L_lock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=a" (ignore1), "=c" (ignore2), "=m" (futex) \ : "0" (0), "1" (1), "m" (futex), \ "i" (offsetof (tcbhead_t, multiple_threads)) \ @@ -425,17 +510,18 @@ extern int lll_unlock_wake_cb (int *__fu __asm __volatile ("cmpl $0, %%gs:%P3\n\t" \ "je 0f\n\t" \ "lock\n" \ - "0:\tsubl $1,%0\n\t" \ - "jne _L_mutex_unlock_%=\n\t" \ + "0:\tsubl $1,%0\n\t" \ + "jne _L_unlock_%=\n\t" \ ".subsection 1\n\t" \ - ".type _L_mutex_unlock_%=,@function\n" \ - "_L_mutex_unlock_%=:\n\t" \ - "leal %0, %%eax\n\t" \ - "call __lll_mutex_unlock_wake\n\t" \ - "jmp 1f\n\t" \ - ".size _L_mutex_unlock_%=,.-_L_mutex_unlock_%=\n" \ + ".type _L_unlock_%=,@function\n" \ + "_L_unlock_%=:\n" \ + "1:\tleal %0, %%eax\n" \ + "2:\tcall __lll_mutex_unlock_wake\n" \ + "3:\tjmp 18f\n\t" \ + "4:\t.size _L_unlock_%=, 4b-1b\n\t" \ ".previous\n" \ - "1:" \ + LLL_STUB_UNWIND_INFO_3 \ + "18:" \ : "=m" (futex), "=&a" (ignore) \ : "m" (futex), \ "i" (offsetof (tcbhead_t, multiple_threads)) \ --- libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S.jj 2005-06-06 14:36:00.000000000 +0200 +++ libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S 2006-09-05 13:44:54.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -43,9 +43,13 @@ .hidden __lll_mutex_lock_wait .align 16 __lll_mutex_lock_wait: + cfi_startproc pushq %r10 + cfi_adjust_cfa_offset(8) pushq %rdx - + cfi_adjust_cfa_offset(8) + cfi_offset(%r10, -16) + cfi_offset(%rdx, -24) xorq %r10, %r10 /* No timeout. */ movl $2, %edx #if FUTEX_WAIT == 0 @@ -67,8 +71,13 @@ __lll_mutex_lock_wait: jnz 1b popq %rdx + cfi_adjust_cfa_offset(-8) + cfi_restore(%rdx) popq %r10 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r10) retq + cfi_endproc .size __lll_mutex_lock_wait,.-__lll_mutex_lock_wait @@ -78,18 +87,30 @@ __lll_mutex_lock_wait: .hidden __lll_mutex_timedlock_wait .align 16 __lll_mutex_timedlock_wait: + cfi_startproc /* Check for a valid timeout value. */ cmpq $1000000000, 8(%rdx) jae 3f pushq %r8 + cfi_adjust_cfa_offset(8) pushq %r9 + cfi_adjust_cfa_offset(8) pushq %r12 + cfi_adjust_cfa_offset(8) pushq %r13 + cfi_adjust_cfa_offset(8) pushq %r14 + cfi_adjust_cfa_offset(8) + cfi_offset(%r8, -16) + cfi_offset(%r9, -24) + cfi_offset(%r12, -32) + cfi_offset(%r13, -40) + cfi_offset(%r14, -48) /* Stack frame for the timespec and timeval structs. */ subq $16, %rsp + cfi_adjust_cfa_offset(16) movq %rdi, %r12 movq %rdx, %r13 @@ -147,13 +168,33 @@ __lll_mutex_timedlock_wait: jnz 7f 6: addq $16, %rsp + cfi_adjust_cfa_offset(-16) popq %r14 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r14) popq %r13 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r13) popq %r12 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r12) popq %r9 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r9) popq %r8 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r8) + retq + +3: movl $EINVAL, %eax retq + cfi_adjust_cfa_offset(56) + cfi_offset(%r8, -16) + cfi_offset(%r9, -24) + cfi_offset(%r12, -32) + cfi_offset(%r13, -40) + cfi_offset(%r14, -48) /* Check whether the time expired. */ 7: cmpq $-ETIMEDOUT, %rcx je 5f @@ -165,11 +206,9 @@ __lll_mutex_timedlock_wait: jz 6b jmp 1b -3: movl $EINVAL, %eax - retq - 5: movl $ETIMEDOUT, %eax jmp 6b + cfi_endproc .size __lll_mutex_timedlock_wait,.-__lll_mutex_timedlock_wait #endif @@ -199,8 +238,13 @@ lll_unlock_wake_cb: .hidden __lll_mutex_unlock_wake .align 16 __lll_mutex_unlock_wake: + cfi_startproc pushq %rsi + cfi_adjust_cfa_offset(8) pushq %rdx + cfi_adjust_cfa_offset(8) + cfi_offset(%rsi, -16) + cfi_offset(%rdx, -24) movl $0, (%rdi) movl $FUTEX_WAKE, %esi @@ -209,8 +253,13 @@ __lll_mutex_unlock_wake: syscall popq %rdx + cfi_adjust_cfa_offset(-8) + cfi_restore(%rdx) popq %rsi + cfi_adjust_cfa_offset(-8) + cfi_restore(%rsi) retq + cfi_endproc .size __lll_mutex_unlock_wake,.-__lll_mutex_unlock_wake --- libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h.jj 2006-08-03 19:36:25.000000000 +0200 +++ libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2006-09-05 13:46:32.000000000 +0200 @@ -49,6 +49,104 @@ #define BUSY_WAIT_NOP asm ("rep; nop") +#define LLL_STUB_UNWIND_INFO_START \ + ".section .eh_frame,\"a\",@progbits\n" \ +"7:\t" ".long 9f-8f # Length of Common Information Entry\n" \ +"8:\t" ".long 0x0 # CIE Identifier Tag\n\t" \ + ".byte 0x1 # CIE Version\n\t" \ + ".ascii \"zR\\0\" # CIE Augmentation\n\t" \ + ".uleb128 0x1 # CIE Code Alignment Factor\n\t" \ + ".sleb128 -8 # CIE Data Alignment Factor\n\t" \ + ".byte 0x10 # CIE RA Column\n\t" \ + ".uleb128 0x1 # Augmentation size\n\t" \ + ".byte 0x1b # FDE Encoding (pcrel sdata4)\n\t" \ + ".byte 0x12 # DW_CFA_def_cfa_sf\n\t" \ + ".uleb128 0x7\n\t" \ + ".sleb128 16\n\t" \ + ".align 8\n" \ +"9:\t" ".long 23f-10f # FDE Length\n" \ +"10:\t" ".long 10b-7b # FDE CIE offset\n\t" \ + ".long 1b-. # FDE initial location\n\t" \ + ".long 6b-1b # FDE address range\n\t" \ + ".uleb128 0x0 # Augmentation size\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x10\n\t" \ + ".uleb128 12f-11f\n" \ +"11:\t" ".byte 0x80 # DW_OP_breg16\n\t" \ + ".sleb128 4b-1b\n" +#define LLL_STUB_UNWIND_INFO_END \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x10\n\t" \ + ".uleb128 14f-13f\n" \ +"13:\t" ".byte 0x80 # DW_OP_breg16\n\t" \ + ".sleb128 4b-2b\n" \ +"14:\t" ".byte 0x40 + (3b-2b) # DW_CFA_advance_loc\n\t" \ + ".byte 0x0e # DW_CFA_def_cfa_offset\n\t" \ + ".uleb128 0\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x10\n\t" \ + ".uleb128 16f-15f\n" \ +"15:\t" ".byte 0x80 # DW_OP_breg16\n\t" \ + ".sleb128 4b-3b\n" \ +"16:\t" ".byte 0x40 + (4b-3b-1) # DW_CFA_advance_loc\n\t" \ + ".byte 0x0e # DW_CFA_def_cfa_offset\n\t" \ + ".uleb128 128\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x10\n\t" \ + ".uleb128 20f-17f\n" \ +"17:\t" ".byte 0x80 # DW_OP_breg16\n\t" \ + ".sleb128 19f-18f\n\t" \ + ".byte 0x0d # DW_OP_const4s\n" \ +"18:\t" ".4byte 4b-.\n\t" \ + ".byte 0x1c # DW_OP_minus\n\t" \ + ".byte 0x0d # DW_OP_const4s\n" \ +"19:\t" ".4byte 24f-.\n\t" \ + ".byte 0x22 # DW_OP_plus\n" \ +"20:\t" ".byte 0x40 + (5b-4b+1) # DW_CFA_advance_loc\n\t" \ + ".byte 0x13 # DW_CFA_def_cfa_offset_sf\n\t" \ + ".sleb128 16\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x10\n\t" \ + ".uleb128 22f-21f\n" \ +"21:\t" ".byte 0x80 # DW_OP_breg16\n\t" \ + ".sleb128 4b-5b\n" \ +"22:\t" ".align 8\n" \ +"23:\t" ".previous\n" + +/* Unwind info for + 1: leaq ..., %rdi + 2: subq $128, %rsp + 3: callq ... + 4: addq $128, %rsp + 5: jmp 24f + 6: + snippet. */ +#define LLL_STUB_UNWIND_INFO_5 \ +LLL_STUB_UNWIND_INFO_START \ +"12:\t" ".byte 0x40 + (2b-1b) # DW_CFA_advance_loc\n\t" \ +LLL_STUB_UNWIND_INFO_END + +/* Unwind info for + 1: leaq ..., %rdi + 0: movq ..., %rdx + 2: subq $128, %rsp + 3: callq ... + 4: addq $128, %rsp + 5: jmp 24f + 6: + snippet. */ +#define LLL_STUB_UNWIND_INFO_6 \ +LLL_STUB_UNWIND_INFO_START \ +"12:\t" ".byte 0x40 + (0b-1b) # DW_CFA_advance_loc\n\t" \ + ".byte 0x16 # DW_CFA_val_expression\n\t" \ + ".uleb128 0x10\n\t" \ + ".uleb128 26f-25f\n" \ +"25:\t" ".byte 0x80 # DW_OP_breg16\n\t" \ + ".sleb128 4b-0b\n" \ +"26:\t" ".byte 0x40 + (2b-0b) # DW_CFA_advance_loc\n\t" \ +LLL_STUB_UNWIND_INFO_END + + #define lll_futex_wait(futex, val) \ ({ \ int __status; \ @@ -138,14 +236,18 @@ extern int __lll_mutex_unlock_wait (int (void) ({ int ignore1, ignore2, ignore3; \ __asm __volatile (LOCK_INSTR "cmpxchgl %0, %2\n\t" \ "jnz 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %2, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_mutex_lock_wait\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_mutex_lock_%=, @function\n" \ + "_L_mutex_lock_%=:\n" \ + "1:\tleaq %2, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_mutex_lock_wait\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_mutex_lock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=S" (ignore1), "=&D" (ignore2), "=m" (futex),\ "=a" (ignore3) \ : "0" (1), "m" (futex), "3" (0) \ @@ -153,17 +255,21 @@ extern int __lll_mutex_unlock_wait (int #define lll_robust_mutex_lock(futex, id) \ - ({ int result, ignore1, ignore2; \ + ({ int result, ignore1, ignore2; \ __asm __volatile (LOCK_INSTR "cmpxchgl %0, %2\n\t" \ "jnz 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %2, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_robust_mutex_lock_wait\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_robust_mutex_lock_%=, @function\n" \ + "_L_robust_mutex_lock_%=:\n" \ + "1:\tleaq %2, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_robust_mutex_lock_wait\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_robust_mutex_lock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=S" (ignore1), "=&D" (ignore2), "=m" (futex), \ "=a" (result) \ : "0" (id), "m" (futex), "3" (0) \ @@ -175,14 +281,18 @@ extern int __lll_mutex_unlock_wait (int (void) ({ int ignore1, ignore2, ignore3; \ __asm __volatile (LOCK_INSTR "cmpxchgl %0, %2\n\t" \ "jnz 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %2, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_mutex_lock_wait\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_mutex_cond_lock_%=, @function\n" \ + "_L_mutex_cond_lock_%=:\n" \ + "1:\tleaq %2, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_mutex_lock_wait\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_mutex_cond_lock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=S" (ignore1), "=&D" (ignore2), "=m" (futex),\ "=a" (ignore3) \ : "0" (2), "m" (futex), "3" (0) \ @@ -193,14 +303,18 @@ extern int __lll_mutex_unlock_wait (int ({ int result, ignore1, ignore2; \ __asm __volatile (LOCK_INSTR "cmpxchgl %0, %2\n\t" \ "jnz 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %2, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_robust_mutex_lock_wait\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_robust_mutex_cond_lock_%=, @function\n" \ + "_L_robust_mutex_cond_lock_%=:\n" \ + "1:\tleaq %2, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_robust_mutex_lock_wait\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_robust_mutex_cond_lock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=S" (ignore1), "=&D" (ignore2), "=m" (futex), \ "=a" (result) \ : "0" (id | FUTEX_WAITERS), "m" (futex), "3" (0) \ @@ -212,15 +326,19 @@ extern int __lll_mutex_unlock_wait (int ({ int result, ignore1, ignore2, ignore3; \ __asm __volatile (LOCK_INSTR "cmpxchgl %2, %4\n\t" \ "jnz 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %4, %%rdi\n\t" \ - "movq %8, %%rdx\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_mutex_timedlock_wait\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_mutex_timedlock_%=, @function\n" \ + "_L_mutex_timedlock_%=:\n" \ + "1:\tleaq %4, %%rdi\n" \ + "0:\tmovq %8, %%rdx\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_mutex_timedlock_wait\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_mutex_timedlock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_6 \ + "24:" \ : "=a" (result), "=&D" (ignore1), "=S" (ignore2), \ "=&d" (ignore3), "=m" (futex) \ : "0" (0), "2" (1), "m" (futex), "m" (timeout) \ @@ -232,15 +350,19 @@ extern int __lll_mutex_unlock_wait (int ({ int result, ignore1, ignore2, ignore3; \ __asm __volatile (LOCK_INSTR "cmpxchgl %2, %4\n\t" \ "jnz 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %4, %%rdi\n\t" \ - "movq %8, %%rdx\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_robust_mutex_timedlock_wait\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_robust_mutex_timedlock_%=, @function\n" \ + "_L_robust_mutex_timedlock_%=:\n" \ + "1:\tleaq %4, %%rdi\n" \ + "0:\tmovq %8, %%rdx\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_robust_mutex_timedlock_wait\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_robust_mutex_timedlock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_6 \ + "24:" \ : "=a" (result), "=&D" (ignore1), "=S" (ignore2), \ "=&d" (ignore3), "=m" (futex) \ : "0" (0), "2" (id), "m" (futex), "m" (timeout) \ @@ -252,14 +374,18 @@ extern int __lll_mutex_unlock_wait (int (void) ({ int ignore; \ __asm __volatile (LOCK_INSTR "decl %0\n\t" \ "jne 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %0, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_mutex_unlock_wake\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_mutex_unlock_%=, @function\n" \ + "_L_mutex_unlock_%=:\n" \ + "1:\tleaq %0, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_mutex_unlock_wake\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_mutex_unlock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=m" (futex), "=&D" (ignore) \ : "m" (futex) \ : "ax", "cx", "r11", "cc", "memory"); }) @@ -269,14 +395,18 @@ extern int __lll_mutex_unlock_wait (int (void) ({ int ignore; \ __asm __volatile (LOCK_INSTR "andl %2, %0\n\t" \ "jne 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %0, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_mutex_unlock_wake\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_robust_mutex_unlock_%=, @function\n" \ + "_L_robust_mutex_unlock_%=:\n" \ + "1:\tleaq %0, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_mutex_unlock_wake\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_robust_mutex_unlock_%=, 6b-1b\n\t"\ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=m" (futex), "=&D" (ignore) \ : "i" (FUTEX_WAITERS), "m" (futex) \ : "ax", "cx", "r11", "cc", "memory"); }) @@ -351,17 +481,21 @@ extern int lll_unlock_wake_cb (int *__fu "je 0f\n\t" \ "lock; cmpxchgl %0, %2\n\t" \ "jnz 1f\n\t" \ - "jmp 2f\n" \ + "jmp 24f\n" \ "0:\tcmpxchgl %0, %2\n\t" \ "jnz 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %2, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_mutex_lock_wait\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_lock_%=, @function\n" \ + "_L_lock_%=:\n" \ + "1:\tleaq %2, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_mutex_lock_wait\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_lock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=S" (ignore1), "=&D" (ignore2), "=m" (futex),\ "=a" (ignore3) \ : "0" (1), "m" (futex), "3" (0) \ @@ -374,17 +508,21 @@ extern int lll_unlock_wake_cb (int *__fu "je 0f\n\t" \ "lock; decl %0\n\t" \ "jne 1f\n\t" \ - "jmp 2f\n" \ + "jmp 24f\n" \ "0:\tdecl %0\n\t" \ "jne 1f\n\t" \ - ".subsection 1\n" \ - "1:\tleaq %0, %%rdi\n\t" \ - "subq $128, %%rsp\n\t" \ - "callq __lll_mutex_unlock_wake\n\t" \ - "addq $128, %%rsp\n\t" \ - "jmp 2f\n\t" \ + ".subsection 1\n\t" \ + ".type _L_unlock_%=, @function\n" \ + "_L_unlock_%=:\n" \ + "1:\tleaq %0, %%rdi\n" \ + "2:\tsubq $128, %%rsp\n" \ + "3:\tcallq __lll_mutex_unlock_wake\n" \ + "4:\taddq $128, %%rsp\n" \ + "5:\tjmp 24f\n" \ + "6:\t.size _L_unlock_%=, 6b-1b\n\t" \ ".previous\n" \ - "2:" \ + LLL_STUB_UNWIND_INFO_5 \ + "24:" \ : "=m" (futex), "=&D" (ignore) \ : "m" (futex) \ : "ax", "cx", "r11", "cc", "memory"); }) --- libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S.jj 2006-03-05 14:32:34.000000000 +0100 +++ libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S 2006-09-05 13:44:54.000000000 +0200 @@ -46,8 +46,13 @@ .hidden __lll_robust_mutex_lock_wait .align 16 __lll_robust_mutex_lock_wait: + cfi_startproc pushq %r10 + cfi_adjust_cfa_offset(8) pushq %rdx + cfi_adjust_cfa_offset(8) + cfi_offset(%r10, -16) + cfi_offset(%rdx, -24) xorq %r10, %r10 /* No timeout. */ #if FUTEX_WAIT == 0 @@ -85,8 +90,13 @@ __lll_robust_mutex_lock_wait: /* NB: %rax == 0 */ 3: popq %rdx + cfi_adjust_cfa_offset(-8) + cfi_restore(%rdx) popq %r10 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r10) retq + cfi_endproc .size __lll_robust_mutex_lock_wait,.-__lll_robust_mutex_lock_wait @@ -95,17 +105,27 @@ __lll_robust_mutex_lock_wait: .hidden __lll_robust_mutex_timedlock_wait .align 16 __lll_robust_mutex_timedlock_wait: + cfi_startproc /* Check for a valid timeout value. */ cmpq $1000000000, 8(%rdx) jae 3f pushq %r8 + cfi_adjust_cfa_offset(8) pushq %r9 + cfi_adjust_cfa_offset(8) pushq %r12 + cfi_adjust_cfa_offset(8) pushq %r13 + cfi_adjust_cfa_offset(8) + cfi_offset(%r8, -16) + cfi_offset(%r9, -24) + cfi_offset(%r12, -32) + cfi_offset(%r13, -40) /* Stack frame for the timespec and timeval structs. */ subq $24, %rsp + cfi_adjust_cfa_offset(24) movq %rdi, %r12 movq %rdx, %r13 @@ -176,19 +196,34 @@ __lll_robust_mutex_timedlock_wait: jnz 7f 6: addq $24, %rsp + cfi_adjust_cfa_offset(-24) popq %r13 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r13) popq %r12 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r12) popq %r9 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r9) popq %r8 + cfi_adjust_cfa_offset(-8) + cfi_restore(%r8) retq +3: movl $EINVAL, %eax + retq + + cfi_adjust_cfa_offset(56) + cfi_offset(%r8, -16) + cfi_offset(%r9, -24) + cfi_offset(%r12, -32) + cfi_offset(%r13, -40) /* Check whether the time expired. */ 7: cmpq $-ETIMEDOUT, %rcx jne 1b 8: movl $ETIMEDOUT, %eax jmp 6b - -3: movl $EINVAL, %eax - retq + cfi_endproc .size __lll_robust_mutex_timedlock_wait,.-__lll_robust_mutex_timedlock_wait Jakub From drepper@redhat.com Tue Sep 5 14:36:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 05 Sep 2006 14:36:00 -0000 Subject: [PATCH] Fix initgrcache.c In-Reply-To: <20060905102751.GS4556@sunsite.mff.cuni.cz> References: <20060905102751.GS4556@sunsite.mff.cuni.cz> Message-ID: <44FD8B5C.30800@redhat.com> Applied. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From drepper@redhat.com Tue Sep 5 14:48:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 05 Sep 2006 14:48:00 -0000 Subject: [PATCH] Use DW_CFA_val_expression to describe i?86/x86_64 lock waiting pads In-Reply-To: <20060905125106.GT4556@sunsite.mff.cuni.cz> References: <20060905125106.GT4556@sunsite.mff.cuni.cz> Message-ID: <44FD8E33.1000005@redhat.com> Applied. And just to make sure every understands this: you'll now need a relatively recent gdb to debug x86 and x86-64 but this code is working as the Fedora use shows. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From jakub@redhat.com Wed Sep 6 16:37:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Wed, 06 Sep 2006 16:37:00 -0000 Subject: [PATCH] Fix uninitialized var in gai_suspend Message-ID: <20060906163703.GU4556@sunsite.mff.cuni.cz> Hi! GAI_MISC_WAIT macro only sets result on error, so without this patch we return an uninitialized value. 2006-09-06 Jakub Jelinek * resolv/gai_suspend.c (gai_suspend): Make sure result is initialized. --- libc/resolv/gai_suspend.c.jj 2006-08-03 10:03:46.000000000 +0200 +++ libc/resolv/gai_suspend.c 2006-09-06 17:30:22.000000000 +0200 @@ -83,6 +83,7 @@ gai_suspend (const struct gaicb *const l pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &oldstate); #ifdef DONT_NEED_GAI_MISC_COND + result = 0; GAI_MISC_WAIT (result, cntr, timeout, 1); #else if (timeout == NULL) Jakub From jakub@redhat.com Wed Sep 6 16:41:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Wed, 06 Sep 2006 16:41:00 -0000 Subject: [PATCH] Fix uninitialized vars in ld-collate.c Message-ID: <20060906164051.GV4556@sunsite.mff.cuni.cz> Hi! col_sym_free label is in a different block and frees what local variables in that block point to, guess that's a typo. seqp was declared in 2 different blocks and one was in some cases using goto to jump to the other block. 2006-09-06 Jakub Jelinek * locale/programs/ld-collate.c (collate_read): Goto sym_equiv_free rather than col_sym_free. Move seqp declaration earlier. --- libc/locale/programs/ld-collate.c.jj 2006-08-30 17:20:41.000000000 +0200 +++ libc/locale/programs/ld-collate.c 2006-09-06 18:33:31.000000000 +0200 @@ -3068,7 +3068,7 @@ collate_read (struct linereader *ldfile, lr_error (ldfile, _("\ %s: unknown symbol `%s' in equivalent definition"), "LC_COLLATE", symname); - goto col_sym_free; + goto sym_equiv_free; } if (insert_entry (&collate->sym_table, @@ -3533,13 +3533,13 @@ error while adding equivalent collating break; } + struct element_t *seqp; if (state == 0) { /* We are outside an `order_start' region. This means we must only accept definitions of values for collation symbols since these are purely abstract values and don't need directions associated. */ - struct element_t *seqp; void *ptr; if (find_entry (&collate->seq_table, symstr, symlen, &ptr) == 0) @@ -3586,7 +3586,6 @@ error while adding equivalent collating { /* It is possible that we already have this collation sequence. In this case we move the entry. */ - struct element_t *seqp = NULL; void *sym; void *ptr; Jakub From jakub@redhat.com Wed Sep 6 16:46:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Wed, 06 Sep 2006 16:46:00 -0000 Subject: [PATCH] Fix re_string_reconstruct if pstr->offsets_needed Message-ID: <20060906164633.GW4556@sunsite.mff.cuni.cz> Hi! As the testcase below shows, we weren't handling pstr->offsets_needed in re_string_reconstruct properly. One issue is that the index passed re_string_context_at must be 0 .. pstr->valid_len - 1, rather than 0 .. pstr->valid_raw_len - 1, as the index is used to access the pstr->wcs array. But another, more serious issue is that I thought the offset < pstr->valid_raw_len && pstr->offsets_needed case can be handled by the re_string_skip_chars block - it can't. We'd need to figure out what exact argument to pass to re_string_context_at, also using re_string_skip_chars might give us bigger valid_len than bufs_len and as the testcase shows that leads to corruptions past the end of malloced buffers. 2006-09-06 Jakub Jelinek * posix/regex_internal.c (re_string_reconstruct): Handle offset < pstr->valid_raw_len && pstr->offsets_needed case. Ensure no bytes read before raw_mbs array. Pass a saved copy of pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to re_string_context_at. * posix/Makefile: Add rules to build and run bug-regex26 test. * posix/bug-regex26.c: New test. --- libc/posix/regex_internal.c.jj 2006-09-06 18:12:56.000000000 +0200 +++ libc/posix/regex_internal.c 2006-09-06 18:14:02.000000000 +0200 @@ -585,34 +585,98 @@ re_string_reconstruct (re_string_t *pstr if (BE (offset != 0, 1)) { - /* Are the characters which are already checked remain? */ - if (BE (offset < pstr->valid_raw_len, 1) -#ifdef RE_ENABLE_I18N - /* Handling this would enlarge the code too much. - Accept a slowdown in that case. */ - && pstr->offsets_needed == 0 -#endif - ) + /* Should the already checked characters be kept? */ + if (BE (offset < pstr->valid_raw_len, 1)) { /* Yes, move them to the front of the buffer. */ - pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags); #ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - memmove (pstr->wcs, pstr->wcs + offset, - (pstr->valid_len - offset) * sizeof (wint_t)); + if (BE (pstr->offsets_needed, 0)) + { + int low = 0, high = pstr->valid_len, mid; + do + { + mid = (high + low) / 2; + if (pstr->offsets[mid] > offset) + high = mid; + else if (pstr->offsets[mid] < offset) + low = mid + 1; + else + break; + } + while (low < high); + if (pstr->offsets[mid] < offset) + ++mid; + pstr->tip_context = re_string_context_at (pstr, mid - 1, + eflags); + /* This can be quite complicated, so handle specially + only the common and easy case where the character with + different length representation of lower and upper + case is present at or after offset. */ + if (pstr->valid_len > offset + && mid == offset && pstr->offsets[mid] == offset) + { + memmove (pstr->wcs, pstr->wcs + offset, + (pstr->valid_len - offset) * sizeof (wint_t)); + memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); + pstr->valid_len -= offset; + pstr->valid_raw_len -= offset; + for (low = 0; low < pstr->valid_len; low++) + pstr->offsets[low] = pstr->offsets[low + offset] - offset; + } + else + { + /* Otherwise, just find out how long the partial multibyte + character at offset is and fill it with WEOF/255. */ + pstr->len = pstr->raw_len - idx + offset; + pstr->stop = pstr->raw_stop - idx + offset; + pstr->offsets_needed = 0; + while (mid > 0 && pstr->offsets[mid - 1] == offset) + --mid; + while (mid < pstr->valid_len) + if (pstr->wcs[mid] != WEOF) + break; + else + ++mid; + if (mid == pstr->valid_len) + pstr->valid_len = 0; + else + { + pstr->valid_len = pstr->offsets[mid] - offset; + if (pstr->valid_len) + { + for (low = 0; low < pstr->valid_len; ++low) + pstr->wcs[low] = WEOF; + memset (pstr->mbs, 255, pstr->valid_len); + } + } + pstr->valid_raw_len = pstr->valid_len; + } + } + else +#endif + { + pstr->tip_context = re_string_context_at (pstr, offset - 1, + eflags); +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + memmove (pstr->wcs, pstr->wcs + offset, + (pstr->valid_len - offset) * sizeof (wint_t)); #endif /* RE_ENABLE_I18N */ - if (BE (pstr->mbs_allocated, 0)) - memmove (pstr->mbs, pstr->mbs + offset, - pstr->valid_len - offset); - pstr->valid_len -= offset; - pstr->valid_raw_len -= offset; + if (BE (pstr->mbs_allocated, 0)) + memmove (pstr->mbs, pstr->mbs + offset, + pstr->valid_len - offset); + pstr->valid_len -= offset; + pstr->valid_raw_len -= offset; #if DEBUG - assert (pstr->valid_len > 0); + assert (pstr->valid_len > 0); #endif + } } else { /* No, skip all characters until IDX. */ + int prev_valid_len = pstr->valid_len; + #ifdef RE_ENABLE_I18N if (BE (pstr->offsets_needed, 0)) { @@ -636,6 +700,8 @@ re_string_reconstruct (re_string_t *pstr byte other than 0x80 - 0xbf. */ raw = pstr->raw_mbs + pstr->raw_mbs_idx; end = raw + (offset - pstr->mb_cur_max); + if (end < pstr->raw_mbs) + end = pstr->raw_mbs; p = raw + offset - 1; #ifdef _LIBC /* We know the wchar_t encoding is UCS4, so for the simple @@ -643,7 +709,7 @@ re_string_reconstruct (re_string_t *pstr if (isascii (*p) && BE (pstr->trans == NULL, 1)) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); - pstr->valid_len = 0; + /* pstr->valid_len = 0; */ wc = (wchar_t) *p; } else @@ -686,7 +752,7 @@ re_string_reconstruct (re_string_t *pstr pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; if (wc == WEOF) pstr->tip_context - = re_string_context_at (pstr, pstr->valid_raw_len - 1, eflags); + = re_string_context_at (pstr, prev_valid_len - 1, eflags); else pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) --- libc/posix/bug-regex26.c.jj 2006-09-06 18:12:36.000000000 +0200 +++ libc/posix/bug-regex26.c 2006-09-06 18:12:30.000000000 +0200 @@ -0,0 +1,38 @@ +/* Test re_search with dotless i. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2006. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +int +main (void) +{ + struct re_pattern_buffer r; + struct re_registers s; + setlocale (LC_ALL, "en_US.UTF-8"); + memset (&r, 0, sizeof (r)); + memset (&s, 0, sizeof (s)); + re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | RE_ICASE); + re_compile_pattern ("insert into", 11, &r); + re_search (&r, "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK", + 15, 0, 15, &s); + return 0; +} --- libc/posix/Makefile.jj 2006-08-02 18:43:46.000000000 +0200 +++ libc/posix/Makefile 2006-09-06 18:13:47.000000000 +0200 @@ -81,7 +81,7 @@ tests := tstgetopt testfnm runtests run bug-regex13 bug-regex14 bug-regex15 bug-regex16 \ bug-regex17 bug-regex18 bug-regex19 bug-regex20 \ bug-regex21 bug-regex22 bug-regex23 bug-regex24 \ - bug-regex25 tst-nice tst-nanosleep tst-regex2 \ + bug-regex25 bug-regex26 tst-nice tst-nanosleep tst-regex2 \ transbug tst-rxspencer tst-pcre tst-boost \ bug-ga1 tst-vfork1 tst-vfork2 tst-waitid \ tst-getaddrinfo2 bug-glob1 bug-glob2 tst-sysconf \ @@ -189,6 +189,7 @@ bug-regex20-ENV = LOCPATH=$(common-objpf bug-regex22-ENV = LOCPATH=$(common-objpfx)localedata bug-regex23-ENV = LOCPATH=$(common-objpfx)localedata bug-regex25-ENV = LOCPATH=$(common-objpfx)localedata +bug-regex26-ENV = LOCPATH=$(common-objpfx)localedata tst-rxspencer-ARGS = --utf8 rxspencer/tests tst-rxspencer-ENV = LOCPATH=$(common-objpfx)localedata tst-pcre-ARGS = PCRE.tests Jakub From drepper@redhat.com Wed Sep 6 16:49:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 06 Sep 2006 16:49:00 -0000 Subject: [PATCH] Fix uninitialized var in gai_suspend In-Reply-To: <20060906163703.GU4556@sunsite.mff.cuni.cz> References: <20060906163703.GU4556@sunsite.mff.cuni.cz> Message-ID: <44FEFC25.9080208@redhat.com> Applied. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From drepper@redhat.com Wed Sep 6 16:52:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 06 Sep 2006 16:52:00 -0000 Subject: [PATCH] Fix uninitialized vars in ld-collate.c In-Reply-To: <20060906164051.GV4556@sunsite.mff.cuni.cz> References: <20060906164051.GV4556@sunsite.mff.cuni.cz> Message-ID: <44FEFC8C.8000503@redhat.com> Applied. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From drepper@redhat.com Wed Sep 6 16:53:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 06 Sep 2006 16:53:00 -0000 Subject: [PATCH] Fix uninitialized vars in ld-collate.c In-Reply-To: <20060906164051.GV4556@sunsite.mff.cuni.cz> References: <20060906164051.GV4556@sunsite.mff.cuni.cz> Message-ID: <44FEFCEE.4050504@redhat.com> Applied. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From jakub@redhat.com Thu Sep 7 13:38:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 07 Sep 2006 13:38:00 -0000 Subject: [PATCH] Fix ppc32 lrint (BZ #3155) Message-ID: <20060907133822.GX4556@sunsite.mff.cuni.cz> Hi! PPC32 ABI forbids stack accesses below r1 (unlike PPC64 ABI). The following patch fixes lrint which was violating this (detected by valgrind). There are 4 other ppc32 files that violate this: libc/sysdeps/powerpc/powerpc32/fpu/fprrest.S libc/sysdeps/powerpc/powerpc32/fpu/fprsave.S libc/sysdeps/powerpc/powerpc32/gprrest0.S libc/sysdeps/powerpc/powerpc32/gprsave0.S The stubs from those files aren't exported from libc.so.6 nor actually used for anything there, so I wonder if we can't nuke them altogether, or if they should move to libc_nonshared.a after making all the functions .hidden there. GCC provides (some of) the PPC32 ABI mandates stubs in crtsavres.o (and there it accesses memory below r11, not r1), so I'm not 100% if we need these at all. 2006-09-07 Jakub Jelinek [BZ #3155] * sysdeps/powerpc/powerpc32/fpu/s_lrint.S (__lrint): Don't access stack below r1. --- libc/sysdeps/powerpc/powerpc32/fpu/s_lrint.S.jj 2006-01-29 21:10:24.000000000 +0100 +++ libc/sysdeps/powerpc/powerpc32/fpu/s_lrint.S 2006-09-07 15:23:38.000000000 +0200 @@ -21,13 +21,15 @@ #include /* long int[r3] __lrint (double x[fp1]) */ -ENTRY (__lrint) +ENTRY (__lrint) + stwu r1,-16(r1) fctiw fp13,fp1 - stfd fp13,-8(r1) + stfd fp13,8(r1) nop /* Insure the following load is in a different dispatch group */ nop /* to avoid pipe stall on POWER4&5. */ nop - lwz r3,-4(r1) + lwz r3,12(r1) + addi r1,r1,16 blr END (__lrint) Jakub From drepper@redhat.com Thu Sep 7 13:47:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 07 Sep 2006 13:47:00 -0000 Subject: [PATCH] Fix ppc32 lrint (BZ #3155) In-Reply-To: <20060907133822.GX4556@sunsite.mff.cuni.cz> References: <20060907133822.GX4556@sunsite.mff.cuni.cz> Message-ID: <45002300.8010509@redhat.com> Applied. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From drepper@redhat.com Thu Sep 7 13:50:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 07 Sep 2006 13:50:00 -0000 Subject: [PATCH] Fix re_string_reconstruct if pstr->offsets_needed In-Reply-To: <20060906164633.GW4556@sunsite.mff.cuni.cz> References: <20060906164633.GW4556@sunsite.mff.cuni.cz> Message-ID: <450023CD.10404@redhat.com> Applied. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From jakub@redhat.com Thu Sep 7 15:50:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 07 Sep 2006 15:50:00 -0000 Subject: [PATCH] Fix malloc with really large sizes [BZ #2775] Message-ID: <20060907155035.GY4556@sunsite.mff.cuni.cz> Hi! As the BZ#2775 testcase shows (not sure if it is appropriate for make check, as it uses many threads to force initial thread to allocate on a different arena than main_arena), we sometimes call grow_heap to grow a heap, but the size is so large that the diff is negative (and in that case grow_heap acts as shrink_heap and unlike growing e.g. assumes the diff is already a multiple of page size). The grow_heap change is just trying to be really safe, if e.g. old heap size is 1MB and diff is e.g. 0x7ff01000 on 32-bit 4KB pagesize arch, then we could easily create heap bigger than HEAP_MAX_SIZE. 2006-09-07 Jakub Jelinek [BZ #2775] * malloc/malloc.c (sYSMALLOc): Only call grow_heap if (long) (MINSIZE + nb - old_size) is positive. * malloc/arena.c (grow_heap): When growing bail even if new_size is negative. --- libc/malloc/arena.c.jj 2006-09-07 16:46:50.000000000 +0200 +++ libc/malloc/arena.c 2006-09-07 17:35:38.000000000 +0200 @@ -712,7 +712,7 @@ grow_heap(h, diff) heap_info *h; long di if(diff >= 0) { diff = (diff + page_mask) & ~page_mask; new_size = (long)h->size + diff; - if(new_size > HEAP_MAX_SIZE) + if((unsigned long) new_size > (unsigned long) HEAP_MAX_SIZE) return -1; if(mprotect((char *)h + h->size, diff, PROT_READ|PROT_WRITE) != 0) return -2; --- libc/malloc/malloc.c.jj 2006-09-04 16:42:01.000000000 +0200 +++ libc/malloc/malloc.c 2006-09-07 17:39:59.000000000 +0200 @@ -2970,7 +2970,8 @@ static Void_t* sYSMALLOc(nb, av) INTERNA /* First try to extend the current heap. */ old_heap = heap_for_ptr(old_top); old_heap_size = old_heap->size; - if (grow_heap(old_heap, MINSIZE + nb - old_size) == 0) { + if ((long) (MINSIZE + nb - old_size) > 0 + && grow_heap(old_heap, MINSIZE + nb - old_size) == 0) { av->system_mem += old_heap->size - old_heap_size; arena_mem += old_heap->size - old_heap_size; #if 0 Jakub From munroesj@us.ibm.com Thu Sep 7 16:18:00 2006 From: munroesj@us.ibm.com (Steven Munroe) Date: Thu, 07 Sep 2006 16:18:00 -0000 Subject: [PATCH] Fix ppc32 lrint (BZ #3155) In-Reply-To: <20060907133822.GX4556@sunsite.mff.cuni.cz> References: <20060907133822.GX4556@sunsite.mff.cuni.cz> Message-ID: <45004788.2020607@us.ibm.com> Jakub Jelinek wrote: >Hi! > >PPC32 ABI forbids stack accesses below r1 (unlike PPC64 ABI). >The following patch fixes lrint which was violating this (detected by >valgrind). >There are 4 other ppc32 files that violate this: >libc/sysdeps/powerpc/powerpc32/fpu/fprrest.S >libc/sysdeps/powerpc/powerpc32/fpu/fprsave.S >libc/sysdeps/powerpc/powerpc32/gprrest0.S >libc/sysdeps/powerpc/powerpc32/gprsave0.S >The stubs from those files aren't exported from libc.so.6 nor actually >used for anything there, so I wonder if we can't nuke them altogether, >or if they should move to libc_nonshared.a after making all the functions >.hidden there. GCC provides (some of) the PPC32 ABI mandates stubs >in crtsavres.o (and there it accesses memory below r11, not r1), >so I'm not 100% if we need these at all. > I am not sure where these came from or their history. As you say they don't match the Linux ABI but we can get away with this because of the way the kernel's signal.c builds signal frames. Not something we should depend on. Easiest to just remove them from sysdeps/powerpc/powerpc32. Looks like they do match the AIX xcoff ABI. So perhaps they should be moved to sysdeps/unix/sysv/aix. I don't know who if any one is maintaining the AIX code in libc. I'll check around. From jakub@redhat.com Thu Sep 7 22:09:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 07 Sep 2006 22:09:00 -0000 Subject: [PATCH] Fix sparc64 non-pic relocation handling Message-ID: <20060907220939.GZ4556@sunsite.mff.cuni.cz> Hi! These 4 are all non-PIC relocations, so they are pretty unlikely to work well in 64-bit programs, still, we shouldn't clobber the rest of the instructions (bits outside of the immediate field). E.g. for R_SPARC_WDISP30 that can happen even when the relocation doesn't overflow (if it is a call to a function located below the call insn, from -2GB to 4 bytes before it). 2006-09-07 Jakub Jelinek [BZ #1006] * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela) Ensure relocation doesn't clobber any bits outside of the immediate field for R_SPARC_TLS_LE_HIX22, R_SPARC_WDISP30, R_SPARC_HI22 and R_SPARC_H44. --- libc/sysdeps/sparc/sparc64/dl-machine.h 14 Apr 2005 21:39:27 -0000 1.50 +++ libc/sysdeps/sparc/sparc64/dl-machine.h 7 Sep 2006 21:54:30 -0000 @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. Sparc64 version. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -623,7 +623,8 @@ elf_machine_rela (struct link_map *map, value = sym->st_value - sym_map->l_tls_offset + reloc->r_addend; if (r_type == R_SPARC_TLS_LE_HIX22) - *reloc_addr = (*reloc_addr & 0xffc00000) | ((~value) >> 10); + *reloc_addr = (*reloc_addr & 0xffc00000) + | (((~value) >> 10) & 0x3fffff); else *reloc_addr = (*reloc_addr & 0xffffe000) | (value & 0x3ff) | 0x1c00; @@ -653,7 +654,7 @@ elf_machine_rela (struct link_map *map, case R_SPARC_WDISP30: *(unsigned int *) reloc_addr = ((*(unsigned int *)reloc_addr & 0xc0000000) | - ((value - (Elf64_Addr) reloc_addr) >> 2)); + (((value - (Elf64_Addr) reloc_addr) >> 2) & 0x3fffffff)); break; /* MEDLOW code model relocs */ @@ -665,7 +666,7 @@ elf_machine_rela (struct link_map *map, case R_SPARC_HI22: *(unsigned int *) reloc_addr = ((*(unsigned int *)reloc_addr & 0xffc00000) | - (value >> 10)); + ((value >> 10) & 0x3fffff)); break; case R_SPARC_OLO10: *(unsigned int *) reloc_addr = @@ -677,7 +678,7 @@ elf_machine_rela (struct link_map *map, case R_SPARC_H44: *(unsigned int *) reloc_addr = ((*(unsigned int *)reloc_addr & 0xffc00000) | - (value >> 22)); + ((value >> 22) & 0x3fffff)); break; case R_SPARC_M44: *(unsigned int *) reloc_addr = Jakub From jakub@redhat.com Fri Sep 8 13:14:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Fri, 08 Sep 2006 13:14:00 -0000 Subject: [PATCH] BZ#3123 fallouts patch Message-ID: <20060908131418.GA4556@sunsite.mff.cuni.cz> Hi! Thanks for the fix, here are just some nits I found while trying to understand. tst-cond22.c doesn't use anything from pthreadP.h what is not in the public pthread.h, so I think it should use the public header instead. But, more importantly, so far we were always holding the invariant that cv->__data.__futex == (unsigned int) (cv->__data.__total_seq + cv->__data.__wakeup_seq) but with today's changes that's no longer true and I think it is likely to cause problems (don't have a testcase, but I fear e.g. pthread_cond_broadcast could suddenly result in no change in __futex value whatsoever and some threads might not notice something changed). All other places that change the values of these 3 variables honor this invariant (e.g. pthread_cond_signal increases both futex and wakeup_seq, pthread_cond_wait increases both total_seq and futex and pthread_cond_broadcast sets wakeup_seq to total_seq and afterwards sets futex to (unsigned int) (2 * total_seq), i.e. the same as (unsigned int) (total_seq + wakeup_seq). 2006-09-08 Jakub Jelinek * tst-cond22.c: Include pthread.h instead of pthreadP.h. Include stdlib.h. * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. --- libc/nptl/tst-cond22.c 8 Sep 2006 10:40:24 -0000 1.1 +++ libc/nptl/tst-cond22.c 8 Sep 2006 12:59:45 -0000 @@ -1,5 +1,6 @@ -#include +#include #include +#include static pthread_barrier_t b; --- libc/nptl/sysdeps/pthread/pthread_cond_wait.c 8 Sep 2006 10:39:42 -0000 1.17 +++ libc/nptl/sysdeps/pthread/pthread_cond_wait.c 8 Sep 2006 12:59:45 -0000 @@ -51,13 +51,15 @@ __condvar_cleanup (void *arg) { /* This thread is not waiting anymore. Adjust the sequence counters appropriately. We do not increment WAKEUP_SEQ if this would - bump it over the value of TOTAL_SEQ> This can happen if a thread + bump it over the value of TOTAL_SEQ. This can happen if a thread was woken and then canceled. */ if (cbuffer->cond->__data.__wakeup_seq < cbuffer->cond->__data.__total_seq) - ++cbuffer->cond->__data.__wakeup_seq; + { + ++cbuffer->cond->__data.__wakeup_seq; + ++cbuffer->cond->__data.__futex; + } ++cbuffer->cond->__data.__woken_seq; - ++cbuffer->cond->__data.__futex; } cbuffer->cond->__data.__nwaiters -= 1 << COND_CLOCK_BITS; --- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S 8 Sep 2006 10:39:42 -0000 1.38 +++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S 8 Sep 2006 12:59:45 -0000 @@ -406,7 +406,7 @@ __condvar_tw_cleanup: cmpl 20(%esp), %eax jne 3f - /* We increment the woken_seq counter only if it is lower than + /* We increment the wakeup_seq counter only if it is lower than total_seq. If this is not the case the thread was woken and then canceled. In this case we ignore the signal. */ movl total_seq(%ebx), %eax @@ -419,10 +419,9 @@ __condvar_tw_cleanup: 6: addl $1, wakeup_seq(%ebx) adcl $0, wakeup_seq+4(%ebx) + addl $1, cond_futex(%ebx) -7: addl $1, cond_futex(%ebx) - - addl $1, woken_seq(%ebx) +7: addl $1, woken_seq(%ebx) adcl $0, woken_seq+4(%ebx) 3: subl $(1 << clock_bits), cond_nwaiters(%ebx) --- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 8 Sep 2006 10:39:42 -0000 1.33 +++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 8 Sep 2006 12:59:45 -0000 @@ -297,7 +297,7 @@ __condvar_w_cleanup: cmpl 12(%esp), %eax jne 3f - /* We increment the woken_seq counter only if it is lower than + /* We increment the wakeup_seq counter only if it is lower than total_seq. If this is not the case the thread was woken and then canceled. In this case we ignore the signal. */ movl total_seq(%ebx), %eax @@ -310,8 +310,9 @@ __condvar_w_cleanup: 6: addl $1, wakeup_seq(%ebx) adcl $0, wakeup_seq+4(%ebx) + addl $1, cond_futex(%ebx) -7: addl $1, cond_futex(%ebx) +7: addl $1, woken_seq(%ebx) adcl $0, woken_seq+4(%ebx) --- libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 8 Sep 2006 10:39:41 -0000 1.23 +++ libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 8 Sep 2006 12:59:45 -0000 @@ -67,15 +67,15 @@ __condvar_cleanup: cmpl 4(%r8), %edx jne 3f - /* We increment the woken_seq counter only if it is lower than + /* We increment the wakeup_seq counter only if it is lower than total_seq. If this is not the case the thread was woken and then canceled. In this case we ignore the signal. */ movq total_seq(%rdi), %rax cmpq wakeup_seq(%rdi), %rax jbe 6f incq wakeup_seq(%rdi) -6: incq woken_seq(%rdi) incl cond_futex(%rdi) +6: incq woken_seq(%rdi) 3: subl $(1 << clock_bits), cond_nwaiters(%rdi) --- libc/nptl/ChangeLog 8 Sep 2006 10:41:17 -0000 1.919 +++ libc/nptl/ChangeLog 8 Sep 2006 12:59:45 -0000 @@ -3,9 +3,9 @@ [BZ #3123] * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ. - * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.c: Likewise. - * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.c: Likewise. - * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.c: Likewise. + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise. + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. * Makefile (tests): Add tst-cond22. * tst-cond22.c: New file. Jakub From jakub@redhat.com Mon Sep 11 07:32:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 11 Sep 2006 07:32:00 -0000 Subject: [PATCH] Fix tst-cond22.c Message-ID: <20060911073207.GC4556@sunsite.mff.cuni.cz> Hi! tst-cond22.c occassionally fails with first thread not canceled cond = { 0, 2, 1, 1, 1, 0x804b140, 0, 0 } cond = { 0, 4, 2, 2, 2, 0x804b140, 0, 0 } The problem is that it relies on tf thread not being woken up (with pthread_signal) before pthread_cancel is run. If tf is woken before pthread_cancel is called in the initial thread, then the thread just runs through until return NULL; and exits. Alternatively, we could if (res == NULL) just try again a few times and only give up (with no error) if the "first thread" has not been successfully cancelled for say 16 or 32 times. 2006-09-11 Jakub Jelinek * tst-cond22.c (do_test): Don't insist the first thread has to be cancelled. --- libc/nptl/tst-cond22.c 2006-09-11 08:56:52.000000000 +0200 +++ libc/nptl/tst-cond22.c 2006-09-11 09:22:03.000000000 +0200 @@ -94,9 +94,9 @@ do_test (void) puts ("1st join failed"); return 1; } - if (res != PTHREAD_CANCELED) + if (res != PTHREAD_CANCELED && res != NULL) { - puts ("first thread not canceled"); + puts ("first thread not canceled nor exited successfully"); status = 1; } Jakub From kkojima@rr.iij4u.or.jp Tue Sep 12 22:28:00 2006 From: kkojima@rr.iij4u.or.jp (Kaz Kojima) Date: Tue, 12 Sep 2006 22:28:00 -0000 Subject: [PATCH] SH: nptl fixups Message-ID: <20060913.072847.38716404.kkojima@rr.iij4u.or.jp> Hi, The attached patch updates SH port of nptl according to the recent updates for x86. Regards, kaz -- 2006-09-12 Kaz Kojima * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI mutexes wake all mutexes. * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ. * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise. diff -uprN ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S --- ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S 2004-06-18 08:55:20.000000000 +0900 +++ LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S 2006-09-09 09:58:52.000000000 +0900 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include #include #include +#include #include "lowlevel-atomic.h" #define SYS_futex 240 @@ -98,6 +99,11 @@ __pthread_cond_broadcast: bt/s 9f add #cond_futex, r4 + /* XXX: The kernel so far doesn't support requeue to PI futex. */ + mov.l @(MUTEX_KIND,r9), r0 + tst #PI_BIT, r0 + bf 9f + /* Wake up all threads. */ mov #FUTEX_CMP_REQUEUE, r5 mov #1, r6 diff -uprN ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S --- ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S 2004-10-26 04:06:13.000000000 +0900 +++ LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S 2006-09-09 10:58:42.000000000 +0900 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -521,6 +521,21 @@ __condvar_tw_cleanup: mov #1, r2 mov #0, r3 + /* We increment the wakeup_seq counter only if it is lower than + total_seq. If this is not the case the thread was woken and + then canceled. In this case we ignore the signal. */ + mov.l @(total_seq+4,r8), r0 + mov.l @(wakeup_seq+4,r8), r1 + cmp/hi r1, r0 + bt/s 6f + cmp/hi r0, r1 + bt 7f + mov.l @(total_seq,r8), r0 + mov.l @(wakeup_seq,r8), r1 + cmp/hs r0, r1 + bt 7f + +6: clrt mov.l @(wakeup_seq,r8),r0 mov.l @(wakeup_seq+4,r8),r1 @@ -532,6 +547,7 @@ __condvar_tw_cleanup: add r2, r0 mov.l r0,@(cond_futex,r8) +7: clrt mov.l @(woken_seq,r8),r0 mov.l @(woken_seq+4,r8),r1 diff -uprN ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S --- ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S 2004-09-11 06:18:06.000000000 +0900 +++ LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S 2006-09-09 10:58:12.000000000 +0900 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -385,6 +385,21 @@ __condvar_w_cleanup: mov #1, r2 mov #0, r3 + /* We increment the wakeup_seq counter only if it is lower than + total_seq. If this is not the case the thread was woken and + then canceled. In this case we ignore the signal. */ + mov.l @(total_seq+4,r8), r0 + mov.l @(wakeup_seq+4,r8), r1 + cmp/hi r1, r0 + bt/s 6f + cmp/hi r0, r1 + bt 7f + mov.l @(total_seq,r8), r0 + mov.l @(wakeup_seq,r8), r1 + cmp/hs r0, r1 + bt 7f + +6: clrt mov.l @(wakeup_seq,r8),r0 mov.l @(wakeup_seq+4,r8),r1 @@ -396,6 +411,7 @@ __condvar_w_cleanup: add r2, r0 mov.l r0,@(cond_futex,r8) +7: clrt mov.l @(woken_seq,r8),r0 mov.l @(woken_seq+4,r8),r1 From jakub@redhat.com Thu Sep 14 11:45:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 14 Sep 2006 11:45:00 -0000 Subject: [PATCH] Fix ppc{32,64} lrintl/lroundl Message-ID: <20060914114459.GF4556@sunsite.mff.cuni.cz> Hi! lrintl and lroundl are broken on both ppc32 and ppc64. For ppc64 the problem is that GCC optimizes llroundl call to lroundl and llrintl to lrintl when long int is as wide as long long int, but lrintl resp. lroundl are on ppc implemented as calls to llrintl resp. llroundl. That means endless recursion. For ppc32 the problem was that for x such that llrintl (x) != (long) llrintl (x) (and similarly l*roundl) FE_INVALID wasn't raised and for values where FE_INVALID was raised even for llrintl/llroundl lrintl/lroundl would return unexpected return values (as (long) __LONG_LONG_MAX__ is not __LONG_MAX__ and ((long) (-__LONG_LONG_MAX__ - 1)) is not (-__LONG_MAX__ - 1). 2006-09-14 Jakub Jelinek * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: Comment fixes. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: Comment fixes. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: Rewritten. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: Rewritten. --- libc/sysdeps/ieee754/ldbl-128ibm/s_llrintl.c.jj 2006-03-22 23:16:58.000000000 +0100 +++ libc/sysdeps/ieee754/ldbl-128ibm/s_llrintl.c 2006-09-14 12:29:37.000000000 +0200 @@ -1,4 +1,4 @@ -/* Round to int long double floating-point values. +/* Round to long long int long double floating-point values. IBM extended format long double version. Copyright (C) 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -18,9 +18,6 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* This has been coded in assembler because GCC makes such a mess of it - when it's coded in C. */ - #include #include #include --- libc/sysdeps/ieee754/ldbl-128ibm/s_llroundl.c.jj 2006-03-22 23:16:58.000000000 +0100 +++ libc/sysdeps/ieee754/ldbl-128ibm/s_llroundl.c 2006-09-14 12:29:37.000000000 +0200 @@ -1,4 +1,4 @@ -/* Round to long long, long double floating-point values. +/* Round to long long int long double floating-point values. IBM extended format long double version. Copyright (C) 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -18,9 +18,6 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* This has been coded in assembler because GCC makes such a mess of it - when it's coded in C. */ - #include #include #include --- libc/sysdeps/ieee754/ldbl-128ibm/s_lrintl.c.jj 2006-01-28 01:07:25.000000000 +0100 +++ libc/sysdeps/ieee754/ldbl-128ibm/s_lrintl.c 2006-09-14 12:29:37.000000000 +0200 @@ -1,9 +1,162 @@ -/* FIXME */ +/* Round to long int long double floating-point values. + IBM extended format long double version. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + #include +#include #include +#include +#include + -long int __lrintl (long double d) +#ifdef __STDC__ +long +__lrintl (long double x) +#else +long +__lrintl (x) + long double x; +#endif { - return llrintl (d); + double xh, xl; + long res, hi, lo; + int save_round; + + ldbl_unpack (x, &xh, &xl); + + /* Limit the range of values handled by the conversion to long. + We do this because we aren't sure whether that conversion properly + raises FE_INVALID. */ + if ( +#if __LONG_MAX__ == 2147483647 + __builtin_expect + ((__builtin_fabs (xh) <= (double) __LONG_MAX__ + 2), 1) +#else + __builtin_expect + ((__builtin_fabs (xh) <= -(double) (-__LONG_MAX__ - 1)), 1) +#endif +#if !defined (FE_INVALID) + || 1 +#endif + ) + { + save_round = fegetround (); + +#if __LONG_MAX__ == 2147483647 + long long llhi = (long long) xh; + if (llhi != (long) llhi) + hi = llhi < 0 ? -__LONG_MAX__ - 1 : __LONG_MAX__; + else + hi = llhi; + xh -= hi; +#else + if (__builtin_expect ((xh == -(double) (-__LONG_MAX__ - 1)), 0)) + { + /* When XH is 9223372036854775808.0, converting to long long will + overflow, resulting in an invalid operation. However, XL might + be negative and of sufficient magnitude that the overall long + double is in fact in range. Avoid raising an exception. In any + case we need to convert this value specially, because + the converted value is not exactly represented as a double + thus subtracting HI from XH suffers rounding error. */ + hi = __LONG_MAX__; + xh = 1.0; + } + else + { + hi = (long) xh; + xh -= hi; + } +#endif + ldbl_canonicalize (&xh, &xl); + + lo = (long) xh; + + /* Peg at max/min values, assuming that the above conversions do so. + Strictly speaking, we can return anything for values that overflow, + but this is more useful. */ + res = hi + lo; + + /* This is just sign(hi) == sign(lo) && sign(res) != sign(hi). */ + if (__builtin_expect (((~(hi ^ lo) & (res ^ hi)) < 0), 0)) + goto overflow; + + xh -= lo; + ldbl_canonicalize (&xh, &xl); + + hi = res; + switch (save_round) + { + case FE_TONEAREST: + if (fabs (xh) < 0.5 + || (fabs (xh) == 0.5 + && ((xh > 0.0 && xl < 0.0) + || (xh < 0.0 && xl > 0.0) + || (xl == 0.0 && (res & 1) == 0)))) + return res; + + if (xh < 0.0) + res -= 1; + else + res += 1; + break; + + case FE_TOWARDZERO: + if (res > 0 && (xh < 0.0 || (xh == 0.0 && xl < 0.0))) + res -= 1; + else if (res < 0 && (xh > 0.0 || (xh == 0.0 && xl > 0.0))) + res += 1; + return res; + break; + + case FE_UPWARD: + if (xh > 0.0 || (xh == 0.0 && xl > 0.0)) + res += 1; + break; + + case FE_DOWNWARD: + if (xh < 0.0 || (xh == 0.0 && xl < 0.0)) + res -= 1; + break; + } + + if (__builtin_expect (((~(hi ^ (res - hi)) & (res ^ hi)) < 0), 0)) + goto overflow; + + return res; + } + else + { + if (xh > 0.0) + hi = __LONG_MAX__; + else if (xh < 0.0) + hi = -__LONG_MAX__ - 1; + else + /* Nan */ + hi = 0; + } + +overflow: +#ifdef FE_INVALID + feraiseexcept (FE_INVALID); +#endif + return hi; } + long_double_symbol (libm, __lrintl, lrintl); --- libc/sysdeps/ieee754/ldbl-128ibm/s_lroundl.c.jj 2006-01-28 01:07:25.000000000 +0100 +++ libc/sysdeps/ieee754/ldbl-128ibm/s_lroundl.c 2006-09-14 12:29:37.000000000 +0200 @@ -1,9 +1,142 @@ -/* FIXME */ +/* Round to long int long double floating-point values. + IBM extended format long double version. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + #include +#include #include +#include +#include -long int __lroundl (long double d) +#ifdef __STDC__ +long +__lroundl (long double x) +#else +long +__lroundl (x) + long double x; +#endif { - return llroundl (d); + double xh, xl; + long res, hi, lo; + + ldbl_unpack (x, &xh, &xl); + + /* Limit the range of values handled by the conversion to long. + We do this because we aren't sure whether that conversion properly + raises FE_INVALID. */ + if ( +#if __LONG_MAX__ == 2147483647 + __builtin_expect + ((__builtin_fabs (xh) <= (double) __LONG_MAX__ + 2), 1) +#else + __builtin_expect + ((__builtin_fabs (xh) <= -(double) (-__LONG_MAX__ - 1)), 1) +#endif +#if !defined (FE_INVALID) + || 1 +#endif + ) + { +#if __LONG_MAX__ == 2147483647 + long long llhi = (long long) xh; + if (llhi != (long) llhi) + hi = llhi < 0 ? -__LONG_MAX__ - 1 : __LONG_MAX__; + else + hi = llhi; + xh -= hi; +#else + if (__builtin_expect ((xh == -(double) (-__LONG_MAX__ - 1)), 0)) + { + /* When XH is 9223372036854775808.0, converting to long long will + overflow, resulting in an invalid operation. However, XL might + be negative and of sufficient magnitude that the overall long + double is in fact in range. Avoid raising an exception. In any + case we need to convert this value specially, because + the converted value is not exactly represented as a double + thus subtracting HI from XH suffers rounding error. */ + hi = __LONG_MAX__; + xh = 1.0; + } + else + { + hi = (long) xh; + xh -= hi; + } +#endif + ldbl_canonicalize (&xh, &xl); + + lo = (long) xh; + + /* Peg at max/min values, assuming that the above conversions do so. + Strictly speaking, we can return anything for values that overflow, + but this is more useful. */ + res = hi + lo; + + /* This is just sign(hi) == sign(lo) && sign(res) != sign(hi). */ + if (__builtin_expect (((~(hi ^ lo) & (res ^ hi)) < 0), 0)) + goto overflow; + + xh -= lo; + ldbl_canonicalize (&xh, &xl); + + hi = res; + if (xh > 0.5) + { + res += 1; + } + else if (xh == 0.5) + { + if (xl > 0.0 || (xl == 0.0 && res >= 0)) + res += 1; + } + else if (-xh > 0.5) + { + res -= 1; + } + else if (-xh == 0.5) + { + if (xl < 0.0 || (xl == 0.0 && res <= 0)) + res -= 1; + } + + if (__builtin_expect (((~(hi ^ (res - hi)) & (res ^ hi)) < 0), 0)) + goto overflow; + + return res; + } + else + { + if (xh > 0.0) + hi = __LONG_MAX__; + else if (xh < 0.0) + hi = -__LONG_MAX__ - 1; + else + /* Nan */ + hi = 0; + } + +overflow: +#ifdef FE_INVALID + feraiseexcept (FE_INVALID); +#endif + return hi; } + long_double_symbol (libm, __lroundl, lroundl); Jakub From jakub@redhat.com Thu Sep 14 13:02:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 14 Sep 2006 13:02:00 -0000 Subject: [PATCH] Fix *at symbols in libc_nonshared.a Message-ID: <20060914130156.GG4556@sunsite.mff.cuni.cz> Hi! fstatat/fstatat64/mknodat weren't marked hidden in libc_nonshared.a, so perhaps some -O0 compiled shared libraries could reexport it. 2006-09-14 Jakub Jelinek * io/Makefile (CFLAGS-fstatat.c): Set. (CFLAGS-fstatat64.c): Likewise. (CFLAGS-mknodat.c): Likewise. --- libc/io/Makefile.jj 2006-01-23 08:40:46.000000000 +0100 +++ libc/io/Makefile 2006-09-14 14:56:19.000000000 +0200 @@ -98,6 +98,9 @@ CFLAGS-mknod.c = -DHAVE_DOT_HIDDEN CFLAGS-stat64.c = -DHAVE_DOT_HIDDEN CFLAGS-fstat64.c = -DHAVE_DOT_HIDDEN CFLAGS-lstat64.c = -DHAVE_DOT_HIDDEN +CFLAGS-fstatat.c = -DHAVE_DOT_HIDDEN +CFLAGS-fstatat64.c = -DHAVE_DOT_HIDDEN +CFLAGS-mknodat.c = -DHAVE_DOT_HIDDEN endif test-stat2-ARGS = Makefile . $(objpfx)test-stat2 Jakub From jakub@redhat.com Thu Sep 14 15:23:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 14 Sep 2006 15:23:00 -0000 Subject: [PATCH] Use AT_PLATFORM and limit the number of important hwcap bits on PPC Message-ID: <20060914152316.GH4556@sunsite.mff.cuni.cz> Hi! For LD_LIBRARY_PATH, ld.so uses AT_PLATFORM whenever it is set by the kernel, even if it is not listed in dl-procinfo.[ch] (that only matters for ldconfig). So, currently e.g. on G5 we look a huge number of dirs: 14931: trying file=/lib/tls/ppc970/altivec/power4/libc.so.6 14931: trying file=/lib/tls/ppc970/altivec/libc.so.6 14931: trying file=/lib/tls/ppc970/power4/libc.so.6 14931: trying file=/lib/tls/ppc970/libc.so.6 14931: trying file=/lib/tls/altivec/power4/libc.so.6 14931: trying file=/lib/tls/altivec/libc.so.6 14931: trying file=/lib/tls/power4/libc.so.6 14931: trying file=/lib/tls/libc.so.6 14931: trying file=/lib/ppc970/altivec/power4/libc.so.6 14931: trying file=/lib/ppc970/altivec/libc.so.6 14931: trying file=/lib/ppc970/power4/libc.so.6 14931: trying file=/lib/ppc970/libc.so.6 14931: trying file=/lib/altivec/power4/libc.so.6 14931: trying file=/lib/altivec/libc.so.6 14931: trying file=/lib/power4/libc.so.6 14931: trying file=/lib/libc.so.6 The following patch limits important hwcaps to just altivec (as it is present on multiple different platforms, ppc970 (aka G5), ppc74{0,5}0, ppc-cell-be (and arch_2_05?)) and adds booke which is also set on 4 different platforms. The power4/power5/power5+ bits seem to be completely redundant with the platform name. I haven't included all platforms in dl-procinfo*, as I don't think we need to list there prehistoric CPUs (for which non-optimized libs are good enough anyway) and embedded stuff (as for embedded use you rarely want to choose different libcs based on which chip you are on, you pretty much know which chip it is), listing there all 24 platforms kernel now lists would be a waste, especially for the scarce bit space in ldconfig's mask (we have at most 31 bits there for platform and any other future uses, so if we now take 6 bits out of this for the common contemporary CPUs, we still have a big reserve for the future). 2006-09-14 Jakub Jelinek * sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add "booke" to the beginning. (_dl_powerpc_platforms): New. * sysdeps/powerpc/dl-procinfo.h (_DL_HWCAP_FIRST): Decrease. (HWCAP_IMPORTANT): Remove power{4,5,5+} and cell, add booke. (_DL_PLATFORMS_COUNT, _DL_FIRST_PLATFORM): Define. (_DL_HWCAP_PLATFORM): Define to new mask. (_dl_platform_string, _dl_string_platform): New functions. * sysdeps/powerpc/sysdep.h (PPC_FEATURE_BOOKE): Define. --- libc/sysdeps/powerpc/dl-procinfo.c.jj 2006-09-14 13:55:06.000000000 +0200 +++ libc/sysdeps/powerpc/dl-procinfo.c 2006-09-14 16:41:23.000000000 +0200 @@ -1,5 +1,5 @@ /* Data for processor capability information. PowerPC version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -46,10 +46,11 @@ #if !defined PROCINFO_DECL && defined SHARED ._dl_powerpc_cap_flags #else -PROCINFO_CLASS const char _dl_powerpc_cap_flags[16][10] +PROCINFO_CLASS const char _dl_powerpc_cap_flags[17][10] #endif #ifndef PROCINFO_DECL = { + "booke", "cell", "power5+", "power5", "power4", "notb", "efpdouble", "efpsingle", "spe", "ucache", "4xxmac", "mmu", "fpu", @@ -62,5 +63,21 @@ PROCINFO_CLASS const char _dl_powerpc_ca , #endif +#if !defined PROCINFO_DECL && defined SHARED + ._dl_powerpc_platforms +#else +PROCINFO_CLASS const char _dl_powerpc_platforms[6][12] +#endif +#ifndef PROCINFO_DECL += { + "power4", "ppc970", "power5", "power5+", "power6", "ppc-cell-be" + } +#endif +#if !defined SHARED || defined PROCINFO_DECL +; +#else +, +#endif + #undef PROCINFO_DECL #undef PROCINFO_CLASS --- libc/sysdeps/powerpc/dl-procinfo.h.jj 2006-09-14 13:55:06.000000000 +0200 +++ libc/sysdeps/powerpc/dl-procinfo.h 2006-09-14 16:12:47.000000000 +0200 @@ -1,5 +1,5 @@ /* Processor capability information handling macros. PowerPC version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,27 +23,34 @@ #include #include /* This defines the PPC_FEATURE_* macros. */ -/* There are 16 bits used, but they are bits 16..31. */ -#define _DL_HWCAP_FIRST 16 +/* There are 17 bits used, but they are bits 15..31. */ +#define _DL_HWCAP_FIRST 15 #define _DL_HWCAP_COUNT 32 /* These bits influence library search. */ -#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \ - | PPC_FEATURE_POWER4 \ - | PPC_FEATURE_POWER5 \ - | PPC_FEATURE_POWER5_PLUS \ - | PPC_FEATURE_CELL) - -/* We don't use AT_PLATFORM. */ -#define _DL_HWCAP_PLATFORM 0 -#define _dl_string_platform(str) (-1) +#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \ + | PPC_FEATURE_BOOKE) + +#define _DL_PLATFORMS_COUNT 6 + +#define _DL_FIRST_PLATFORM 32 +/* Mask to filter out platforms. */ +#define _DL_HWCAP_PLATFORM (((1ULL << _DL_PLATFORMS_COUNT) - 1) \ + << _DL_FIRST_PLATFORM) static inline const char * __attribute__ ((unused)) _dl_hwcap_string (int idx) { return GLRO(dl_powerpc_cap_flags)[idx - _DL_HWCAP_FIRST]; -}; +} + +static inline const char * +__attribute__ ((unused)) +_dl_platform_string (int idx) +{ + return GLRO(dl_powerpc_platforms)[idx - _DL_FIRST_PLATFORM]; +} static inline int __attribute__ ((unused)) @@ -53,7 +60,48 @@ _dl_string_hwcap (const char *str) if (strcmp (str, _dl_hwcap_string (i)) == 0) return i; return -1; -}; +} + +static inline int +__attribute__ ((unused, always_inline)) +_dl_string_platform (const char *str) +{ + if (str == NULL) + return -1; + + if (strncmp (str, GLRO(dl_powerpc_platforms)[0], 5) == 0) + { + int ret; + str += 5; + switch (*str) + { + case '4': + ret = _DL_FIRST_PLATFORM + 0; + break; + case '5': + ret = _DL_FIRST_PLATFORM + 2; + if (str[1] == '+') + ++ret, ++str; + break; + case '6': + ret = _DL_FIRST_PLATFORM + 4; + break; + default: + return -1; + } + if (str[1] == '\0') + return ret; + } + else if (strncmp (str, GLRO(dl_powerpc_platforms)[1], 3) == 0) + { + if (strcmp (str + 3, GLRO(dl_powerpc_platforms)[1] + 3) == 0) + return _DL_FIRST_PLATFORM + 1; + else if (strcmp (str + 3, GLRO(dl_powerpc_platforms)[5] + 3) == 0) + return _DL_FIRST_PLATFORM + 5; + } + + return -1; +} #ifdef IS_IN_rtld static inline int --- libc/sysdeps/powerpc/sysdep.h.jj 2005-11-21 12:07:50.000000000 +0100 +++ libc/sysdeps/powerpc/sysdep.h 2006-09-14 16:11:34.000000000 +0200 @@ -37,6 +37,7 @@ #define PPC_FEATURE_POWER5 0x00040000 /* POWER5 microarch level */ #define PPC_FEATURE_POWER5_PLUS 0x00020000 /* POWER5+ microarch level */ #define PPC_FEATURE_CELL 0x00010000 /* CELL PU microarch level */ +#define PPC_FEATURE_BOOKE 0x00008000 #define PPC_FEATURE_970 (PPC_FEATURE_POWER4 + PPC_FEATURE_HAS_ALTIVEC) #ifdef __ASSEMBLER__ Jakub From munroesj@us.ibm.com Thu Sep 14 16:22:00 2006 From: munroesj@us.ibm.com (Steven Munroe) Date: Thu, 14 Sep 2006 16:22:00 -0000 Subject: [PATCH] Use AT_PLATFORM and limit the number of important hwcap bits on PPC In-Reply-To: <20060914152316.GH4556@sunsite.mff.cuni.cz> References: <20060914152316.GH4556@sunsite.mff.cuni.cz> Message-ID: <45098339.7020206@us.ibm.com> Jakub Jelinek wrote: >Hi! > >For LD_LIBRARY_PATH, ld.so uses AT_PLATFORM whenever it is set by the >kernel, even if it is not listed in dl-procinfo.[ch] (that only matters >for ldconfig). So, currently e.g. on G5 we look a huge number of dirs: >... >The following patch limits important hwcaps to just altivec (as it is >present on multiple different platforms, ppc970 (aka G5), ppc74{0,5}0, >ppc-cell-be (and arch_2_05?)) and adds booke which is also set on 4 >different platforms. The power4/power5/power5+ bits seem to be completely >redundant with the platform name. > Correct the these bits should be removed from important mask in favor of AT_PLATFORM. These bits do designate ISA levels and as such are still (potentially) useful for runtime test to use specific instructions. >I haven't included all platforms in dl-procinfo*, as I don't think we need >to list there prehistoric CPUs (for which non-optimized libs are good enough >anyway) and embedded stuff (as for embedded use you rarely want to choose >different libcs based on which chip you are on, you pretty much know >which chip it is), listing there all 24 platforms kernel now lists would >be a waste, especially for the scarce bit space in ldconfig's mask (we have >at most 31 bits there for platform and any other future uses, so if we now >take 6 bits out of this for the common contemporary CPUs, we still have >a big reserve for the future). > > This is similar to a patch I submited in January but seems to have been ignored. So this patch is ok with only one quible, I was told that I should not use "cell" as the Official name is "Cell Broadband Engine". So the HWCAP name should be "cellbe". >2006-09-14 Jakub Jelinek > > * sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add "booke" > to the beginning. > (_dl_powerpc_platforms): New. > * sysdeps/powerpc/dl-procinfo.h (_DL_HWCAP_FIRST): Decrease. > (HWCAP_IMPORTANT): Remove power{4,5,5+} and cell, add booke. > (_DL_PLATFORMS_COUNT, _DL_FIRST_PLATFORM): Define. > (_DL_HWCAP_PLATFORM): Define to new mask. > (_dl_platform_string, _dl_string_platform): New functions. > * sysdeps/powerpc/sysdep.h (PPC_FEATURE_BOOKE): Define. > >--- libc/sysdeps/powerpc/dl-procinfo.c.jj 2006-09-14 13:55:06.000000000 +0200 >+++ libc/sysdeps/powerpc/dl-procinfo.c 2006-09-14 16:41:23.000000000 +0200 >@@ -1,5 +1,5 @@ > /* Data for processor capability information. PowerPC version. >- Copyright (C) 2005 Free Software Foundation, Inc. >+ Copyright (C) 2005, 2006 Free Software Foundation, Inc. > This file is part of the GNU C Library. > > The GNU C Library is free software; you can redistribute it and/or >@@ -46,10 +46,11 @@ > #if !defined PROCINFO_DECL && defined SHARED > ._dl_powerpc_cap_flags > #else >-PROCINFO_CLASS const char _dl_powerpc_cap_flags[16][10] >+PROCINFO_CLASS const char _dl_powerpc_cap_flags[17][10] > #endif > #ifndef PROCINFO_DECL > = { >+ "booke", > "cell", "power5+", "power5", "power4", > "notb", "efpdouble", "efpsingle", "spe", > "ucache", "4xxmac", "mmu", "fpu", >@@ -62,5 +63,21 @@ PROCINFO_CLASS const char _dl_powerpc_ca > , > #endif > >+#if !defined PROCINFO_DECL && defined SHARED >+ ._dl_powerpc_platforms >+#else >+PROCINFO_CLASS const char _dl_powerpc_platforms[6][12] >+#endif >+#ifndef PROCINFO_DECL >+= { >+ "power4", "ppc970", "power5", "power5+", "power6", "ppc-cell-be" >+ } >+#endif >+#if !defined SHARED || defined PROCINFO_DECL >+; >+#else >+, >+#endif >+ > #undef PROCINFO_DECL > #undef PROCINFO_CLASS >--- libc/sysdeps/powerpc/dl-procinfo.h.jj 2006-09-14 13:55:06.000000000 +0200 >+++ libc/sysdeps/powerpc/dl-procinfo.h 2006-09-14 16:12:47.000000000 +0200 >@@ -1,5 +1,5 @@ > /* Processor capability information handling macros. PowerPC version. >- Copyright (C) 2005 Free Software Foundation, Inc. >+ Copyright (C) 2005, 2006 Free Software Foundation, Inc. > This file is part of the GNU C Library. > > The GNU C Library is free software; you can redistribute it and/or >@@ -23,27 +23,34 @@ > #include > #include /* This defines the PPC_FEATURE_* macros. */ > >-/* There are 16 bits used, but they are bits 16..31. */ >-#define _DL_HWCAP_FIRST 16 >+/* There are 17 bits used, but they are bits 15..31. */ >+#define _DL_HWCAP_FIRST 15 > #define _DL_HWCAP_COUNT 32 > > /* These bits influence library search. */ >-#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \ >- | PPC_FEATURE_POWER4 \ >- | PPC_FEATURE_POWER5 \ >- | PPC_FEATURE_POWER5_PLUS \ >- | PPC_FEATURE_CELL) >- >-/* We don't use AT_PLATFORM. */ >-#define _DL_HWCAP_PLATFORM 0 >-#define _dl_string_platform(str) (-1) >+#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \ >+ | PPC_FEATURE_BOOKE) >+ >+#define _DL_PLATFORMS_COUNT 6 >+ >+#define _DL_FIRST_PLATFORM 32 >+/* Mask to filter out platforms. */ >+#define _DL_HWCAP_PLATFORM (((1ULL << _DL_PLATFORMS_COUNT) - 1) \ >+ << _DL_FIRST_PLATFORM) > > static inline const char * > __attribute__ ((unused)) > _dl_hwcap_string (int idx) > { > return GLRO(dl_powerpc_cap_flags)[idx - _DL_HWCAP_FIRST]; >-}; >+} >+ >+static inline const char * >+__attribute__ ((unused)) >+_dl_platform_string (int idx) >+{ >+ return GLRO(dl_powerpc_platforms)[idx - _DL_FIRST_PLATFORM]; >+} > > static inline int > __attribute__ ((unused)) >@@ -53,7 +60,48 @@ _dl_string_hwcap (const char *str) > if (strcmp (str, _dl_hwcap_string (i)) == 0) > return i; > return -1; >-}; >+} >+ >+static inline int >+__attribute__ ((unused, always_inline)) >+_dl_string_platform (const char *str) >+{ >+ if (str == NULL) >+ return -1; >+ >+ if (strncmp (str, GLRO(dl_powerpc_platforms)[0], 5) == 0) >+ { >+ int ret; >+ str += 5; >+ switch (*str) >+ { >+ case '4': >+ ret = _DL_FIRST_PLATFORM + 0; >+ break; >+ case '5': >+ ret = _DL_FIRST_PLATFORM + 2; >+ if (str[1] == '+') >+ ++ret, ++str; >+ break; >+ case '6': >+ ret = _DL_FIRST_PLATFORM + 4; >+ break; >+ default: >+ return -1; >+ } >+ if (str[1] == '\0') >+ return ret; >+ } >+ else if (strncmp (str, GLRO(dl_powerpc_platforms)[1], 3) == 0) >+ { >+ if (strcmp (str + 3, GLRO(dl_powerpc_platforms)[1] + 3) == 0) >+ return _DL_FIRST_PLATFORM + 1; >+ else if (strcmp (str + 3, GLRO(dl_powerpc_platforms)[5] + 3) == 0) >+ return _DL_FIRST_PLATFORM + 5; >+ } >+ >+ return -1; >+} > > #ifdef IS_IN_rtld > static inline int >--- libc/sysdeps/powerpc/sysdep.h.jj 2005-11-21 12:07:50.000000000 +0100 >+++ libc/sysdeps/powerpc/sysdep.h 2006-09-14 16:11:34.000000000 +0200 >@@ -37,6 +37,7 @@ > #define PPC_FEATURE_POWER5 0x00040000 /* POWER5 microarch level */ > #define PPC_FEATURE_POWER5_PLUS 0x00020000 /* POWER5+ microarch level */ > #define PPC_FEATURE_CELL 0x00010000 /* CELL PU microarch level */ >+#define PPC_FEATURE_BOOKE 0x00008000 > #define PPC_FEATURE_970 (PPC_FEATURE_POWER4 + PPC_FEATURE_HAS_ALTIVEC) > > #ifdef __ASSEMBLER__ > > Jakub > From munroesj@us.ibm.com Thu Sep 14 17:28:00 2006 From: munroesj@us.ibm.com (Steven Munroe) Date: Thu, 14 Sep 2006 17:28:00 -0000 Subject: [PATCH] Use AT_PLATFORM and limit the number of important hwcap bits on PPC In-Reply-To: References: <20060914152316.GH4556@sunsite.mff.cuni.cz> Message-ID: <45099284.9030705@us.ibm.com> Ulrich Drepper wrote: > On 9/14/06, Jakub Jelinek wrote: >> +#define HWCAP_IMPORTANT >> (PPC_FEATURE_HAS_ALTIVEC \ >> + | PPC_FEATURE_BOOKE) > > booke is not important for reasonable machines. The embedded garbage > can define their own macros in a file in ports. > > I'm going to apply the change without the bit in about 14 hours (when > I get back online) unless I read a rejection. Mind you, rejection of > the move to AT_PLATFORM, not the booke stuff. Ok with me. From drepper@gmail.com Thu Sep 14 18:03:00 2006 From: drepper@gmail.com (Ulrich Drepper) Date: Thu, 14 Sep 2006 18:03:00 -0000 Subject: [PATCH] Use AT_PLATFORM and limit the number of important hwcap bits on PPC In-Reply-To: <20060914152316.GH4556@sunsite.mff.cuni.cz> References: <20060914152316.GH4556@sunsite.mff.cuni.cz> Message-ID: On 9/14/06, Jakub Jelinek wrote: > +#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \ > + | PPC_FEATURE_BOOKE) booke is not important for reasonable machines. The embedded garbage can define their own macros in a file in ports. I'm going to apply the change without the bit in about 14 hours (when I get back online) unless I read a rejection. Mind you, rejection of the move to AT_PLATFORM, not the booke stuff. From jakub@redhat.com Thu Sep 14 18:14:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 14 Sep 2006 18:14:00 -0000 Subject: [PATCH] Use AT_PLATFORM and limit the number of important hwcap bits on PPC In-Reply-To: References: <20060914152316.GH4556@sunsite.mff.cuni.cz> Message-ID: <20060914181419.GI4556@sunsite.mff.cuni.cz> On Thu, Sep 14, 2006 at 10:12:48AM -0700, Ulrich Drepper wrote: > On 9/14/06, Jakub Jelinek wrote: > >+#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \ > >+ | PPC_FEATURE_BOOKE) > > booke is not important for reasonable machines. The embedded garbage > can define their own macros in a file in ports. > > I'm going to apply the change without the bit in about 14 hours (when > I get back online) unless I read a rejection. Mind you, rejection of > the move to AT_PLATFORM, not the booke stuff. Here is an updated patch that doesn't list BOOKE in HWCAP_IMPORTANT, on the other side adds another 3 bits to recognized hwcaps (for LD_SHOW_AUXV=1) and adds some stuff from Steven's http://sources.redhat.com/ml/libc-alpha/2006-01/msg00096.html patch. 2006-09-14 Jakub Jelinek Steven Munroe * sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add 4 new cap names to the beginning. Rename "cell" to "cellbe". (_dl_powerpc_platforms): New. * sysdeps/powerpc/dl-procinfo.h (_DL_HWCAP_FIRST): Decrease. (HWCAP_IMPORTANT): Remove power{4,5,5+} and cell. (_DL_PLATFORMS_COUNT, _DL_FIRST_PLATFORM): Define. (_DL_HWCAP_PLATFORM): Define to new mask. (_dl_platform_string, _dl_string_platform): New functions. * sysdeps/powerpc/sysdep.h (PPC_FEATURE_BOOKE, PPC_FEATURE_SMT, PPC_FEATURE_ICACHE_SNOOP, PPC_FEATURE_ARCH_2_05): Define. --- libc/sysdeps/powerpc/dl-procinfo.c.jj 2006-09-14 13:55:06.000000000 +0200 +++ libc/sysdeps/powerpc/dl-procinfo.c 2006-09-14 19:57:49.000000000 +0200 @@ -1,5 +1,5 @@ /* Data for processor capability information. PowerPC version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -46,11 +46,12 @@ #if !defined PROCINFO_DECL && defined SHARED ._dl_powerpc_cap_flags #else -PROCINFO_CLASS const char _dl_powerpc_cap_flags[16][10] +PROCINFO_CLASS const char _dl_powerpc_cap_flags[20][10] #endif #ifndef PROCINFO_DECL = { - "cell", "power5+", "power5", "power4", + "arch_2_05", "ic_snoop", "smt", "booke", + "cellbe", "power5+", "power5", "power4", "notb", "efpdouble", "efpsingle", "spe", "ucache", "4xxmac", "mmu", "fpu", "altivec", "ppc601", "ppc64", "ppc32", @@ -62,5 +63,21 @@ PROCINFO_CLASS const char _dl_powerpc_ca , #endif +#if !defined PROCINFO_DECL && defined SHARED + ._dl_powerpc_platforms +#else +PROCINFO_CLASS const char _dl_powerpc_platforms[6][12] +#endif +#ifndef PROCINFO_DECL += { + "power4", "ppc970", "power5", "power5+", "power6", "ppc-cell-be" + } +#endif +#if !defined SHARED || defined PROCINFO_DECL +; +#else +, +#endif + #undef PROCINFO_DECL #undef PROCINFO_CLASS --- libc/sysdeps/powerpc/dl-procinfo.h.jj 2006-09-14 13:55:06.000000000 +0200 +++ libc/sysdeps/powerpc/dl-procinfo.h 2006-09-14 19:59:08.000000000 +0200 @@ -1,5 +1,5 @@ /* Processor capability information handling macros. PowerPC version. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,27 +23,33 @@ #include #include /* This defines the PPC_FEATURE_* macros. */ -/* There are 16 bits used, but they are bits 16..31. */ -#define _DL_HWCAP_FIRST 16 +/* There are 20 bits used, but they are bits 12..31. */ +#define _DL_HWCAP_FIRST 12 #define _DL_HWCAP_COUNT 32 /* These bits influence library search. */ -#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \ - | PPC_FEATURE_POWER4 \ - | PPC_FEATURE_POWER5 \ - | PPC_FEATURE_POWER5_PLUS \ - | PPC_FEATURE_CELL) - -/* We don't use AT_PLATFORM. */ -#define _DL_HWCAP_PLATFORM 0 -#define _dl_string_platform(str) (-1) +#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC) + +#define _DL_PLATFORMS_COUNT 6 + +#define _DL_FIRST_PLATFORM 32 +/* Mask to filter out platforms. */ +#define _DL_HWCAP_PLATFORM (((1ULL << _DL_PLATFORMS_COUNT) - 1) \ + << _DL_FIRST_PLATFORM) static inline const char * __attribute__ ((unused)) _dl_hwcap_string (int idx) { return GLRO(dl_powerpc_cap_flags)[idx - _DL_HWCAP_FIRST]; -}; +} + +static inline const char * +__attribute__ ((unused)) +_dl_platform_string (int idx) +{ + return GLRO(dl_powerpc_platforms)[idx - _DL_FIRST_PLATFORM]; +} static inline int __attribute__ ((unused)) @@ -53,7 +59,48 @@ _dl_string_hwcap (const char *str) if (strcmp (str, _dl_hwcap_string (i)) == 0) return i; return -1; -}; +} + +static inline int +__attribute__ ((unused, always_inline)) +_dl_string_platform (const char *str) +{ + if (str == NULL) + return -1; + + if (strncmp (str, GLRO(dl_powerpc_platforms)[0], 5) == 0) + { + int ret; + str += 5; + switch (*str) + { + case '4': + ret = _DL_FIRST_PLATFORM + 0; + break; + case '5': + ret = _DL_FIRST_PLATFORM + 2; + if (str[1] == '+') + ++ret, ++str; + break; + case '6': + ret = _DL_FIRST_PLATFORM + 4; + break; + default: + return -1; + } + if (str[1] == '\0') + return ret; + } + else if (strncmp (str, GLRO(dl_powerpc_platforms)[1], 3) == 0) + { + if (strcmp (str + 3, GLRO(dl_powerpc_platforms)[1] + 3) == 0) + return _DL_FIRST_PLATFORM + 1; + else if (strcmp (str + 3, GLRO(dl_powerpc_platforms)[5] + 3) == 0) + return _DL_FIRST_PLATFORM + 5; + } + + return -1; +} #ifdef IS_IN_rtld static inline int --- libc/sysdeps/powerpc/sysdep.h.jj 2005-11-21 12:07:50.000000000 +0100 +++ libc/sysdeps/powerpc/sysdep.h 2006-09-14 19:58:48.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,14 +29,18 @@ #define PPC_FEATURE_HAS_MMU 0x04000000 /* Memory Management Unit. */ #define PPC_FEATURE_HAS_4xxMAC 0x02000000 /* 4xx Multiply Accumulator. */ #define PPC_FEATURE_UNIFIED_CACHE 0x01000000 /* Unified I/D cache. */ -#define PPC_FEATURE_HAS_SPE 0x00800000 -#define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 -#define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 +#define PPC_FEATURE_HAS_SPE 0x00800000 /* Signal Processing ext. */ +#define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 /* SPE Float. */ +#define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 /* SPE Double. */ #define PPC_FEATURE_NO_TB 0x00100000 /* 601/403gx have no timebase */ -#define PPC_FEATURE_POWER4 0x00080000 /* POWER4 microarch level */ -#define PPC_FEATURE_POWER5 0x00040000 /* POWER5 microarch level */ -#define PPC_FEATURE_POWER5_PLUS 0x00020000 /* POWER5+ microarch level */ -#define PPC_FEATURE_CELL 0x00010000 /* CELL PU microarch level */ +#define PPC_FEATURE_POWER4 0x00080000 /* POWER4 ISA 2.00 */ +#define PPC_FEATURE_POWER5 0x00040000 /* POWER5 ISA 2.01 */ +#define PPC_FEATURE_POWER5_PLUS 0x00020000 /* POWER5+ ISA 2.02 */ +#define PPC_FEATURE_CELL_BE 0x00010000 /* CELL Broadband Engine */ +#define PPC_FEATURE_BOOKE 0x00008000 +#define PPC_FEATURE_SMT 0x00004000 +#define PPC_FEATURE_ICACHE_SNOOP 0x00002000 +#define PPC_FEATURE_ARCH_2_05 0x00001000 /* ISA 2.05 */ #define PPC_FEATURE_970 (PPC_FEATURE_POWER4 + PPC_FEATURE_HAS_ALTIVEC) #ifdef __ASSEMBLER__ Jakub From jakub@redhat.com Fri Sep 15 22:52:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Fri, 15 Sep 2006 22:52:00 -0000 Subject: [PATCH] Fix ppc* libSegFault.so register dump Message-ID: <20060915225144.GJ4556@sunsite.mff.cuni.cz> Hi! For ppc32 this just removes '\0' character that has been printed after the register dump and before the backtrace. For ppc64 libSegFault.so printed complete garbage. 2006-09-16 Jakub Jelinek * sysdeps/powerpc/powerpc32/register-dump.h (register_dump): Don't write '\0' to the fd. * sysdeps/mach/hurd/powerpc/register-dump.h (register_dump): Likewise. * sysdeps/powerpc/powerpc64/register-dump.h (register_dump): Likewise. Change regs to unsigned long pointer from unsigned int, fix fscr offset. --- libc/sysdeps/powerpc/powerpc64/register-dump.h.jj 2002-09-18 01:50:02.000000000 +0200 +++ libc/sysdeps/powerpc/powerpc64/register-dump.h 2006-09-16 00:43:48.000000000 +0200 @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 1998, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 2002, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -34,7 +34,7 @@ gr16-19: 000000000000010% 00000000000001 gr20-23: 000000000000014% 000000000000015% 000000000000016% 000000000000017%\n\ gr24-27: 000000000000018% 000000000000019% 00000000000001a% 00000000000001b%\n\ gr28-31: 00000000000001c% 00000000000001d% 00000000000001e% 00000000000001f%\n\ -fscr=0000071%\n\ +fscr=000000000000050%\n\ fp0-3: 000000000000030% 000000000000031% 000000000000032% 000000000000033%\n\ fp4-7: 000000000000034% 000000000000035% 000000000000036% 000000000000037%\n\ fp8-11: 000000000000038% 000000000000038% 00000000000003a% 00000000000003b%\n\ @@ -104,7 +104,7 @@ register_dump (int fd, struct sigcontext char buffer[sizeof(dumpform)]; char *bufferpos; unsigned regno; - unsigned *regs = (unsigned *)(ctx->regs); + unsigned long *regs = (unsigned long *)(ctx->regs); memcpy(buffer, dumpform, sizeof(dumpform)); @@ -117,7 +117,7 @@ register_dump (int fd, struct sigcontext } /* Write the output. */ - write (fd, buffer, sizeof(buffer)); + write (fd, buffer, sizeof(buffer) - 1); } --- libc/sysdeps/powerpc/powerpc32/register-dump.h.jj 2002-09-05 10:25:50.000000000 +0200 +++ libc/sysdeps/powerpc/powerpc32/register-dump.h 2006-09-16 00:44:07.000000000 +0200 @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -113,7 +113,7 @@ register_dump (int fd, struct sigcontext } /* Write the output. */ - write (fd, buffer, sizeof(buffer)); + write (fd, buffer, sizeof(buffer) - 1); } --- libc/sysdeps/mach/hurd/powerpc/register-dump.h.jj 2001-11-10 01:37:47.000000000 +0100 +++ libc/sysdeps/mach/hurd/powerpc/register-dump.h 2006-09-16 00:44:35.000000000 +0200 @@ -1,5 +1,5 @@ /* Dump registers. PowerPC/Hurd version. - Copyright (C) 1998, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 2001, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -113,7 +113,7 @@ register_dump (int fd, struct sigcontext } /* Write the output. */ - write (fd, buffer, sizeof(buffer)); + write (fd, buffer, sizeof(buffer) - 1); } #define REGISTER_DUMP \ Jakub From jakub@redhat.com Sat Sep 16 18:38:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Sat, 16 Sep 2006 18:38:00 -0000 Subject: [PATCH] Test for a dlclose failure Message-ID: <20060916183820.GK4556@sunsite.mff.cuni.cz> Hi! This testcase segfaults in ld.so. When unload7mod2.so is loaded, it is added to unload7mod1.so's l_scope, but when it is dlclosed, nothing removes it from that scope. In _dl_close: else if (imap->l_type == lt_loaded) <= this condition is true { if (imap->l_searchlist.r_list == NULL <= this one is not && imap->l_initfini != NULL) <= this one is true { and therefore imap->l_scope isn't walked and adjusted. 2006-09-16 Jakub Jelinek * elf/Makefile: Add rules to build and run unload7 test. * elf/unload7.c: New test. * elf/unload7mod1.c: New file. * elf/unload7mod2.c: New file. --- libc/elf/Makefile.jj 2006-08-25 11:01:23.000000000 +0200 +++ libc/elf/Makefile 2006-09-16 20:19:06.000000000 +0200 @@ -87,6 +87,7 @@ distribute := rtld-Rules \ unload3mod1.c unload3mod2.c unload3mod3.c unload3mod4.c \ unload4mod1.c unload4mod2.c unload4mod3.c unload4mod4.c \ unload6mod1.c unload6mod2.c unload6mod3.c \ + unload7mod1.c unload7mod2.c \ tst-auditmod1.c tst-audit.sh \ order2mod1.c order2mod2.c order2mod3.c order2mod4.c \ tst-stackguard1.c tst-stackguard1-static.c \ @@ -168,7 +169,7 @@ tests += loadtest restest1 preloadtest l tst-align tst-align2 $(tests-execstack-$(have-z-execstack)) \ tst-dlmodcount tst-dlopenrpath tst-deep1 \ tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \ - unload3 unload4 unload5 unload6 tst-global1 order2 \ + unload3 unload4 unload5 unload6 unload7 tst-global1 order2 \ tst-audit1 tst-audit2 \ tst-stackguard1 tst-addr1 # reldep9 @@ -211,6 +212,7 @@ modules-names = testobj1 testobj2 testob unload3mod1 unload3mod2 unload3mod3 unload3mod4 \ unload4mod1 unload4mod2 unload4mod3 unload4mod4 \ unload6mod1 unload6mod2 unload6mod3 \ + unload7mod1 unload7mod2 \ order2mod1 order2mod2 order2mod3 order2mod4 ifeq (yes,$(have-initfini-array)) modules-names += tst-array2dep tst-array5dep @@ -455,6 +457,8 @@ $(objpfx)unload4mod2.so: $(objpfx)unload $(objpfx)unload6mod1.so: $(libdl) $(objpfx)unload6mod2.so: $(libdl) $(objpfx)unload6mod3.so: $(libdl) +$(objpfx)unload7mod1.so: $(libdl) +$(objpfx)unload7mod2.so: $(objpfx)unload7mod1.so LDFLAGS-tst-tlsmod5.so = -nostdlib LDFLAGS-tst-tlsmod6.so = -nostdlib @@ -732,6 +736,10 @@ $(objpfx)unload6: $(libdl) $(objpfx)unload6.out: $(objpfx)unload6mod1.so $(objpfx)unload6mod2.so \ $(objpfx)unload6mod3.so +$(objpfx)unload7: $(libdl) +$(objpfx)unload7.out: $(objpfx)unload7mod1.so $(objpfx)unload7mod2.so +unload7-ENV = MALLOC_PERTURB_=85 + ifdef libdl $(objpfx)tst-tls9-static: $(common-objpfx)dlfcn/libdl.a $(objpfx)tst-tls9-static.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so --- libc/elf/unload7.c.jj 2006-09-16 19:58:48.000000000 +0200 +++ libc/elf/unload7.c 2006-09-16 20:03:31.000000000 +0200 @@ -0,0 +1,39 @@ +#include +#include + +int +main (void) +{ + void *h = dlopen ("unload7mod1.so", RTLD_LAZY); + if (h == NULL) + { + puts ("dlopen unload7mod1.so failed"); + return 1; + } + + int (*fn) (void); + fn = dlsym (h, "foo"); + if (fn == NULL) + { + puts ("dlsym failed"); + return 1; + } + + int ret = 0; + if (fn () == 0) + ++ret; + + void *h2 = dlopen ("unload7mod2.so", RTLD_LAZY); + if (h2 == NULL) + { + puts ("dlopen unload7mod1.so failed"); + return 1; + } + dlclose (h2); + + if (fn () == 0) + ++ret; + + dlclose (h); + return ret; +} --- libc/elf/unload7mod1.c.jj 2006-09-16 20:04:13.000000000 +0200 +++ libc/elf/unload7mod1.c 2006-09-16 20:06:26.000000000 +0200 @@ -0,0 +1,11 @@ +#include +#include + +int +foo (int i) +{ + if (dlsym (RTLD_DEFAULT, "unload7_nonexistent_symbol") == NULL) + return 1; + puts ("dlsym returned non-NULL"); + return 0; +} --- libc/elf/unload7mod2.c.jj 2006-09-16 20:06:51.000000000 +0200 +++ libc/elf/unload7mod2.c 2006-09-16 20:06:43.000000000 +0200 @@ -0,0 +1 @@ +int x; Jakub From drepper@redhat.com Sun Sep 17 06:02:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Sun, 17 Sep 2006 06:02:00 -0000 Subject: [PATCH] SH: nptl fixups In-Reply-To: <20060913.072847.38716404.kkojima@rr.iij4u.or.jp> References: <20060913.072847.38716404.kkojima@rr.iij4u.or.jp> Message-ID: <450CE509.8080501@redhat.com> Applied. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From drepper@redhat.com Sun Sep 17 07:25:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Sun, 17 Sep 2006 07:25:00 -0000 Subject: [PATCH] Fix ppc{32,64} lrintl/lroundl In-Reply-To: <20060914114459.GF4556@sunsite.mff.cuni.cz> References: <20060914114459.GF4556@sunsite.mff.cuni.cz> Message-ID: <450CF898.6070109@redhat.com> Applied. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From drepper@redhat.com Sun Sep 17 07:26:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Sun, 17 Sep 2006 07:26:00 -0000 Subject: [PATCH] Fix *at symbols in libc_nonshared.a In-Reply-To: <20060914130156.GG4556@sunsite.mff.cuni.cz> References: <20060914130156.GG4556@sunsite.mff.cuni.cz> Message-ID: <450CF8D3.2000707@redhat.com> Applied. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From jakub@redhat.com Mon Sep 18 10:48:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 18 Sep 2006 10:48:00 -0000 Subject: [PATCH] Fix 2 NPTL testcases Message-ID: <20060918104847.GN4556@sunsite.mff.cuni.cz> Hi! tst-kill4 does something apps generally shouldn't do - it relies on the thread descriptor to be put into stack cache and not being immediately freed, unfortunately if the stack size is larger than the limit for stack cache, it is freed immediately and the stack size is determined from current ulimit -s. This test kept crashing on ia64 for a while, but can be reproduced e.g. on ppc32 with ulimit -s 80000. On IA-64 with its larger page size, writing 100000 bytes into a pipe succeeds in contemporary kernels, even when nobody reads anything from the other pipe's end. This patch changes it to loop, so it will eventually block. 2006-09-18 Jakub Jelinek * tst-kill4.c (do_test): Explicitly set tf thread's stack size. * tst-cancel2.c (tf): Loop as long as something was written. --- libc/nptl/tst-kill4.c.jj 2003-02-21 21:27:54.000000000 +0100 +++ libc/nptl/tst-kill4.c 2006-09-18 12:32:48.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2003. @@ -35,13 +35,30 @@ tf (void *a) int do_test (void) { + pthread_attr_t at; + if (pthread_attr_init (&at) != 0) + { + puts ("attr_create failed"); + exit (1); + } + + /* Limit thread stack size, because if it is too large, pthread_join + will free it immediately rather than put it into stack cache. */ + if (pthread_attr_setstacksize (&at, 2 * 1024 * 1024) != 0) + { + puts ("setstacksize failed"); + exit (1); + } + pthread_t th; - if (pthread_create (&th, NULL, tf, NULL) != 0) + if (pthread_create (&th, &at, tf, NULL) != 0) { puts ("create failed"); exit (1); } + pthread_attr_destroy (&at); + if (pthread_join (th, NULL) != 0) { puts ("join failed"); --- libc/nptl/tst-cancel2.c.jj 2002-11-26 23:49:53.000000000 +0100 +++ libc/nptl/tst-cancel2.c 2006-09-18 12:33:53.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -33,11 +33,7 @@ tf (void *arg) write blocks. */ char buf[100000]; - if (write (fd[1], buf, sizeof (buf)) == sizeof (buf)) - { - puts ("write succeeded"); - return (void *) 1l; - } + while (write (fd[1], buf, sizeof (buf)) > 0); return (void *) 42l; } Jakub From drepper@redhat.com Mon Sep 18 13:42:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 18 Sep 2006 13:42:00 -0000 Subject: [PATCH] Fix 2 NPTL testcases In-Reply-To: <20060918104847.GN4556@sunsite.mff.cuni.cz> References: <20060918104847.GN4556@sunsite.mff.cuni.cz> Message-ID: <450EA25F.2050003@redhat.com> Applied. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From jakub@redhat.com Tue Sep 19 16:59:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 19 Sep 2006 16:59:00 -0000 Subject: [PATCH] Fix dl-cache AT_PLATFORM handling Message-ID: <20060919165945.GO4556@sunsite.mff.cuni.cz> Hi! If kernel doesn't provide any AT_PLATFORM in auxv on targets which support it, we should reject any libraries with non-zero _DL_HWCAP_PLATFORM bits (i.e. any platform optimized libs), rather than accepting them all. Otherwise we could say load power5 optimized lib on power4 when using ld.so.cache (for path searches for libraries ld.so was doing the right thing already before). 2006-09-19 Jakub Jelinek * elf/dl-cache.c (HWCAP_CHECK): If _DL_PLATFORMS_COUNT, but platform == -1, reject any libs with non-zero _DL_HWCAP_PLATFORM bits. --- libc/elf/dl-cache.c.jj 2005-12-14 09:34:10.000000000 +0100 +++ libc/elf/dl-cache.c 2006-09-19 18:54:32.000000000 +0200 @@ -1,5 +1,5 @@ /* Support for reading /etc/ld.so.cache files written by Linux ldconfig. - Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1996-2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -264,7 +264,7 @@ _dl_load_cache_lookup (const char *name) #define HWCAP_CHECK \ if (GLRO(dl_osversion) && lib->osversion > GLRO(dl_osversion)) \ continue; \ - if (_DL_PLATFORMS_COUNT && platform != -1 \ + if (_DL_PLATFORMS_COUNT \ && (lib->hwcap & _DL_HWCAP_PLATFORM) != 0 \ && (lib->hwcap & _DL_HWCAP_PLATFORM) != platform) \ continue; \ Jakub From schwidefsky@de.ibm.com Wed Sep 20 14:22:00 2006 From: schwidefsky@de.ibm.com (Martin Schwidefsky) Date: Wed, 20 Sep 2006 14:22:00 -0000 Subject: [patch] s390: makecontext trampoline. Message-ID: <20060920142230.GA4587@skybase> Hi, the makecontext function should not use the stack for a trampoline for no good reason. If we ever want to implement non-executable-stack this will bite us. -- blue skies, Martin. Martin Schwidefsky Linux for zSeries Development & Services IBM Deutschland Entwicklung GmbH "Reality continues to ruin my life." - Calvin. --- 2006-09-20 Martin Schwidefsky * sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c (__makecontext): Cast sp to unsigned long to avoid compiler warning. (__makecontext): Use __makecontext_ret function instead of a trampoline on the stack. (__makecontext_ret): New function. * sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c: Likewise. diff -urpN libc/sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c libc-s390/sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c --- libc/sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c 2001-07-06 06:56:19.000000000 +0200 +++ libc-s390/sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c 2006-08-25 14:38:22.000000000 +0200 @@ -37,8 +37,6 @@ +-----------------------+ n | overflow parameters | 96 +-----------------------+ - 8 | trampoline | 96+n - +-----------------------+ The registers are set up like this: %r2-%r6: parameters 1 to 5 %r7 : (*func) pointer @@ -55,18 +53,16 @@ void __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) { + extern void __makecontext_ret (void); unsigned long *sp; va_list ap; int i; - sp = (long *) (((long) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size) & -8L); - - /* Setup the trampoline. */ - *--sp = 0x07f90000; - *--sp = 0x0de71828; + sp = (unsigned long *) (((unsigned long) ucp->uc_stack.ss_sp + + ucp->uc_stack.ss_size) & -8L); /* Set the return address to trampoline. */ - ucp->uc_mcontext.gregs[14] = (long) sp; + ucp->uc_mcontext.gregs[14] = (long) __makecontext_ret; /* Set register parameters. */ va_start (ap, argc); @@ -98,4 +94,12 @@ __makecontext (ucontext_t *ucp, void (*f ucp->uc_mcontext.gregs[15] = (long) sp; } +asm(".text\n" + ".type __makecontext_ret,@function\n" + "__makecontext_ret:\n" + " basr %r14,%r7\n" + " lr %r2,%r8\n" + " br %r9\n" + ".size __makecontext_ret, .-__makecontext_ret"); + weak_alias (__makecontext, makecontext) diff -urpN libc/sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c libc-s390/sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c --- libc/sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c 2001-07-06 06:56:20.000000000 +0200 +++ libc-s390/sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c 2006-08-25 14:38:27.000000000 +0200 @@ -37,8 +37,6 @@ +-----------------------+ n | overflow parameters | 160 +-----------------------+ - 8 | trampoline | 160+n - +-----------------------+ The registers are set up like this: %r2-%r6: parameters 1 to 5 %r7 : (*func) pointer @@ -55,17 +53,16 @@ void __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) { + extern void __makecontext_ret (void); unsigned long *sp; va_list ap; int i; - sp = (long *) (((long) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size) & -8L); - - /* Setup the trampoline. */ - *--sp = 0x0de7b904002807f9; + sp = (unsigned long *) (((unsigned long) ucp->uc_stack.ss_sp + + ucp->uc_stack.ss_size) & -8L); /* Set the return address to trampoline. */ - ucp->uc_mcontext.gregs[14] = (long) sp; + ucp->uc_mcontext.gregs[14] = (long) __makecontext_ret; /* Set register parameters. */ va_start (ap, argc); @@ -97,4 +94,12 @@ __makecontext (ucontext_t *ucp, void (*f ucp->uc_mcontext.gregs[15] = (long) sp; } +asm(".text\n" + ".type __makecontext_ret,@function\n" + "__makecontext_ret:\n" + " basr %r14,%r7\n" + " lgr %r2,%r8\n" + " br %r9\n" + ".size __makecontext_ret, .-__makecontext_ret"); + weak_alias (__makecontext, makecontext) From drepper@redhat.com Wed Sep 20 14:30:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 20 Sep 2006 14:30:00 -0000 Subject: [patch] s390: makecontext trampoline. In-Reply-To: <20060920142230.GA4587@skybase> References: <20060920142230.GA4587@skybase> Message-ID: <451150C2.7000905@redhat.com> Applied. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From drepper@redhat.com Wed Sep 20 17:12:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 20 Sep 2006 17:12:00 -0000 Subject: glibc 2.5 on Sep 29 Message-ID: <4511767F.4040008@redhat.com> glibc 2.5 will be released on Sep 29. Just an advance warning. I'll make no test releases, every Fedora rawhide build qualifies as that and is much more effective. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From aj@suse.de Wed Sep 20 19:00:00 2006 From: aj@suse.de (Andreas Jaeger) Date: Wed, 20 Sep 2006 19:00:00 -0000 Subject: Fix failure in math/test-ldouble.out Message-ID: This fixes: testing long double (without inline functions) Failure: Test: lrint_upward (281474976710656.025) == 28147497671065 Result: is: 281474976710656 should be: 28147497671065 Ok to commit? Andreas 2006-09-20 Andreas Jaeger * math/libm-test.inc (lrint_test_upward): Fix typo. ============================================================ Index: math/libm-test.inc --- math/libm-test.inc 20 Sep 2006 17:12:34 -0000 1.72 +++ math/libm-test.inc 20 Sep 2006 18:58:18 -0000 @@ -3421,7 +3421,7 @@ lrint_test_upward (void) TEST_f_l (lrint, 1071930.0008, 1071931); TEST_f_l (lrint, 1073741824.01, 1073741825); # if LONG_MAX > 281474976710656 && defined (TEST_LDOUBLE) - TEST_f_l (lrint, 281474976710656.025, 28147497671065); + TEST_f_l (lrint, 281474976710656.025, 281474976710656); # endif #endif } -- Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj/ SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From drepper@redhat.com Wed Sep 20 19:06:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 20 Sep 2006 19:06:00 -0000 Subject: Fix failure in math/test-ldouble.out In-Reply-To: References: Message-ID: <4511917D.9070202@redhat.com> Andreas Jaeger wrote: > Ok to commit? Yes. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From munroesj@us.ibm.com Wed Sep 20 19:34:00 2006 From: munroesj@us.ibm.com (Steven Munroe) Date: Wed, 20 Sep 2006 19:34:00 -0000 Subject: glibc 2.5 on Sep 29 In-Reply-To: <4511767F.4040008@redhat.com> References: <4511767F.4040008@redhat.com> Message-ID: <45119932.8030407@us.ibm.com> Ulrich Drepper wrote: >glibc 2.5 will be released on Sep 29. Just an advance warning. I'll >make no test releases, every Fedora rawhide build qualifies as that and >is much more effective. > > What new/changed ABI does 2.5 represent? From drepper@redhat.com Wed Sep 20 19:53:00 2006 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 20 Sep 2006 19:53:00 -0000 Subject: glibc 2.5 on Sep 29 In-Reply-To: <45119932.8030407@us.ibm.com> References: <4511767F.4040008@redhat.com> <45119932.8030407@us.ibm.com> Message-ID: <45119C4C.9090501@redhat.com> Steven Munroe wrote: > What new/changed ABI does 2.5 represent? This is a question which the NEWS file already answers. -- ? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: From jakub@redhat.com Wed Sep 20 21:36:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Wed, 20 Sep 2006 21:36:00 -0000 Subject: [PATCH] Fix spelling errors in error messages Message-ID: <20060920213635.GQ4556@sunsite.mff.cuni.cz> Hi! BZ#3137 reports some spelling errors and this patch also updates the *.po{t,} files, so that it doesn't create translation regressions. 2006-09-20 Jakub Jelinek * po/libc.pot: Regenerated. * po/be.po: Updated. * po/ca.po: Likewise. * po/cs.po: Likewise. * po/da.po: Likewise. * po/de.po: Likewise. * po/el.po: Likewise. * po/en_GB.po: Likewise. * po/es.po: Likewise. * po/fi.po: Likewise. * po/fr.po: Likewise. * po/gl.po: Likewise. * po/hr.po: Likewise. * po/hu.po: Likewise. * po/ja.po: Likewise. * po/ko.po: Likewise. * po/nb.po: Likewise. * po/nl.po: Likewise. * po/pl.po: Likewise. * po/pt_BR.po: Likewise. * po/ru.po: Likewise. * po/rw.po: Likewise. * po/sk.po: Likewise. * po/sv.po: Likewise. * po/tr.po: Likewise. * po/zh_CN.po: Likewise. * po/zh_TW.po: Likewise. [BZ #3137] * iconv/iconv_prog.c (main): Fix spelling in error message. * iconv/iconvconfig.c (main): Likewise. * locale/programs/ld-collate.c (handle_ellipsis): Likewise. * locale/programs/ld-ctype.c (charclass_symbolic_ellipsis): Likewise. * locale/programs/localedef.c (main): Likewise. * locale/programs/repertoire.c (repertoire_read): Likewise. * timezone/zdump.c (main): Likewise. * nscd/connections.c (handle_request): Fix spelling in log message. Patch by Malcolm Parsons . --- libc/nscd/connections.c.jj 2006-06-21 17:36:39.000000000 +0200 +++ libc/nscd/connections.c 2006-09-20 23:13:12.000000000 +0200 @@ -1079,7 +1079,7 @@ cannot handle old request version %d; cu { char buf[256]; - dbg_log (_("error getting callers id: %s"), + dbg_log (_("error getting caller's id: %s"), strerror_r (errno, buf, sizeof (buf))); break; } --- libc/locale/programs/ld-collate.c.jj 2006-09-11 08:56:51.000000000 +0200 +++ libc/locale/programs/ld-collate.c 2006-09-20 23:13:12.000000000 +0200 @@ -1295,7 +1295,7 @@ order for `%.*s' already defined at %s:% { invalid_range: lr_error (ldfile, _("\ -`%s' and `%.*s' are no valid names for symbolic range"), +`%s' and `%.*s' are not valid names for symbolic range"), startp->name, (int) lento, endp->name); return; } --- libc/locale/programs/ld-ctype.c.jj 2006-08-30 17:20:41.000000000 +0200 +++ libc/locale/programs/ld-ctype.c 2006-09-20 23:13:12.000000000 +0200 @@ -1472,7 +1472,7 @@ charclass_symbolic_ellipsis (struct line { invalid_range: lr_error (ldfile, - _("`%s' and `%.*s' are no valid names for symbolic range"), + _("`%s' and `%.*s' are not valid names for symbolic range"), last_str, (int) now->val.str.lenmb, nowstr); return; } --- libc/locale/programs/localedef.c.jj 2006-08-22 10:42:29.000000000 +0200 +++ libc/locale/programs/localedef.c 2006-09-20 23:13:12.000000000 +0200 @@ -288,7 +288,7 @@ cannot write output files to `%s'"), out } else WITH_CUR_LOCALE (error (4, 0, _("\ -no output file produced because warning were issued"))); +no output file produced because warnings were issued"))); /* This exit status is prescribed by POSIX.2 4.35.7. */ exit (error_message_count != 0); --- libc/locale/programs/repertoire.c.jj 2005-12-30 09:04:02.000000000 +0100 +++ libc/locale/programs/repertoire.c 2006-09-20 23:13:12.000000000 +0200 @@ -328,7 +328,7 @@ argument to <%s> must be a single charac if (tsearch (result, &known, &repertoire_compare) == NULL) /* Something went wrong. */ - WITH_CUR_LOCALE (error (0, errno, _("cannot safe new repertoire map"))); + WITH_CUR_LOCALE (error (0, errno, _("cannot save new repertoire map"))); return result; } --- libc/timezone/zdump.c.jj 2006-01-11 16:55:32.000000000 +0100 +++ libc/timezone/zdump.c 2006-09-20 23:13:12.000000000 +0200 @@ -389,7 +389,7 @@ _("%s: usage is %s [ --version ] [ -v ] } if (fflush(stdout) || ferror(stdout)) { (void) fprintf(stderr, "%s: ", progname); - (void) perror(_("Error writing standard output")); + (void) perror(_("Error writing to standard output")); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); --- libc/po/be.po.jj 2003-11-04 19:33:14.000000000 +0100 +++ libc/po/be.po 2006-09-20 23:23:20.000000000 +0200 @@ -260,7 +260,7 @@ msgstr "???????????????????????????????????? ?????????????????????????? #: iconv/iconv_prog.c:241 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "" #: iconv/iconv_prog.c:246 @@ -352,7 +352,7 @@ msgid "Prefix used for all file accesses msgstr "" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "" #: iconv/iconvconfig.c:405 @@ -727,7 +727,7 @@ msgstr "" #: locale/programs/ld-collate.c:1287 locale/programs/ld-ctype.c:1467 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "" #: locale/programs/ld-collate.c:1333 locale/programs/ld-collate.c:3712 @@ -1620,7 +1620,7 @@ msgid "no or value g msgstr "" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "" #: locale/programs/repertoire.c:343 @@ -3028,7 +3028,7 @@ msgid "%s: usage is %s [ -v ] [ -c cutof msgstr "" #: timezone/zdump.c:268 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "???????????????????????????? ???????????????????????? ???????????????????????????????????????????????? ????????????????????????" #: timezone/zic.c:365 @@ -5047,7 +5047,7 @@ msgstr "???????????????????????????????????? ?????????????????????????? #: nscd/connections.c:405 nscd/connections.c:499 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "" #: nscd/connections.c:471 --- libc/po/ca.po.jj 2004-08-14 18:18:36.000000000 +0200 +++ libc/po/ca.po 2006-09-20 23:23:20.000000000 +0200 @@ -268,7 +268,7 @@ msgstr "no s'ha pogut obrir el fitxer d' #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "no es suporta la conversi???? de ????%s???? ni a ????%s????" #: iconv/iconv_prog.c:248 @@ -373,7 +373,7 @@ msgid "Prefix used for all file accesses msgstr "Prefix a usar en tots els accessos a fitxer." #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "no s'ha generat el fitxer d'eixida perqu???? s'han produ????t avisos" #: iconv/iconvconfig.c:405 @@ -760,7 +760,7 @@ msgstr "%s: un rang simb????lic amb e? ??lip #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "????%s???? i ????%.*s???? no s????n noms v????lids de rangs simb????lics" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1695,7 +1695,7 @@ msgstr "no s'ha especificat un valor or value g msgstr "ingen - eller -v??rdi givet" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "kan ikke gemme ny repertoiretabel" #: locale/programs/repertoire.c:343 @@ -3051,7 +3051,7 @@ msgid "%s: usage is %s [ -v ] [ -c cutof msgstr "%s: brug er %s [ -v ] [ -c gr??nse ] zonenavn ...\n" #: timezone/zdump.c:268 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Fejl ved skrivning til standard ud" #: timezone/zic.c:365 @@ -5073,7 +5073,7 @@ msgstr "kan ikke udskrive resultat: '%s' #: nscd/connections.c:405 nscd/connections.c:499 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "fejl ved foresp??rgsel p?? opkaldets id: %s" #: nscd/connections.c:471 --- libc/po/de.po.jj 2004-12-14 10:29:32.000000000 +0100 +++ libc/po/de.po 2006-09-20 23:23:20.000000000 +0200 @@ -304,7 +304,7 @@ msgstr "Kann die Ausgabedatei nicht ????ff #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "Konvertierung von ????%s???? nach ????%s???? wird nicht unterst????tzt" #: iconv/iconv_prog.c:248 @@ -406,7 +406,7 @@ msgid "Prefix used for all file accesses msgstr "Prefix f????r jeden Dateizugriff" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "Es wurde keine Ausgabedatei erzeugt, weil Warnungen ausgegeben wurden" #: iconv/iconvconfig.c:405 @@ -787,7 +787,7 @@ msgstr "%s: Das Symbol f????r Auslassungen #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "????%s???? und ????%.*s???? sind ung????ltige Namen f????r eine symbolischen Zeichenbereich" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1716,7 +1716,7 @@ msgid "no or value g msgstr "Kein oder Wert angegeben" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "Kann die neue ????repertoire????-Map ????%s???? nicht speichern" #: locale/programs/repertoire.c:343 @@ -3149,7 +3149,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: Syntax: %s [ --version ] [ -v ] [ -c cutoff ] Zonenname ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Fehler beim Schreiben zur Standardausgabe" #: timezone/zic.c:361 @@ -5208,7 +5208,7 @@ msgstr "Das Ergebnis kann nicht geschrie #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "Fehler beim Feststellen der Identit????t des Aufrufers: %s" #: nscd/connections.c:485 --- libc/po/el.po.jj 2001-05-23 01:27:05.000000000 +0200 +++ libc/po/el.po 2006-09-20 23:23:20.000000000 +0200 @@ -3801,7 +3801,7 @@ msgstr "?? ?????????????? `%1$s' ?????? ?????????????????? ?? #: locale/programs/ld-collate.c:1268 locale/programs/ld-ctype.c:1454 #, fuzzy, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "???? <%s> ?????? <%s> ?????????? ???? ???????????????? ?????????????? ?????? ????????" #: elf/sprof.c:762 @@ -4118,7 +4118,7 @@ msgstr "?????????????? ?? ???????????????? ?????????????????? ?????? #: locale/programs/repertoire.c:331 #, fuzzy -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "???????????????? ?????????????????? ???????????? ?????????????????????? `%s'" #: elf/dl-load.c:776 @@ -4329,7 +4329,7 @@ msgstr "???????????????????????? ?????? ???? ???????????? ?????????? #: nscd/connections.c:361 nscd/connections.c:453 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "???????????? ?????? ???????? ?????? ???????????????????? ?????????? ?????? ????????????: %s" #: locale/programs/ld-collate.c:3013 @@ -4771,7 +4771,7 @@ msgid "no output digits defined and none msgstr "" #: locale/programs/localedef.c:236 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "?????? ?????????????????? ???????????? ???????????? ???????????? ?????????????????? ??????????????????????????????" #: locale/programs/charmap.c:488 locale/programs/charmap.c:668 locale/programs/charmap.c:764 @@ -5587,7 +5587,7 @@ msgstr "yp_update: ???????????????? ?????????? ???????????? #~ msgid "while writing database file" #~ msgstr "???????? ?????? ?????????????? ?????????????? ???????????? ??????????????????" -#~ msgid "%s: Error writing standard output " +#~ msgid "%s: Error writing to standard output " #~ msgstr "%s: ???????????? ???????? ?????? ?????????????? ???????? ???????????????? ?????????? " #~ msgid "Cputime limit exceeded" --- libc/po/en_GB.po.jj 2000-07-03 22:42:06.000000000 +0200 +++ libc/po/en_GB.po 2006-09-20 23:23:20.000000000 +0200 @@ -3768,7 +3768,7 @@ msgstr "" #: locale/programs/ld-collate.c:1184 locale/programs/ld-ctype.c:1263 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "" #: elf/sprof.c:763 @@ -3988,7 +3988,7 @@ msgid "cannot read statistics data" msgstr "" #: locale/programs/repertoire.c:331 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "" #: nscd/cache.c:150 nscd/connections.c:151 @@ -4188,7 +4188,7 @@ msgstr "" #: nscd/connections.c:360 nscd/connections.c:451 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "" #: locale/programs/ld-collate.c:2787 @@ -4600,7 +4600,7 @@ msgid "" msgstr "" #: locale/programs/localedef.c:229 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "" #: locale/programs/charmap.c:438 locale/programs/charmap.c:589 --- libc/po/es.po.jj 2005-01-08 16:50:24.000000000 +0100 +++ libc/po/es.po 2006-09-20 23:23:20.000000000 +0200 @@ -302,7 +302,7 @@ msgstr "no se puede abrir el fichero de #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "no se admite la conversi??n de `%s' a `%s'" #: iconv/iconv_prog.c:248 @@ -411,7 +411,7 @@ msgid "Prefix used for all file accesses msgstr "Prefijo utilizado para todos los accesos a ficheros" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "no se ha producido ning??n fichero de salida debido a la existencia de avisos" #: iconv/iconvconfig.c:405 @@ -798,7 +798,7 @@ msgstr "%s: el rango simb??lico de la eli #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' y `%.*s' no son nombres v??lidos para el rango simb??lico" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1748,7 +1748,7 @@ msgstr "no se ha dado ning??n valor \"%s\" ei ole tuettu" #: iconv/iconv_prog.c:246 @@ -376,7 +376,7 @@ msgid "Prefix used for all file accesses msgstr "Jokaisen tiedoston k??sittelyss?? k??ytett??v?? etuliite" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "tulostiedostoa ei tuotettu varoituksen takia" #: iconv/iconvconfig.c:405 @@ -751,7 +751,7 @@ msgstr "%s: symbolisen v??lin sanankatkai #: locale/programs/ld-collate.c:1287 locale/programs/ld-ctype.c:1467 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "\"%s\" ja \"%.*s\" eiv??t ole kelvollisia nimi?? symboliselle v??lille" #: locale/programs/ld-collate.c:1333 locale/programs/ld-collate.c:3712 @@ -1652,7 +1652,7 @@ msgid "no or value g msgstr "ei - tai -arvoa annettu" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "uutta valikoimakarttaa ei voi turvata" #: locale/programs/repertoire.c:343 @@ -3065,7 +3065,7 @@ msgid "%s: usage is %s [ -v ] [ -c cutof msgstr "%s: k??ytt??: %s [ -v ] [ -c katkaisu ] vy??hykenimi ...\n" #: timezone/zdump.c:268 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Virhe kirjoitettaessa vakiotulosteeseen" #: timezone/zic.c:365 @@ -5086,7 +5086,7 @@ msgstr "tulosta ei voi kirjoittaa: %s" #: nscd/connections.c:405 nscd/connections.c:499 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "virhe kutsujan tunnisteen hakemisessa: %s" #: nscd/connections.c:471 --- libc/po/fr.po.jj 2004-08-14 18:18:37.000000000 +0200 +++ libc/po/fr.po 2006-09-20 23:23:21.000000000 +0200 @@ -260,7 +260,7 @@ msgstr "Ne peut ouvrir le fichier de sor #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "conversions de ?? %s ?? et de , vers ?? %s ?? ne sont pas support??es" #: iconv/iconv_prog.c:248 @@ -362,7 +362,7 @@ msgid "Prefix used for all file accesses msgstr "Pr??fixe utilis?? pour tous les acc??s fichiers" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "Aucun fichier de sortie g??n??r?? en raison d'un avertissement d??j?? ??mis" #: iconv/iconvconfig.c:405 @@ -741,7 +741,7 @@ msgstr "%s: plage de l'ellipse symboliqu #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "?? %s ?? et ?? %.*s ?? sont des noms invalides pour un intervalle symbolique." #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1664,7 +1664,7 @@ msgid "no or value g msgstr "Aucune valeur ou fournie" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "Ne peut sauvegarder la nouvelle table des r??pertoires" #: locale/programs/repertoire.c:343 @@ -3087,7 +3087,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: usage est %s [ --version ] [ -v ] [ -c seuil ] nom_du_fuseau_horaire ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "ERREUR d'??criture sur la sortie standard" #: timezone/zic.c:361 @@ -5131,7 +5131,7 @@ msgstr "Ne peut ??crire les r??sultats: ?? #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "erreur lors de la recherche de l'identificateur de l'appelant: %s" #: nscd/connections.c:485 --- libc/po/gl.po.jj 2003-03-03 20:35:16.000000000 +0100 +++ libc/po/gl.po 2006-09-20 23:23:21.000000000 +0200 @@ -259,7 +259,7 @@ msgstr "non se pode abri-lo ficheiro de #: iconv/iconv_prog.c:241 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "as conversi??ns de `%s' e a `%s' non est??n soportadas" #: iconv/iconv_prog.c:246 @@ -360,7 +360,7 @@ msgid "Prefix used for all file accesses msgstr "Prefixo a empregar para t??dolos accesos a ficheiro" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "non se produc??u un ficheiro de sa??da porque se deron avisos" #: iconv/iconvconfig.c:405 @@ -735,7 +735,7 @@ msgstr "%s: os puntos suspensivos do ran #: locale/programs/ld-collate.c:1287 locale/programs/ld-ctype.c:1467 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' e `%.*s' non son nomes v??lidos para o rango simb??lico" #: locale/programs/ld-collate.c:1333 locale/programs/ld-collate.c:3712 @@ -1636,7 +1636,7 @@ msgid "no or value g msgstr "non se deu un valor ou " #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "non se pode grava-lo novo mapa de repertorios" #: locale/programs/repertoire.c:343 @@ -3049,7 +3049,7 @@ msgid "%s: usage is %s [ -v ] [ -c cutof msgstr "%s: ??sase %s [ -v ] [ -c corte ] nomezona ...\n" #: timezone/zdump.c:268 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Erro ao escribir na sa??da est??ndar" #: timezone/zic.c:365 @@ -5070,7 +5070,7 @@ msgstr "non se pode escribi-lo resultado #: nscd/connections.c:405 nscd/connections.c:499 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "erro ao obte-lo identificador do chamante: %s" #: nscd/connections.c:471 --- libc/po/hr.po.jj 2002-06-21 00:37:34.000000000 +0200 +++ libc/po/hr.po 2006-09-20 23:23:21.000000000 +0200 @@ -1870,7 +1870,7 @@ msgid "Error while talking to callback p msgstr "" #: timezone/zdump.c:268 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "" #: inet/ruserpass.c:184 @@ -3828,7 +3828,7 @@ msgstr "`%1$s' definicija ne zavr? ??ava s #: locale/programs/ld-collate.c:1281 locale/programs/ld-ctype.c:1455 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "" #: elf/sprof.c:762 @@ -4117,7 +4117,7 @@ msgid "cannot read statistics data" msgstr "ne moogu pro????itati statistike" #: locale/programs/repertoire.c:331 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "" #: elf/dl-load.c:784 @@ -4339,7 +4339,7 @@ msgstr "enkoding izvornog teksta" #: nscd/connections.c:366 nscd/connections.c:460 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "gre? ??ka pri dohvatu broja pozivatelja: %s" #: locale/programs/ld-collate.c:3032 @@ -4777,7 +4777,7 @@ msgid "no output digits defined and none msgstr "" #: iconv/iconvconfig.c:308 locale/programs/localedef.c:236 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "" #: locale/programs/charmap.c:493 locale/programs/charmap.c:673 locale/programs/charmap.c:769 locale/programs/repertoire.c:231 --- libc/po/hu.po.jj 2002-09-16 19:33:32.000000000 +0200 +++ libc/po/hu.po 2006-09-20 23:23:21.000000000 +0200 @@ -1968,7 +1968,7 @@ msgid "Error while talking to callback p msgstr "Hiba am??g kommunik??ltam a visszah??v?? folyamattal" #: timezone/zdump.c:268 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Hiba az alap??rtelmezett kimenetre ??r??s sor??n" #: inet/ruserpass.c:184 @@ -4025,7 +4025,7 @@ msgstr "a `%1$s' meghat??roz??s nem v??gz??d #: locale/programs/ld-collate.c:1281 locale/programs/ld-ctype.c:1455 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "a `%s' ??s a `%.*s' nem ??rv??nyesek a szimbolikus tartom??nyban" #: elf/sprof.c:762 @@ -4318,7 +4318,7 @@ msgid "cannot read statistics data" msgstr "nem lehet olvasni a statisztikai adatokat" #: locale/programs/repertoire.c:331 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "nem biztons??gos ??j reperto??r" #: elf/dl-load.c:784 @@ -4540,7 +4540,7 @@ msgstr "az eredeti sz??veg k??dol??sa" #: nscd/connections.c:366 nscd/connections.c:460 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "hiba a h??v?? azonos??t??s sor??n: %s" #: locale/programs/ld-collate.c:3032 @@ -4984,7 +4984,7 @@ msgid "no output digits defined and none msgstr "nincs kimeneti sz??m meghat??rozva ??s nincs szabv??nyos n??v a karakterk??szletben" #: iconv/iconvconfig.c:308 locale/programs/localedef.c:236 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "nem j??tt l??tre kimeneti f??jl, mert figyelmeztet??st kaptam" #: locale/programs/charmap.c:493 locale/programs/charmap.c:673 --- libc/po/ja.po.jj 2004-12-21 14:33:32.000000000 +0100 +++ libc/po/ja.po 2006-09-20 23:23:21.000000000 +0200 @@ -259,7 +259,7 @@ msgstr "????????????????????????????????????????????????" #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "`%s'????????????????????????`%s'????????????????????????????????????????????????????????????????????????????????" #: iconv/iconv_prog.c:248 @@ -362,7 +362,7 @@ msgid "Prefix used for all file accesses msgstr "????????????????????????????????????????????????????????????????????????????????????????????????" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "????????????????????????????????????????????????????????????????????????????????????????????????" #: iconv/iconvconfig.c:405 @@ -737,7 +737,7 @@ msgstr "%s: ????????????????????????????????????????????`order #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' ???? `%.*s' ????????????????????????????????????????????????????????????????????????" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1654,7 +1654,7 @@ msgid "no or value g msgstr " ???????????? ????????????????????????????????????????????????" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "????????????????????????????????????????????????????????????????????????????????????" #: locale/programs/repertoire.c:343 @@ -3075,7 +3075,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: ???????????? %s [ --version ] [ -v ] [ -c cutoff ] zonename ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "????????????????????????????????????????????????????????" #: timezone/zic.c:361 @@ -5112,7 +5112,7 @@ msgstr "????????????????????????????????????????: %s" #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "????????????????ID????????????????????????????: %s" #: nscd/connections.c:485 --- libc/po/ko.po.jj 2004-08-14 18:18:37.000000000 +0200 +++ libc/po/ko.po 2006-09-20 23:23:21.000000000 +0200 @@ -260,7 +260,7 @@ msgstr "???????? ???????????? ???? ???? ????????????????" #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "`%s'???????? ???????? ???? `%s'???????? ???????????? ???????????????? ????????????????" #: iconv/iconv_prog.c:248 @@ -361,7 +361,7 @@ msgid "Prefix used for all file accesses msgstr "???????? ???????? ???????????? ???????????????? ????????????" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "???????????? ???????????????????? ???????????? ???????? ???????????? ???????????????????? ????????????????????" #: iconv/iconvconfig.c:405 @@ -739,7 +739,7 @@ msgstr "%s: ???????? ???????? ???????????????????? `order_ #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s'????(????) `%.*s'????(????) ???????? ???????????? ???????????????????? ???????????? ????????????????" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1667,7 +1667,7 @@ msgstr " ???????? ???????? ???? # ????????: safe???? ???????????? ??????????? #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "???????????? ????????? ?????? ???????? ???????????? ???????? ???? ????????????????" #: locale/programs/repertoire.c:343 @@ -3096,7 +3096,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: ???????????????? %s [ --version ] [ -v ] [ -c ???????? ] ???????????? ... ????????????\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "???????? ???????????? ???????? ???? ????????" #: timezone/zic.c:361 @@ -5131,7 +5131,7 @@ msgstr "???????????? ???? ???? ????????????????: %s" #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "???????????????? ID???? ???????????? ????????: %s" #: nscd/connections.c:485 --- libc/po/nb.po.jj 2004-03-08 09:26:40.000000000 +0100 +++ libc/po/nb.po 2006-09-20 23:23:21.000000000 +0200 @@ -264,7 +264,7 @@ msgstr "kan ikke ??pne utfil" #: iconv/iconv_prog.c:241 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "konvertering fra ??%s?? til ??%s?? er ikke st??ttet" #: iconv/iconv_prog.c:246 @@ -366,7 +366,7 @@ msgid "Prefix used for all file accesses msgstr "Prefiks brukt for all filaksessering" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "p?? grunn av advarsler ble ingen utfil opprettet" #: iconv/iconvconfig.c:405 @@ -742,7 +742,7 @@ msgstr "%s: symbolsk omr??de-ellipse m?? i #: locale/programs/ld-collate.c:1287 locale/programs/ld-ctype.c:1467 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "??%s?? og ??%.*s?? er ulovlige navn for symbolsk omr??de" #: locale/programs/ld-collate.c:1333 locale/programs/ld-collate.c:3712 @@ -1662,7 +1662,7 @@ msgstr "ingen - eller #: locale/programs/repertoire.c:332 #, fuzzy -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "kan ikke lese ferdighetskart ??%s??" #: locale/programs/repertoire.c:343 @@ -3148,7 +3148,7 @@ msgstr "%s: bruk er %s [ -v ] [ -c grens #: timezone/zdump.c:268 #, fuzzy -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "%s: Feil ved skriving til standard ut " #: timezone/zic.c:365 @@ -5208,7 +5208,7 @@ msgstr "kan ikke skrive ut resultat: ??%s #: nscd/connections.c:405 nscd/connections.c:499 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "" #: nscd/connections.c:471 --- libc/po/nl.po.jj 2004-08-14 18:18:37.000000000 +0200 +++ libc/po/nl.po 2006-09-20 23:23:21.000000000 +0200 @@ -261,7 +261,7 @@ msgstr "kan uitvoerbestand niet openen" #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "conversie van `%s' en naar `%s' wordt niet ondersteund" #: iconv/iconv_prog.c:248 @@ -367,7 +367,7 @@ msgid "Prefix used for all file accesses msgstr "Voorvoegsel gebruikt voor alle bestandstoegang" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "geen uitvoerbestand gemaakt omdat waarschuwing is gegeven" #: iconv/iconvconfig.c:405 @@ -742,7 +742,7 @@ msgstr "%s: weglatingsteken van symbolis #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' en `%.*s' zijn geen geldige namen voor een symbolisch bereik" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1659,7 +1659,7 @@ msgid "no or value g msgstr "geen of waarde gegeven" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "kan nieuwe repertoire afbeelding niet opslaan" #: locale/programs/repertoire.c:343 @@ -3080,7 +3080,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: gebruik is %s [ --version ] [ -v ] [ -c afkapwaarde ] zonenaam ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Fout bij schrijven naar standaard uitvoer" #: timezone/zic.c:361 @@ -5117,7 +5117,7 @@ msgstr "kan resultaat niet schrijven: %s #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "fout bij opvragen ID van aanroeper: %s" #: nscd/connections.c:485 --- libc/po/pl.po.jj 2004-08-14 18:18:37.000000000 +0200 +++ libc/po/pl.po 2006-09-20 23:23:21.000000000 +0200 @@ -261,7 +261,7 @@ msgstr "nie mo??na otworzy?? pliku wyj??cio #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "konwersja z `%s' oraz do `%s' nie jest obs??ugiwana" #: iconv/iconv_prog.c:248 @@ -364,7 +364,7 @@ msgid "Prefix used for all file accesses msgstr "Prefiks u??ywany przy ka??dym dost??pie do pliku" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "nie utworzono pliku wyj??ciowego, poniewa?? wyst??pi??y ostrze??enia" #: iconv/iconvconfig.c:405 @@ -743,7 +743,7 @@ msgstr "%s: wyrzutnia symbolicznego prze #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' i `%.*s' nie s?? poprawnymi nazwami dla symbolicznego przedzia??u" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1662,7 +1662,7 @@ msgid "no or value g msgstr "nie podano ??adnych warto??ci lub " #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "nie mo??na zachowa?? nowej tablicy repertuaru" #: locale/programs/repertoire.c:343 @@ -3086,7 +3086,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: sk??adnia: %s [ --version ] [ -v ] [ -c rok ] nazwa_strefy...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "B????d podczas pisania na standardowe wyj??cie" #: timezone/zic.c:361 @@ -5129,7 +5129,7 @@ msgstr "nie mo??na zapisa?? wyniku: %s" #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "b????d podczas pobierania identyfikator??w wywo??uj??cych: %s" #: nscd/connections.c:485 --- libc/po/pt_BR.po.jj 1999-08-15 17:28:07.000000000 +0200 +++ libc/po/pt_BR.po 2006-09-20 23:23:21.000000000 +0200 @@ -323,7 +323,7 @@ msgstr "%s: Erro escrevendo %s\n" #: timezone/zdump.c:266 #, c-format -msgid "%s: Error writing standard output " +msgid "%s: Error writing to standard output " msgstr "%s: Erro escrevendo para sa??da padr??o " #: timezone/zic.c:841 @@ -3642,7 +3642,7 @@ msgid "no other keyword shall be specifi msgstr "nehuma outra palavra-chave deve ser especificada quando `copy' ?? usado" #: locale/programs/localedef.c:334 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "nenhum arquivo de sa??da foi produzido porque avisos foram emitidos" #: locale/programs/locfile.c:283 locale/programs/locfile.c:301 --- libc/po/ru.po.jj 2005-02-15 11:10:52.000000000 +0100 +++ libc/po/ru.po 2006-09-20 23:23:21.000000000 +0200 @@ -259,7 +259,7 @@ msgstr "??? ???????????????? ?????????????? ???????????????? ???????? #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "????? ?????????????????????? ???? `%s' ?? ?? `%s' ??? ????????? ??????????????????" #: iconv/iconv_prog.c:248 @@ -361,7 +361,7 @@ msgid "Prefix used for all file accesses msgstr "????? ????????, ????????????????? ?????? ?????? ?????????????? ???? ????? ?? ????????????" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "???????????????? ???????? ??? ????????????, ?????????????????? ???????? ????? ????????? ????? ??????" #: iconv/iconvconfig.c:405 @@ -736,7 +736,7 @@ msgstr "%s: ????????? ?????????????????? ?????????????????????? #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' ?? `%.*s' ??? ???????????????? ??? ?????????? ????? ???????? ?????????????????????? ??????????????????" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1649,7 +1649,7 @@ msgid "no or value g msgstr "??? ???????????? ????????? ????? ?????? " #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "" #: locale/programs/repertoire.c:343 @@ -3074,7 +3074,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: ????????????????????????? : %s [ --version ] [ -v ] [ -c cutoff ] ??????-???????? ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "???????????? ???????????? ???? ?????????????????????? ??????????" #: timezone/zic.c:361 @@ -5112,7 +5112,7 @@ msgstr "??? ???????????????? ???????????????? ??? ??????????????: % #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "???????????? ?????? ??????????? ?????? ????? ?????????????????????? ????????????????? ?? ??????????????: %s" #: nscd/connections.c:485 --- libc/po/rw.po.jj 2005-04-28 17:35:34.000000000 +0200 +++ libc/po/rw.po 2006-09-20 23:23:22.000000000 +0200 @@ -302,7 +302,7 @@ msgstr "Gufungura Ibisohoka IDOSIYE" #: iconv/iconv_prog.c:243 #, fuzzy, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "Ihindurangero Bivuye Na Kuri OYA" #: iconv/iconv_prog.c:248 @@ -403,7 +403,7 @@ msgstr "kugirango Byose IDOSIYE" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 #, fuzzy -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "Oya Ibisohoka IDOSIYE Iburira Byasohowe" #: iconv/iconvconfig.c:405 @@ -825,7 +825,7 @@ msgstr "%s:Urutonde OYA ku" #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, fuzzy, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s'Na." #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1823,7 +1823,7 @@ msgstr "Oya Cyangwa Agaciro" #: locale/programs/repertoire.c:332 #, fuzzy -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "Gishya" #: locale/programs/repertoire.c:343 @@ -3440,7 +3440,7 @@ msgstr "%s:Ikoresha: ni Verisiyo v C" #: timezone/zdump.c:269 #, fuzzy -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Bisanzwe Ibisohoka" #: timezone/zic.c:361 @@ -5785,7 +5785,7 @@ msgstr "Kwandika Igisubizo" #: nscd/connections.c:392 nscd/connections.c:514 #, fuzzy, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "Ikosa ID" #: nscd/connections.c:485 --- libc/po/sk.po.jj 2004-08-14 18:18:37.000000000 +0200 +++ libc/po/sk.po 2006-09-20 23:23:22.000000000 +0200 @@ -260,7 +260,7 @@ msgstr "nie je mo? ??n???? otvori? ?? v????stupn #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "konverzie z `%s' a do `%s' nie s???? podporovan????" #: iconv/iconv_prog.c:248 @@ -361,7 +361,7 @@ msgid "Prefix used for all file accesses msgstr "Predpona pou? ??it???? pre v? ??etky pr????stupy k s????borom" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "v????stupn???? s????bor nebol vytvoren???? kv????li v????skytu varovan????" #: iconv/iconvconfig.c:405 @@ -736,7 +736,7 @@ msgstr "%s: pokra????ovanie symbolick????ho #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' a `%.*s' s???? nepr????pustn???? n????zvy pre symbolick???? rozsah" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1653,7 +1653,7 @@ msgid "no or value g msgstr "nezadan???? alebo hodnota" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "nie je mo? ??n???? uchova? ?? mapu reperto????ru" #: locale/programs/repertoire.c:343 @@ -3074,7 +3074,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: pou? ??itie je %s [ --version ] [ -v????] [ -c limit ] meno_z????ny ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Chyba pri z????pise na ? ??tandardn???? v????stup" #: timezone/zic.c:361 @@ -5115,7 +5115,7 @@ msgstr "nie je mo? ??n???? zap????sa? ?? v????sled #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "chyba pri z????skan???? id volaj????ceho: %s" #: nscd/connections.c:485 --- libc/po/sv.po.jj 2004-08-14 18:18:37.000000000 +0200 +++ libc/po/sv.po 2006-09-20 23:23:22.000000000 +0200 @@ -260,7 +260,7 @@ msgstr "kan inte ??ppna utfil" #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "konvertering fr??n \"%s\" och till \"%s\" st??ds ej" #: iconv/iconv_prog.c:248 @@ -364,7 +364,7 @@ msgid "Prefix used for all file accesses msgstr "Prefix att anv??nda f??r alla fil??tkomster" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "ingen utfil skapad p?? grund av varningar" #: iconv/iconvconfig.c:405 @@ -741,7 +741,7 @@ msgstr "%s: symboliskt intervall kan int #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "\"%s\" och \"%.*s\" ??r otill??tna namn f??r symboliskt intervall" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1658,7 +1658,7 @@ msgid "no or value g msgstr "inget eller v??rde angivet" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "kan inte s??kra repertoartabell" #: locale/programs/repertoire.c:343 @@ -3079,7 +3079,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: anv??ndning ??r %s [ --version ] [ -v ] [ -c gr??ns ] zonnamn ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Fel vid skrivning till standard ut" #: timezone/zic.c:361 @@ -5114,7 +5114,7 @@ msgstr "kan inte skriva resultat: %s" #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "kunde inte h??mta anropandes identitet: %s" #: nscd/connections.c:485 --- libc/po/tr.po.jj 2005-03-01 10:34:43.000000000 +0100 +++ libc/po/tr.po 2006-09-20 23:23:22.000000000 +0200 @@ -261,7 +261,7 @@ msgstr "????????kt???? dosyas???? a????????lam????yor" #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "`%s'den ve `%s'e d????n????? ??????m desteklenmiyor" #: iconv/iconv_prog.c:248 @@ -366,7 +366,7 @@ msgid "Prefix used for all file accesses msgstr "T????m dosya eri? ??imlerinde kullan????lan ????nek" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "uyar???? yay????nland????????????ndan ????retilen bir ????????kt???? dosyas???? yok" #: iconv/iconvconfig.c:405 @@ -741,7 +741,7 @@ msgstr "%s: sembolik kapsam elipslerinin #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' ve `%.*s' sembolik kapsam i????in ge????erli isimler de????il" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1658,7 +1658,7 @@ msgid "no or value g msgstr " ya da de????eri verilmeliydi" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "yeni repertuvar e? ??lemin do????rulu????undan emin olunamaz " #: locale/programs/repertoire.c:343 @@ -3084,7 +3084,7 @@ msgstr "" "zamanDilimi????smi ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "Standart ????????kt????ya yazarken hata" #: timezone/zic.c:361 @@ -5122,7 +5122,7 @@ msgstr "sonu???? yaz????lam????yor: %s" #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "????a????r????c???? kimli????i al????n????rken hata: %s" #: nscd/connections.c:485 --- libc/po/zh_CN.po.jj 2003-06-10 18:23:00.000000000 +0200 +++ libc/po/zh_CN.po 2006-09-20 23:23:22.000000000 +0200 @@ -259,7 +259,7 @@ msgstr "????????????????????????????????" #: iconv/iconv_prog.c:241 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "????????????????????%s????????????%s????????????????" #: iconv/iconv_prog.c:246 @@ -351,7 +351,7 @@ msgid "Prefix used for all file accesses msgstr "????????????????????????????????????????????" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "????????????????????????????????????????????????????????" #: iconv/iconvconfig.c:405 @@ -726,7 +726,7 @@ msgstr "" #: locale/programs/ld-collate.c:1287 locale/programs/ld-ctype.c:1467 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "" #: locale/programs/ld-collate.c:1333 locale/programs/ld-collate.c:3712 @@ -1623,7 +1623,7 @@ msgid "no or value g msgstr "???????????????? ???????????????? " #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "" #: locale/programs/repertoire.c:343 @@ -3033,7 +3033,7 @@ msgid "%s: usage is %s [ -v ] [ -c cutof msgstr "%s???????????????? %s [ -v ] [ -c cutoff ] ???????????? ...\n" #: timezone/zdump.c:268 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "????????????????????????????????" #: timezone/zic.c:365 @@ -5054,7 +5054,7 @@ msgstr "????????????????????????????????%s????" #: nscd/connections.c:405 nscd/connections.c:499 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "" #: nscd/connections.c:471 --- libc/po/zh_TW.po.jj 2005-08-23 12:00:47.000000000 +0200 +++ libc/po/zh_TW.po 2006-09-20 23:23:22.000000000 +0200 @@ -262,7 +262,7 @@ msgstr "??????????????????????????????????????????" #: iconv/iconv_prog.c:243 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "???????????????????????? `%s' ?????????????????? `%s' ??????????????????" #: iconv/iconv_prog.c:248 @@ -362,7 +362,7 @@ msgid "Prefix used for all file accesses msgstr "??????????????????????????????????????????????????????????????????????????????????????????" #: iconv/iconvconfig.c:327 locale/programs/localedef.c:292 -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????" #: iconv/iconvconfig.c:405 @@ -737,7 +737,7 @@ msgstr "%s: ???????????????????????????????????????????????????????? #: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "`%s' ?????? `%.*s' ????????????????????????????????????????????????????????????????????????" #: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737 @@ -1654,7 +1654,7 @@ msgid "no or value g msgstr "???????????????????????? ?????? ????????????" #: locale/programs/repertoire.c:332 -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "??????????????????????????????????????????????????????????????????" #: locale/programs/repertoire.c:343 @@ -3107,7 +3107,7 @@ msgid "%s: usage is %s [ --version ] [ - msgstr "%s: ?????????????????? %s [ --version ] [ -v ] [ -c ???????????? ] ???????????????????????? ...\n" #: timezone/zdump.c:269 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "????????? ????????????????????????????????????????????" #: timezone/zic.c:361 @@ -5142,7 +5142,7 @@ msgstr "????????????????????? ??????????????: %s" #: nscd/connections.c:392 nscd/connections.c:514 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "????????????????????????????????????????????????????????????????????????????????????: %s" #: nscd/connections.c:485 --- libc/po/libc.pot.jj 2006-02-27 18:30:51.000000000 +0100 +++ libc/po/libc.pot 2006-09-20 23:23:19.000000000 +0200 @@ -1208,7 +1208,7 @@ msgstr "" #: iconv/iconv_prog.c:241 #, c-format -msgid "conversion from `%s' and to `%s' are not supported" +msgid "conversions from `%s' and to `%s' are not supported" msgstr "" #: iconv/iconv_prog.c:246 @@ -1295,7 +1295,7 @@ msgstr "" #: iconv/iconvconfig.c:342 locale/programs/localedef.c:290 #, c-format -msgid "no output file produced because warning were issued" +msgid "no output file produced because warnings were issued" msgstr "" #: iconv/iconvconfig.c:428 @@ -1774,7 +1774,7 @@ msgstr "" #: locale/programs/ld-collate.c:1297 locale/programs/ld-ctype.c:1475 #, c-format -msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgid "`%s' and `%.*s' are not valid names for symbolic range" msgstr "" #: locale/programs/ld-collate.c:1346 locale/programs/ld-collate.c:3737 @@ -2720,7 +2720,7 @@ msgstr "" #: locale/programs/repertoire.c:331 #, c-format -msgid "cannot safe new repertoire map" +msgid "cannot save new repertoire map" msgstr "" #: locale/programs/repertoire.c:342 @@ -3637,7 +3637,7 @@ msgstr "" #: nscd/connections.c:1066 #, c-format -msgid "error getting callers id: %s" +msgid "error getting caller's id: %s" msgstr "" #: nscd/connections.c:1124 nscd/connections.c:1138 @@ -6012,7 +6012,7 @@ msgid "%s: wild -c argument %s\n" msgstr "" #: timezone/zdump.c:392 -msgid "Error writing standard output" +msgid "Error writing to standard output" msgstr "" #: timezone/zdump.c:415 --- libc/iconv/iconv_prog.c.jj 2006-08-22 10:42:28.000000000 +0200 +++ libc/iconv/iconv_prog.c 2006-09-20 23:13:12.000000000 +0200 @@ -239,7 +239,7 @@ main (int argc, char *argv[]) if (to_wrong) error (0, 0, _("\ -conversion from `%s' and to `%s' are not supported"), +conversions from `%s' and to `%s' are not supported"), from_pretty, to_pretty); else error (0, 0, --- libc/iconv/iconvconfig.c.jj 2006-01-02 11:39:02.000000000 +0100 +++ libc/iconv/iconvconfig.c 2006-09-20 23:13:12.000000000 +0200 @@ -339,7 +339,7 @@ main (int argc, char *argv[]) if (status == 0) status = write_output (); else - error (1, 0, _("no output file produced because warning were issued")); + error (1, 0, _("no output file produced because warnings were issued")); return status; } Jakub From aj@suse.de Thu Sep 21 04:27:00 2006 From: aj@suse.de (Andreas Jaeger) Date: Thu, 21 Sep 2006 04:27:00 -0000 Subject: Two bugzilla patches Message-ID: Bug 2830: Fix is in http://sourceware.org/ml/libc-alpha/2006-06/msg00010.html Ok to commit? Bug 2510: Patch appended. Ok to commit? Andreas 2006-09-21 Andreas Jaeger [BZ #2510] * manual/search.texi (Hash Search Function): Clarify. (Array Search Function): Clarify. ============================================================ Index: manual/search.texi --- manual/search.texi 11 Oct 2002 10:50:55 -0000 1.36 +++ manual/search.texi 21 Sep 2006 04:27:21 -0000 @@ -82,7 +82,7 @@ starting at @var{base} if it is found. available @code{NULL} is returned. The mean runtime of this function is @code{*@var{nmemb}}/2. This -function should only be used elements often get added to or deleted from +function should only be used if elements often get added to or deleted from the array in which case it might not be useful to sort the array before searching. @end deftypefun @@ -247,21 +247,21 @@ Couldn't find Janice. @node Hash Search Function @section The @code{hsearch} function. -The functions mentioned so far in this chapter are searching in a sorted +The functions mentioned so far in this chapter are for searching in a sorted or unsorted array. There are other methods to organize information which later should be searched. The costs of insert, delete and search differ. One possible implementation is using hashing tables. -The following functions are declared in the the header file @file{search.h}. +The following functions are declared in the header file @file{search.h}. @comment search.h @comment SVID @deftypefun int hcreate (size_t @var{nel}) The @code{hcreate} function creates a hashing table which can contain at least @var{nel} elements. There is no possibility to grow this table so -it is necessary to choose the value for @var{nel} wisely. The used -methods to implement this function might make it necessary to make the +it is necessary to choose the value for @var{nel} wisely. The method +used to implement this function might make it necessary to make the number of elements in the hashing table larger than the expected maximal -number of elements. Hashing tables usually work inefficient if they are +number of elements. Hashing tables usually work inefficiently if they are filled 80% or more. The constant access time guaranteed by hashing can only be achieved if few collisions exist. See Knuth's ``The Art of Computer Programming, Part 3: Searching and Sorting'' for more -- Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj/ SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From jakub@redhat.com Thu Sep 21 19:12:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 21 Sep 2006 19:12:00 -0000 Subject: [PATCH] Fix ppc{32,64} longjmp Message-ID: <20060921191216.GS4556@sunsite.mff.cuni.cz> Hi! Stack pointer demangling in ppc{32,64} longjmp leaves for one (ppc64; or a couple (ppc32)) instruction(s) garbage in r1, which is bad if a signal comes in. Fixed thusly: 2006-09-21 Jakub Jelinek [BZ #3225] * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (PTR_MANGLE3, PTR_DEMANGLE3): Define. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h (PTR_MANGLE3, PTR_DEMANGLE3): Likewise. * sysdeps/powerpc/powerpc32/__longjmp-common.S (__longjmp): Use it. * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S (__longjmp): Likewise. * sysdeps/powerpc/powerpc64/__longjmp-common.S (__longjmp): Likewise. --- libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h.jj 2006-01-02 11:39:05.000000000 +0100 +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h 2006-09-21 17:46:56.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,1997-2003,2004,2005 Free Software Foundation, Inc. +/* Copyright (C) 1992,1997-2003,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -285,8 +285,12 @@ xor reg,tmpreg,reg # define PTR_MANGLE2(reg, tmpreg) \ xor reg,tmpreg,reg +# define PTR_MANGLE3(destreg, reg, tmpreg) \ + lwz tmpreg,POINTER_GUARD(r2); \ + xor destreg,tmpreg,reg # define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) # define PTR_DEMANGLE2(reg, tmpreg) PTR_MANGLE2 (reg, tmpreg) +# define PTR_DEMANGLE3(destreg, reg, tmpreg) PTR_MANGLE3 (destreg, reg, tmpreg) # else # define PTR_MANGLE(var) \ (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) --- libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h.jj 2006-01-11 16:55:32.000000000 +0100 +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h 2006-09-21 17:47:49.000000000 +0200 @@ -299,8 +299,12 @@ xor reg,tmpreg,reg # define PTR_MANGLE2(reg, tmpreg) \ xor reg,tmpreg,reg +# define PTR_MANGLE3(destreg, reg, tmpreg) \ + ld tmpreg,POINTER_GUARD(r13); \ + xor destreg,tmpreg,reg # define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) # define PTR_DEMANGLE2(reg, tmpreg) PTR_MANGLE2 (reg, tmpreg) +# define PTR_DEMANGLE3(destreg, reg, tmpreg) PTR_MANGLE3 (destreg, reg, tmpreg) # else # define PTR_MANGLE(var) \ (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) --- libc/sysdeps/powerpc/powerpc32/__longjmp-common.S.jj 2006-01-14 17:41:04.000000000 +0100 +++ libc/sysdeps/powerpc/powerpc32/__longjmp-common.S 2006-09-21 18:03:21.000000000 +0200 @@ -31,7 +31,11 @@ ENTRY (BP_SYM (__longjmp)) CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE) +#ifdef PTR_DEMANGLE + lwz r24,(JB_GPR1*4)(r3) +#else lwz r1,(JB_GPR1*4)(r3) +#endif lwz r0,(JB_LR*4)(r3) lwz r14,((JB_GPRS+0)*4)(r3) lwz r15,((JB_GPRS+1)*4)(r3) @@ -41,8 +45,8 @@ ENTRY (BP_SYM (__longjmp)) lwz r19,((JB_GPRS+5)*4)(r3) lwz r20,((JB_GPRS+6)*4)(r3) #ifdef PTR_DEMANGLE - PTR_DEMANGLE (r0, r25) - PTR_DEMANGLE2 (r1, r25) + PTR_DEMANGLE3 (r1, r24, r25) + PTR_DEMANGLE2 (r0, r25) #endif mtlr r0 lwz r21,((JB_GPRS+7)*4)(r3) --- libc/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S.jj 2006-01-14 17:41:04.000000000 +0100 +++ libc/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S 2006-09-21 18:02:33.000000000 +0200 @@ -114,7 +114,11 @@ aligned_restore_vmx: lvx v31,0,r6 L(no_vmx): #endif +#ifdef PTR_DEMANGLE + lwz r24,(JB_GPR1*4)(r3) +#else lwz r1,(JB_GPR1*4)(r3) +#endif lwz r0,(JB_LR*4)(r3) lwz r14,((JB_GPRS+0)*4)(r3) lfd fp14,((JB_FPRS+0*2)*4)(r3) @@ -131,8 +135,8 @@ L(no_vmx): lwz r20,((JB_GPRS+6)*4)(r3) lfd fp20,((JB_FPRS+6*2)*4)(r3) #ifdef PTR_DEMANGLE - PTR_DEMANGLE (r0, r25) - PTR_DEMANGLE2 (r1, r25) + PTR_DEMANGLE3 (r1, r24, r25) + PTR_DEMANGLE2 (r0, r25) #endif mtlr r0 lwz r21,((JB_GPRS+7)*4)(r3) --- libc/sysdeps/powerpc/powerpc64/__longjmp-common.S.jj 2006-01-14 17:41:04.000000000 +0100 +++ libc/sysdeps/powerpc/powerpc64/__longjmp-common.S 2006-09-21 18:01:05.000000000 +0200 @@ -108,9 +108,11 @@ aligned_restore_vmx: lvx v31,0,r6 L(no_vmx): #endif - ld r1,(JB_GPR1*8)(r3) #ifdef PTR_DEMANGLE - PTR_DEMANGLE (r1, r25) + ld r22,(JB_GPR1*8)(r3) + PTR_DEMANGLE3 (r1, r22, r25) +#else + ld r1,(JB_GPR1*8)(r3) #endif ld r2,(JB_GPR2*8)(r3) ld r0,(JB_LR*8)(r3) Jakub From jakub@redhat.com Sun Sep 24 07:05:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Sun, 24 Sep 2006 07:05:00 -0000 Subject: [PATCH] Fix IEEE quad lrintl Message-ID: <20060924070451.GU4556@sunsite.mff.cuni.cz> Hi! Stupid typos cause it not to be properly rounded - the result of the rounding (r) was unused, while GET_LDOUBLE_WORDS64 was computing exactly what has been already computed, as x hasn't changed in between. 2006-09-24 Jakub Jelinek * sysdeps/ieee754/ldbl-128/s_lrintl.c (__lrintl): Fix 2 typos. --- libc/sysdeps/ieee754/ldbl-128/s_lrintl.c.jj 2006-09-20 23:00:13.000000000 +0200 +++ libc/sysdeps/ieee754/ldbl-128/s_lrintl.c 2006-09-24 08:52:27.000000000 +0200 @@ -50,7 +50,7 @@ __lrintl (long double x) { w = two112[sx] + x; t = w - two112[sx]; - GET_LDOUBLE_WORDS64 (i0, i1, x); + GET_LDOUBLE_WORDS64 (i0, i1, t); j0 = ((i0 >> 48) & 0x7fff) - 0x3fff; i0 &= 0x0000ffffffffffffLL; i0 |= 0x0001000000000000LL; @@ -65,7 +65,7 @@ __lrintl (long double x) { w = two112[sx] + x; t = w - two112[sx]; - GET_LDOUBLE_WORDS64 (i0, i1, x); + GET_LDOUBLE_WORDS64 (i0, i1, t); j0 = ((i0 >> 48) & 0x7fff) - 0x3fff; i0 &= 0x0000ffffffffffffLL; i0 |= 0x0001000000000000LL; Jakub From jakub@redhat.com Sun Sep 24 10:13:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Sun, 24 Sep 2006 10:13:00 -0000 Subject: [PATCH] Update ppc ulps Message-ID: <20060924101331.GV4556@sunsite.mff.cuni.cz> Hi! I'm getting on both ppc and ppc64 2.125 ulp error on clog10 (> 2ulp allowed), 0.75ulp on y0 1/8 and 1ulp on imag csinh (-2-3i). 2006-09-24 Jakub Jelinek * sysdeps/powerpc/fpu/libm-test-ulps: Updated. --- libc/sysdeps/powerpc/fpu/libm-test-ulps.jj 2006-01-31 22:31:27.000000000 +0100 +++ libc/sysdeps/powerpc/fpu/libm-test-ulps 2006-09-24 11:55:42.000000000 +0200 @@ -264,8 +264,8 @@ ldouble: 1 Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i": float: 1 ifloat: 1 -ildouble: 2 -ldouble: 2 +ildouble: 3 +ldouble: 3 Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": double: 1 float: 1 @@ -364,6 +364,8 @@ ldouble: 2 Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i": double: 1 idouble: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i": float: 1 ifloat: 1 @@ -739,6 +741,9 @@ idouble: 1 ifloat: 1 # y0 +Test "y0 (0.125) == -1.38968062514384052915582277745018693": +ildouble: 1 +ldouble: 1 Test "y0 (0.75) == -0.137172769385772397522814379396581855": ildouble: 1 ldouble: 1 @@ -800,6 +805,9 @@ ildouble: 2 ldouble: 2 # yn +Test "yn (0, 0.125) == -1.38968062514384052915582277745018693": +ildouble: 1 +ldouble: 1 Test "yn (0, 0.75) == -0.137172769385772397522814379396581855": ildouble: 1 ldouble: 1 @@ -1066,8 +1074,8 @@ ldouble: 1 Function: Real part of "clog10": float: 1 ifloat: 1 -ildouble: 2 -ldouble: 2 +ildouble: 3 +ldouble: 3 Function: Imaginary part of "clog10": double: 1 Jakub From munroesj@us.ibm.com Sun Sep 24 20:18:00 2006 From: munroesj@us.ibm.com (Steven Munroe) Date: Sun, 24 Sep 2006 20:18:00 -0000 Subject: [PATCH] Update ppc ulps In-Reply-To: <20060924101331.GV4556@sunsite.mff.cuni.cz> References: <20060924101331.GV4556@sunsite.mff.cuni.cz> Message-ID: <4516E681.8000903@us.ibm.com> Jakub Jelinek wrote: >Hi! > >I'm getting on both ppc and ppc64 2.125 ulp error on clog10 (> 2ulp >allowed), 0.75ulp on y0 1/8 and 1ulp on imag csinh (-2-3i). > > > Which gcc are you using? I found that gcc-4.2 or gcc-4.1.1 with the reassociation patch backport causes upls errors in ppc that are not there for just gcc-4.1.1. I have not had time to tract this down to a simple test case that I can hand to the gcc folks. From jakub@redhat.com Sun Sep 24 20:49:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Sun, 24 Sep 2006 20:49:00 -0000 Subject: [PATCH] Update ppc ulps In-Reply-To: <4516E681.8000903@us.ibm.com> References: <20060924101331.GV4556@sunsite.mff.cuni.cz> <4516E681.8000903@us.ibm.com> Message-ID: <20060924204917.GW4556@sunsite.mff.cuni.cz> On Sun, Sep 24, 2006 at 03:11:45PM -0500, Steven Munroe wrote: > >I'm getting on both ppc and ppc64 2.125 ulp error on clog10 (> 2ulp > >allowed), 0.75ulp on y0 1/8 and 1ulp on imag csinh (-2-3i). > > > Which gcc are you using? I found that gcc-4.2 or gcc-4.1.1 with the > reassociation patch backport causes upls errors in ppc that are not > there for just gcc-4.1.1. I have reassoc backport in. That's one of the reasons why I haven't regenerated the ulps, just merged, so that both vanilla 4.1.x, 4.1.x with reassoc etc. pass. While in the above 4 cases gcc with reassoc generates worse code, for several ones there is an improvement too. Jakub From jakub@redhat.com Mon Sep 25 11:33:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 25 Sep 2006 11:33:00 -0000 Subject: [PATCH] Handle really large number of files in glob_in_dir (BZ#3253) Message-ID: <20060925113250.GX4556@sunsite.mff.cuni.cz> Hi! This is my proposed patch for the BZ#3253 issue. Allocating a pointer pair with alloca one at a time is overkill and on some arches really bad (on some arches each alloca allocates quite a big fixed area in addition to the requested size), on the other side we want at least some initial allocations done with alloca for speed and also copying memory around on realloc would be costly. So, this patch uses a chain of (decreasingly big) arrays of pointers, the last few of them allocated with alloca and the really big ones with malloc. The last array is even in a local variable, so that the allocation code can be only in one place (the other two need just one pointer entry). 2006-09-25 Jakub Jelinek [BZ #3253] * posix/glob.c (glob_in_dir): Don't alloca one struct globlink at a time, rather allocate increasingly bigger arrays of pointers, if possible with alloca, if too large with malloc. Reported by Petr Baudys . --- libc/posix/glob.c.jj 2006-01-11 16:55:30.000000000 +0100 +++ libc/posix/glob.c 2006-09-25 13:06:07.000000000 +0200 @@ -1090,16 +1090,20 @@ glob_in_dir (const char *pattern, const { size_t dirlen = strlen (directory); void *stream = NULL; - struct globlink + struct globnames { - struct globlink *next; - char *name; + struct globnames *next; + size_t count; + char *name[16]; }; - struct globlink *names = NULL; - size_t nfound; + struct globnames init_names; + struct globnames *names = &init_names, *names_alloca = &init_names; + size_t nfound = 0, allocasize = sizeof (init_names), cur = 0; int meta; int save; + init_names.next = NULL; + init_names.count = 16; meta = __glob_pattern_p (pattern, !(flags & GLOB_NOESCAPE)); if (meta == 0 && (flags & (GLOB_NOCHECK|GLOB_NOMAGIC))) { @@ -1107,7 +1111,6 @@ glob_in_dir (const char *pattern, const characters and we must not return an error therefore the result will always contain exactly one name. */ flags |= GLOB_NOCHECK; - nfound = 0; } else if (meta == 0 && ((flags & GLOB_NOESCAPE) || strchr (pattern, '\\') == NULL)) @@ -1128,8 +1131,6 @@ glob_in_dir (const char *pattern, const /* We found this file to be existing. Now tell the rest of the function to copy this name into the result. */ flags |= GLOB_NOCHECK; - - nfound = 0; } else { @@ -1137,12 +1138,10 @@ glob_in_dir (const char *pattern, const { /* This is a special case for matching directories like in "*a/". */ - names = (struct globlink *) __alloca (sizeof (struct globlink)); - names->name = (char *) malloc (1); - if (names->name == NULL) + names->name[cur] = (char *) malloc (1); + if (names->name[cur] == NULL) goto memory_error; - names->name[0] = '\0'; - names->next = NULL; + *names->name[cur++] = '\0'; nfound = 1; meta = 0; } @@ -1157,7 +1156,6 @@ glob_in_dir (const char *pattern, const && ((errfunc != NULL && (*errfunc) (directory, errno)) || (flags & GLOB_ERR))) return GLOB_ABORTED; - nfound = 0; meta = 0; } else @@ -1168,7 +1166,6 @@ glob_in_dir (const char *pattern, const | FNM_CASEFOLD #endif ); - nfound = 0; flags |= GLOB_MAGCHAR; while (1) @@ -1224,15 +1221,29 @@ glob_in_dir (const char *pattern, const || link_exists_p (directory, dirlen, name, pglob, flags)) { - struct globlink *new = (struct globlink *) - __alloca (sizeof (struct globlink)); + if (cur == names->count) + { + struct globnames *newnames; + size_t count = names->count * 2; + size_t size = sizeof (struct globnames) + + (count - 16) * sizeof (char *); + allocasize += size; + if (__libc_use_alloca (allocasize)) + newnames = names_alloca = __alloca (size); + else if ((newnames = malloc (size)) + == NULL) + goto memory_error; + newnames->count = count; + newnames->next = names; + names = newnames; + cur = 0; + } len = NAMLEN (d); - new->name = (char *) malloc (len + 1); - if (new->name == NULL) + names->name[cur] = (char *) malloc (len + 1); + if (names->name[cur] == NULL) goto memory_error; - *((char *) mempcpy (new->name, name, len)) = '\0'; - new->next = names; - names = new; + *((char *) mempcpy (names->name[cur++], name, len)) + = '\0'; ++nfound; } } @@ -1245,12 +1256,10 @@ glob_in_dir (const char *pattern, const { size_t len = strlen (pattern); nfound = 1; - names = (struct globlink *) __alloca (sizeof (struct globlink)); - names->next = NULL; - names->name = (char *) malloc (len + 1); - if (names->name == NULL) + names->name[cur] = (char *) malloc (len + 1); + if (names->name[cur] == NULL) goto memory_error; - *((char *) mempcpy (names->name, pattern, len)) = '\0'; + *((char *) mempcpy (names->name[cur++], pattern, len)) = '\0'; } if (nfound != 0) @@ -1265,8 +1274,23 @@ glob_in_dir (const char *pattern, const goto memory_error; pglob->gl_pathv = new_gl_pathv; - for (; names != NULL; names = names->next) - pglob->gl_pathv[pglob->gl_offs + pglob->gl_pathc++] = names->name; + while (1) + { + size_t i; + struct globnames *old = names; + for (i = 0; i < cur; ++i) + pglob->gl_pathv[pglob->gl_offs + pglob->gl_pathc++] + = names->name[i]; + names = names->next; + if (names == NULL) + break; + cur = names->count; + if (old == names_alloca) + names_alloca = names; + else + free (old); + } + pglob->gl_pathv[pglob->gl_offs + pglob->gl_pathc] = NULL; pglob->gl_flags = flags; @@ -1293,11 +1317,20 @@ glob_in_dir (const char *pattern, const closedir (stream); __set_errno (save); } - while (names != NULL) + while (1) { - if (names->name != NULL) - free (names->name); + size_t i; + struct globnames *old = names; + for (i = 0; i < cur; ++i) + free (names->name[i]); names = names->next; + if (names == NULL) + break; + cur = names->count; + if (old == names_alloca) + names_alloca = names; + else + free (old); } return GLOB_NOSPACE; } Jakub From jakub@redhat.com Mon Sep 25 15:08:00 2006 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 25 Sep 2006 15:08:00 -0000 Subject: [PATCH] Fix fchownat (BZ#3252) Message-ID: <20060925150748.GY4556@sunsite.mff.cuni.cz> Hi! fchownat on many arches duplicates everything __chown and __lchown functions do, which is quite error prone (at least the i386 and s390 versions don't cope properly with AT_SYMLINK_NOFOLLOW) in all the various --enable-kernel=x.y.z cases. The following patch simplifies that, only handles the second most common case inline (for ppc __ASSUME_LCHOWN_SYSCALL, for i386 and simila __ASSUME_32BITUIDS) and leaves the rest of the dirty work to out of line __chown/__lchown (that is only for glibcs configured to support < 2.3.39 (resp. < 2.1.18 on ppc), so not a big deal IMHO and it decreases code duplication). 2006-09-25 Jakub Jelinek [BZ #3252] * sysdeps/unix/sysv/linux/powerpc/fchownat.c (fchownat): Handle only fchownat syscall and __ASSUME_LCHOWN_SYSCALL case inline, call __{,l}chown to handle the rest. * sysdeps/unix/sysv/linux/i386/fchownat.c (fchownat): Handle only fchownat syscall and __ASSUME_32BITUIDS case inline, call __{,l}chown to handle the rest. * sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c: Include i386/fchownat.c. * sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c: Likewise. * sysdeps/unix/sysv/linux/sh/fchownat.c: Likewise. --- libc/sysdeps/unix/sysv/linux/powerpc/fchownat.c.jj 2006-08-08 17:41:55.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/powerpc/fchownat.c 2006-09-25 16:13:48.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -81,143 +81,30 @@ fchownat (int fd, const char *file, uid_ file = buf; } +# if __ASSUME_LCHOWN_SYSCALL INTERNAL_SYSCALL_DECL (err); -# if __ASSUME_LCHOWN_SYSCALL if (flag & AT_SYMLINK_NOFOLLOW) result = INTERNAL_SYSCALL (lchown, err, 3, file, owner, group); else result = INTERNAL_SYSCALL (chown, err, 3, file, owner, group); -# else - char link[PATH_MAX + 2]; - char path[2 * PATH_MAX + 4]; - int loopct; - size_t filelen; - static int libc_old_chown = 0 /* -1=old linux, 1=new linux, 0=unknown */; - - if (libc_old_chown == 1) - { - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown, err, 3, __ptrvalue (file), owner, - group); - else - result = INTERNAL_SYSCALL (chown, err, 3, __ptrvalue (file), owner, - group); - goto out; - } - -# ifdef __NR_lchown - if (flag & AT_SYMLINK_NOFOLLOW) - { - result = INTERNAL_SYSCALL (lchown, err, 3, __ptrvalue (file), owner, - group); - goto out; - } - - if (libc_old_chown == 0) - { - result = INTERNAL_SYSCALL (chown, err, 3, __ptrvalue (file), owner, - group); - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - { - libc_old_chown = 1; - goto fail; - } - libc_old_chown = -1; - } -# else - if (flag & AT_SYMLINK_NOFOLLOW) - { - result = INTERNAL_SYSCALL (chown, err, 3, __ptrvalue (file), owner, - group); - goto out; - } -# endif - - result = __readlink (file, link, PATH_MAX + 1); - if (result == -1) - { -# ifdef __NR_lchown - result = INTERNAL_SYSCALL (lchown, err, 3, __ptrvalue (file), owner, - group); -# else - result = INTERNAL_SYSCALL (chown, err, 3, __ptrvalue (file), owner, - group); -# endif - goto out; - } - - filelen = strlen (file) + 1; - if (filelen > sizeof (path)) - { - errno = ENAMETOOLONG; - return -1; - } - memcpy (path, file, filelen); - - /* 'The system has an arbitrary limit...' In practise, we'll hit - ENAMETOOLONG before this, usually. */ - for (loopct = 0; loopct < 128; ++loopct) - { - size_t linklen; - - if (result >= PATH_MAX + 1) - { - errno = ENAMETOOLONG; - return -1; - } - - link[result] = 0; /* Null-terminate string, just-in-case. */ - - linklen = strlen (link) + 1; - - if (link[0] == '/') - memcpy (path, link, linklen); - else - { - filelen = strlen (path); - - while (filelen > 1 && path[filelen - 1] == '/') - --filelen; - while (filelen > 0 && path[filelen - 1] != '/') - --filelen; - if (filelen + linklen > sizeof (path)) - { - errno = ENAMETOOLONG; - return -1; - } - memcpy (path + filelen, link, linklen); - } - - result = __readlink (path, link, PATH_MAX + 1); - - if (result == -1) - { -# ifdef __NR_lchown - result = INTERNAL_SYSCALL (lchown, err, 3, path, owner, group); -# else - result = INTERNAL_SYSCALL (chown, err, 3, path, owner, group); -# endif - goto out; - } - } - __set_errno (ELOOP); - return -1; - - out: -# endif if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) { -# if !__ASSUME_LCHOWN_SYSCALL - fail: -# endif __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); - result = -1; + return -1; } +# else + /* Don't inline the rest to avoid unnecessary code duplication. */ + if (flag & AT_SYMLINK_NOFOLLOW) + result = __lchown (file, owner, group); + else + result = __chown (file, owner, group); + if (result < 0) + __atfct_seterrno (errno, fd, buf); +# endif return result; + #endif } --- libc/sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c.jj 2006-02-28 20:07:32.000000000 +0100 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c 2006-09-25 16:15:46.000000000 +0200 @@ -1 +1 @@ -#include +#include --- libc/sysdeps/unix/sysv/linux/i386/fchownat.c.jj 2006-08-08 17:41:55.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/i386/fchownat.c 2006-09-25 16:12:06.000000000 +0200 @@ -30,33 +30,6 @@ #include #include -/* - In Linux 2.1.x the chown functions have been changed. A new function lchown - was introduced. The new chown now follows symlinks - the old chown and the - new lchown do not follow symlinks. - The new lchown function has the same number as the old chown had and the - new chown has a new number. When compiling with headers from Linux > 2.1.8x - it's impossible to run this libc with older kernels. In these cases libc - has therefore to route calls to chown to the old chown function. -*/ - -extern int __chown_is_lchown (const char *__file, uid_t __owner, - gid_t __group); -extern int __real_chown (const char *__file, uid_t __owner, gid_t __group); - - -#if defined __NR_lchown || __ASSUME_LCHOWN_SYSCALL > 0 -/* Running under Linux > 2.1.80. */ - -# ifdef __NR_chown32 -# if __ASSUME_32BITUIDS == 0 -/* This variable is shared with all files that need to check for 32bit - uids. */ -extern int __libc_missing_32bit_uids; -# endif -# endif /* __NR_chown32 */ -#endif - int fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) @@ -105,92 +78,33 @@ fchownat (int fd, const char *file, uid_ file = buf; } +# if __ASSUME_32BITUIDS > 0 + /* This implies __ASSUME_LCHOWN_SYSCALL. */ INTERNAL_SYSCALL_DECL (err); -# if defined __NR_lchown || __ASSUME_LCHOWN_SYSCALL > 0 -# if __ASSUME_LCHOWN_SYSCALL == 0 - static int __libc_old_chown; - -# ifdef __NR_chown32 - if (__libc_missing_32bit_uids <= 0) - { - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), - owner, group); - else - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), - owner, group); - - if (!INTERNAL_SYSCALL_ERROR_P (result, err)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - goto fail; - - __libc_missing_32bit_uids = 1; - } -# endif /* __NR_chown32 */ - - if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U)) - || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) - { - __set_errno (EINVAL); - return -1; - } + if (flag & AT_SYMLINK_NOFOLLOW) + result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), owner, + group); + else + result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, + group); - if (!__libc_old_chown && (flag & AT_SYMLINK_NOFOLLOW) == 0) - { - result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, - group); - - if (!INTERNAL_SYSCALL_ERROR_P (result, err)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - goto fail; - - __libc_old_chown = 1; - } - - result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner, - group); -# elif __ASSUME_32BITUIDS - /* This implies __ASSUME_LCHOWN_SYSCALL. */ - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, - group); -# else - /* !__ASSUME_32BITUIDS && ASSUME_LCHOWN_SYSCALL */ -# ifdef __NR_chown32 - if (__libc_missing_32bit_uids <= 0) - { - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, - group); - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - goto fail; - - __libc_missing_32bit_uids = 1; - } -# endif /* __NR_chown32 */ - if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U)) - || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) { - __set_errno (EINVAL); + __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); return -1; } - - result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, group); -# endif # else - result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, group); + /* Don't inline the rest to avoid unnecessary code duplication. */ + if (flag & AT_SYMLINK_NOFOLLOW) + result = __lchown (file, owner, group); + else + result = __chown (file, owner, group); + if (result < 0) + __atfct_seterrno (errno, fd, buf); # endif - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) - goto fail; - return result; - fail: - __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); - return -1; #endif } --- libc/sysdeps/unix/sysv/linux/sh/fchownat.c.jj 2006-08-08 17:41:55.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/sh/fchownat.c 2006-09-25 16:15:14.000000000 +0200 @@ -1,140 +1 @@ -/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#ifdef __NR_chown32 -# if __ASSUME_32BITUIDS == 0 -/* This variable is shared with all files that need to check for 32bit - uids. */ -extern int __libc_missing_32bit_uids; -# endif -#endif /* __NR_chown32 */ - -int -fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) -{ - int result; - -#ifdef __NR_fchownat -# ifndef __ASSUME_ATFCTS - if (__have_atfcts >= 0) -# endif - { - result = INLINE_SYSCALL (fchownat, 5, fd, file, owner, group, flag); -# ifndef __ASSUME_ATFCTS - if (result == -1 && errno == ENOSYS) - __have_atfcts = -1; - else -# endif - return result; - } -#endif - -#ifndef __ASSUME_ATFCTS - if (flag & ~AT_SYMLINK_NOFOLLOW) - { - __set_errno (EINVAL); - return -1; - } - - char *buf = NULL; - - if (fd != AT_FDCWD && file[0] != '/') - { - size_t filelen = strlen (file); - static const char procfd[] = "/proc/self/fd/%d/%s"; - /* Buffer for the path name we are going to use. It consists of - - the string /proc/self/fd/ - - the file descriptor number - - the file name provided. - The final NUL is included in the sizeof. A bit of overhead - due to the format elements compensates for possible negative - numbers. */ - size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; - buf = alloca (buflen); - - __snprintf (buf, buflen, procfd, fd, file); - file = buf; - } - - INTERNAL_SYSCALL_DECL (err); - -# if __ASSUME_32BITUIDS > 0 - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), owner, - group); - else - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, - group); -# else -# ifdef __NR_chown32 - if (__libc_missing_32bit_uids <= 0) - { - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), - owner, group); - else - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, - group); - - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - goto fail; - - __libc_missing_32bit_uids = 1; - } -# endif /* __NR_chown32 */ - - if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U)) - || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) - { - __set_errno (EINVAL); - return -1; - } - - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner, - group); - else - result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, - group); -# endif - - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) - { - fail: - __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); - result = -1; - } - - return result; -#endif -} +#include --- libc/sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c.jj 2006-08-08 17:41:55.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c 2006-09-25 16:18:46.000000000 +0200 @@ -1,159 +1 @@ -/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -/* - In Linux 2.1.x the chown functions have been changed. A new function lchown - was introduced. The new chown now follows symlinks - the old chown and the - new lchown do not follow symlinks. - The new lchown function has the same number as the old chown had and the - new chown has a new number. When compiling with headers from Linux > 2.1.8x - it's impossible to run this libc with older kernels. In these cases libc - has therefore to route calls to chown to the old chown function. -*/ - -/* Running under Linux > 2.1.80. */ - -#ifdef __NR_chown32 -# if __ASSUME_32BITUIDS == 0 -/* This variable is shared with all files that need to check for 32bit - uids. */ -extern int __libc_missing_32bit_uids; -# endif -#endif /* __NR_chown32 */ - -int -fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) -{ - int result; - -#ifdef __NR_fchownat -# ifndef __ASSUME_ATFCTS - if (__have_atfcts >= 0) -# endif - { - result = INLINE_SYSCALL (fchownat, 5, fd, file, owner, group, flag); -# ifndef __ASSUME_ATFCTS - if (result == -1 && errno == ENOSYS) - __have_atfcts = -1; - else -# endif - return result; - } -#endif - -#ifndef __ASSUME_ATFCTS - if (flag & ~AT_SYMLINK_NOFOLLOW) - { - __set_errno (EINVAL); - return -1; - } - - char *buf = NULL; - - if (fd != AT_FDCWD && file[0] != '/') - { - size_t filelen = strlen (file); - static const char procfd[] = "/proc/self/fd/%d/%s"; - /* Buffer for the path name we are going to use. It consists of - - the string /proc/self/fd/ - - the file descriptor number - - the file name provided. - The final NUL is included in the sizeof. A bit of overhead - due to the format elements compensates for possible negative - numbers. */ - size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; - buf = alloca (buflen); - - __snprintf (buf, buflen, procfd, fd, file); - file = buf; - } - - INTERNAL_SYSCALL_DECL (err); - -# if __ASSUME_32BITUIDS > 0 - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner, - group); -# else - static int __libc_old_chown; - -# ifdef __NR_chown32 - if (__libc_missing_32bit_uids <= 0) - { - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), - owner, group); - else - result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), - owner, group); - - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - goto fail; - - __libc_missing_32bit_uids = 1; - } -# endif /* __NR_chown32 */ - if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U)) - || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U))) - { - __set_errno (EINVAL); - return -1; - } - - if (!__libc_old_chown && (flag & AT_SYMLINK_NOFOLLOW) == 0) - { - result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, - group); - - if (!INTERNAL_SYSCALL_ERROR_P (result, err)) - return result; - if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS) - goto fail; - - __libc_old_chown = 1; - } - - result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner, - group); -# endif - - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) - { - fail: - __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); - result = -1; - } - - return result; -#endif -} +#include Jakub