Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109429513
D33379.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D33379.diff
View Options
diff --git a/contrib/elftoolchain/readelf/readelf.c b/contrib/elftoolchain/readelf/readelf.c
--- a/contrib/elftoolchain/readelf/readelf.c
+++ b/contrib/elftoolchain/readelf/readelf.c
@@ -373,8 +373,9 @@
unsigned int nt);
static const char *note_type_freebsd(unsigned int nt);
static const char *note_type_freebsd_core(unsigned int nt);
-static const char *note_type_linux_core(unsigned int nt);
+static const char *note_type_go(unsigned int nt);
static const char *note_type_gnu(unsigned int nt);
+static const char *note_type_linux_core(unsigned int nt);
static const char *note_type_netbsd(unsigned int nt);
static const char *note_type_openbsd(unsigned int nt);
static const char *note_type_unknown(unsigned int nt);
@@ -1151,6 +1152,8 @@
return note_type_freebsd(nt);
else if (strcmp(name, "GNU") == 0 && et != ET_CORE)
return note_type_gnu(nt);
+ else if (strcmp(name, "Go") == 0 && et != ET_CORE)
+ return note_type_go(nt);
else if (strcmp(name, "NetBSD") == 0 && et != ET_CORE)
return note_type_netbsd(nt);
else if (strcmp(name, "OpenBSD") == 0 && et != ET_CORE)
@@ -1243,6 +1246,15 @@
}
}
+static const char *
+note_type_go(unsigned int nt)
+{
+ switch (nt) {
+ case 4: return "elfGoBuildIDTag";
+ default: return (note_type_unknown(nt));
+ }
+}
+
static const char *
note_type_netbsd(unsigned int nt)
{
@@ -3814,6 +3826,16 @@
dump_flags(note_feature_ctl_flags, ubuf[0]);
return;
}
+ } else if (strcmp(name, "Go") == 0) {
+ if (type == 4) {
+ printf(" Build ID: ");
+ for (i = 0; i < sz; i++) {
+ printf(isprint(buf[i]) ? "%c" : "<%02x>",
+ buf[i]);
+ }
+ printf("\n");
+ return;
+ }
} else if (strcmp(name, "GNU") == 0) {
switch (type) {
case NT_GNU_PROPERTY_TYPE_0:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Feb 5, 11:11 PM (21 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16482583
Default Alt Text
D33379.diff (1 KB)
Attached To
Mode
D33379: readelf: add Go build ID ELF note support
Attached
Detach File
Event Timeline
Log In to Comment