From 137eec9ba03bb9e0e2f14cbf16760af8f9705151 Mon Sep 17 00:00:00 2001 From: emaste Date: Fri, 6 Mar 2020 17:24:51 +0000 Subject: [PATCH] readelf: print GNU Build-ID Sponsored by: The FreeBSD Foundation --- contrib/elftoolchain/readelf/readelf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/elftoolchain/readelf/readelf.c b/contrib/elftoolchain/readelf/readelf.c index e5a6fa0de2e6..28daeede16ae 100644 --- a/contrib/elftoolchain/readelf/readelf.c +++ b/contrib/elftoolchain/readelf/readelf.c @@ -3742,6 +3742,12 @@ dump_notes_data(struct readelf *re, const char *name, uint32_t type, case NT_GNU_PROPERTY_TYPE_0: dump_gnu_property_type_0(re, buf, sz); return; + case NT_GNU_BUILD_ID: + printf(" Build ID: "); + for (i = 0; i < sz; i++) + printf("%02x", (unsigned char)buf[i]); + printf("\n"); + return; } } else if (strcmp(name, "Xen") == 0) { switch (type) {