提交 f3bf07b9 编写于 作者: A Atsushi Nemoto 提交者: Ralf Baechle

[MIPS] Ignore unresolved weak symbols in modules.

Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 320e6aba
...@@ -288,6 +288,9 @@ int apply_relocate(Elf_Shdr *sechdrs, const char *strtab, ...@@ -288,6 +288,9 @@ int apply_relocate(Elf_Shdr *sechdrs, const char *strtab,
sym = (Elf_Sym *)sechdrs[symindex].sh_addr sym = (Elf_Sym *)sechdrs[symindex].sh_addr
+ ELF_MIPS_R_SYM(rel[i]); + ELF_MIPS_R_SYM(rel[i]);
if (!sym->st_value) { if (!sym->st_value) {
/* Ignore unresolved weak symbol */
if (ELF_ST_BIND(sym->st_info) == STB_WEAK)
continue;
printk(KERN_WARNING "%s: Unknown symbol %s\n", printk(KERN_WARNING "%s: Unknown symbol %s\n",
me->name, strtab + sym->st_name); me->name, strtab + sym->st_name);
return -ENOENT; return -ENOENT;
...@@ -325,6 +328,9 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, ...@@ -325,6 +328,9 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
sym = (Elf_Sym *)sechdrs[symindex].sh_addr sym = (Elf_Sym *)sechdrs[symindex].sh_addr
+ ELF_MIPS_R_SYM(rel[i]); + ELF_MIPS_R_SYM(rel[i]);
if (!sym->st_value) { if (!sym->st_value) {
/* Ignore unresolved weak symbol */
if (ELF_ST_BIND(sym->st_info) == STB_WEAK)
continue;
printk(KERN_WARNING "%s: Unknown symbol %s\n", printk(KERN_WARNING "%s: Unknown symbol %s\n",
me->name, strtab + sym->st_name); me->name, strtab + sym->st_name);
return -ENOENT; return -ENOENT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册