]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - binutils/readelf.c
PowerPC64 st_other decoding in readelf
[thirdparty/binutils-gdb.git] / binutils / readelf.c
index a936ff375876408d70005ea6fb69060895bd8120..2d9d48d002b0a43785125e9ff61bbc450f839f9e 100644 (file)
@@ -11088,11 +11088,16 @@ get_ia64_symbol_other (Filedata * filedata, unsigned int other)
 static const char *
 get_ppc64_symbol_other (unsigned int other)
 {
-  if (PPC64_LOCAL_ENTRY_OFFSET (other) != 0)
+  if ((other & ~STO_PPC64_LOCAL_MASK) != 0)
+    return NULL;
+
+  other >>= STO_PPC64_LOCAL_BIT;
+  if (other <= 6)
     {
       static char buf[32];
-      snprintf (buf, sizeof buf, _("<localentry>: %d"),
-               PPC64_LOCAL_ENTRY_OFFSET (other));
+      if (other >= 2)
+       other = ppc64_decode_local_entry (other);
+      snprintf (buf, sizeof buf, _("<localentry>: %d"), other);
       return buf;
     }
   return NULL;