This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch] Add readelf support for gold version note sections
- From: Cary Coutant <ccoutant at google dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Wed, 5 Feb 2014 10:31:20 -0800
- Subject: [patch] Add readelf support for gold version note sections
- Authentication-results: sourceware.org; auth=none
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;