Add readelf support for dumping gold version note sections.
authorCary Coutant <ccoutant@google.com>
Wed, 5 Feb 2014 18:29:24 +0000 (10:29 -0800)
committerCary Coutant <ccoutant@google.com>
Thu, 6 Feb 2014 16:38:03 +0000 (08:38 -0800)
binutils/
PR binutils/16444
* readelf.c (print_gnu_note): Add support for NT_GNU_GOLD_VERSION.

binutils/ChangeLog
binutils/readelf.c

index 6f107e14243a42a661ebce646a655adb9a91089e..67584131af26c0c2ab5cd2773627ac5fcd552e28 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-06  Cary Coutant  <ccoutant@google.com>
+
+       PR binutils/16444
+       * readelf.c (print_gnu_note): Add support for NT_GNU_GOLD_VERSION.
+
 2014-01-08  H.J. Lu  <hongjiu.lu@intel.com>
 
        * version.c (print_version): Update copyright year to 2014.
index 7d228d6b5a92fae970a56ef3b83292bdad20e851..453aeb710545f0e9aa0a38826bc723f0c9bd23b4 100644 (file)
@@ -13576,6 +13576,17 @@ print_gnu_note (Elf_Internal_Note *pnote)
                major, minor, subminor);
       }
       break;
+
+    case NT_GNU_GOLD_VERSION:
+      {
+       unsigned long i;
+
+       printf (_("    Version: "));
+       for (i = 0; i < pnote->descsz && pnote->descdata[i] != '\0'; ++i)
+         printf ("%c", pnote->descdata[i]);
+       printf ("\n");
+      }
+      break;
     }
 
   return 1;