From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20934 invoked by alias); 22 Apr 2004 06:39:12 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 20918 invoked from network); 22 Apr 2004 06:39:12 -0000 Received: from unknown (HELO r-rr.iij4u.or.jp) (210.130.0.76) by sources.redhat.com with SMTP; 22 Apr 2004 06:39:12 -0000 Received: from localhost (frgw.3in.ne.jp [210.251.121.226]) by r-rr.iij4u.or.jp (8.11.6+IIJ/8.11.6) with ESMTP id i3M6d9w00904 for ; Thu, 22 Apr 2004 15:39:09 +0900 (JST) Date: Thu, 22 Apr 2004 06:39:00 -0000 Message-Id: <20040422.153713.34742469.kkojima@rr.iij4u.or.jp> To: libc-hacker@sources.redhat.com Subject: [PATCH] Fix SH linuxthreads vfork From: Kaz Kojima Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg00078.txt.bz2 Hi, I'd like to forward a mail from SUGIOKA Toshinobu because he has a trouble with subscribing libc-hacker. I've confirmed his patch below in my environment. BTW, does anyone know about any trouble to subscribe libc-hacker? Regards, kaz -- Hi, Appended patch fixes segmentation fault in vfork on sh[34]-linux target which is caused by un-initialized register usage. ChangeLog: 2004-04-22 SUGIOKA Toshinobu * linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer reference in PIC case. Index: linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S =================================================================== RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S,v retrieving revision 1.3 diff -u -r1.3 vfork.S --- linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S 11 Feb 2003 06:27:54 -0000 1.3 +++ linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S 22 Apr 2004 05:10:49 -0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004 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 @@ -27,8 +27,11 @@ ENTRY (__vfork) #ifdef SHARED + mov.l .Lgot, r1 + mova .Lgot, r0 + add r0, r1 mov.l .Lpthread_func, r0 - mov.l @(r0,r12), r0 + mov.l @(r0,r1), r0 #else mov.l .Lpthread_create, r0 #endif @@ -50,6 +53,8 @@ .L1: .word __NR_vfork .align 2 #ifdef SHARED +.Lgot: + .long _GLOBAL_OFFSET_TABLE_ .Lpthread_func: .long __libc_pthread_functions@GOTOFF #else