This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Ignore processor-specific GNU program properties


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=537616aaeb44bc698af9848987e7c8e96d550595

commit 537616aaeb44bc698af9848987e7c8e96d550595
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Apr 11 15:07:41 2017 -0700

    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.

Diff:
---
 bfd/ChangeLog        |  5 +++++
 bfd/elf-properties.c | 10 +++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d046562..678a007 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
+	processor-specific properties with generic ELF target vector.
+
 2017-04-10  Qing Zhao  <qing.zhao@oracle.com>
 
         * elf32-sparc.c (elf_backend_fixup_symbol): New.
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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]