This is the mail archive of the binutils@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]

[patch] Add readelf support for gold version note sections


This patch adds readelf support for dumping gold version note sections.

Tested with no regressions on x86-64. OK to commit?

-cary


2014-02-05  Cary Coutant  <ccoutant@google.com>

binutils/
        PR binutils/16444
        * readelf.c (print_gnu_note): Add support for NT_GNU_GOLD_VERSION.


diff --git a/binutils/readelf.c b/binutils/readelf.c
index 7d228d6..453aeb7 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -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;


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