summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-07-13 09:34:49 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-07-13 09:34:49 +0000
commitc89ed64561aae9407492da7bbfbbd14b49add8bb (patch)
treea2af650a50210ea4af993ee759bb54c6bef7b233 /target
parent519de6658dad2a75b585b3904ba68b152f72a1f0 (diff)
[kernel] MIPS: fix loading of modules with unresolved weak symbols
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16823 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic-2.6/patches-2.6.28/025-mips_fix_loading_of_modules_with_unresolved_weak_sy.patch42
-rw-r--r--target/linux/generic-2.6/patches-2.6.29/025-mips_fix_loading_of_modules_with_unresolved_weak_sy.patch42
-rw-r--r--target/linux/generic-2.6/patches-2.6.30/026-mips_fix_loading_of_modules_with_unresolved_weak_sy.patch42
3 files changed, 126 insertions, 0 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.28/025-mips_fix_loading_of_modules_with_unresolved_weak_sy.patch b/target/linux/generic-2.6/patches-2.6.28/025-mips_fix_loading_of_modules_with_unresolved_weak_sy.patch
new file mode 100644
index 000000000..20c6132e4
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.28/025-mips_fix_loading_of_modules_with_unresolved_weak_sy.patch
@@ -0,0 +1,42 @@
+From 819b4bda18d62b52d04789c4a8d4fc3fbf9ce242 Mon Sep 17 00:00:00 2001
+From: Gabor Juhos <juhosg@openwrt.org>
+Date: Mon, 13 Jul 2009 10:46:49 +0200
+Subject: [PATCH] MIPS: fix loading of modules with unresolved weak symbols
+
+Loading of modules with unresolved weak symbols fails on MIPS
+since '88173507e4fc1e7ecd111b0565e8cba0cb7dae6d'.
+
+Modules: handle symbols that have a zero value
+
+The module subsystem cannot handle symbols that are zero. If symbols
+are present that have a zero value then the module resolver prints out a
+message that these symbols are unresolved.
+
+We have to use IS_ERR_VALUE() to check that a symbol has been resolved
+or not.
+
+Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+---
+ arch/mips/kernel/module.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/mips/kernel/module.c
++++ b/arch/mips/kernel/module.c
+@@ -303,7 +303,7 @@ int apply_relocate(Elf_Shdr *sechdrs, co
+ /* This is the symbol it is referring to */
+ sym = (Elf_Sym *)sechdrs[symindex].sh_addr
+ + ELF_MIPS_R_SYM(rel[i]);
+- if (!sym->st_value) {
++ if (IS_ERR_VALUE(sym->st_value)) {
+ /* Ignore unresolved weak symbol */
+ if (ELF_ST_BIND(sym->st_info) == STB_WEAK)
+ continue;
+@@ -343,7 +343,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs
+ /* This is the symbol it is referring to */
+ sym = (Elf_Sym *)sechdrs[symindex].sh_addr
+ + ELF_MIPS_R_SYM(rel[i]);
+- if (!sym->st_value) {
++ if (IS_ERR_VALUE(sym->st_value)) {
+ /* Ignore unresolved weak symbol */
+ if (ELF_ST_BIND(sym->st_info) == STB_WEAK)
+ continue;
diff --git a/target/linux/generic-2.6/patches-2.6.29/025-mips_fix_loading_of_modules_with_unresolved_weak_sy.patch b/target/linux/generic-2.6/patches-2.6.29/025-mips_fix_loading_of_modules_with_unresolved_weak_sy.patch
new file mode 100644
index 000000000..20c6132e4
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.29/025-mips_fix_loading_of_modules_with_unresolved_weak_sy.patch
@@ -0,0 +1,42 @@
+From 819b4bda18d62b52d04789c4a8d4fc3fbf9ce242 Mon Sep 17 00:00:00 2001
+From: Gabor Juhos <juhosg@openwrt.org>
+Date: Mon, 13 Jul 2009 10:46:49 +0200
+Subject: [PATCH] MIPS: fix loading of modules with unresolved weak symbols
+
+Loading of modules with unresolved weak symbols fails on MIPS
+since '88173507e4fc1e7ecd111b0565e8cba0cb7dae6d'.
+
+Modules: handle symbols that have a zero value
+
+The module subsystem cannot handle symbols that are zero. If symbols
+are present that have a zero value then the module resolver prints out a
+message that these symbols are unresolved.
+
+We have to use IS_ERR_VALUE() to check that a symbol has been resolved
+or not.
+
+Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+---
+ arch/mips/kernel/module.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/mips/kernel/module.c
++++ b/arch/mips/kernel/module.c
+@@ -303,7 +303,7 @@ int apply_relocate(Elf_Shdr *sechdrs, co
+ /* This is the symbol it is referring to */
+ sym = (Elf_Sym *)sechdrs[symindex].sh_addr
+ + ELF_MIPS_R_SYM(rel[i]);
+- if (!sym->st_value) {
++ if (IS_ERR_VALUE(sym->st_value)) {
+ /* Ignore unresolved weak symbol */
+ if (ELF_ST_BIND(sym->st_info) == STB_WEAK)
+ continue;
+@@ -343,7 +343,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs
+ /* This is the symbol it is referring to */
+ sym = (Elf_Sym *)sechdrs[symindex].sh_addr
+ + ELF_MIPS_R_SYM(rel[i]);
+- if (!sym->st_value) {
++ if (IS_ERR_VALUE(sym->st_value)) {
+ /* Ignore unresolved weak symbol */
+ if (ELF_ST_BIND(sym->st_info) == STB_WEAK)
+ continue;
diff --git a/target/linux/generic-2.6/patches-2.6.30/026-mips_fix_loading_of_modules_with_unresolved_weak_sy.patch b/target/linux/generic-2.6/patches-2.6.30/026-mips_fix_loading_of_modules_with_unresolved_weak_sy.patch
new file mode 100644
index 000000000..20c6132e4
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.30/026-mips_fix_loading_of_modules_with_unresolved_weak_sy.patch
@@ -0,0 +1,42 @@
+From 819b4bda18d62b52d04789c4a8d4fc3fbf9ce242 Mon Sep 17 00:00:00 2001
+From: Gabor Juhos <juhosg@openwrt.org>
+Date: Mon, 13 Jul 2009 10:46:49 +0200
+Subject: [PATCH] MIPS: fix loading of modules with unresolved weak symbols
+
+Loading of modules with unresolved weak symbols fails on MIPS
+since '88173507e4fc1e7ecd111b0565e8cba0cb7dae6d'.
+
+Modules: handle symbols that have a zero value
+
+The module subsystem cannot handle symbols that are zero. If symbols
+are present that have a zero value then the module resolver prints out a
+message that these symbols are unresolved.
+
+We have to use IS_ERR_VALUE() to check that a symbol has been resolved
+or not.
+
+Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+---
+ arch/mips/kernel/module.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/mips/kernel/module.c
++++ b/arch/mips/kernel/module.c
+@@ -303,7 +303,7 @@ int apply_relocate(Elf_Shdr *sechdrs, co
+ /* This is the symbol it is referring to */
+ sym = (Elf_Sym *)sechdrs[symindex].sh_addr
+ + ELF_MIPS_R_SYM(rel[i]);
+- if (!sym->st_value) {
++ if (IS_ERR_VALUE(sym->st_value)) {
+ /* Ignore unresolved weak symbol */
+ if (ELF_ST_BIND(sym->st_info) == STB_WEAK)
+ continue;
+@@ -343,7 +343,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs
+ /* This is the symbol it is referring to */
+ sym = (Elf_Sym *)sechdrs[symindex].sh_addr
+ + ELF_MIPS_R_SYM(rel[i]);
+- if (!sym->st_value) {
++ if (IS_ERR_VALUE(sym->st_value)) {
+ /* Ignore unresolved weak symbol */
+ if (ELF_ST_BIND(sym->st_info) == STB_WEAK)
+ continue;