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 | 351b4b401bafdccd2b2e7be3f2e8da7e1391c77c (patch) | |
tree | a4f13dfe7f996e81cb0f22227aedf1ee2391b6fb /binutils/readelf.c | |
parent | 5c61c5ab194547aac922564e47ea2aa6ae8fd5c3 (diff) | |
download | gdb-351b4b401bafdccd2b2e7be3f2e8da7e1391c77c.zip gdb-351b4b401bafdccd2b2e7be3f2e8da7e1391c77c.tar.gz gdb-351b4b401bafdccd2b2e7be3f2e8da7e1391c77c.tar.bz2 |
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 709824d..84f73f1 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); } |