string_table + sect->sh_name, cnt);
SECTION_NAME (sect), cnt);
process_mips_specific (file)     FILE * file;{  Elf_Internal_Dyn * entry;  size_t liblist_offset = 0;  size_t liblistno = 0;  size_t conflictsno = 0;  size_t options_offset = 0;  size_t conflicts_offset = 0;  /* We have a lot of special sections.  Thanks SGI!  */  if (dynamic_segment == NULL)    /* No information available.  */    return 0;  for (entry = dynamic_segment; entry->d_tag != DT_NULL; ++entry)    switch (entry->d_tag)      {      case DT_MIPS_LIBLIST:	liblist_offset = entry->d_un.d_val - loadaddr;	break;      case DT_MIPS_LIBLISTNO:	liblistno = entry->d_un.d_val;	break;      case DT_MIPS_OPTIONS:	options_offset = entry->d_un.d_val - loadaddr;	break;      case DT_MIPS_CONFLICT:	conflicts_offset = entry->d_un.d_val - loadaddr;	break;      case DT_MIPS_CONFLICTNO:	conflictsno = entry->d_un.d_val;	break;      default:	break;      }  if (liblist_offset != 0 && liblistno != 0 && do_dynamic)    {      Elf32_External_Lib * elib;      size_t cnt;      GET_DATA_ALLOC (liblist_offset, liblistno * sizeof (Elf32_External_Lib),		      elib, Elf32_External_Lib *, "liblist");      printf ("\nSection '.liblist' contains %lu entries:\n",	      (unsigned long) liblistno);      fputs ("     Library              Time Stamp          Checksum   Version Flags\n",	     stdout);      for (cnt = 0; cnt < liblistno; ++cnt)	{	  Elf32_Lib liblist;	  time_t time;	  char timebuf[20];	  struct tm * tmp;	  liblist.l_name = BYTE_GET (elib[cnt].l_name);	  time = BYTE_GET (elib[cnt].l_time_stamp);	  liblist.l_checksum = BYTE_GET (elib[cnt].l_checksum);	  liblist.l_version = BYTE_GET (elib[cnt].l_version);	  liblist.l_flags = BYTE_GET (elib[cnt].l_flags);	  tmp = gmtime (&time);	  sprintf (timebuf, "%04u-%02u-%02uT%02u:%02u:%02u",		   tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday,		   tmp->tm_hour, tmp->tm_min, tmp->tm_sec);	  printf ("%3lu: %-20s %s %#10lx %-7ld", (unsigned long) cnt,		  dynamic_strings + liblist.l_name, timebuf,		  liblist.l_checksum, liblist.l_version);	  if (liblist.l_flags == 0)	    puts (" NONE");	  else	    {	      static const struct	      {		const char * name;		int bit;	      }	      l_flags_vals[] =	      {		{ " EXACT_MATCH", LL_EXACT_MATCH },		{ " IGNORE_INT_VER", LL_IGNORE_INT_VER },		{ " REQUIRE_MINOR", LL_REQUIRE_MINOR },		{ " EXPORTS", LL_EXPORTS },		{ " DELAY_LOAD", LL_DELAY_LOAD },		{ " DELTA", LL_DELTA }	      };	      int flags = liblist.l_flags;	      size_t fcnt;	      for (fcnt = 0;		   fcnt < sizeof (l_flags_vals) / sizeof (l_flags_vals[0]);		   ++fcnt)		if ((flags & l_flags_vals[fcnt].bit) != 0)		  {		    fputs (l_flags_vals[fcnt].name, stdout);		    flags ^= l_flags_vals[fcnt].bit;		  }	      if (flags != 0)		printf (" %#x", (unsigned int) flags);	      puts ("");	    }	}      free (elib);    }  if (options_offset != 0)    {      Elf_External_Options * eopt;      Elf_Internal_Shdr *    sect = section_headers;      Elf_Internal_Options * iopt;      Elf_Internal_Options * option;      size_t offset;      int cnt;      /* Find the section header so that we get the size.  */      while (sect->sh_type != SHT_MIPS_OPTIONS)	++ sect;      GET_DATA_ALLOC (options_offset, sect->sh_size, eopt,		      Elf_External_Options *, "options");      iopt = (Elf_Internal_Options *) malloc ((sect->sh_size / sizeof (eopt))					      * sizeof (*iopt));      if (iopt == NULL)	{	  error (_("Out of memory"));	  return 0;	}      offset = cnt = 0;      option = iopt;            while (offset < sect->sh_size)	{	  Elf_External_Options * eoption;	  eoption = (Elf_External_Options *) ((char *) eopt + offset);	  option->kind = BYTE_GET (eoption->kind);	  option->size = BYTE_GET (eoption->size);	  option->section = BYTE_GET (eoption->section);	  option->info = BYTE_GET (eoption->info);	  offset += option->size;	  	  ++option;	  ++cnt;	}      printf (_("\nSection '%s' contains %d entries:\n"),	      string_table + sect->sh_name, cnt);      option = iopt;            while (cnt-- > 0)	{	  size_t len;	  switch (option->kind)	    {	    case ODK_NULL:	      /* This shouldn't happen.  */	      printf (" NULL       %d %lx", option->section, option->info);	      break;	    case ODK_REGINFO:	      printf (" REGINFO    ");	      if (elf_header.e_machine == EM_MIPS)		{		  /* 32bit form.  */		  Elf32_External_RegInfo *ereg;		  Elf32_RegInfo reginfo;		  ereg = (Elf32_External_RegInfo *) (option + 1);		  reginfo.ri_gprmask = BYTE_GET (ereg->ri_gprmask);		  reginfo.ri_cprmask[0] = BYTE_GET (ereg->ri_cprmask[0]);		  reginfo.ri_cprmask[1] = BYTE_GET (ereg->ri_cprmask[1]);		  reginfo.ri_cprmask[2] = BYTE_GET (ereg->ri_cprmask[2]);		  reginfo.ri_cprmask[3] = BYTE_GET (ereg->ri_cprmask[3]);		  reginfo.ri_gp_value = BYTE_GET (ereg->ri_gp_value);		  printf ("GPR %08lx  GP 0x%lx\n",			  reginfo.ri_gprmask,			  (unsigned long) reginfo.ri_gp_value);		  printf ("            CPR0 %08lx  CPR1 %08lx  CPR2 %08lx  CPR3 %08lx\n",			  reginfo.ri_cprmask[0], reginfo.ri_cprmask[1],			  reginfo.ri_cprmask[2], reginfo.ri_cprmask[3]);		}	      else		{		  /* 64 bit form.  */		  Elf64_External_RegInfo * ereg;		  Elf64_Internal_RegInfo reginfo;		  ereg = (Elf64_External_RegInfo *) (option + 1);		  reginfo.ri_gprmask    = BYTE_GET (ereg->ri_gprmask);		  reginfo.ri_cprmask[0] = BYTE_GET (ereg->ri_cprmask[0]);		  reginfo.ri_cprmask[1] = BYTE_GET (ereg->ri_cprmask[1]);		  reginfo.ri_cprmask[2] = BYTE_GET (ereg->ri_cprmask[2]);		  reginfo.ri_cprmask[3] = BYTE_GET (ereg->ri_cprmask[3]);		  reginfo.ri_gp_value   = BYTE_GET8 (ereg->ri_gp_value);		  printf ("GPR %08lx  GP 0x",			  reginfo.ri_gprmask);		  printf_vma (reginfo.ri_gp_value);		  printf ("\n");		  printf ("            CPR0 %08lx  CPR1 %08lx  CPR2 %08lx  CPR3 %08lx\n",			  reginfo.ri_cprmask[0], reginfo.ri_cprmask[1],			  reginfo.ri_cprmask[2], reginfo.ri_cprmask[3]);		}	      ++option;	      continue;	    case ODK_EXCEPTIONS:	      fputs (" EXCEPTIONS fpe_min(", stdout);	      process_mips_fpe_exception (option->info & OEX_FPU_MIN);	      fputs (") fpe_max(", stdout);	      process_mips_fpe_exception ((option->info & OEX_FPU_MAX) >> 8);	      fputs (")", stdout);	      if (option->info & OEX_PAGE0)		fputs (" PAGE0", stdout);	      if (option->info & OEX_SMM)		fputs (" SMM", stdout);	      if (option->info & OEX_FPDBUG)		fputs (" FPDBUG", stdout);	      if (option->info & OEX_DISMISS)		fputs (" DISMISS", stdout);	      break;	    case ODK_PAD:	      fputs (" PAD       ", stdout);	      if (option->info & OPAD_PREFIX)		fputs (" PREFIX", stdout);	      if (option->info & OPAD_POSTFIX)		fputs (" POSTFIX", stdout);	      if (option->info & OPAD_SYMBOL)		fputs (" SYMBOL", stdout);	      break;	    case ODK_HWPATCH:	      fputs (" HWPATCH   ", stdout);	      if (option->info & OHW_R4KEOP)		fputs (" R4KEOP", stdout);	      if (option->info & OHW_R8KPFETCH)		fputs (" R8KPFETCH", stdout);	      if (option->info & OHW_R5KEOP)		fputs (" R5KEOP", stdout);	      if (option->info & OHW_R5KCVTL)		fputs (" R5KCVTL", stdout);	      break;	    case ODK_FILL:	      fputs (" FILL       ", stdout);	      /* XXX Print content of info word?  */	      break;	    case ODK_TAGS:	      fputs (" TAGS       ", stdout);	      /* XXX Print content of info word?  */	      break;	    case ODK_HWAND:	      fputs (" HWAND     ", stdout);	      if (option->info & OHWA0_R4KEOP_CHECKED)		fputs (" R4KEOP_CHECKED", stdout);	      if (option->info & OHWA0_R4KEOP_CLEAN)		fputs (" R4KEOP_CLEAN", stdout);	      break;	    case ODK_HWOR:	      fputs (" HWOR      ", stdout);	      if (option->info & OHWA0_R4KEOP_CHECKED)		fputs (" R4KEOP_CHECKED", stdout);	      if (option->info & OHWA0_R4KEOP_CLEAN)		fputs (" R4KEOP_CLEAN", stdout);	      break;	    case ODK_GP_GROUP:	      printf (" GP_GROUP  %#06lx  self-contained %#06lx",		      option->info & OGP_GROUP,		      (option->info & OGP_SELF) >> 16);	      break;	    case ODK_IDENT:	      printf (" IDENT     %#06lx  self-contained %#06lx",		      option->info & OGP_GROUP,		      (option->info & OGP_SELF) >> 16);	      break;	    default:	      /* This shouldn't happen.  */	      printf (" %3d ???     %d %lx",		      option->kind, option->section, option->info);	      break;	    }	  len = sizeof (*eopt);	  while (len < option->size)	    if (((char *) option)[len] >= ' '		&& ((char *) option)[len] < 0x7f)	      printf ("%c", ((char *) option)[len++]);	    else	      printf ("\\%03o", ((char *) option)[len++]);	  fputs ("\n", stdout);	  ++option;	}      free (eopt);    }  if (conflicts_offset != 0 && conflictsno != 0)    {      Elf32_External_Conflict * econf32;      Elf64_External_Conflict * econf64;      Elf32_Conflict * iconf;      size_t cnt;      if (dynamic_symbols == NULL)	{	  error (_("conflict list with without table"));	  return 0;	}      iconf = (Elf32_Conflict *) malloc (conflictsno * sizeof (*iconf));      if (iconf == NULL)	{	  error (_("Out of memory"));	  return 0;	}      if (is_32bit_elf)	{	  GET_DATA_ALLOC (conflicts_offset, conflictsno * sizeof (*econf32),			  econf32, Elf32_External_Conflict *, "conflict");	  for (cnt = 0; cnt < conflictsno; ++cnt)	    iconf[cnt] = BYTE_GET (econf32[cnt]);	}      else	{	  GET_DATA_ALLOC (conflicts_offset, conflictsno * sizeof (*econf64),			  econf64, Elf64_External_Conflict *, "conflict");	  for (cnt = 0; cnt < conflictsno; ++cnt)	    iconf[cnt] = BYTE_GET (econf64[cnt]);	}      printf (_("\nSection '.conflict' contains %d entries:\n"), conflictsno);      puts (_("  Num:    Index       Value  Name"));      for (cnt = 0; cnt < conflictsno; ++cnt)	{	  Elf_Internal_Sym * psym = &dynamic_symbols[iconf[cnt]];	  printf ("%5lu: %8lu  ", (unsigned long) cnt, iconf[cnt]);	  print_vma (psym->st_value, FULL_HEX);	  printf ("  %s\n", dynamic_strings + psym->st_name);	}      free (iconf);    }  return 1;}