diff options
author | Richard Henderson <rth@redhat.com> | 1999-07-08 15:49:41 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 1999-07-08 15:49:41 +0000 |
commit | f0d71605dc362386b59409d4d621593ac90c989f (patch) | |
tree | 9c2cfeb3a1840dfa0874cd5ad7b00ea3534c047e /binutils/readelf.c | |
parent | 01f52b0d9da02c6c9fabc5621df698f938db37f2 (diff) | |
download | binutils-redhat-f0d71605dc362386b59409d4d621593ac90c989f.tar.gz |
Jakub Jelinek <jj@ultra.linux.cz>
* readelf.c (guess_is_rela): Sparcv9 and v8plus use rela.
(dump_relocations): Use ELF64_R_TYPE_ID for Sparc, for R_SPARC_OLO10
print the secondary addend.
(get_machine_flags): Print Sparc machine flags.
(get_symbol_type): Print STT_REGISTER.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r-- | binutils/readelf.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c index 709824d1ed..84f73f13b7 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -414,6 +414,8 @@ guess_is_rela (e_machine) /* Targets that use RELA relocations. */ case EM_68K: + case EM_SPARC32PLUS: + case EM_SPARCV9: case EM_SPARC: case EM_PPC: case EM_CYGNUS_V850: @@ -605,7 +607,10 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) } else { - type = ELF64_R_TYPE (info); + if (elf_header.e_machine == EM_SPARCV9) + type = ELF64_R_TYPE_ID (info); + else + type = ELF64_R_TYPE (info); symtab_index = ELF64_R_SYM (info); } @@ -742,6 +747,10 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) else if (is_rela) printf ("%34c%lx", ' ', (unsigned long) relas[i].r_addend); + if (elf_header.e_machine == EM_SPARCV9 + && !strcmp (rtype, "R_SPARC_OLO10")) + printf (" + %lx", (unsigned long) ELF64_R_TYPE_DATA (info)); + putchar ('\n'); } @@ -1062,6 +1071,29 @@ get_machine_flags (e_flags, e_machine) if ((e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_4) strcat (buf, ", mips4"); break; + + case EM_SPARCV9: + if (e_flags & EF_SPARC_32PLUS) + strcat (buf, ", v8+"); + + if (e_flags & EF_SPARC_SUN_US1) + strcat (buf, ", ultrasparc"); + + if (e_flags & EF_SPARC_HAL_R1) + strcat (buf, ", halr1"); + + if (e_flags & EF_SPARC_LEDATA) + strcat (buf, ", ledata"); + + if ((e_flags & EF_SPARCV9_MM) == EF_SPARCV9_TSO) + strcat (buf, ", tso"); + + if ((e_flags & EF_SPARCV9_MM) == EF_SPARCV9_PSO) + strcat (buf, ", pso"); + + if ((e_flags & EF_SPARCV9_MM) == EF_SPARCV9_RMO) + strcat (buf, ", rmo"); + break; } } @@ -3393,6 +3425,9 @@ get_symbol_type (type) { if (elf_header.e_machine == EM_ARM && type == STT_ARM_TFUNC) return _("THUMB_FUNC"); + + if (elf_header.e_machine == EM_SPARCV9 && type == STT_REGISTER) + return _("REGISTER"); sprintf (buff, _("<processor specific>: %d"), type); } |