summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/insmod-modutils/include
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/insmod-modutils/include')
-rw-r--r--mdk-stage1/insmod-modutils/include/config.h3
-rw-r--r--mdk-stage1/insmod-modutils/include/elf_alpha.h1
-rw-r--r--mdk-stage1/insmod-modutils/include/elf_arm.h1
-rw-r--r--mdk-stage1/insmod-modutils/include/elf_i386.h1
-rw-r--r--mdk-stage1/insmod-modutils/include/elf_m68k.h1
-rw-r--r--mdk-stage1/insmod-modutils/include/elf_mips.h1
-rw-r--r--mdk-stage1/insmod-modutils/include/elf_ppc.h1
-rw-r--r--mdk-stage1/insmod-modutils/include/elf_s390.h5
-rw-r--r--mdk-stage1/insmod-modutils/include/elf_sparc.h1
-rw-r--r--mdk-stage1/insmod-modutils/include/elf_sparc64.h1
-rw-r--r--mdk-stage1/insmod-modutils/include/kallsyms.h8
-rw-r--r--mdk-stage1/insmod-modutils/include/kerneld.h2
-rw-r--r--mdk-stage1/insmod-modutils/include/module.h17
-rw-r--r--mdk-stage1/insmod-modutils/include/obj.h39
-rw-r--r--mdk-stage1/insmod-modutils/include/util.h8
-rw-r--r--mdk-stage1/insmod-modutils/include/version.h2
16 files changed, 56 insertions, 36 deletions
diff --git a/mdk-stage1/insmod-modutils/include/config.h b/mdk-stage1/insmod-modutils/include/config.h
index 11da6a523..3a37b00d4 100644
--- a/mdk-stage1/insmod-modutils/include/config.h
+++ b/mdk-stage1/insmod-modutils/include/config.h
@@ -28,6 +28,7 @@
#include <stdio.h>
#include <sys/utsname.h>
+#define MODUTILS_MACROS "/lib/modutils/macros"
#define ETC_MODULES_CONF "/etc/modules.conf"
#define EXEC_PRE_INSTALL 0
@@ -92,6 +93,8 @@ enum gen_file_enum {
GEN_ISAPNPMAPFILE,
GEN_USBMAPFILE,
GEN_PARPORTMAPFILE,
+ GEN_IEEE1394MAPFILE,
+ GEN_PNPBIOSMAPFILE,
GEN_DEPFILE,
};
diff --git a/mdk-stage1/insmod-modutils/include/elf_alpha.h b/mdk-stage1/insmod-modutils/include/elf_alpha.h
index f1ec66f1c..4202bcc14 100644
--- a/mdk-stage1/insmod-modutils/include/elf_alpha.h
+++ b/mdk-stage1/insmod-modutils/include/elf_alpha.h
@@ -1,5 +1,4 @@
/* Machine-specific elf macros for the Alpha. */
-#ident "$Id$"
#define ELFCLASSM ELFCLASS64
#define ELFDATAM ELFDATA2LSB
diff --git a/mdk-stage1/insmod-modutils/include/elf_arm.h b/mdk-stage1/insmod-modutils/include/elf_arm.h
index f6b531e88..cf04cafe0 100644
--- a/mdk-stage1/insmod-modutils/include/elf_arm.h
+++ b/mdk-stage1/insmod-modutils/include/elf_arm.h
@@ -1,5 +1,4 @@
/* Machine-specific elf macros for ARM. */
-#ident "$Id$"
#define ELFCLASSM ELFCLASS32
#define ELFDATAM ELFDATA2LSB
diff --git a/mdk-stage1/insmod-modutils/include/elf_i386.h b/mdk-stage1/insmod-modutils/include/elf_i386.h
index c6c2d326e..f5c57d384 100644
--- a/mdk-stage1/insmod-modutils/include/elf_i386.h
+++ b/mdk-stage1/insmod-modutils/include/elf_i386.h
@@ -1,5 +1,4 @@
/* Machine-specific elf macros for i386 et al. */
-#ident "$Id$"
#define ELFCLASSM ELFCLASS32
#define ELFDATAM ELFDATA2LSB
diff --git a/mdk-stage1/insmod-modutils/include/elf_m68k.h b/mdk-stage1/insmod-modutils/include/elf_m68k.h
index 817fc8f2c..c488ba9d1 100644
--- a/mdk-stage1/insmod-modutils/include/elf_m68k.h
+++ b/mdk-stage1/insmod-modutils/include/elf_m68k.h
@@ -1,5 +1,4 @@
/* Machine-specific elf macros for m68k. */
-#ident "$Id$"
#define ELFCLASSM ELFCLASS32
#define ELFDATAM ELFDATA2MSB
diff --git a/mdk-stage1/insmod-modutils/include/elf_mips.h b/mdk-stage1/insmod-modutils/include/elf_mips.h
index 8a0430216..4b91ddd01 100644
--- a/mdk-stage1/insmod-modutils/include/elf_mips.h
+++ b/mdk-stage1/insmod-modutils/include/elf_mips.h
@@ -1,5 +1,4 @@
/* Machine-specific elf macros for MIPS. */
-#ident "$Id$"
#define ELFCLASSM ELFCLASS32
#ifdef __MIPSEB__
diff --git a/mdk-stage1/insmod-modutils/include/elf_ppc.h b/mdk-stage1/insmod-modutils/include/elf_ppc.h
index 71596de8c..b0060ace1 100644
--- a/mdk-stage1/insmod-modutils/include/elf_ppc.h
+++ b/mdk-stage1/insmod-modutils/include/elf_ppc.h
@@ -1,5 +1,4 @@
/* Machine-specific elf macros for the PowerPC. */
-#ident "$Id$"
#define ELFCLASSM ELFCLASS32
#define ELFDATAM ELFDATA2MSB
diff --git a/mdk-stage1/insmod-modutils/include/elf_s390.h b/mdk-stage1/insmod-modutils/include/elf_s390.h
index 547d66b83..7a35bde93 100644
--- a/mdk-stage1/insmod-modutils/include/elf_s390.h
+++ b/mdk-stage1/insmod-modutils/include/elf_s390.h
@@ -1,10 +1,11 @@
/* Machine-specific elf macros for i386 et al. */
-#ident "$Id$"
#define ELFCLASSM ELFCLASS32
#define ELFDATAM ELFDATA2MSB
-#define MATCH_MACHINE(x) (x == EM_S390)
+#define EM_S390_OLD 0xa390
+
+#define MATCH_MACHINE(x) (x == EM_S390 || x == EM_S390_OLD)
#define SHT_RELM SHT_RELA
#define Elf32_RelM Elf32_Rela
diff --git a/mdk-stage1/insmod-modutils/include/elf_sparc.h b/mdk-stage1/insmod-modutils/include/elf_sparc.h
index 9b5c348d9..8903b2654 100644
--- a/mdk-stage1/insmod-modutils/include/elf_sparc.h
+++ b/mdk-stage1/insmod-modutils/include/elf_sparc.h
@@ -1,5 +1,4 @@
/* Machine-specific elf macros for the Sparc. */
-#ident "$Id$"
#define ELFCLASSM ELFCLASS32
#define ELFDATAM ELFDATA2MSB
diff --git a/mdk-stage1/insmod-modutils/include/elf_sparc64.h b/mdk-stage1/insmod-modutils/include/elf_sparc64.h
index 158edd7e1..891e0c3d9 100644
--- a/mdk-stage1/insmod-modutils/include/elf_sparc64.h
+++ b/mdk-stage1/insmod-modutils/include/elf_sparc64.h
@@ -1,5 +1,4 @@
/* Machine-specific elf macros for the Sparc. */
-#ident "$Id$"
#define ELFCLASSM ELFCLASS64
#define ELFDATAM ELFDATA2MSB
diff --git a/mdk-stage1/insmod-modutils/include/kallsyms.h b/mdk-stage1/insmod-modutils/include/kallsyms.h
index 9748873cf..90bb75f22 100644
--- a/mdk-stage1/insmod-modutils/include/kallsyms.h
+++ b/mdk-stage1/insmod-modutils/include/kallsyms.h
@@ -1,3 +1,6 @@
+#ifndef MODUTILS_KALLSYMS_H
+#define MODUTILS_KALLSYMS_H 1
+
/* kallsyms headers
Copyright 2000 Keith Owens <kaos@ocs.com.au>
@@ -24,11 +27,6 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ident "$Id$"
-
-#ifndef MODUTILS_KALLSYMS_H
-#define MODUTILS_KALLSYMS_H 1
-
/* Have to (re)define these ElfW entries here because external kallsyms
* code does not have access to modutils/include/obj.h. This code is
* included from user spaces tools (modutils) and kernel, they need
diff --git a/mdk-stage1/insmod-modutils/include/kerneld.h b/mdk-stage1/insmod-modutils/include/kerneld.h
index 3bc2c9d42..f32e34b4a 100644
--- a/mdk-stage1/insmod-modutils/include/kerneld.h
+++ b/mdk-stage1/insmod-modutils/include/kerneld.h
@@ -4,8 +4,6 @@
#ifndef MODUTILS_KERNELD_H
#define MODUTILS_KERNELD_H
-#ident "$Id$"
-
#define KERNELD_SYSTEM 1
#define KERNELD_REQUEST_MODULE 2 /* "insmod" */
#define KERNELD_RELEASE_MODULE 3 /* "rmmod" */
diff --git a/mdk-stage1/insmod-modutils/include/module.h b/mdk-stage1/insmod-modutils/include/module.h
index db49ab2b2..ae8224f8a 100644
--- a/mdk-stage1/insmod-modutils/include/module.h
+++ b/mdk-stage1/insmod-modutils/include/module.h
@@ -1,3 +1,6 @@
+#ifndef MODUTILS_MODULE_H
+#define MODUTILS_MODULE_H 1
+
/* Definitions for the Linux module syscall interface.
Copyright 1996, 1997 Linux International.
@@ -20,11 +23,6 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifndef MODUTILS_MODULE_H
-#define MODUTILS_MODULE_H 1
-
-#ident "$Id$"
-
/* This file contains the structures used by the 2.0 and 2.1 kernels.
We do not use the kernel headers directly because we do not wish
to be dependant on a particular kernel version to compile insmod. */
@@ -207,4 +205,13 @@ int delete_module(const char *);
*/
extern unsigned int safemode;
+/*======================================================================*/
+/* Tainted kernel information. This must match include/linux/kernel.h */
+/* and kernel/panic.c. */
+
+#define TAINT_FILENAME "/proc/sys/kernel/tainted"
+#define TAINT_PROPRIETORY_MODULE (1<<0)
+#define TAINT_FORCED_MODULE (1<<1)
+#define TAINT_UNSAFE_SMP (1<<2)
+
#endif /* module.h */
diff --git a/mdk-stage1/insmod-modutils/include/obj.h b/mdk-stage1/insmod-modutils/include/obj.h
index b140c65c3..de346b16a 100644
--- a/mdk-stage1/insmod-modutils/include/obj.h
+++ b/mdk-stage1/insmod-modutils/include/obj.h
@@ -1,3 +1,6 @@
+#ifndef MODUTILS_OBJ_H
+#define MODUTILS_OBJ_H 1
+
/* Elf object file loading and relocation routines.
Copyright 1996, 1997 Linux International.
@@ -21,16 +24,13 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifndef MODUTILS_OBJ_H
-#define MODUTILS_OBJ_H 1
-
-#ident "$Id$"
-
/* The relocatable object is manipulated using elfin types. */
#include <stdio.h>
+#include <sys/types.h>
#include <elf.h>
#include ELF_MACHINE_H
+#include "module.h"
#ifndef ElfW
# if ELFCLASSM == ELFCLASS32
@@ -77,7 +77,7 @@ struct obj_symbol
{
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;
@@ -161,6 +161,8 @@ struct obj_symbol_patch_struct
#define obj_create_image ObjW(create_image)
#define obj_addr_to_native_ptr ObjW(addr_to_native_ptr)
#define obj_native_ptr_to_addr ObjW(native_ptr_to_addr)
+#define obj_kallsyms ObjW(kallsyms)
+#define obj_gpl_license ObjW(gpl_license)
#define arch_new_file ObjW(arch_new_file)
#define arch_new_section ObjW(arch_new_section)
#define arch_new_symbol ObjW(arch_new_symbol)
@@ -198,7 +200,8 @@ void obj_insert_section_load_order (struct obj_file *f,
struct obj_section *obj_create_alloced_section (struct obj_file *f,
const char *name,
unsigned long align,
- unsigned long size);
+ unsigned long size,
+ unsigned long flags);
struct obj_section *obj_create_alloced_section_first (struct obj_file *f,
const char *name,
@@ -264,7 +267,7 @@ union obj_ptr_4 {
void *ptr;
};
union obj_ptr_8 {
- Elf64_Xword addr;
+ u_int64_t addr; /* Should be Elf64_Xword but not all users have this yet */
void *ptr;
};
@@ -272,4 +275,24 @@ void *obj_addr_to_native_ptr(ElfW(Addr));
ElfW(Addr) obj_native_ptr_to_addr(void *);
+/* Standard method of finding relocation symbols, sets isym */
+#define obj_find_relsym(isym, f, find, rel, symtab, strtab) \
+ { \
+ unsigned long symndx = ELFW(R_SYM)((rel)->r_info); \
+ ElfW(Sym) *extsym = (symtab)+symndx; \
+ if (ELFW(ST_BIND)(extsym->st_info) == STB_LOCAL) { \
+ isym = (typeof(isym)) (f)->local_symtab[symndx]; \
+ } \
+ else { \
+ const char *name; \
+ if (extsym->st_name) \
+ name = (strtab) + extsym->st_name; \
+ else \
+ name = (f)->sections[extsym->st_shndx]->name; \
+ isym = (typeof(isym)) obj_find_symbol((find), name); \
+ } \
+ }
+
+int obj_gpl_license(struct obj_file *, const char **);
+
#endif /* obj.h */
diff --git a/mdk-stage1/insmod-modutils/include/util.h b/mdk-stage1/insmod-modutils/include/util.h
index b2e4a67c3..0a1354bec 100644
--- a/mdk-stage1/insmod-modutils/include/util.h
+++ b/mdk-stage1/insmod-modutils/include/util.h
@@ -1,3 +1,6 @@
+#ifndef MODUTILS_UTIL_H
+#define MODUTILS_UTIL_H 1
+
/* Miscelaneous utility functions.
Copyright 1996, 1997 Linux International.
@@ -20,11 +23,6 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifndef MODUTILS_UTIL_H
-#define MODUTILS_UTIL_H 1
-
-#ident "$Id$"
-
#include <stdio.h>
#include <sys/stat.h>
diff --git a/mdk-stage1/insmod-modutils/include/version.h b/mdk-stage1/insmod-modutils/include/version.h
index 51ca0eb29..9ca0c57a9 100644
--- a/mdk-stage1/insmod-modutils/include/version.h
+++ b/mdk-stage1/insmod-modutils/include/version.h
@@ -1 +1 @@
-#define MODUTILS_VERSION "2.4.2"
+#define MODUTILS_VERSION "2.4.19"