public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* Fix _exit for Linux
@ 2002-09-15 20:40 Andreas Jaeger
  2002-09-15 22:11 ` Ulrich Drepper
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Andreas Jaeger @ 2002-09-15 20:40 UTC (permalink / raw)
  To: GNU libc hacker


Building glibc with GCC 3.3 CVS I get these errors:

/opt/gcc/3.3-devel/bin/gcc -nostdlib -nostartfiles -o /builds/glibc/gcc-3.3/iconv/iconvconfig  -Wl,-dynamic-linker=/usr/src/test/glibc-2.3/lib/ld-linux.so.2   -Wl,-z,combreloc /builds/glibc/gcc-3.3/csu/crt1.o /builds/glibc/gcc-3.3/csu/crti.o `/opt/gcc/3.3-devel/bin/gcc --print-file-name=crtbegin.o` /builds/glibc/gcc-3.3/iconv/iconvconfig.o /builds/glibc/gcc-3.3/iconv/strtab.o /builds/glibc/gcc-3.3/iconv/xmalloc.o  -Wl,-rpath-link=/builds/glibc/gcc-3.3:/builds/glibc/gcc-3.3/math:/builds/glibc/gcc-3.3/elf:/builds/glibc/gcc-3.3/dlfcn:/builds/glibc/gcc-3.3/nss:/builds/glibc/gcc-3.3/nis:/builds/glibc/gcc-3.3/rt:/builds/glibc/gcc-3.3/resolv:/builds/glibc/gcc-3.3/crypt:/builds/glibc/gcc-3.3/linuxthreads /builds/glibc/gcc-3.3/libc.so.6 /builds/glibc/gcc-3.3/libc_nonshared.a -lgcc `/opt/gcc/3.3-devel/bin/gcc --print-file-name=crtend.o` /builds/glibc/gcc-3.3/csu/crtn.o
/builds/glibc/gcc-3.3/libc.so.6(.data+0xb2c): multiple definition of `__ctype_toupper@GLIBC_2.0'
/builds/glibc/gcc-3.3/libc.so.6(*IND*+0x0): multiple definition of `__ctype32_toupper@GLIBC_2.2'
/builds/glibc/gcc-3.3/libc.so.6(.data+0xb34): first defined here
/builds/glibc/gcc-3.3/libc.so.6(.data+0xb30): multiple definition of `__ctype32_tolower@GLIBC_2.2'
/builds/glibc/gcc-3.3/libc.so.6(.data+0xb20): multiple definition of `__ctype_b@GLIBC_2.0'
/builds/glibc/gcc-3.3/libc.so.6(*IND*+0x0): multiple definition of `__ctype_tolower@GLIBC_2.0'
/builds/glibc/gcc-3.3/libc.so.6(.data+0xb28): first defined here
/builds/glibc/gcc-3.3/libc.so.6(.data+0xb24): multiple definition of `__ctype32_b@GLIBC_2.0'
/builds/glibc/gcc-3.3/libc.so.6: undefined reference to `__GI__exit'
collect2: ld returned 1 exit status
make[2]: *** [/builds/glibc/gcc-3.3/iconv/iconvconfig] Error 1
make[2]: Leaving directory `/usr/src/cvs/libc/iconv'

__GI__exit comes from sysdeps/unix/sysv/linux/i386/clone.S:
	call	HIDDEN_JUMPTARGET (_exit)

The new _exit code needs the right aliases.  I've changed i386/_exit.S
also to use the macros.

Ok to commit the appended patch?

Andreas

2002-09-16  Andreas Jaeger  <aj@suse.de>

	* sysdeps/unix/sysv/linux/_exit.c: Add hidden alias and weak_alias
	to _Exit.
	* sysdeps/unix/sysv/linux/i386/_exit.S: Likewise.

============================================================
Index: sysdeps/unix/sysv/linux/i386/_exit.S
--- sysdeps/unix/sysv/linux/i386/_exit.S	15 Sep 2002 02:28:28 -0000	1.1
+++ sysdeps/unix/sysv/linux/i386/_exit.S	16 Sep 2002 03:39:31 -0000
@@ -38,6 +38,5 @@ _exit:
 	hlt
 	.size	_exit,.-_exit
 
-	.globl	_Exit
-	.weak	_Exit
-_Exit	= _exit
+libc_hidden_def (_exit)
+weak_alias (_exit, _Exit)
============================================================
Index: sysdeps/unix/sysv/linux/_exit.c
--- sysdeps/unix/sysv/linux/_exit.c	15 Sep 2002 02:27:40 -0000	1.1
+++ sysdeps/unix/sysv/linux/_exit.c	16 Sep 2002 03:39:31 -0000
@@ -36,3 +36,5 @@ _exit (status)
       ABORT_INSTRUCTION;
     }
 }
+libc_hidden_def (_exit)
+weak_alias (_exit, _Exit)

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-15 20:40 Fix _exit for Linux Andreas Jaeger
@ 2002-09-15 22:11 ` Ulrich Drepper
  2002-09-15 23:56 ` Roland McGrath
  2002-09-16  9:46 ` Alexandre Oliva
  2 siblings, 0 replies; 20+ messages in thread
