From 926c538512b17e87d94ea193d7dd10e012347ff0 Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Wed, 5 Feb 2014 10:29:24 -0800 Subject: [PATCH] Add readelf support for dumping gold version note sections. binutils/ PR binutils/16444 * readelf.c (print_gnu_note): Add support for NT_GNU_GOLD_VERSION. --- binutils/ChangeLog | 5 +++++ binutils/readelf.c | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 6f107e1..6758413 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2014-02-06 Cary Coutant + + PR binutils/16444 + * readelf.c (print_gnu_note): Add support for NT_GNU_GOLD_VERSION. + 2014-01-08 H.J. Lu * version.c (print_version): Update copyright year to 2014. 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; -- 2.7.4