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/binutils-2_29-branch] Collision between NT_GNU_BUILD_ATTRIBUTE_OPEN and NT_PPC_VMX


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

commit 325696767d54f24172b46ab6e296f3abd458aa14
Author: Alan Modra <amodra@gmail.com>
Date:   Sat Aug 12 16:27:29 2017 +0930

    Collision between NT_GNU_BUILD_ATTRIBUTE_OPEN and NT_PPC_VMX
    
    	* readelf.c (process_note): Qualify NT_GNU_BUILD_ATTRIBUTE notes
    	by name data.

Diff:
---
 binutils/ChangeLog |  5 +++++
 binutils/readelf.c | 14 ++++++++++----
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 35c9a61..7c9b86f 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2017-08-12  Alan Modra  <amodra@gmail.com>
+
+	* readelf.c (process_note): Qualify NT_GNU_BUILD_ATTRIBUTE notes
+	by name data.
+
 2017-07-24  Tristan Gingold  <gingold@adacore.com>
 
 	* configure: Regenerate.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index b2f75c0..9bbfc95 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -17465,8 +17465,11 @@ process_note (Elf_Internal_Note *  pnote,
 
   printf ("  ");
 
-  if (pnote->type == NT_GNU_BUILD_ATTRIBUTE_OPEN
-      || pnote->type == NT_GNU_BUILD_ATTRIBUTE_FUNC)
+  if (((const_strneq (pnote->namedata, "GA")
+	&& strchr ("*$!+", pnote->namedata[2]) != NULL)
+       || strchr ("*$!+", pnote->namedata[0]) != NULL)
+      && (pnote->type == NT_GNU_BUILD_ATTRIBUTE_OPEN
+	  || pnote->type == NT_GNU_BUILD_ATTRIBUTE_FUNC))
     print_gnu_build_attribute_name (pnote);
   else
     print_symbol (-20, name);
@@ -17484,8 +17487,11 @@ process_note (Elf_Internal_Note *  pnote,
     return print_stapsdt_note (pnote);
   else if (const_strneq (pnote->namedata, "CORE"))
     return print_core_note (pnote);
-  else if (pnote->type == NT_GNU_BUILD_ATTRIBUTE_OPEN
-	   || pnote->type == NT_GNU_BUILD_ATTRIBUTE_FUNC)
+  else if (((const_strneq (pnote->namedata, "GA")
+	     && strchr ("*$!+", pnote->namedata[2]) != NULL)
+	    || strchr ("*$!+", pnote->namedata[0]) != NULL)
+	   && (pnote->type == NT_GNU_BUILD_ATTRIBUTE_OPEN
+	       || pnote->type == NT_GNU_BUILD_ATTRIBUTE_FUNC))
     return print_gnu_build_attribute_description (pnote, file);
 
   if (pnote->descsz)


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