X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=binutils%2Freadelf.c;h=d9686731fda9d630e793e2bb1a1e88db9e5fbe97;hb=156c2f8bf75a86dfa719220f9f259196d9d2491b;hp=4d41099f59298818a5600c05889fb77f3ea5ceef;hpb=dcefbbbda0f35b8ee3bb36d7bba65fec0a1d5d63;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/readelf.c b/binutils/readelf.c index 4d41099f59..d9686731fd 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -71,6 +71,8 @@ #include "elf/pj.h" #include "elf/avr.h" #include "elf/ia64.h" +#include "elf/cris.h" +#include "elf/i860.h" #include "bucomm.h" #include "getopt.h" @@ -565,6 +567,8 @@ guess_is_rela (e_machine) case EM_MCORE: case EM_IA_64: case EM_AVR: + case EM_CRIS: + case EM_860: return TRUE; case EM_MMA: @@ -879,6 +883,14 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) case EM_IA_64: rtype = elf_ia64_reloc_type (type); break; + + case EM_CRIS: + rtype = elf_cris_reloc_type (type); + break; + + case EM_860: + rtype = elf_i860_reloc_type (type); + break; } if (rtype == NULL) @@ -1070,6 +1082,7 @@ get_dynamic_type (type) case DT_PREINIT_ARRAY: return "PREINIT_ARRAY"; case DT_PREINIT_ARRAYSZ: return "PREINIT_ARRAYSZ"; + case DT_CHECKSUM: return "CHECKSUM"; case DT_PLTPADSZ: return "PLTPADSZ"; case DT_MOVEENT: return "MOVEENT"; case DT_MOVESZ: return "MOVESZ"; @@ -1096,14 +1109,10 @@ get_dynamic_type (type) case DT_VERNEED: return "VERNEED"; case DT_VERNEEDNUM: return "VERNEEDNUM"; - case DT_AUXILIARY: return "AUXILARY"; + case DT_AUXILIARY: return "AUXILIARY"; case DT_USED: return "USED"; case DT_FILTER: return "FILTER"; -#if DT_CHECKSUM != 0 - case DT_CHECKSUM: return "CHECKSUM"; -#endif - default: if ((type >= DT_LOPROC) && (type <= DT_HIPROC)) { @@ -1251,6 +1260,7 @@ get_machine_name (e_machine) case EM_ST19: return "STMicroelectronics ST19 8-bit microcontroller"; case EM_VAX: return "Digital VAX"; case EM_AVR: return "Atmel AVR 8-bit microcontroller"; + case EM_CRIS: return "Axis Communications 32-bit embedded processor"; default: sprintf (buff, _(": %x"), e_machine); return buff; @@ -1451,6 +1461,16 @@ get_machine_flags (e_flags, e_machine) if ((e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_4) strcat (buf, ", mips4"); + + switch ((e_flags & EF_MIPS_MACH)) + { + case E_MIPS_MACH_3900: strcat (buf, ", 3900"); break; + case E_MIPS_MACH_4010: strcat (buf, ", 4010"); break; + case E_MIPS_MACH_4100: strcat (buf, ", 4100"); break; + case E_MIPS_MACH_4650: strcat (buf, ", 4650"); break; + case E_MIPS_MACH_4111: strcat (buf, ", 4111"); break; + case E_MIPS_MACH_MIPS32: strcat (buf, ", mips32"); break; + } break; case EM_SPARCV9: @@ -3332,12 +3352,33 @@ process_dynamic_segment (file) case DT_AUXILIARY: case DT_FILTER: + case DT_CONFIG: + case DT_DEPAUDIT: + case DT_AUDIT: if (do_dynamic) { - if (entry->d_tag == DT_AUXILIARY) - printf (_("Auxiliary library")); - else - printf (_("Filter library")); + switch (entry->d_tag) + { + case DT_AUXILIARY: + printf (_("Auxiliary library")); + break; + + case DT_FILTER: + printf (_("Filter library")); + break; + + case DT_CONFIG: + printf (_("Configuration file")); + break; + + case DT_DEPAUDIT: + printf (_("Dependency audit library")); + break; + + case DT_AUDIT: + printf (_("Audit library")); + break; + } if (dynamic_strings) printf (": [%s]\n", dynamic_strings + entry->d_un.d_val); @@ -3466,10 +3507,10 @@ process_dynamic_segment (file) printf (" INTERPOSE"); val ^= DF_1_INTERPOSE; } - if (val & DF_1_NODEPLIB) + if (val & DF_1_NODEFLIB) { - printf (" NODEPLIB"); - val ^= DF_1_NODEPLIB; + printf (" NODEFLIB"); + val ^= DF_1_NODEFLIB; } if (val & DF_1_NODUMP) { @@ -3509,6 +3550,7 @@ process_dynamic_segment (file) case DT_DEBUG : case DT_TEXTREL : case DT_JMPREL : + case DT_RUNPATH : dynamic_info[entry->d_tag] = entry->d_un.d_val; if (do_dynamic) @@ -3539,6 +3581,10 @@ process_dynamic_segment (file) printf (_("Library rpath: [%s]"), name); break; + case DT_RUNPATH: + printf (_("Library runpath: [%s]"), name); + break; + default: print_vma (entry->d_un.d_val, PREFIX_HEX); break; @@ -5189,7 +5235,14 @@ display_debug_pubnames (section, start, file) if (pubnames.pn_version != 2) { - warn (_("Only DWARF 2 pubnames are currently supported")); + static int warned = 0; + + if (! warned) + { + warn (_("Only DWARF 2 pubnames are currently supported\n")); + warned = 1; + } + continue; } @@ -6361,6 +6414,12 @@ display_debug_aranges (section, start, file) arange.ar_pointer_size = BYTE_GET (external->ar_pointer_size); arange.ar_segment_size = BYTE_GET (external->ar_segment_size); + if (arange.ar_version != 2) + { + warn (_("Only DWARF 2 aranges are currently supported.\n")); + break; + } + printf (_(" Length: %ld\n"), arange.ar_length); printf (_(" Version: %d\n"), arange.ar_version); printf (_(" Offset into .debug_info: %lx\n"), arange.ar_info_offset);