[RFC,v2,4/6] Handle DT_GNU_UNIQUE in readelf

Message ID 20200617135945.12716-5-vivek@collabora.com
State New
Headers show
Series
  • binutils patches to add DT_GNU_UNIQUE
Related show

Commit Message

David Faust via Binutils June 17, 2020, 1:59 p.m.
---
 binutils/readelf.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

-- 
2.11.0

Patch

diff --git a/binutils/readelf.c b/binutils/readelf.c
index 101fd66ccb..1cf098d0f7 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -2211,6 +2211,7 @@  get_dynamic_type (Filedata * filedata, unsigned long type)
     case DT_GNU_LIBLIST: return "GNU_LIBLIST";
     case DT_GNU_LIBLISTSZ: return "GNU_LIBLISTSZ";
     case DT_GNU_HASH:	return "GNU_HASH";
+    case DT_GNU_UNIQUE: return "GNU_UNIQUE";
 
     default:
       if ((type >= DT_LOPROC) && (type <= DT_HIPROC))
@@ -10914,6 +10915,15 @@  the .dynstr section doesn't match the DT_STRTAB and DT_STRSZ tags\n"));
 	    }
 	  break;
 
+	case DT_GNU_UNIQUE:
+	  /* The value of this entry is currently unused.  */
+	  if (do_dynamic)
+            {
+              print_vma (entry->d_un.d_val, PREFIX_HEX);
+              putchar ('\n');
+            }
+	  break;
+
 	default:
 	  if ((entry->d_tag >= DT_VERSYM) && (entry->d_tag <= DT_VERNEEDNUM))
 	    filedata->version_info[DT_VERSIONTAGIDX (entry->d_tag)]