This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb/users/hjl/linux/master] Skip unknown relocation
- From: H.J.Lu <hjl at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 11 Jan 2015 16:20:43 -0000
- Subject: [binutils-gdb/users/hjl/linux/master] Skip unknown relocation
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6f25f22356dcf9ddf6b375c8e967486f10855dfd
commit 6f25f22356dcf9ddf6b375c8e967486f10855dfd
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jan 6 16:46:36 2015 -0800
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:
---
bfd/ChangeLog | 6 ++++++
bfd/elf32-i386.c | 4 ++--
bfd/elf64-x86-64.c | 3 ++-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 10ffe34..3483d79 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ 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 <nickc@redhat.com>
PR binutils/17512
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index cf072a3..a6c8faa 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 5cbb6fd..581ee17 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)