From: H.J. Lu Date: Wed, 7 Jan 2015 00:46:36 +0000 (-0800) Subject: Skip unknown relocation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6f25f22356dcf9ddf6b375c8e967486f10855dfd;p=binutils-gdb.git Skip unknown relocation PR binutils/17512 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation. * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 10ffe34e9ef..3483d79031e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2015-01-06 H.J. Lu + + PR binutils/17512 + * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation. + * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise. + 2015-01-06 Nick Clifton PR binutils/17512 diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index cf072a31207..a6c8faab9a5 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -5194,9 +5194,9 @@ bad_return: { long reloc_index; - /* PR 17512: file: bc9d6cf5. */ + /* Skip unknown relocation. PR 17512: file: bc9d6cf5. */ if (p->howto == NULL) - goto bad_return; + continue; if (p->howto->type != R_386_JUMP_SLOT && p->howto->type != R_386_IRELATIVE) diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 5cbb6fd9ba2..581ee171773 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -5559,8 +5559,9 @@ bad_return: { long reloc_index; + /* Skip unknown relocation. */ if (p->howto == NULL) - goto bad_return; + continue; if (p->howto->type != R_X86_64_JUMP_SLOT && p->howto->type != R_X86_64_IRELATIVE)