diff -Nur modutils-2.4.22/ChangeLog modutils-2.4.23/ChangeLog --- modutils-2.4.22/ChangeLog Mon Nov 25 15:12:57 2002 +++ modutils-2.4.23/ChangeLog Thu Mar 13 14:39:45 2003 @@ -1,3 +1,20 @@ +2003-03-13 Keith Owens + + modutils 2.4.23 + + * Correct s390[x] relocations for position independent code. + Bill Nottingham/Amit S. Kale. + * Add alias for the tun/tap device. Bill Nottingham. + * Fix insmod for ppc64 MODULE_PARM(foo, "l"). Peter Bergner. + * Add DESTDIR to man_kerneld, change man pages from 444 to 644. + Peter Breitenlohner. + * libz must be static for --enable-zlib. Bill Nottingham, reworked + by Keith Owens. + * Add note about refusing patches that change behaviour to man pages. + * Alpha now uses srel32 in the exception handling macros. + Richard Henderson. + * Support ia64 brl relocations. + 2002-11-25 Keith Owens modutils 2.4.22 diff -Nur modutils-2.4.22/INSTALL modutils-2.4.23/INSTALL --- modutils-2.4.22/INSTALL Sun Apr 28 17:28:59 2002 +++ modutils-2.4.23/INSTALL Wed Jan 29 17:39:00 2003 @@ -93,7 +93,9 @@ --disable-zlib Handle gzipped objects? Default is no. You probably only need this if you are booting a small root filesystem and the filesystem is - not compressed itself. + not compressed itself. You need a static + version of libz that is suitable for the host + system in order to use --enable-zlib. --disable-use-syscall Use _syscall() functions? Default is no. Any current libc should have definitions for the modutils to kernel system calls. If you get diff -Nur modutils-2.4.22/configure modutils-2.4.23/configure --- modutils-2.4.22/configure Sun Jul 21 17:31:45 2002 +++ modutils-2.4.23/configure Wed Jan 29 17:39:00 2003 @@ -901,6 +901,9 @@ +# If zlib is required, libz must be linked static, insmod is in /sbin, libz is +# in /usr/lib and may not be available when insmod is run. But if insmod is +# all static then we cannot use -Bdynamic at all, it confuses ld. # Check whether --enable-zlib or --disable-zlib was given. if test "${enable_zlib+set}" = set; then enableval="$enable_zlib" @@ -909,14 +912,17 @@ #define CONFIG_USE_ZLIB 1 EOF - LIBS="$LIBS -lz" + zlib_flags="-Wl,-Bstatic -lz" + if test "$insmod_static" = "no"; then + zlib_flags="$zlib_flags -Wl,-Bdynamic" + fi fi fi # Default for use-syscall depends on the presence of query_module in libc. echo $ac_n "checking for query_module in -lc""... $ac_c" 1>&6 -echo "configure:920: checking for query_module in -lc" >&5 +echo "configure:926: checking for query_module in -lc" >&5 ac_lib_var=`echo c'_'query_module | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -924,7 +930,7 @@ ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1006,7 +1012,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1010: checking for $ac_word" >&5 +echo "configure:1016: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1036,7 +1042,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1040: checking for $ac_word" >&5 +echo "configure:1046: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1087,7 +1093,7 @@ # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1091: checking for $ac_word" >&5 +echo "configure:1097: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1119,7 +1125,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1123: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1129: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1130,12 +1136,12 @@ cat > conftest.$ac_ext << EOF -#line 1134 "configure" +#line 1140 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1161,12 +1167,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1165: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1171: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1170: checking whether we are using GNU C" >&5 +echo "configure:1176: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1175,7 +1181,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1194,7 +1200,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1204: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1225,10 +1231,15 @@ fi fi +# Delay adding the zlib_flags until after AC_PROG_CC, so we can distinguish +# between a broken cc and a working cc but missing libz.a. There are no +# standard autoconf tests for the presence of a static library, so just set +# LDFLAGS and let the link step check for libz.a. +LDFLAGS="$LDFLAGS $zlib_flags" # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1232: checking for $ac_word" >&5 +echo "configure:1243: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1256,7 +1267,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1260: checking whether ln -s works" >&5 +echo "configure:1271: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1335,12 +1346,12 @@ echo $ac_n "checking for wordexp""... $ac_c" 1>&6 -echo "configure:1339: checking for wordexp" >&5 +echo "configure:1350: checking for wordexp" >&5 if eval "test \"`echo '$''{'ac_cv_func_wordexp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_wordexp=yes" else @@ -1386,12 +1397,12 @@ echo $ac_n "checking for glob""... $ac_c" 1>&6 -echo "configure:1390: checking for glob" >&5 +echo "configure:1401: checking for glob" >&5 if eval "test \"`echo '$''{'ac_cv_func_glob'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_glob=yes" else @@ -1438,13 +1449,13 @@ if test "$ARCH" = "alpha"; then echo $ac_n "checking for broken alpha assembler""... $ac_c" 1>&6 -echo "configure:1442: checking for broken alpha assembler" >&5 +echo "configure:1453: checking for broken alpha assembler" >&5 cat > conftest.c <&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ac_broken_gas=no if objdump -r conftest.o | grep 'LITERAL.*y.*4$' > /dev/null; then cat >> confdefs.h <<\EOF diff -Nur modutils-2.4.22/configure.in modutils-2.4.23/configure.in --- modutils-2.4.22/configure.in Sun Jul 21 17:31:45 2002 +++ modutils-2.4.23/configure.in Wed Jan 29 17:39:00 2003 @@ -190,11 +190,17 @@ fi],[STRIP=$DEFAULT_STRIP]) AC_SUBST(STRIP) +# If zlib is required, libz must be linked static, insmod is in /sbin, libz is +# in /usr/lib and may not be available when insmod is run. But if insmod is +# all static then we cannot use -Bdynamic at all, it confuses ld. AC_ARG_ENABLE(zlib, [ --disable-zlib Do not handle gzipped objects (default)], [if test "$enableval" = "yes"; then AC_DEFINE(CONFIG_USE_ZLIB) - LIBS="$LIBS -lz" + zlib_flags="-Wl,-Bstatic -lz" + if test "$insmod_static" = "no"; then + zlib_flags="$zlib_flags -Wl,-Bdynamic" + fi fi]) # Default for use-syscall depends on the presence of query_module in libc. @@ -228,6 +234,11 @@ fi AC_PROG_CC +# Delay adding the zlib_flags until after AC_PROG_CC, so we can distinguish +# between a broken cc and a working cc but missing libz.a. There are no +# standard autoconf tests for the presence of a static library, so just set +# LDFLAGS and let the link step check for libz.a. +LDFLAGS="$LDFLAGS $zlib_flags" AC_PROG_RANLIB AC_PROG_LN_S diff -Nur modutils-2.4.22/include/module.h modutils-2.4.23/include/module.h --- modutils-2.4.22/include/module.h Fri Mar 1 11:39:06 2002 +++ modutils-2.4.23/include/module.h Tue Jan 28 03:22:02 2003 @@ -96,6 +96,7 @@ #define tgt_sizeof_void_p sizeof(void *) #define tgt_long long #define tgt_long_fmt "l" +#define tgt_strtoul strtoul /* This assumes that long long on a 32 bit system is equivalent to long on the * equivalent 64 bit system. Also that void and char pointers are 8 bytes on @@ -107,11 +108,13 @@ #undef tgt_sizeof_long #undef tgt_sizeof_char_p #undef tgt_sizeof_void_p +#undef tgt_strtoul #define tgt_long long long #define tgt_long_fmt "ll" #define tgt_sizeof_long 8 #define tgt_sizeof_char_p 8 #define tgt_sizeof_void_p 8 +#define tgt_strtoul strtoull #endif /*======================================================================*/ diff -Nur modutils-2.4.22/include/version.h modutils-2.4.23/include/version.h --- modutils-2.4.22/include/version.h Sun Oct 13 22:51:05 2002 +++ modutils-2.4.23/include/version.h Thu Nov 28 00:29:33 2002 @@ -1 +1 @@ -#define MODUTILS_VERSION "2.4.22" +#define MODUTILS_VERSION "2.4.23" diff -Nur modutils-2.4.22/insmod/insmod.c modutils-2.4.23/insmod/insmod.c --- modutils-2.4.22/insmod/insmod.c Mon Nov 25 14:40:45 2002 +++ modutils-2.4.23/insmod/insmod.c Tue Jan 28 03:22:02 2003 @@ -1055,7 +1055,7 @@ break; case 'l': - *(long *) loc = strtoul(input, &input, 0); + *(tgt_long *) loc = tgt_strtoul(input, &input, 0); loc += tgt_sizeof_long; break; diff -Nur modutils-2.4.22/man/Makefile.in modutils-2.4.23/man/Makefile.in --- modutils-2.4.22/man/Makefile.in Mon Nov 25 14:23:35 2002 +++ modutils-2.4.23/man/Makefile.in Tue Jan 28 03:25:24 2003 @@ -18,7 +18,7 @@ for i in $(srcdir)/*.[1-8] ; do \ ext=`echo $$i | sed 's/.*\.//'`; \ $(MKDIR) $(DESTDIR)$(mandir)/man$$ext/; \ - $(INSTALL) -m 444 $$i $(DESTDIR)$(mandir)/man$$ext/; \ + $(INSTALL) -m 644 $$i $(DESTDIR)$(mandir)/man$$ext/; \ done realclean: clean diff -Nur modutils-2.4.22/man/depmod.8 modutils-2.4.23/man/depmod.8 --- modutils-2.4.22/man/depmod.8 Sun Apr 28 19:39:21 2002 +++ modutils-2.4.23/man/depmod.8 Wed Feb 12 14:51:53 2003 @@ -3,7 +3,7 @@ .\" This program is distributed according to the Gnu General Public License. .\" See the file COPYING in the base distribution directory .\" -.TH DEPMOD 8 "January 26, 2002" Linux "Linux Module Support" +.TH DEPMOD 8 "February 12, 2003" Linux "Linux Module Support" .SH NAME depmod \- handle dependency descriptions for loadable kernel modules .SH SYNOPSIS @@ -233,6 +233,14 @@ .SH BUGS \fBdepmod\fR [ \-V | \-\-version ] should exit immediately. Instead, it prints the version information and behaves as if no options were given. +.P +Although the fix for this bug is trivial, it changes the behaviour of +modutils. +Given the large number of distributions and scripts that run modutils +and expect the current behaviour, any change of behaviour is +unacceptable in 2.4. +Don't bother sending patches for this bug, it will not be fixed in 2.4, +it should be fixed in 2.5. .SH AUTHORS Jacques Gelinas (jack@solucorp.qc.ca) .br diff -Nur modutils-2.4.22/man/genksyms.8 modutils-2.4.23/man/genksyms.8 --- modutils-2.4.22/man/genksyms.8 Wed Jan 30 23:21:56 2002 +++ modutils-2.4.23/man/genksyms.8 Wed Feb 12 14:51:53 2003 @@ -3,7 +3,7 @@ .\" This program is distributed according to the Gnu General Public License. .\" See the file COPYING in the kernel source directory /linux .\" -.TH GENKSYMS 8 "January 30, 2002" Linux "Linux Module Support" +.TH GENKSYMS 8 "February 12, 2003" Linux "Linux Module Support" .SH NAME genksyms \- generate symbol version information .SH SYNOPSIS @@ -81,6 +81,14 @@ \fBgenksyms\fR [\fB\-V\fR\ |\ \fB\-\-version\fR] should display version information and then exit immediately. Instead, it prints the version information and behaves as if no options were given. +.P +Although the fix for this bug is trivial, it changes the behaviour of +modutils. +Given the large number of distributions and scripts that run modutils +and expect the current behaviour, any change of behaviour is +unacceptable in 2.4. +Don't bother sending patches for this bug, it will not be fixed in 2.4, +it should be fixed in 2.5. .SH HISTORY This versioning concept is a result from discussions, not at least on the KERNEL-channel, with a lot of people. diff -Nur modutils-2.4.22/man/insmod.8 modutils-2.4.23/man/insmod.8 --- modutils-2.4.22/man/insmod.8 Sun Oct 13 20:23:29 2002 +++ modutils-2.4.23/man/insmod.8 Wed Feb 12 14:51:53 2003 @@ -2,7 +2,7 @@ .\" This program is distributed according to the Gnu General Public License. .\" See the file COPYING in the kernel source directory. .\" -.TH INSMOD 8 "January 30, 2002" Linux "Linux Module Support" +.TH INSMOD 8 "February 12, 2003" Linux "Linux Module Support" .SH NAME insmod \- install loadable kernel module .hy 0 @@ -298,6 +298,14 @@ \fBinsmod\fR [\fB\-V\fR\ |\ \fB\-\-version\fR] should display version information and then exit immediately. Instead, it prints the version information and behaves as if no options were given. +.P +Although the fix for this bug is trivial, it changes the behaviour of +modutils. +Given the large number of distributions and scripts that run modutils +and expect the current behaviour, any change of behaviour is +unacceptable in 2.4. +Don't bother sending patches for this bug, it will not be fixed in 2.4, +it should be fixed in 2.5. .SH HISTORY Module support was first conceived by Anonymous .br diff -Nur modutils-2.4.22/man/ksyms.8 modutils-2.4.23/man/ksyms.8 --- modutils-2.4.22/man/ksyms.8 Thu Jan 31 23:17:09 2002 +++ modutils-2.4.23/man/ksyms.8 Wed Feb 12 14:51:53 2003 @@ -2,7 +2,7 @@ .\" This program is distributed according to the Gnu General Public License. .\" See the file COPYING in the kernel source directory .\" -.TH KSYMS 8 "January 31, 2002" Linux "Linux Module Support" +.TH KSYMS 8 "February 12, 2003" Linux "Linux Module Support" .SH NAME ksyms \- display exported kernel symbols. .SH SYNOPSIS @@ -35,6 +35,14 @@ .SH BUGS \fBksyms\fR [ \-V | \-\-version ] should exit immediately. Instead, it prints the version information and behaves as if no options were given. +.P +Although the fix for this bug is trivial, it changes the behaviour of +modutils. +Given the large number of distributions and scripts that run modutils +and expect the current behaviour, any change of behaviour is +unacceptable in 2.4. +Don't bother sending patches for this bug, it will not be fixed in 2.4, +it should be fixed in 2.5. .SH HISTORY The \fBksyms\fR command was first conceived by Bjorn Ekwall .br diff -Nur modutils-2.4.22/man/modprobe.8 modutils-2.4.23/man/modprobe.8 --- modutils-2.4.22/man/modprobe.8 Sun Apr 28 19:39:21 2002 +++ modutils-2.4.23/man/modprobe.8 Wed Feb 12 14:51:53 2003 @@ -3,7 +3,7 @@ .\" This program is distributed according to the Gnu General Public License. .\" See the file COPYING in the base distribution directory .\" -.TH MODPROBE 8 "February 4, 2002" Linux "Linux Module Support" +.TH MODPROBE 8 "February 12, 2003" Linux "Linux Module Support" .SH NAME modprobe \- high level handling of loadable modules .SH SYNOPSIS @@ -251,6 +251,14 @@ \fBmodprobe\fR\ [ \fB\-V\fR\ |\ \fB\-\-version\fR ] should exit immediately. Instead, it prints the version information and behaves as if no options were given. +.P +Although the fix for this bug is trivial, it changes the behaviour of +modutils. +Given the large number of distributions and scripts that run modutils +and expect the current behaviour, any change of behaviour is +unacceptable in 2.4. +Don't bother sending patches for this bug, it will not be fixed in 2.4, +it should be fixed in 2.5. .SH AUTHOR Jacques Gelinas (jack@solucorp.qc.ca) .br diff -Nur modutils-2.4.22/man/rmmod.8 modutils-2.4.23/man/rmmod.8 --- modutils-2.4.22/man/rmmod.8 Fri Mar 1 11:39:06 2002 +++ modutils-2.4.23/man/rmmod.8 Wed Feb 12 14:51:53 2003 @@ -3,7 +3,7 @@ .\" This program is distributed according to the Gnu General Public License. .\" See the file COPYING in the distribution source directory .\" -.TH RMMOD 8 "February 6, 2002" Linux "Linux Module Support" +.TH RMMOD 8 "February 12, 2003" Linux "Linux Module Support" .SH NAME rmmod \- unload loadable modules .SH SYNOPSIS @@ -93,6 +93,14 @@ \fBrmmod\fR [\fB\-V\fR\ |\ \fB\-\-version\fR] should display version information and then exit immediately. Instead, it prints the version information and behaves as if no options were given. +.P +Although the fix for this bug is trivial, it changes the behaviour of +modutils. +Given the large number of distributions and scripts that run modutils +and expect the current behaviour, any change of behaviour is +unacceptable in 2.4. +Don't bother sending patches for this bug, it will not be fixed in 2.4, +it should be fixed in 2.5. .SH HISTORY Module support was first conceived by Anonymous .br diff -Nur modutils-2.4.22/man_kerneld/Makefile.in modutils-2.4.23/man_kerneld/Makefile.in --- modutils-2.4.22/man_kerneld/Makefile.in Fri Mar 1 11:39:06 2002 +++ modutils-2.4.23/man_kerneld/Makefile.in Tue Jan 28 03:25:24 2003 @@ -10,8 +10,8 @@ set -e; \ for i in $(srcdir)/*.[1-8] ; do \ ext=`echo $$i | sed 's/.*\.//'`; \ - $(MKDIR) $(mandir)/man$$ext/; \ - $(INSTALL) -m 444 $$i $(mandir)/man$$ext/; \ + $(MKDIR) $(DESTDIR)$(mandir)/man$$ext/; \ + $(INSTALL) -m 644 $$i $(DESTDIR)$(mandir)/man$$ext/; \ done realclean: clean diff -Nur modutils-2.4.22/modutils.spec modutils-2.4.23/modutils.spec --- modutils-2.4.22/modutils.spec Sun Oct 13 22:51:05 2002 +++ modutils-2.4.23/modutils.spec Thu Nov 28 00:29:33 2002 @@ -1,6 +1,6 @@ Summary: Module utilities Name: modutils -Version: 2.4.22 +Version: 2.4.23 Release: 1 Copyright: GPL Group: Utilities/System diff -Nur modutils-2.4.22/obj/obj_alpha.c modutils-2.4.23/obj/obj_alpha.c --- modutils-2.4.22/obj/obj_alpha.c Mon Nov 25 14:07:19 2002 +++ modutils-2.4.23/obj/obj_alpha.c Wed Feb 19 21:42:19 2003 @@ -227,6 +227,14 @@ *iloc = (*iloc & ~0x3fff) | (v & 0x3fff); break; + case R_ALPHA_SREL32: + v -= dot; + if ((Elf64_Sxword)v >= 0x80000000 + || (Elf64_Sxword)v < -(Elf64_Sxword)0x80000000) + ret = obj_reloc_overflow; + *iloc = v; + break; + default: ret = obj_reloc_unhandled; break; diff -Nur modutils-2.4.22/obj/obj_ia64.c modutils-2.4.23/obj/obj_ia64.c --- modutils-2.4.22/obj/obj_ia64.c Wed Jul 31 10:41:48 2002 +++ modutils-2.4.23/obj/obj_ia64.c Thu Mar 13 14:39:45 2003 @@ -266,6 +266,24 @@ } /* + * add a immediate 60 value to the instruction at slot in bundle + */ +enum obj_reloc +obj_ia64_ins_pcrel60b(Elf64_Xword v, Elf64_Addr *bundle, Elf64_Xword slot) +{ + Elf64_Xword ins; + + assert(slot == 2); + + ins = obj_ia64_ins_extract_from_bundle(bundle, slot); + ins &= 0xffffffee00001fff; + ins |= ((v & 0x8000000000000000) >> 27) | ((v & 0x0000000000fffff0) << 9); + obj_ia64_ins_insert_in_bundle(bundle, slot, ins); + obj_ia64_ins_insert_in_bundle(bundle, --slot, ((v & 0x7fffffffff000000) >> 22)); + return obj_reloc_ok; +} + +/* * create a plt entry */ enum obj_reloc @@ -852,6 +870,10 @@ } break; + case R_IA64_PCREL60B : /* @pcrel(sym + add), brl */ + ret = obj_ia64_ins_pcrel60b(v - dot, bundle, slot); + break; + case R_IA64_PCREL32LSB : /* @pcrel(sym + add), data4 LSB */ COPY_32LSB(loc, v-dot); break; diff -Nur modutils-2.4.22/obj/obj_s390.c modutils-2.4.23/obj/obj_s390.c --- modutils-2.4.22/obj/obj_s390.c Fri Mar 1 11:39:06 2002 +++ modutils-2.4.23/obj/obj_s390.c Tue Jan 28 03:18:47 2003 @@ -146,6 +146,9 @@ case R_390_PLT32: case R_390_PLT16DBL: + /* For PLT relocs, the addend applies to the PLT slot. */ + v -= rel->r_addend; + /* find the plt entry and initialize it. */ assert(isym != NULL); pe = (struct s390_plt_entry *) &isym->pltent; @@ -154,19 +157,19 @@ unsigned int *ip = (unsigned int *)(ifile->plt->contents + pe->offset); ip[0] = 0x0d105810; /* basr 1,0; lg 1,10(1); br 1 */ ip[1] = 0x100607f1; - if (ELF32_R_TYPE(rel->r_info) == R_390_PLT16DBL) - ip[2] = v - 2; - else - ip[2] = v; + ip[2] = v; pe->initialized = 1; } /* Insert relative distance to target. */ v = plt + pe->offset - dot; + /* Add PLT slot addend here. */ + v += rel->r_addend; + if (ELF32_R_TYPE(rel->r_info) == R_390_PLT32) *(unsigned int *) loc = (unsigned int) v; else if (ELF32_R_TYPE(rel->r_info) == R_390_PLT16DBL) - *(unsigned short *) loc = (unsigned short) ((v + 2) >> 1); + *(unsigned short *) loc = (unsigned short) (v >> 1); break; case R_390_GLOB_DAT: diff -Nur modutils-2.4.22/obj/obj_s390x.c modutils-2.4.23/obj/obj_s390x.c --- modutils-2.4.22/obj/obj_s390x.c Fri Mar 1 11:39:06 2002 +++ modutils-2.4.23/obj/obj_s390x.c Tue Jan 28 03:18:47 2003 @@ -157,6 +157,9 @@ case R_390_PLT32DBL: case R_390_PLT32: case R_390_PLT16DBL: + /* For PLT relocs, the addend applies to the PLT slot. */ + v -= rel->r_addend; + /* find the plt entry and initialize it. */ assert(isym != NULL); pe = (struct s390_plt_entry *) &isym->pltent; @@ -166,27 +169,24 @@ ip[0] = 0x0d10e310; /* basr 1,0; lg 1,10(1); br 1 */ ip[1] = 0x100a0004; ip[2] = 0x07f10000; - if (ELF64_R_TYPE(rel->r_info) == R_390_PLT32DBL || - ELF64_R_TYPE(rel->r_info) == R_390_PLT16DBL) { - ip[3] = (unsigned int) ((v - 2) >> 32); - ip[4] = (unsigned int) (v - 2); - } else { - ip[3] = (unsigned int) (v >> 32); - ip[4] = (unsigned int) v; - } + ip[3] = (unsigned int) (v >> 32); + ip[4] = (unsigned int) v; pe->initialized = 1; } /* Insert relative distance to target. */ v = plt + pe->offset - dot; + /* Add PLT slot addend here. */ + v += rel->r_addend; + if (ELF64_R_TYPE(rel->r_info) == R_390_PLT64) *(unsigned long *) loc = v; else if (ELF64_R_TYPE(rel->r_info) == R_390_PLT32DBL) - *(unsigned int *) loc = (unsigned int) ((v + 2) >> 1); + *(unsigned int *) loc = (unsigned int) (v >> 1); else if (ELF64_R_TYPE(rel->r_info) == R_390_PLT32) *(unsigned int *) loc = (unsigned int) v; else if (ELF64_R_TYPE(rel->r_info) == R_390_PLT16DBL) - *(unsigned short *) loc = (unsigned short) ((v + 2) >> 1); + *(unsigned short *) loc = (unsigned short) (v >> 1); break; case R_390_GLOB_DAT: diff -Nur modutils-2.4.22/util/alias.h modutils-2.4.23/util/alias.h --- modutils-2.4.22/util/alias.h Mon Nov 25 15:12:57 2002 +++ modutils-2.4.23/util/alias.h Tue Jan 28 03:19:52 2003 @@ -117,6 +117,7 @@ "char-major-10-157 applicom", /* from David Woodhouse */ "char-major-10-175 agpgart", /* /dev/agpgart GART AGP mapping access */ "char-major-10-184 microcode", /* Tigran Aivazian */ + "char-major-10-200 tun", /* Universal TUN/TAP device driver */ "char-major-13 input", "char-major-13-32 mousedev",