summaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-12-21 20:54:59 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-12-21 20:54:59 +0000
commit2e192da85953fc037cf95e4f75885961a09a51aa (patch)
tree6c01c531219e549546b09923383310465e2c1e35 /bfd/elf64-x86-64.c
parent60ef6a53db4fb25ae17b971c72f42143778e243a (diff)
downloadbinutils-redhat-2e192da85953fc037cf95e4f75885961a09a51aa.tar.gz
Check R_X86_64_standard for unrecognized relocation
* elf64-x86-64.c (elf_x86_64_relocate_section): Check R_X86_64_standard instead of R_X86_64_max for unrecognized relocation.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 11ec917e69..92bf991387 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -3207,8 +3207,11 @@ elf_x86_64_relocate_section (bfd *output_bfd,
|| r_type == (int) R_X86_64_GNU_VTENTRY)
continue;
- if (r_type >= R_X86_64_max)
+ if (r_type >= (int) R_X86_64_standard)
{
+ (*_bfd_error_handler)
+ (_("%B: unrecognized relocation (0x%x) in section `%A'"),
+ input_bfd, input_section, r_type);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}