This is the mail archive of the mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix SH linuxthreads vfork


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?


Appended patch fixes segmentation fault in vfork on sh[34]-linux target
which is caused by un-initialized register usage.

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
 	mov.l	.Lpthread_create, r0
@@ -50,6 +53,8 @@
 .L1:	.word	__NR_vfork
 	.align	2
 #ifdef SHARED
 	.long	__libc_pthread_functions@GOTOFF

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]