From: Ulrich Drepper @ 2002-09-15 22:11 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: GNU libc hacker

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andreas Jaeger wrote:

> Ok to commit the appended patch?

Yes.

- -- 
- ---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9hWgW2ijCOnn/RHQRAjmrAJ4rE8d7oe9hwAhM7zl+tmFMpOoN/ACeLIhu
1Vk3vsRwc1+SwSFHpr7mY8E=
=xm+Y
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-15 20:40 Fix _exit for Linux Andreas Jaeger
  2002-09-15 22:11 ` Ulrich Drepper
@ 2002-09-15 23:56 ` Roland McGrath
  2002-09-16  0:10   ` Ulrich Drepper
  2002-09-16  9:46 ` Alexandre Oliva
  2 siblings, 1 reply; 20+ messages in thread
From: Roland McGrath @ 2002-09-15 23:56 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: GNU libc hacker

Those fixes look right to me.

Also about this new exit code, I think that since __exit_thread is declared
in a generic header and called from generic code, it should not be in the
sysdeps makefile.  

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-15 23:56 ` Roland McGrath
@ 2002-09-16  0:10   ` Ulrich Drepper
  2002-09-16  0:36     ` Roland McGrath
  0 siblings, 1 reply; 20+ messages in thread
From: Ulrich Drepper @ 2002-09-16  0:10 UTC (permalink / raw)
  To: Roland McGrath; +Cc: Andreas Jaeger, GNU libc hacker

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Roland McGrath wrote:
> Those fixes look right to me.
> 
> Also about this new exit code, I think that since __exit_thread is declared
> in a generic header and called from generic code, it should not be in the
> sysdeps makefile.  

Not every system might have this function and it is not exported. 
Therefore having the rule in a sysdep Makefile is correct.

- -- 
- ---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9hYPl2ijCOnn/RHQRAte8AJ9enaI7LwMPsKB6sY2aB9PGtBn8dACffDkc
cmXmLtnz8M29v32Cg3vqcW0=
=v9BS
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-16  0:10   ` Ulrich Drepper
@ 2002-09-16  0:36     ` Roland McGrath
  2002-09-16  0:45       ` Ulrich Drepper
  0 siblings, 1 reply; 20+ messages in thread
From: Roland McGrath @ 2002-09-16  0:36 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Andreas Jaeger, GNU libc hacker

> Not every system might have this function and it is not exported. 
> Therefore having the rule in a sysdep Makefile is correct.

Systems that don't have it are broken now because generic/libc-start.c
refers to it.  Either it belongs in the generic code and the generic
makefile, or it belongs in the sysdeps makefile and a sysdeps libc-start.c.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-16  0:36     ` Roland McGrath
@ 2002-09-16  0:45       ` Ulrich Drepper
  0 siblings, 0 replies; 20+ messages in thread
From: Ulrich Drepper @ 2002-09-16  0:45 UTC (permalink / raw)
  To: Roland McGrath; +Cc: Andreas Jaeger, GNU libc hacker

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Roland McGrath wrote:

> Systems that don't have it are broken now because generic/libc-start.c
> refers to it.  Either it belongs in the generic code and the generic
> makefile, or it belongs in the sysdeps makefile and a sysdeps libc-start.c.

