PR 9766
[deliverable/binutils-gdb.git] / binutils / readelf.c
index 81cde343e593d202ddf28c1df71e444af431e864..38da0b6ec27c15f0141ff46177396e2a45101cbf 100644 (file)
 #include "elf/i960.h"
 #include "elf/ia64.h"
 #include "elf/ip2k.h"
+#include "elf/lm32.h"
 #include "elf/iq2000.h"
 #include "elf/m32c.h"
 #include "elf/m32r.h"
@@ -598,6 +599,7 @@ guess_is_rela (unsigned int e_machine)
     case EM_IP2K:
     case EM_IP2K_OLD:
     case EM_IQ2000:
+    case EM_LATTICEMICO32:
     case EM_M32C_OLD:
     case EM_M32C:
     case EM_M32R:
@@ -1186,6 +1188,10 @@ dump_relocations (FILE *file,
          rtype = elf_xtensa_reloc_type (type);
          break;
 
+       case EM_LATTICEMICO32:
+         rtype = elf_lm32_reloc_type (type);
+         break;
+
        case EM_M32C_OLD:
        case EM_M32C:
          rtype = elf_m32c_reloc_type (type);
@@ -1251,38 +1257,9 @@ dump_relocations (FILE *file,
 
              printf (" ");
 
-             if (ELF_ST_TYPE (psym->st_info) == STT_IFUNC)
-               {
-                 const char * name;
-                 unsigned int len;
-                 unsigned int width = is_32bit_elf ? 8 : 14;
-
-                 /* Relocations against IFUNC symbols do not use the value of
-                    the symbol as the address to relocate against.  Instead
-                    they invoke the function named by the symbol and use its
-                    result as the address for relocation.
-
-                    To indicate this to the user, do not display the value of
-                    the symbol in the "Symbols's Value" field.  Instead show
-                    its name followed by () as a hint that the symbol is
-                    invoked.  */
-
-                 if (strtab == NULL
-                     || psym->st_name == 0
-                     || psym->st_name >= strtablen)
-                   name = "??";
-                 else
-                   name = strtab + psym->st_name;
-
-                 len = print_symbol (width, name);
-                 printf ("()%-*s", len <= width ? (width + 1) - len : 1, " ");
-               }
-             else
-               {
-                 print_vma (psym->st_value, LONG_HEX);
+             print_vma (psym->st_value, LONG_HEX);
 
-                 printf (is_32bit_elf ? "   " : " ");
-               }
+             printf (is_32bit_elf ? "   " : " ");
 
              if (psym->st_name == 0)
                {
@@ -1862,6 +1839,7 @@ get_machine_name (unsigned e_machine)
     case EM_IQ2000:            return "Vitesse IQ2000";
     case EM_XTENSA_OLD:
     case EM_XTENSA:            return "Tensilica Xtensa Processor";
+    case EM_LATTICEMICO32:     return "Lattice Mico32";
     case EM_M32C_OLD:
     case EM_M32C:              return "Renesas M32c";
     case EM_MT:                 return "Morpho Techologies MT processor";
@@ -7065,14 +7043,6 @@ get_symbol_type (unsigned int type)
              if (type == STT_HP_STUB)
                return "HP_STUB";
            }
-         else if (elf_header.e_ident[EI_OSABI] == ELFOSABI_LINUX
-                  || elf_header.e_ident[EI_OSABI] == ELFOSABI_HURD
-                  /* GNU/Linux is still using the default value 0.  */
-                  || elf_header.e_ident[EI_OSABI] == ELFOSABI_NONE)
-           {
-             if (type == STT_IFUNC)
-               return "IFUNC";
-           }
 
          snprintf (buff, sizeof (buff), _("<OS specific>: %d"), type);
        }
@@ -8119,6 +8089,8 @@ is_32bit_abs_reloc (unsigned int reloc_type)
       return reloc_type == 2; /* R_IP2K_32.  */
     case EM_IQ2000:
       return reloc_type == 2; /* R_IQ2000_32.  */
+    case EM_LATTICEMICO32:
+      return reloc_type == 3; /* R_LM32_32.  */
     case EM_M32C_OLD:
     case EM_M32C:
       return reloc_type == 3; /* R_M32C_32.  */
This page took 0.024991 seconds and 4 git commands to generate.