]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
readelf: Add 'R' and 'D' to "Key to Flags:"
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 2 Feb 2021 13:14:48 +0000 (05:14 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 2 Feb 2021 13:15:05 +0000 (05:15 -0800)
Add "R (retain)" and "D (mbind)" to "Key to Flags:".

PR binutils/27281
* readelf.c (process_section_headers): Add 'R' and 'D' to
"Key to Flags:".
* testsuite/binutils-all/retain1a.d: Updated.

binutils/ChangeLog
binutils/readelf.c
binutils/testsuite/binutils-all/retain1a.d

index cc71947e8f9ed81391d0dde025f456a644d6315d..6a610a96692530d50db2255c058ab8280fe9d0ff 100644 (file)
@@ -1,3 +1,10 @@
+2021-02-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/27281
+       * readelf.c (process_section_headers): Add 'R' and 'D' to
+       "Key to Flags:".
+       * testsuite/binutils-all/retain1a.d: Updated.
+
 2021-01-30  Nick Clifton  <nickc@redhat.com>
 
        * README-how-to-make-a-release: Small updates after the 2.35.2
index 5df51086226204a2660f062b8df94fac68782857..c61219a4652b8cf8f668adf47b51ee558e8911fa 100644 (file)
@@ -6992,6 +6992,18 @@ process_section_headers (Filedata * filedata)
   W (write), A (alloc), X (execute), M (merge), S (strings), I (info),\n\
   L (link order), O (extra OS processing required), G (group), T (TLS),\n\
   C (compressed), x (unknown), o (OS specific), E (exclude),\n  "));
+      switch (filedata->file_header.e_ident[EI_OSABI])
+       {
+       case ELFOSABI_GNU:
+       case ELFOSABI_FREEBSD:
+         printf (_("R (retain), "));
+         /* Fall through */
+       case ELFOSABI_NONE:
+         printf (_("D (mbind), "));
+         break;
+       default:
+         break;
+       }
       if (filedata->file_header.e_machine == EM_X86_64
          || filedata->file_header.e_machine == EM_L1OM
          || filedata->file_header.e_machine == EM_K1OM)
index 6397ac52ae552cbdb93d493437a6880291ed3dfe..c3cdcaf12e46ba69be8531718572c316dba841b1 100644 (file)
@@ -15,4 +15,6 @@
   \[[ 0-9]+\] .bss.lsretain0.*WAR.*
   \[[ 0-9]+\] .bss.lsretain1.*WAR.*
   \[[ 0-9]+\] .data.lsretain2.*WAR.*
+#...
+  R \(retain\), D \(mbind\), .*
 #pass