libc-start.c used __exit_thread only if HAVE_CANCELBUF is defined.  If 
this symbol is defined (at it isn't in the public code) then the 
function is not used.

- -- 
- ---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9hYvv2ijCOnn/RHQRAjWpAJsEqc7dhMu+BUeNLo1MKvHTpM9TcwCdFWcO
vG2RjU06PyoVOVeU2hdIbSw=
=DzVZ
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-16  9:46 ` Alexandre Oliva
@ 2002-09-16  9:37   ` Andreas Jaeger
  2002-09-16  9:52     ` Alexandre Oliva
  2002-09-16  9:54     ` Jakub Jelinek
  0 siblings, 2 replies; 20+ messages in thread
From: Andreas Jaeger @ 2002-09-16  9:37 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: GNU libc hacker

Alexandre Oliva <aoliva@redhat.com> writes:

> On Sep 16, 2002, Andreas Jaeger <aj@suse.de> wrote:
>
>> +libc_hidden_def (_exit)
>
> Hmm.  I don't think this is right.  libc_hidden_proto (_exit) is
> commented out in include/unistd.h, so, if my understanding is correct,

In that case it couldn't have worked before, have a look at
sysdeps/unix/_exit.S, I just copied the declarations from there and
that was the default used before AFAIK.

> libc_hidden_def (_exit) is not guaranteed to have the right effect.
> In fact, it fails to link libc.so on mips-linux, not only because
> _exit ends up undefined, but also because INLINE_SYSCALL has no
> arch-specific definition on mips, and we end up with a call to
> __syscall_exit, that does not exist.  I've tweaked the syscall file
> such that a definition for __syscall_exit is generated, but this was
> not enough to get _exit() to be defined, so the link of libc.so still
> failed.

Please send a patch,
Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-15 20:40 Fix _exit for Linux Andreas Jaeger
  2002-09-15 22:11 ` Ulrich Drepper
  2002-09-15 23:56 ` Roland McGrath
@ 2002-09-16  9:46 ` Alexandre Oliva
  2002-09-16  9:37   ` Andreas Jaeger
  2 siblings, 1 reply; 20+ messages in thread
From: Alexandre Oliva @ 2002-09-16  9:46 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: GNU libc hacker

On Sep 16, 2002, Andreas Jaeger <aj@suse.de> wrote:

> +libc_hidden_def (_exit)

Hmm.  I don't think this is right.  libc_hidden_proto (_exit) is
commented out in include/unistd.h, so, if my understanding is correct,
libc_hidden_def (_exit) is not guaranteed to have the right effect.
In fact, it fails to link libc.so on mips-linux, not only because
_exit ends up undefined, but also because INLINE_SYSCALL has no
arch-specific definition on mips, and we end up with a call to
__syscall_exit, that does not exist.  I've tweaked the syscall file
such that a definition for __syscall_exit is generated, but this was
not enough to get _exit() to be defined, so the link of libc.so still
failed.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-16  9:37   ` Andreas Jaeger
@ 2002-09-16  9:52     ` Alexandre Oliva
  2002-09-16  9:54     ` Jakub Jelinek
  1 sibling, 0 replies; 20+ messages in thread
From: Alexandre Oliva @ 2002-09-16  9:52 UTC (permalink / raw)
  To: GNU libc hacker

On Sep 16, 2002, Andreas Jaeger <aj@suse.de> wrote:

> Alexandre Oliva <aoliva@redhat.com> writes:
>> On Sep 16, 2002, Andreas Jaeger <aj@suse.de> wrote:
>> 
>>> +libc_hidden_def (_exit)
>> 
>> Hmm.  I don't think this is right.  libc_hidden_proto (_exit) is
>> commented out in include/unistd.h, so, if my understanding is correct,

> In that case it couldn't have worked before, have a look at
> sysdeps/unix/_exit.S, I just copied the declarations from there and
> that was the default used before AFAIK.

I found that confusing too.  But the difference is that in the
assembly implementation, the prototype declaration doesn't matter, as
it is the assembly code that determines the symbol name in the
function definition, whereas in C it is the prototype declaration that
has the symbol renamed.

> Please send a patch,

As soon as I get confirmation on whether we're to actually hide
_exit() or not.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-16  9:37   ` Andreas Jaeger
  2002-09-16  9:52     ` Alexandre Oliva
@ 2002-09-16  9:54     ` Jakub Jelinek
  2002-09-16 10:14       ` Ulrich Drepper
  1 sibling, 1 reply; 20+ messages in thread
From: Jakub Jelinek @ 2002-09-16  9:54 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: Alexandre Oliva, GNU libc hacker

On Mon, Sep 16, 2002 at 05:57:08PM +0200, Andreas Jaeger wrote:
> Alexandre Oliva <aoliva@redhat.com> writes:
> 
> > On Sep 16, 2002, Andreas Jaeger <aj@suse.de> wrote:
> >
> >> +libc_hidden_def (_exit)
> >
> > Hmm.  I don't think this is right.  libc_hidden_proto (_exit) is
> > commented out in include/unistd.h, so, if my understanding is correct,
> 
> In that case it couldn't have worked before, have a look at
> sysdeps/unix/_exit.S, I just copied the declarations from there and
> that was the default used before AFAIK.

There is a difference between libc_hidden_def in .S files and in .c files.
In .S files it will work even if libc_hidden_proto () was not declared
in header files (usually the assembly doesn't even include those headers),
while if you use libc_hidden_{def,weak} without previous libc_hidden_proto,
things will break badly...

	Jakub

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-16  9:54     ` Jakub Jelinek
@ 2002-09-16 10:14       ` Ulrich Drepper
  2002-09-24 20:24         ` Alexandre Oliva
  0 siblings, 1 reply; 20+ messages in thread
From: Ulrich Drepper @ 2002-09-16 10:14 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Andreas Jaeger, Alexandre Oliva, GNU libc hacker

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jakub Jelinek wrote:

> There is a difference between libc_hidden_def in .S files and in .c files.
> In .S files it will work even if libc_hidden_proto () was not declared
> in header files (usually the assembly doesn't even include those headers),
> while if you use libc_hidden_{def,weak} without previous libc_hidden_proto,
> things will break badly...

Anyway, the _exit code can now be hidden.  The implementation in glibc 
itself is now correct if compiled with the new kernel headers so there 
is no need to allow it to be overwritten.  Let's change include/unistd.h 
and add hidden everywhere for _exit.

- -- 
- ---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9hhGA2ijCOnn/RHQRAodIAKDGKsw02EoXxh2IKij3axJlDlb80ACgtfNr
bj9Y/7TEIN7bdij2o/pIUfU=
=/JH9
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-16 10:14       ` Ulrich Drepper
@ 2002-09-24 20:24         ` Alexandre Oliva
  2002-09-24 20:28           ` Roland McGrath
  0 siblings, 1 reply; 20+ messages in thread
From: Alexandre Oliva @ 2002-09-24 20:24 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Jakub Jelinek, Andreas Jaeger, GNU libc hacker

[-- Attachment #1: Type: text/plain, Size: 832 bytes --]

On Sep 16, 2002, Ulrich Drepper <drepper@redhat.com> wrote:

> Jakub Jelinek wrote:
>> There is a difference between libc_hidden_def in .S files and in .c files.
>> In .S files it will work even if libc_hidden_proto () was not declared
>> in header files (usually the assembly doesn't even include those headers),
>> while if you use libc_hidden_{def,weak} without previous libc_hidden_proto,
>> things will break badly...

> Anyway, the _exit code can now be hidden.  The implementation in glibc
> itself is now correct if compiled with the new kernel headers so there
> is no need to allow it to be overwritten.  Let's change
> include/unistd.h and add hidden everywhere for _exit.

Apologies for the delay.  Here's the patch that fixes the mips port
such that libc.so doesn't fail to link because __syscall_exit is not
defined.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: glibc-mips-_exit.patch --]
[-- Type: text/x-patch, Size: 834 bytes --]

Index: ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* sysdeps/unix/sysv/linux/mips/syscalls.list: Added _exit.

Index: sysdeps/unix/sysv/linux/mips/syscalls.list
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/syscalls.list,v
retrieving revision 1.32
diff -u -p -r1.32 syscalls.list
--- sysdeps/unix/sysv/linux/mips/syscalls.list 13 Sep 2002 07:12:28 -0000 1.32
+++ sysdeps/unix/sysv/linux/mips/syscalls.list 25 Sep 2002 03:23:27 -0000
@@ -82,3 +82,6 @@ sys_lstat	lxstat	lstat		i:sp	__syscall_l
 sys_readv	readv	readv		i:ipi	__syscall_readv
 sys_stat	xstat	stat		i:sp	__syscall_stat
 sys_writev	writev	writev		i:ipi	__syscall_writev
+
+# _exit() does INLINE_SYSCALL (_exit), but we don't have INLINE_SYSCALL
+sys_exit	_exit	exit		i:i	__syscall_exit

[-- Attachment #3: Type: text/plain, Size: 289 bytes --]


-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-24 20:24         ` Alexandre Oliva
@ 2002-09-24 20:28           ` Roland McGrath
  2002-09-24 20:35             ` Ulrich Drepper
  0 siblings, 1 reply; 20+ messages in thread
From: Roland McGrath @ 2002-09-24 20:28 UTC (permalink / raw)
  To: Alexandre Oliva
  Cc: Ulrich Drepper, Jakub Jelinek, Andreas Jaeger, GNU libc hacker

I think you can just add the alias to sysdeps/unix/_exit.S instead.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-24 20:28           ` Roland McGrath
@ 2002-09-24 20:35             ` Ulrich Drepper
  2002-09-24 21:08               ` Roland McGrath
  2002-09-25 10:27               ` Andreas Jaeger
  0 siblings, 2 replies; 20+ messages in thread
From: Ulrich Drepper @ 2002-09-24 20:35 UTC (permalink / raw)
  To: Roland McGrath; +Cc: Alexandre Oliva, GNU libc hacker

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Roland McGrath wrote:
> I think you can just add the alias to sysdeps/unix/_exit.S instead.

No.  MIPS is one of the platforms without a functioning INLINE_SYSCALL
implementation.  They need __syscall_* entry points.

- -- 
- ---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9kS7o2ijCOnn/RHQRAt2vAJ9numer5IQ70wh6H58xVnjTTtUN7gCfVGbT
5DX6d3+KJvnNLrC7ic7zRJ8=
=S4rk
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-24 20:35             ` Ulrich Drepper
@ 2002-09-24 21:08               ` Roland McGrath
  2002-09-24 21:53                 ` Ulrich Drepper
  2002-09-24 21:55                 ` Alexandre Oliva
  2002-09-25 10:27               ` Andreas Jaeger
  1 sibling, 2 replies; 20+ messages in thread
From: Roland McGrath @ 2002-09-24 21:08 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Alexandre Oliva, GNU libc hacker

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Roland McGrath wrote:
> > I think you can just add the alias to sysdeps/unix/_exit.S instead.
> 
> No.  MIPS is one of the platforms without a functioning INLINE_SYSCALL
> implementation.  They need __syscall_* entry points.

Yes, they need a __syscall_exit alias for _exit.  Why not use an alias of
the existing _exit instead of having syscalls.list generate a different one?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-24 21:08               ` Roland McGrath
@ 2002-09-24 21:53                 ` Ulrich Drepper
  2002-09-24 22:02                   ` Roland McGrath
  2002-09-24 21:55                 ` Alexandre Oliva
  1 sibling, 1 reply; 20+ messages in thread
From: Ulrich Drepper @ 2002-09-24 21:53 UTC (permalink / raw)
  To: Roland McGrath; +Cc: Alexandre Oliva, GNU libc hacker

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Roland McGrath wrote:

> Yes, they need a __syscall_exit alias for _exit.  Why not use an alias of
> the existing _exit instead of having syscalls.list generate a different one?

It's not an alias.  The _exit function does now more than it did before
and the exit syscall is only part of the job.  At least if the
exit_group syscall is also known at compile time.

- -- 
- ---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9kUE52ijCOnn/RHQRAuAsAKC9/noWjvA5IYbqIYwijGqviSm4JwCgoo69
9Qo9F8FgbDx7BjlNwV2wQh0=
=v1lG
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-24 21:08               ` Roland McGrath
  2002-09-24 21:53                 ` Ulrich Drepper
@ 2002-09-24 21:55                 ` Alexandre Oliva
  2002-09-24 22:01                   ` Roland McGrath
  1 sibling, 1 reply; 20+ messages in thread
From: Alexandre Oliva @ 2002-09-24 21:55 UTC (permalink / raw)
  To: Roland McGrath; +Cc: Ulrich Drepper, GNU libc hacker

On Sep 25, 2002, Roland McGrath <roland@redhat.com> wrote:

>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> 
>> Roland McGrath wrote:
>> > I think you can just add the alias to sysdeps/unix/_exit.S instead.
>> 
>> No.  MIPS is one of the platforms without a functioning INLINE_SYSCALL
>> implementation.  They need __syscall_* entry points.

> Yes, they need a __syscall_exit alias for _exit.

Such that _exit calls itself recursively? (this was my first reading)

I don't see any useful code in sysdeps/unix/_exit.S.  Certainly not
anything that resembles an actual system call.  What do you mean?
Perhaps that the syscall code generated by syscalls.list should define
_exit as an alias to __syscall_exit?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-24 21:55                 ` Alexandre Oliva
@ 2002-09-24 22:01                   ` Roland McGrath
  0 siblings, 0 replies; 20+ messages in thread
From: Roland McGrath @ 2002-09-24 22:01 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: Ulrich Drepper, GNU libc hacker

> I don't see any useful code in sysdeps/unix/_exit.S.  Certainly not
> anything that resembles an actual system call.

The `PSEUDO' macro does all the work that is done for any actual system
call defined in libc.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-24 21:53                 ` Ulrich Drepper
@ 2002-09-24 22:02                   ` Roland McGrath
  0 siblings, 0 replies; 20+ messages in thread
From: Roland McGrath @ 2002-09-24 22:02 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Alexandre Oliva, GNU libc hacker

> It's not an alias.  The _exit function does now more than it did before
> and the exit syscall is only part of the job.  At least if the
> exit_group syscall is also known at compile time.

Oh, right, I was overlooking the new unix/linux/_exit.c that overrides _exit.S.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Fix _exit for Linux
  2002-09-24 20:35             ` Ulrich Drepper
  2002-09-24 21:08               ` Roland McGrath
@ 2002-09-25 10:27               ` Andreas Jaeger
  1 sibling, 0 replies; 20+ messages in thread
From: Andreas Jaeger @ 2002-09-25 10:27 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Roland McGrath, Alexandre Oliva, GNU libc hacker

Ulrich Drepper <drepper@redhat.com> writes:

> Roland McGrath wrote:
>> I think you can just add the alias to sysdeps/unix/_exit.S instead.
>
> No.  MIPS is one of the platforms without a functioning INLINE_SYSCALL
> implementation.  They need __syscall_* entry points.

I've committed a similar patch that I got from elsewhere today,

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2002-09-25 17:27 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-15 20:40 Fix _exit for Linux Andreas Jaeger
2002-09-15 22:11 ` Ulrich Drepper
2002-09-15 23:56 ` Roland McGrath
2002-09-16  0:10   ` Ulrich Drepper
2002-09-16  0:36     ` Roland McGrath
2002-09-16  0:45       ` Ulrich Drepper
2002-09-16  9:46 ` Alexandre Oliva
2002-09-16  9:37   ` Andreas Jaeger
2002-09-16  9:52     ` Alexandre Oliva
2002-09-16  9:54     ` Jakub Jelinek
2002-09-16 10:14       ` Ulrich Drepper
2002-09-24 20:24         ` Alexandre Oliva
2002-09-24 20:28           ` Roland McGrath
2002-09-24 20:35             ` Ulrich Drepper
2002-09-24 21:08               ` Roland McGrath
2002-09-24 21:53                 ` Ulrich Drepper
2002-09-24 22:02                   ` Roland McGrath
2002-09-24 21:55                 ` Alexandre Oliva
2002-09-24 22:01                   ` Roland McGrath
2002-09-25 10:27               ` Andreas Jaeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).