From 4925704145f97d1cc2740cd0365ad02693d7caa7 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 11 Apr 2017 09:02:26 -0700 Subject: [PATCH] Ignore processor-specific GNU program properties Skip processor-specific GNU program properties with generic ELF target vector. They should be handled by the matching ELF target vector. * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore processor-specific properties with generic ELF target vector. --- bfd/elf-properties.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bfd/elf-properties.c b/bfd/elf-properties.c index a0456f8..04ef536 100644 --- a/bfd/elf-properties.c +++ b/bfd/elf-properties.c @@ -113,7 +113,15 @@ bad_size: if (type >= GNU_PROPERTY_LOPROC) { - if (type < GNU_PROPERTY_LOUSER && bed->parse_gnu_properties) + if (bed->elf_machine_code == EM_NONE) + { + /* Ignore processor-specific properties with generic ELF + target vector. They should be handled by the matching + ELF target vector. */ + goto next; + } + else if (type < GNU_PROPERTY_LOUSER + && bed->parse_gnu_properties) { enum elf_property_kind kind = bed->parse_gnu_properties (abfd, type, ptr, datasz); -- 2.9.3