Collision between NT_GNU_BUILD_ATTRIBUTE_OPEN and NT_PPC_VMX
authorAlan Modra <amodra@gmail.com>
Sat, 12 Aug 2017 06:57:29 +0000 (16:27 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 12 Aug 2017 08:15:39 +0000 (17:45 +0930)
* readelf.c (process_note): Qualify NT_GNU_BUILD_ATTRIBUTE notes
by name data.

binutils/ChangeLog
binutils/readelf.c

index fa2b3674f7d6ee1cf1c048d5b0a67e0131be4c14..1208754d59371b2caf84fe4f478003bf163824d2 100644 (file)
@@ -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-08-08  Nick Clifton  <nickc@redhat.com>
 
        PR 21909
index 2b15f0f2cb227191be72464b869f60f7b9b06b65..0fc656258360c7b4bcd4173ef56c8eb5be31a094 100644 (file)
@@ -17477,8 +17477,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);
@@ -17496,8 +17499,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)
This page took 0.035823 seconds and 4 git commands to generate.