This is the mail archive of the libc-hacker@sources.redhat.com 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]

Fix _exit for Linux


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


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