Handle DT_GNU_FLAGS_1 in readelf
authorVivek Das Mohapatra <vivek@collabora.com>
Mon, 14 Dec 2020 17:25:53 +0000 (17:25 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 15 Dec 2020 08:15:09 +0000 (18:45 +1030)
* readelf.c (get_dynamic_type): Handle DT_GNU_FLAGS_1.
(process_dynamic_section): Likewise.

binutils/ChangeLog
binutils/readelf.c

index 6f0ed5e1621a2c204f382e68862cf2724d4dd55f..885b47034847d07ac0729059d76d634ee84fc86d 100644 (file)
@@ -1,3 +1,8 @@
+2020-12-15  Vivek Das Mohapatra  <vivek@collabora.com>
+
+       * readelf.c (get_dynamic_type): Handle DT_GNU_FLAGS_1.
+       (process_dynamic_section): Likewise.
+
 2020-12-11  Cary Coutant  <ccoutant@gmail.com>
 
        * readelf.c (get_machine_name): Update list of e_machine values.
index ed252f9c41403305a8ddd1575f0cee86bb960861..22354ba951b3a15593fe319f9002710ab50c9ef8 100644 (file)
@@ -2232,6 +2232,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_FLAGS_1: return "GNU_FLAGS_1";
 
     default:
       if ((type >= DT_LOPROC) && (type <= DT_HIPROC))
@@ -11082,6 +11083,28 @@ the .dynstr section doesn't match the DT_STRTAB and DT_STRSZ tags\n"));
            }
          break;
 
+       case DT_GNU_FLAGS_1:
+         if (do_dynamic)
+           {
+             printf (_("Flags:"));
+             if (entry->d_un.d_val == 0)
+               printf (_(" None\n"));
+             else
+               {
+                 unsigned long int val = entry->d_un.d_val;
+
+                 if (val & DF_GNU_1_UNIQUE)
+                   {
+                     printf (" UNIQUE");
+                     val ^= DF_GNU_1_UNIQUE;
+                   }
+                 if (val != 0)
+                   printf (" %lx", val);
+                 puts ("");
+               }
+           }
+         break;
+
        default:
          if ((entry->d_tag >= DT_VERSYM) && (entry->d_tag <= DT_VERNEEDNUM))
            filedata->version_info[DT_VERSIONTAGIDX (entry->d_tag)]
This page took 0.03505 seconds and 4 git commands to generate.