diff options
Diffstat (limited to 'arch/mips')
-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; |