From: H.J. Lu Date: Sat, 22 Dec 2012 18:25:09 +0000 (+0000) Subject: Check R_X86_64_standard for unrecognized relocation X-Git-Tag: binutils-2_23_2~122 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eeab3760badcce40a3f2fe56e3889fe463ac561d;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index acb0d651d3c..a51bbd1d322 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2012-12-21 H.J. Lu + + * elf64-x86-64.c (elf_x86_64_relocate_section): Check + R_X86_64_standard instead of R_X86_64_max for unrecognized + relocation. + 2012-12-21 H.J. Lu PR ld/14980 diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index ef20bd8ed38..a0e2daf049c 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -3135,8 +3135,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; }