diff -Nur modutils-2.4.16/ChangeLog modutils-2.4.17/ChangeLog --- modutils-2.4.16/ChangeLog Sun Apr 28 19:39:21 2002 +++ modutils-2.4.17/ChangeLog Sun Jul 21 19:19:32 2002 @@ -1,3 +1,21 @@ +2002-07-21 Keith Owens + + modutils 2.4.17 + + * struct obj_symbol needs target specific value for 32/64 bit modutils. + Will Schmidt. + * New binutils no longer uses '?' for kstrtab in System.map. + Alan Modra. + * Only warn for unknown parameters on insmod. This used to be an error + which caused migration problems when a parameter was removed from a + module. Requested by Matt Domsch. + * Change default TAINT_URL to http://www.tux.org/lkml/#export-tainted. + * Upgrade for bison > 1.31. Reported by Akim Demaille. + * Add license string "GPL v2". Reported by Pavel Roskin. + * PPC64 updates for new relocation types. Alan Modra. + * Revert depmod to pre-2.4.13 behaviour. Unresolved symbols should not + cause a non-zero return code unless depmod -u is explicitly set. + 2002-04-28 Keith Owens modutils 2.4.16 diff -Nur modutils-2.4.16/configure modutils-2.4.17/configure --- modutils-2.4.16/configure Sun Apr 28 17:28:59 2002 +++ modutils-2.4.17/configure Sun Jul 21 17:31:45 2002 @@ -1328,9 +1328,9 @@ fi -# If the user did not specify TAINT_URL, use http://www.tux.org/lkml/#s1-18. +# If the user did not specify TAINT_URL, use http://www.tux.org/lkml/#export-tainted. if test "$TAINT_URL" = ""; then - TAINT_URL="http://www.tux.org/lkml/\#s1-18" + TAINT_URL="http://www.tux.org/lkml/\#export-tainted" fi diff -Nur modutils-2.4.16/configure.in modutils-2.4.17/configure.in --- modutils-2.4.16/configure.in Sun Apr 28 17:28:59 2002 +++ modutils-2.4.17/configure.in Sun Jul 21 17:31:45 2002 @@ -282,9 +282,9 @@ fi AC_SUBST(MKDIR) -# If the user did not specify TAINT_URL, use http://www.tux.org/lkml/#s1-18. +# If the user did not specify TAINT_URL, use http://www.tux.org/lkml/#export-tainted. if test "$TAINT_URL" = ""; then - TAINT_URL="http://www.tux.org/lkml/\#s1-18" + TAINT_URL="http://www.tux.org/lkml/\#export-tainted" fi AC_SUBST(TAINT_URL) diff -Nur modutils-2.4.16/depmod/depmod.c modutils-2.4.17/depmod/depmod.c --- modutils-2.4.16/depmod/depmod.c Sun Apr 28 17:53:35 2002 +++ modutils-2.4.17/depmod/depmod.c Sun Jul 21 19:19:32 2002 @@ -1060,12 +1060,9 @@ if (!isspace(*line)) /* Adressless symbol? */ p = strtok(NULL, " \t\n"); /* The second word is either the symbol name or a type */ - if (p && strlen(p) == 1) { /* System.map */ + if (p && p[0] && !p[1]) { /* System.map */ is_mapfile = 1; - if (*p != '?') - p = NULL; - else - p = strtok(NULL, " \t\n"); + p = strtok(NULL, " \t\n"); } else { /* /proc/ksyms copy */ if (p && strtok(NULL, " \t\n")) p = NULL; @@ -1083,7 +1080,7 @@ if (!isspace(*line)) /* Adressless symbol? */ p = strtok(NULL, " \t\n"); if (is_mapfile) { - if (*p != '?') + if (!p || !p[0] || p[1]) continue; p = strtok(NULL, " \t\n"); /* Sparc has symbols like '.div' that need to be @@ -1258,6 +1255,13 @@ if (m == nbdepmod) tbdep[nbdepmod++] = mod; } else { + /* Kludge to preserve old depmod behaviour without -u. + * 2.4.13 change to keep going had the unwanted side + * effect of always treating unresolved symbols as an + * error. Use the error() routine but do not count + * any errors. Remove in 2.5. + */ + int save_errors = errors; if (!quiet && nberr == 0) error("*** Unresolved symbols in %s", ptmod->name); @@ -1266,6 +1270,7 @@ nberr++; if (flag_unresolved_error) ret = 1; + errors = save_errors; } } verbose("%s\n", ptmod->name + skipchars); diff -Nur modutils-2.4.16/genksyms/parse.y modutils-2.4.17/genksyms/parse.y --- modutils-2.4.16/genksyms/parse.y Fri Mar 1 11:39:06 2002 +++ modutils-2.4.17/genksyms/parse.y Sun Jul 21 18:24:43 2002 @@ -188,8 +188,8 @@ AUTO_KEYW | REGISTER_KEYW | STATIC_KEYW - | EXTERN_KEYW { is_extern = 1; $$ = $1 } - | INLINE_KEYW { is_extern = 0; $$ = $1 } + | EXTERN_KEYW { is_extern = 1; $$ = $1; } + | INLINE_KEYW { is_extern = 0; $$ = $1; } ; type_specifier: diff -Nur modutils-2.4.16/include/obj.h modutils-2.4.17/include/obj.h --- modutils-2.4.16/include/obj.h Fri Mar 1 11:39:06 2002 +++ modutils-2.4.17/include/obj.h Sun Jul 21 17:00:22 2002 @@ -30,6 +30,7 @@ #include #include #include ELF_MACHINE_H +#include "module.h" #ifndef ElfW # if ELFCLASSM == ELFCLASS32 @@ -76,7 +77,7 @@ { struct obj_symbol *next; /* hash table link */ const char *name; - unsigned long value; + tgt_long value; unsigned long size; int secidx; /* the defining section index/module */ int info; diff -Nur modutils-2.4.16/include/version.h modutils-2.4.17/include/version.h --- modutils-2.4.16/include/version.h Thu Apr 4 16:39:13 2002 +++ modutils-2.4.17/include/version.h Sun Jul 21 16:59:27 2002 @@ -1 +1 @@ -#define MODUTILS_VERSION "2.4.16" +#define MODUTILS_VERSION "2.4.17" diff -Nur modutils-2.4.16/insmod/insmod.c modutils-2.4.17/insmod/insmod.c --- modutils-2.4.16/insmod/insmod.c Sun Apr 28 18:00:14 2002 +++ modutils-2.4.17/insmod/insmod.c Sun Jul 21 17:28:37 2002 @@ -812,14 +812,10 @@ memcpy(key + 5, *argv, n); key[n + 5] = '\0'; if ((fmt = get_modinfo_value(f, key)) == NULL) { - if (required) { - error("invalid parameter %s", key); - return 0; - } - else { - if (flag_verbose) - lprintf("ignoring %s", *argv); - continue; /* silently ignore optional parameters */ + if (required || flag_verbose) { + lprintf("Warning: ignoring %s, no such parameter in this module", *argv); + ++warnings; + continue; } } key += 5; diff -Nur modutils-2.4.16/modutils.spec modutils-2.4.17/modutils.spec --- modutils-2.4.16/modutils.spec Thu Apr 4 16:39:13 2002 +++ modutils-2.4.17/modutils.spec Sun Jul 21 16:59:27 2002 @@ -1,6 +1,6 @@ Summary: Module utilities Name: modutils -Version: 2.4.16 +Version: 2.4.17 Release: 1 Copyright: GPL Group: Utilities/System diff -Nur modutils-2.4.16/obj/obj_gpl_license.c modutils-2.4.17/obj/obj_gpl_license.c --- modutils-2.4.16/obj/obj_gpl_license.c Tue Oct 2 11:22:51 2001 +++ modutils-2.4.17/obj/obj_gpl_license.c Sun Jul 21 18:34:40 2002 @@ -27,6 +27,7 @@ */ static const char *gpl_licenses[] = { "GPL", + "GPL v2", "GPL and additional rights", "Dual BSD/GPL", "Dual MPL/GPL", diff -Nur modutils-2.4.16/obj/obj_ppc64.c modutils-2.4.17/obj/obj_ppc64.c --- modutils-2.4.16/obj/obj_ppc64.c Mon Dec 3 23:56:01 2001 +++ modutils-2.4.17/obj/obj_ppc64.c Sun Jul 21 18:36:30 2002 @@ -255,10 +255,12 @@ case R_PPC64_ADDR16_HI: case R_PPC64_ADDR16_LO: case R_PPC64_ADDR16_LO_DS: + case R_PPC64_ADDR32: case R_PPC64_ADDR64: case R_PPC64_TOC: case R_PPC64_TOC16: case R_PPC64_TOC16_DS: + case R_PPC64_REL14: continue; case R_PPC64_REL24: @@ -374,6 +376,12 @@ return 1; } +static inline int apply_addr32 (char *loc, Elf64_Addr v) +{ + *((Elf64_Word *) loc) = (Elf64_Word) v; + return v + ((Elf64_Addr) 1 << 32) >= ((Elf64_Addr) 2 << 32); +} + static inline int apply_addr16_lo (char *loc, Elf64_Addr v) { *((Elf64_Half *) loc) = (*((Elf64_Half *) loc) & ~0xffff) | (v & 0xffff); @@ -448,6 +456,11 @@ ret = obj_reloc_overflow; break; + case R_PPC64_ADDR32: + if (apply_addr32 (loc, v)) + ret = obj_reloc_overflow; + break; + case R_PPC64_ADDR64: v = ppc64_adjust_symval (hfile, isym, v); *((Elf64_Xword *) loc) = v; @@ -548,6 +561,20 @@ ret = obj_reloc_dangerous; } } + break; + + case R_PPC64_REL14: + dot = targsec->header.sh_addr + rel->r_offset; + v -= dot; + if (v + 0x8000 > 0xffff || (v & 3) != 0) + { + if (DEBUG_PPC > 0) + fprintf (stderr, "rel14 overflow\n"); + ret = obj_reloc_overflow; + } + *((Elf64_Word *) loc) = ((*((Elf64_Word *) loc) & ~0xfffc) + | (v & 0xfffc)); + break; } return ret;