]> Git Repo - binutils.git/blobdiff - binutils/readelf.c
2006-02-08 H.J. Lu <[email protected]>
[binutils.git] / binutils / readelf.c
index f0385d0f9c82f4a40ba765cec7d3601c812d01b3..a10dc41a8888eac65a2a37a10d52c51e646f4aef 100644 (file)
@@ -1940,10 +1940,53 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
          break;
 
        case EM_68K:
-         if (e_flags & EF_CPU32)
+         if (e_flags & EF_M68K_CPU32)
            strcat (buf, ", cpu32");
-         if (e_flags & EF_M68000)
+         if (e_flags & EF_M68K_M68000)
            strcat (buf, ", m68000");
+         if (e_flags & EF_M68K_ISA_MASK)
+           {
+             char const *isa = _("unknown");
+             char const *mac = _("unknown mac");
+      
+             switch (e_flags & EF_M68K_ISA_MASK)
+               {
+               case EF_M68K_ISA_A:
+                 isa = "A";
+                 break;
+               case EF_M68K_ISA_A_PLUS:
+                 isa = "A+";
+                 break;
+               case EF_M68K_ISA_B:
+                 isa = "B";
+                 break;
+               }
+             strcat (buf, ", cf, isa ");
+             strcat (buf, isa);
+             if (e_flags & EF_M68K_HW_DIV)
+               strcat (buf, ", hwdiv");
+             switch (e_flags & EF_M68K_MAC_MASK)
+               {
+               case 0:
+                 mac = NULL;
+                 break;
+               case EF_M68K_MAC:
+                 mac = "mac";
+                 break;
+               case EF_M68K_EMAC:
+                 mac = "emac";
+                 break;
+               }
+             if (mac)
+               {
+                 strcat (buf, ", ");
+                 strcat (buf, mac);
+               }
+             if (e_flags & EF_M68K_USP)
+               strcat (buf, ", usp");
+             if (e_flags & EF_M68K_FLOAT)
+               strcat (buf, ", float");
+           }
          break;
 
        case EM_PPC:
@@ -3405,6 +3448,9 @@ process_program_headers (FILE *file)
          for (j = 1; j < elf_header.e_shnum; j++, section++)
            {
              if (section->sh_size > 0
+                 /* PT_TLS segment contains only SHF_TLS sections.  */
+                 && (segment->p_type != PT_TLS
+                     || (section->sh_flags & SHF_TLS) != 0)
                  /* Compare allocated sections by VMA, unallocated
                     sections by file offset.  */
                  && (section->sh_flags & SHF_ALLOC
This page took 0.030301 seconds and 4 git commands to generate.