#include "elf/arc.h"
#include "elf/fr30.h"
#include "elf/mcore.h"
+#include "elf/mmix.h"
#include "elf/i960.h"
#include "elf/pj.h"
#include "elf/avr.h"
case EM_X86_64:
case EM_S390:
case EM_S390_OLD:
+ case EM_MMIX:
return TRUE;
case EM_MMA:
rtype = elf_mcore_reloc_type (type);
break;
+ case EM_MMIX:
+ rtype = elf_mmix_reloc_type (type);
+ break;
+
case EM_PPC:
case EM_PPC64:
rtype = elf_ppc_reloc_type (type);
if (result != NULL)
return result;
- sprintf (buff, "SHT_LOPROC+%x", sh_type - SHT_LOPROC);
+ sprintf (buff, "LOPROC+%x", sh_type - SHT_LOPROC);
}
else if ((sh_type >= SHT_LOOS) && (sh_type <= SHT_HIOS))
- sprintf (buff, "SHT_LOOS+%x", sh_type - SHT_LOOS);
+ sprintf (buff, "LOOS+%x", sh_type - SHT_LOOS);
else if ((sh_type >= SHT_LOUSER) && (sh_type <= SHT_HIUSER))
- sprintf (buff, "SHT_LOUSER+%x", sh_type - SHT_LOUSER);
+ sprintf (buff, "LOUSER+%x", sh_type - SHT_LOUSER);
else
sprintf (buff, _("<unknown>: %x"), sh_type);
do_debugging = 1;
else
{
+ unsigned int index = 0;
+
do_debugging = 0;
- switch (optarg[0])
- {
- case 'i':
- case 'I':
- do_debug_info = 1;
- break;
- case 'a':
- case 'A':
- do_debug_abbrevs = 1;
- break;
+ while (optarg[index])
+ switch (optarg[index++])
+ {
+ case 'i':
+ case 'I':
+ do_debug_info = 1;
+ break;
- case 'l':
- case 'L':
- do_debug_lines = 1;
- break;
+ case 'a':
+ case 'A':
+ do_debug_abbrevs = 1;
+ break;
- case 'p':
- case 'P':
- do_debug_pubnames = 1;
- break;
+ case 'l':
+ case 'L':
+ do_debug_lines = 1;
+ break;
- case 'r':
- case 'R':
- do_debug_aranges = 1;
- break;
+ case 'p':
+ case 'P':
+ do_debug_pubnames = 1;
+ break;
- case 'F':
- do_debug_frames_interp = 1;
- case 'f':
- do_debug_frames = 1;
- break;
+ case 'r':
+ case 'R':
+ do_debug_aranges = 1;
+ break;
- case 'm':
- case 'M':
- do_debug_macinfo = 1;
- break;
+ case 'F':
+ do_debug_frames_interp = 1;
+ case 'f':
+ do_debug_frames = 1;
+ break;
- default:
- warn (_("Unrecognised debug option '%s'\n"), optarg);
- break;
- }
+ case 'm':
+ case 'M':
+ do_debug_macinfo = 1;
+ break;
+
+ default:
+ warn (_("Unrecognised debug option '%s'\n"), optarg);
+ break;
+ }
}
break;
#ifdef SUPPORT_DISASSEMBLY
/* Check the length of the block. */
info.li_length = BYTE_GET (external->li_length);
+
+ if (info.li_length == 0xffffffff)
+ {
+ warn (_("64-bit DWARF line info is not supported yet.\n"));
+ break;
+ }
+
if (info.li_length + sizeof (external->li_length) > section->sh_size)
{
warn
data = start + sizeof (* external);
start += pubnames.pn_length + sizeof (external->pn_length);
+ if (pubnames.pn_length == 0xffffffff)
+ {
+ warn (_("64-bit DWARF pubnames are not supported yet.\n"));
+ break;
+ }
+
if (pubnames.pn_version != 2)
{
static int warned = 0;
/* DWARF 2.1 values. */
case DW_LANG_C99: printf ("(ANSI C99)"); break;
case DW_LANG_Ada95: printf ("(ADA 95)"); break;
- case DW_LANG_Fortran95: printf ("(Fortran 95)"); break;
+ case DW_LANG_Fortran95: printf ("(Fortran 95)"); break;
/* MIPS extension. */
case DW_LANG_Mips_Assembler: printf ("(MIPS assembler)"); break;
default: printf ("(Unknown: %lx)", uvalue); break;
compunit.cu_abbrev_offset = BYTE_GET (external->cu_abbrev_offset);
compunit.cu_pointer_size = BYTE_GET (external->cu_pointer_size);
+ if (compunit.cu_length == 0xffffffff)
+ {
+ warn (_("64-bit DWARF debug info is not supported yet.\n"));
+ break;
+ }
+
/* Check for RELA relocations in the abbrev_offset address, and
apply them. */
for (relsec = section_headers;
arange.ar_pointer_size = BYTE_GET (external->ar_pointer_size);
arange.ar_segment_size = BYTE_GET (external->ar_segment_size);
+ if (arange.ar_length == 0xffffffff)
+ {
+ warn (_("64-bit DWARF aranges are not supported yet.\n"));
+ break;
+ }
+
if (arange.ar_version != 2)
{
warn (_("Only DWARF 2 aranges are currently supported.\n"));
if (length == 0)
return 1;
+ if (length == 0xffffffff)
+ {
+ warn (_("64-bit DWARF format frames are not supported yet.\n"));
+ break;
+ }
+
block_end = saved_start + length + 4;
cie_id = byte_get (start, 4); start += 4;
look_for = is_eh ? start - 4 - cie_id : section_start + cie_id;
- for (cie=chunks; cie ; cie = cie->next)
+ for (cie = chunks; cie ; cie = cie->next)
if (cie->chunk_start == look_for)
break;
{ ".debug_frame", display_debug_frames, NULL },
{ ".eh_frame", display_debug_frames, NULL },
{ ".debug_macinfo", display_debug_macinfo, NULL },
+ { ".debug_pubtypes", display_debug_not_supported, NULL },
{ ".debug_str", display_debug_not_supported, NULL },
{ ".debug_static_func", display_debug_not_supported, NULL },
{ ".debug_static_vars", display_debug_not_supported, NULL },
}
#endif
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;