summaryrefslogtreecommitdiffstats
path: root/abs/core/klibc/klibc-module-init-tools.patch
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/klibc/klibc-module-init-tools.patch')
-rw-r--r--abs/core/klibc/klibc-module-init-tools.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/abs/core/klibc/klibc-module-init-tools.patch b/abs/core/klibc/klibc-module-init-tools.patch
new file mode 100644
index 0000000..a5e4532
--- /dev/null
+++ b/abs/core/klibc/klibc-module-init-tools.patch
@@ -0,0 +1,63 @@
+diff -Nur klibc-1.5.orig/usr/include/sys/elf32.h klibc-1.5/usr/include/sys/elf32.h
+--- klibc-1.5.orig/usr/include/sys/elf32.h 2007-03-04 02:52:10.000000000 +0100
++++ klibc-1.5/usr/include/sys/elf32.h 2007-10-31 09:18:09.000000000 +0100
+@@ -110,4 +110,8 @@
+ Elf32_Word n_type; /* Content type */
+ } Elf32_Nhdr;
+
++/* How to extract and insert information held in the st_info field. */
++#define ELF32_ST_BIND(val) (((unsigned char) (val)) >> 4)
++#define ELF32_ST_TYPE(val) ((val) & 0xf)
++
+ #endif /* _SYS_ELF32_H */
+diff -Nur klibc-1.5.orig/usr/include/sys/elf64.h klibc-1.5/usr/include/sys/elf64.h
+--- klibc-1.5.orig/usr/include/sys/elf64.h 2007-03-04 02:52:10.000000000 +0100
++++ klibc-1.5/usr/include/sys/elf64.h 2007-10-31 09:18:09.000000000 +0100
+@@ -110,4 +110,8 @@
+ Elf64_Word n_type; /* Content type */
+ } Elf64_Nhdr;
+
++/* Both Elf32_Sym and Elf64_Sym use the same one-byte st_info field. */
++#define ELF64_ST_BIND(val) ELF32_ST_BIND (val)
++#define ELF64_ST_TYPE(val) ELF32_ST_TYPE (val)
++
+ #endif /* _SYS_ELF64_H */
+diff -Nur klibc-1.5.orig/usr/include/sys/elfcommon.h klibc-1.5/usr/include/sys/elfcommon.h
+--- klibc-1.5.orig/usr/include/sys/elfcommon.h 2007-03-04 02:52:10.000000000 +0100
++++ klibc-1.5/usr/include/sys/elfcommon.h 2007-10-31 09:18:09.000000000 +0100
+@@ -184,4 +184,14 @@
+ #define ELFOSABI_NONE 0
+ #define ELFOSABI_LINUX 3
+
++/* Legal values for ST_BIND subfield of st_info (symbol binding). */
++#define STB_LOCAL 0 /* Local symbol */
++#define STB_GLOBAL 1 /* Global symbol */
++#define STB_WEAK 2 /* Weak symbol */
++#define STB_NUM 3 /* Number of defined types. */
++#define STB_LOOS 10 /* Start of OS-specific */
++#define STB_HIOS 12 /* End of OS-specific */
++#define STB_LOPROC 13 /* Start of processor-specific */
++#define STB_HIPROC 15 /* End of processor-specific */
++
+ #endif /* _SYS_ELFCOMMON_H */
+diff -Nur klibc-1.5.orig/usr/utils/Kbuild klibc-1.5/usr/utils/Kbuild
+--- klibc-1.5.orig/usr/utils/Kbuild 2007-03-04 02:52:10.000000000 +0100
++++ klibc-1.5/usr/utils/Kbuild 2007-10-31 09:18:28.000000000 +0100
+@@ -4,7 +4,7 @@
+
+ progs := chroot dd mkdir mkfifo mknod mount pivot_root umount
+ progs += true false sleep ln nuke minips cat
+-progs += insmod uname halt kill readlink cpio
++progs += uname halt kill readlink cpio
+
+ static-y := $(addprefix static/, $(progs))
+ shared-y := $(addprefix shared/, $(progs))
+@@ -40,8 +40,6 @@
+ shared/minips-y := minips.o
+ static/cat-y := cat.o
+ shared/cat-y := cat.o
+-static/insmod-y := insmod.o
+-shared/insmod-y := insmod.o
+ static/uname-y := uname.o
+ shared/uname-y := uname.o
+ static/halt-y := halt.o