* Re: [parisc-linux] Re: hppa glibc 2.3.3
@ 2004-10-08 6:00 Joel Soete
2004-10-08 17:01 ` Carlos O'Donell
0 siblings, 1 reply; 9+ messages in thread
From: Joel Soete @ 2004-10-08 6:00 UTC (permalink / raw)
To: Carlos O'Donell; +Cc: parisc-linux
> -- Original Message --
> Date: Thu, 7 Oct 2004 18:39:40 -0400
> From: Carlos O'Donell <carlos@baldric.uwo.ca>
> To: Joel Soete <soete.joel@tiscali.be>
> Cc: parisc-linux@parisc-linux.org
> Subject: Re: [parisc-linux] Re: hppa glibc 2.3.3
>
>
> > I look forward and encounter:
> > <http://sources.redhat.com/ml/glibc-cvs/2004-q4/msg00074.html>
> >
> > It seems an evidence to just change errno to rtld_errno symbol for th=
ose
> > other arch but for hppa I realy didn't encounter this variable name,
what
> > did I missed (certanly a macro but which one?)
>
> Please please please, if you are going to quote other arches, read the
> code before commenting.
>
> i386 code is ancient and manipulates errno directly. We use the generic=
> code which is always kept up to date. Notice how alpha and ia64 didn't
> need to be fixed? Neither do we :)
>
Sorry to be so lazy (just a bit tired, appologies), here are the ref to
likewise modifications:
<http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linu=
x/ia64/sysdep.S.diff?cvsroot=3Dglibc&r1=3D1.8&r2=3D1.9>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/ia64/sysdep.S,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- libc/sysdeps/unix/sysv/linux/ia64/sysdep.S 2004/05/04 16:46:06 1.8
+++ libc/sysdeps/unix/sysv/linux/ia64/sysdep.S 2004/10/04 20:59:36 1.9
@@ -30,7 +30,7 @@
* be fine. Otherwise, we would have to first load the global
* pointer register from __gp.
*/
- addl r2=3D@gprel(errno),gp
+ addl r2=3D@gprel(rtld_errno),gp
;;
st4 [r2]=3Dr8
mov r8=3D-1
<http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/alpha/sys=
dep.h.diff?cvsroot=3Dglibc&r1=3D1.25&r2=3D1.26>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/glibc/libc/sysdeps/unix/alpha/sysdep.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- libc/sysdeps/unix/alpha/sysdep.h 2004/09/26 17:40:31 1.25
+++ libc/sysdeps/unix/alpha/sysdep.h 2004/10/04 20:59:38 1.26
@@ -82,7 +82,7 @@
#if RTLD_PRIVATE_ERRNO
# define SYSCALL_ERROR_LABEL $syscall_error
# define SYSCALL_ERROR_HANDLER \
- stl v0, errno(gp) !gprel; \
+ stl v0, rtld_errno(gp) !gprel; \
lda v0, -1; \
ret
#elif defined(PIC)
pfff, 'thuth is out there' :)
Thanks for your attention,
Joel
-------------------------------------------------------------------------=
--
Tiscali ADSL GO, 29,50 Euro/mois pendant toute une ann=E9e, profitez-en..=
..
http://reg.tiscali.be/adsl/welcome.asp?lg=3DFR
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [parisc-linux] Re: hppa glibc 2.3.3
2004-10-08 6:00 [parisc-linux] Re: hppa glibc 2.3.3 Joel Soete
@ 2004-10-08 17:01 ` Carlos O'Donell
2004-10-11 4:44 ` Randolph Chung
0 siblings, 1 reply; 9+ messages in thread
From: Carlos O'Donell @ 2004-10-08 17:01 UTC (permalink / raw)
To: Joel Soete; +Cc: parisc-linux
On Fri, Oct 08, 2004 at 08:00:53AM +0200, Joel Soete wrote:
> Sorry to be so lazy (just a bit tired, appologies), here are the ref to
> pfff, 'thuth is out there' :)
The only problem might exist if __errno_location does not return the
proper address of rltd_errno when RTLD_PRIVATE_ERRNO is defined. It
should. If it doesn't then our definition of
SYSCALL_ERRNO_HANDLER should change in that situation (away from
DEFAULT_SYSCALL_ERROR_HANDLER which is set to __errno_location).
All we want is that SYSCALL_ERRNO_HANDLER act as a function that returns
the address of an int, into which we write the syscall error value.
Read the code in:
libc/sysdeps/generic/errno-loc.c
libc/sysdeps/generic/errno.c
libc/sysdeps/unix/sysv/linux/hppa/sysdep.h
The last file defines the syscall wrappers and their usage of
SYSCALL_ERRNO_HANDLER.
c.
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [parisc-linux] Re: hppa glibc 2.3.3
2004-10-08 17:01 ` Carlos O'Donell
@ 2004-10-11 4:44 ` Randolph Chung
2004-10-12 20:38 ` Carlos O'Donell
0 siblings, 1 reply; 9+ messages in thread
From: Randolph Chung @ 2004-10-11 4:44 UTC (permalink / raw)
To: Carlos O'Donell; +Cc: parisc-linux
> The only problem might exist if __errno_location does not return the
> proper address of rltd_errno when RTLD_PRIVATE_ERRNO is defined. It
> should. If it doesn't then our definition of
> SYSCALL_ERRNO_HANDLER should change in that situation (away from
> DEFAULT_SYSCALL_ERROR_HANDLER which is set to __errno_location).
is there a fix for this? i was building glibc from cvs today to look at
the _dl_debug_state problem and ran into this too.... (also the problem
with the missing NULL defn for waitid)
The problem here seems to be that we are using the generic dl-sysdep.h
and errno.c/errno-loc.c definitions, and when building rtld-errno-loc.o,
__errno_location is coded to return &errno and not &rtld_errno.
i hacked this in my build but not sure if this is the proper solution --
should we propose a change to the generic errno-loc.c? or do we need our
own? or am i on the wrong track?
i'm using something like this:
Index: linuxthreads/sysdeps/pthread/errno-loc.c
===================================================================
RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/pthread/errno-loc.c,v
retrieving revision 1.3
diff -u -p -r1.3 errno-loc.c
--- linuxthreads/sysdeps/pthread/errno-loc.c 1 Apr 2003 00:52:40 -0000 1.3
+++ linuxthreads/sysdeps/pthread/errno-loc.c 11 Oct 2004 04:41:14 -0000
@@ -24,9 +24,13 @@
#include <sysdep-cancel.h>
#if ! USE___THREAD
+#if RTLD_PRIVATE_ERRNO
+extern int rtld_errno;
+#else
#undef errno
extern int errno;
#endif
+#endif
int *
#if ! USE___THREAD
@@ -41,6 +45,10 @@ __errno_location (void)
return LIBC_THREAD_GETMEM (self, p_errnop);
}
#endif
+#if RTLD_PRIVATE_ERRNO
+ return &rtld_errno;
+#else
return &errno;
+#endif
}
libc_hidden_def (__errno_location)
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [parisc-linux] Re: hppa glibc 2.3.3
2004-10-11 4:44 ` Randolph Chung
@ 2004-10-12 20:38 ` Carlos O'Donell
0 siblings, 0 replies; 9+ messages in thread
From: Carlos O'Donell @ 2004-10-12 20:38 UTC (permalink / raw)
To: Randolph Chung; +Cc: parisc-linux
> is there a fix for this? i was building glibc from cvs today to look at
> the _dl_debug_state problem and ran into this too.... (also the problem
> with the missing NULL defn for waitid)
I have a fix for the missing NULL defn.
> The problem here seems to be that we are using the generic dl-sysdep.h
> and errno.c/errno-loc.c definitions, and when building rtld-errno-loc.o,
> __errno_location is coded to return &errno and not &rtld_errno.
Yeah, I saw this yesterday while going through the tree.
> i hacked this in my build but not sure if this is the proper solution --
> should we propose a change to the generic errno-loc.c? or do we need our
> own? or am i on the wrong track?
IMO your hack is correct, a lot of other arches just
write their own version of this file and change it
depending on the defines.
I get a warning when I compile this and it doesn't
fail the build for me.
The patch looks good.
As for the missing _dl_debug_state, I'm really starting
to think it's a linker issue.
c.
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <200409271755.i8RHtNoa017851@hiauly1.hia.nrc.ca>]
end of thread, other threads:[~2004-10-12 20:38 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-08 6:00 [parisc-linux] Re: hppa glibc 2.3.3 Joel Soete
2004-10-08 17:01 ` Carlos O'Donell
2004-10-11 4:44 ` Randolph Chung
2004-10-12 20:38 ` Carlos O'Donell
[not found] <200409271755.i8RHtNoa017851@hiauly1.hia.nrc.ca>
[not found] ` <Pine.LNX.4.58.0409272134390.422@trillian.uni>
[not found] ` <20040928032200.GF27033@baldric.uwo.ca>
[not found] ` <Pine.LNX.4.58.0410050846320.924@trillian.uni>
2004-10-06 4:56 ` Carlos O'Donell
[not found] ` <4161729B00001345@mail-1-bnl.tiscali.it>
2004-10-07 15:29 ` Carlos O'Donell
2004-10-07 16:08 ` Joel Soete
2004-10-07 17:03 ` Joel Soete
2004-10-07 22:39 ` Carlos O'Donell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox