devfsd, compiling on glibc22x
PATCH 1/1 devfsd, compiling on glibc22x
This patch is simple, defines RTLD_NEXT if not previously defined.
devfsd.c Sat Jan 27 18:15:46 2001 renamed from devfsd.c.orig Sat Jan 27 18:14:19 2001 +0 -0
@@ -165,6 +165,7 @@ Last updated by Richard Gooch 3-JUL-2000: Added "-C
/etc/modules.devfs"
when calling modprobe(8). Fail if a configuration line has EXECUTE
modprobe.
+ Updated by David Ford 27-JAN-2001: Added RTLD_NEXT define
*/
#include <unistd.h>
@@ -221,6 +222,10 @@
#define AC_MKNEWCOMPAT 8 #define AC_RMOLDCOMPAT 9 #define AC_RMNEWCOMPAT 10
+
+#ifndef RTLD_NEXT
+# define RTLD_NEXT ((void *) -1l)
+#endif
struct permissions_type
{
--
There is a natural aristocracy among men. The grounds of this are virtue and talents. Thomas Jefferson The good thing about standards is that there are so many to choose from. Andrew S. Tanenbaum
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 16 lines · David Ford
This patch is simple, defines
RTLD_NEXTif not previously defined.devfsd.c Sat Jan 27 18:15:46 2001 renamed from devfsd.c.orig Sat Jan 27 18:14:19 2001 +0
-0@@ -165,6 +165,7 @@ Last updated by Richard Gooch 3-JUL-2000: Added "-C
/etc/modules.devfs"
when calling modprobe(8). Fail if a configuration line has EXECUTE
modprobe.devfsd.c Sat Jan 27 18:15:46 2001 renamed from devfsd.c.orig Sat Jan 27 18:14:19 2001 +1
-0+ Updated by David Ford 27-JAN-2001: Added RTLD_NEXT define */ #include <unistd.h>
devfsd.c Sat Jan 27 18:15:46 2001 line 231
Quoted 10 lines
devfsd.c Sat Jan 27 18:15:46 2001 renamed from devfsd.c.orig Sat Jan 27 18:14:19 2001 +4
-0@@ -221,6 +222,10 @@ #define AC_MKNEWCOMPAT 8 #define AC_RMOLDCOMPAT 9 #define AC_RMNEWCOMPAT 10 + +#ifndef RTLD_NEXT +# define RTLD_NEXT ((void *) -1l) +#endif struct permissions_type {
for me :
make CFLAGS='-O2 -I. -D_GNU_SOURCE'
compiles without any patch. is it correct ?
Signature · 7 lines
------------------------------------------------ Pierre Rousselet <[email protected]> ------------------------------------------------ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/
Quoted 3 lines · Pierre Rousselet
for me :
make CFLAGS='-O2 -I. -D_GNU_SOURCE'
compiles without any patch. is it correct ?
Yes. RTLD_NEXT is not in any standard, it's an extension available via -D_GNU_SOURCE.
Signature · 7 lines
---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/
Quoted 8 lines · Ulrich Drepper
Quoted 3 lines · Pierre Rousselet
for me :
make CFLAGS='-O2 -I. -D_GNU_SOURCE'
compiles without any patch. is it correct ?Yes.
RTLD_NEXTis not in any standard, it's an extension available via -D_GNU_SOURCE.
This isn't a HURD feature.
This isn't even a C library feature.
This is a Linux feature.
So the _GNU_SOURCE thing is just plain wrong. Quit trying to rename the OS.
Since there are so many standards to choose from, putting all features into the default would be most obvious. Else what, pure C89 maybe? Dang new-fangled standards might break something. Normal UNIX systems don't make developers jump through hoops to get access to stuff; they instead provide clean namespaces upon request.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 8 lines · Ulrich Drepper
Quoted 3 lines · Pierre Rousselet
for me :
make CFLAGS='-O2 -I. -D_GNU_SOURCE'
compiles without any patch. is it correct ?Yes.
RTLD_NEXTis not in any standard, it's an extension available via -D_GNU_SOURCE.
So why do old binaries (compiled with glibc 2.1.3) segfault when they call dlsym() with RTLD_NEXT? Even newly compiled binaries (with glibc 2.2) still segfault.
Regards, Richard.... Permanent: [email protected] Current: [email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 8 lines · Ulrich Drepper
Quoted 3 lines · Pierre Rousselet
for me :
make CFLAGS='-O2 -I. -D_GNU_SOURCE'
compiles without any patch. is it correct ?Yes.
RTLD_NEXTis not in any standard, it's an extension available via -D_GNU_SOURCE.
Ok, how about we all tag Richard until he adds that to the makefile? :)
-d
--
There is a natural aristocracy among men. The grounds of this are virtue and talents. Thomas Jefferson The good thing about standards is that there are so many to choose from. Andrew S. Tanenbaum
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 3 lines · Richard Gooch
So why do old binaries (compiled with glibc 2.1.3) segfault when they call
dlsym()withRTLD_NEXT? Even newly compiled binaries (with glibc 2.2) still segfault.
What do you ask me? You wrote the code.
Signature · 7 lines
---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/
Quoted 7 lines · Ulrich Drepper
Quoted 3 lines · Richard Gooch
So why do old binaries (compiled with glibc 2.1.3) segfault when they call
dlsym()withRTLD_NEXT? Even newly compiled binaries (with glibc 2.2) still segfault.What do you ask me? You wrote the code.
But you wrote dlsym(), right I have a debug trace from someone which shows that the call to dlsym() segfaults. It's being called thusly:
dlsym (RTLD_NEXT, "symlink");
This doesn't fail with libc 5 nor with glibc 2.1.3. But it does with glibc 2.2.
Regards, Richard.... Permanent: [email protected] Current: [email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/