public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix non-IA32 build
@ 2002-12-10 10:02 Jakub Jelinek
  2002-12-10 12:23 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2002-12-10 10:02 UTC (permalink / raw)
  To: Roland McGrath, Ulrich Drepper; +Cc: Glibc hackers

Hi!

Some __libc aliases were missing on various arches.
I'm not sure if it is a good idea to export the new
pthread wrappers @@GLIBC_2.3.1, because that will mean current programs/libs
won't use the wrapped syscalls. IMHO it would be much better to export
them at the versions they have in libc.so. select would be a slight problem,
since it is usually select@@GLIBC_2.0, but on Alpha it is
select@@GLIBC_2.1.

2002-12-10  Jakub Jelinek  <jakub@redhat.com>

	* include/libc-symbols.h: Fix a comment typo.

	* sysdeps/unix/sysv/linux/alpha/select.S (__libc_select): New alias.
	* sysdeps/unix/sysv/linux/alpha/sigsuspend.S (__libc_sigsuspend):
	Likewise.
	* sysdeps/unix/sysv/linux/ia64/sigsuspend.c (__libc_sigsuspend):
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/sigsuspend.c
	(__libc_sigsuspend): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c
	(__libc_sigsuspend): Likewise.
	* sysdeps/generic/creat.c (__libc_creat): Renamed from creat.
	(creat): New weak alias.

--- libc/include/libc-symbols.h.jj	2002-11-05 23:10:07.000000000 +0100
+++ libc/include/libc-symbols.h	2002-12-10 17:36:24.000000000 +0100
@@ -655,7 +655,7 @@
    There is no reason to use hidden_weak over hidden_def in assembly,
    but we provide it for consistency with the C usage.
    hidden_proto doesn't make sense for assembly but the equivalent
-   is to call via the HIDDEN_JUMPTARGET macro einstead of JUMPTARGET.  */
+   is to call via the HIDDEN_JUMPTARGET macro instead of JUMPTARGET.  */
 #  define hidden_def(name)	strong_alias (name, __GI_##name)
 #  define hidden_weak(name)	hidden_def (name)
 #  define hidden_ver(local, name) strong_alias (local, __GI_##name)
--- libc/sysdeps/unix/sysv/linux/alpha/select.S.jj	2002-11-08 11:39:46.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/select.S	2002-12-10 17:31:49.000000000 +0100
@@ -125,7 +125,9 @@ default_symbol_version (__select_tv64, _
 strong_alias (__select_tv64, __select_tv64p)
 default_symbol_version (__select_tv64p, select, GLIBC_2.1)
 libc_hidden_ver (__select_tv64, __select)
+strong_alias (__select_tv64, __libc_select)
 #else
+strong_alias (__select, __libc_select)
 weak_alias (__select, select)
 libc_hidden_def (__select)
 #endif
--- libc/sysdeps/unix/sysv/linux/alpha/sigsuspend.S.jj	2002-11-08 11:39:46.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/sigsuspend.S	2002-12-10 17:34:10.000000000 +0100
@@ -53,3 +53,4 @@ error:
 
 libc_hidden_def (__sigsuspend)
 weak_alias(__sigsuspend, sigsuspend)
+strong_alias (__sigsuspend, __libc_sigsuspend)
--- libc/sysdeps/unix/sysv/linux/ia64/sigsuspend.c.jj	2002-08-03 11:09:56.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/sigsuspend.c	2002-12-10 17:37:21.000000000 +0100
@@ -39,3 +39,4 @@ __sigsuspend (set)
 }
 libc_hidden_def (__sigsuspend)
 weak_alias (__sigsuspend, sigsuspend)
+strong_alias (__sigsuspend, __libc_sigsuspend)
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/sigsuspend.c.jj	2002-08-03 11:09:58.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/sigsuspend.c	2002-12-10 17:37:52.000000000 +0100
@@ -38,3 +38,4 @@ __sigsuspend (set)
 }
 libc_hidden_def (__sigsuspend)
 weak_alias (__sigsuspend, sigsuspend)
+strong_alias (__sigsuspend, __libc_sigsuspend)
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c.jj	2002-08-03 11:09:59.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c	2002-12-10 17:38:24.000000000 +0100
@@ -38,3 +38,4 @@ __sigsuspend (set)
 }
 libc_hidden_def (__sigsuspend)
 weak_alias (__sigsuspend, sigsuspend)
+strong_alias (__sigsuspend, __libc_sigsuspend)
--- libc/sysdeps/generic/creat.c.jj	2001-08-23 18:49:27.000000000 +0200
+++ libc/sysdeps/generic/creat.c	2002-12-10 18:09:16.000000000 +0100
@@ -23,9 +23,10 @@
 
 /* Create FILE with protections MODE.  */
 int
-creat (file, mode)
+__libc_creat (file, mode)
      const char *file;
      mode_t mode;
 {
   return __open (file, O_WRONLY|O_CREAT|O_TRUNC, mode);
 }
+weak_alias (__libc_creat, creat)

	Jakub

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

* Re: [PATCH] Fix non-IA32 build
  2002-12-10 10:02 [PATCH] Fix non-IA32 build Jakub Jelinek
@ 2002-12-10 12:23 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2002-12-10 12:23 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Roland McGrath, Glibc hackers

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

Jakub Jelinek wrote:

> Some __libc aliases were missing on various arches.

I'll look at it.


> I'm not sure if it is a good idea to export the new
> pthread wrappers @@GLIBC_2.3.1, because that will mean current programs/libs
> won't use the wrapped syscalls. IMHO it would be much better to export
> them at the versions they have in libc.so. select would be a slight problem,
> since it is usually select@@GLIBC_2.0, but on Alpha it is
> select@@GLIBC_2.1.

We cannot do this.  Since this means newly linked programs will have
references to select@GLIBC_2.0 in libpthread while there was no so
function in libpthread at that time.  The DSO version startup test will
not catch this and only a relocation will fail later on.  That's wrong.

It's not ideal to have the symbols with different versions but it's also
no big problem.  Old code so far survived without the wrappers (and
ideally their behavior shouldn't be changed).  New programs will find
the new definition and add a reference to it.  This is also the desired
behavior, we don't want the reference to fall back to the definition in
libc.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE99k1n2ijCOnn/RHQRApZIAKCUN7C97J+NSjYYemzZ7gs1rouZkgCfUDSH
QIXJqjLP0LKt2pPs/J7lxwA=
=QgiF
-----END PGP SIGNATURE-----

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

end of thread, other threads:[~2002-12-10 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-10 10:02 [PATCH] Fix non-IA32 build Jakub Jelinek
2002-12-10 12:23 ` Ulrich Drepper

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).