diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2006-05-22 11:45:07 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-06-05 19:15:10 -0400 |
commit | f3bf07b9a367c342bcbc9f47d525d3cf5e8b4f3b (patch) | |
tree | ef2b98ffd23f41a016f015ad78cf73a75d3647df /arch | |
parent | 320e6aba26892b016293190e079f15e83a5c28b9 (diff) |
[MIPS] Ignore unresolved weak symbols in modules.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/kernel/module.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c index e54a7f442f8a..d7bf0215bc1d 100644 --- a/arch/mips/kernel/module.c +++ b/arch/mips/kernel/module.c | |||
@@ -288,6 +288,9 @@ int apply_relocate(Elf_Shdr *sechdrs, const char *strtab, | |||
288 | sym = (Elf_Sym *)sechdrs[symindex].sh_addr | 288 | sym = (Elf_Sym *)sechdrs[symindex].sh_addr |
289 | + ELF_MIPS_R_SYM(rel[i]); | 289 | + ELF_MIPS_R_SYM(rel[i]); |
290 | if (!sym->st_value) { | 290 | if (!sym->st_value) { |
291 | /* Ignore unresolved weak symbol */ | ||
292 | if (ELF_ST_BIND(sym->st_info) == STB_WEAK) | ||
293 | continue; | ||
291 | printk(KERN_WARNING "%s: Unknown symbol %s\n", | 294 | printk(KERN_WARNING "%s: Unknown symbol %s\n", |
292 | me->name, strtab + sym->st_name); | 295 | me->name, strtab + sym->st_name); |
293 | return -ENOENT; | 296 | return -ENOENT; |
@@ -325,6 +328,9 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | |||
325 | sym = (Elf_Sym *)sechdrs[symindex].sh_addr | 328 | sym = (Elf_Sym *)sechdrs[symindex].sh_addr |
326 | + ELF_MIPS_R_SYM(rel[i]); | 329 | + ELF_MIPS_R_SYM(rel[i]); |
327 | if (!sym->st_value) { | 330 | if (!sym->st_value) { |
331 | /* Ignore unresolved weak symbol */ | ||
332 | if (ELF_ST_BIND(sym->st_info) == STB_WEAK) | ||
333 | continue; | ||
328 | printk(KERN_WARNING "%s: Unknown symbol %s\n", | 334 | printk(KERN_WARNING "%s: Unknown symbol %s\n", |
329 | me->name, strtab + sym->st_name); | 335 | me->name, strtab + sym->st_name); |
330 | return -ENOENT; | 336 | return -ENOENT; |