aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2005-05-31 22:52:50 +0000
committerRichard Henderson <rth@redhat.com>2005-05-31 22:52:50 +0000
commit7ace3541ba2aba54eb54b683701800464ee439db (patch)
tree677810537035dc586defa8cfe84ed42fc480c027 /binutils
parent2acf634e2d8e755ab5f4ce769e4180a8f95aae5a (diff)
downloadgdb-7ace3541ba2aba54eb54b683701800464ee439db.zip
gdb-7ace3541ba2aba54eb54b683701800464ee439db.tar.gz
gdb-7ace3541ba2aba54eb54b683701800464ee439db.tar.bz2
* readelf.c (dump_relocations): Special case R_ALPHA_LITUSE.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/readelf.c29
2 files changed, 30 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 97139f9..1c91d20 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2005-05-31 Richard Henderson <rth@redhat.com>
+
+ * readelf.c (dump_relocations): Special case R_ALPHA_LITUSE.
+
2005-05-29 Richard Henderson <rth@redhat.com>
* readelf.c (get_alpha_dynamic_type): New.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 0523d55..31deb55 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -1243,7 +1243,31 @@ dump_relocations (FILE *file,
else
printf (do_wide ? "%-22.22s" : "%-17.17s", rtype);
- if (symtab_index)
+ if (elf_header.e_machine == EM_ALPHA
+ && streq (rtype, "R_ALPHA_LITUSE")
+ && is_rela)
+ {
+ switch (rels[i].r_addend)
+ {
+ case LITUSE_ALPHA_ADDR: rtype = "ADDR"; break;
+ case LITUSE_ALPHA_BASE: rtype = "BASE"; break;
+ case LITUSE_ALPHA_BYTOFF: rtype = "BYTOFF"; break;
+ case LITUSE_ALPHA_JSR: rtype = "JSR"; break;
+ case LITUSE_ALPHA_TLSGD: rtype = "TLSGD"; break;
+ case LITUSE_ALPHA_TLSLDM: rtype = "TLSLDM"; break;
+ case LITUSE_ALPHA_JSRDIRECT: rtype = "JSRDIRECT"; break;
+ default: rtype = NULL;
+ }
+ if (rtype)
+ printf (" (%s)", rtype);
+ else
+ {
+ putchar (' ');
+ printf (_("<unknown addend: %lx>"),
+ (unsigned long) rels[i].r_addend);
+ }
+ }
+ else if (symtab_index)
{
if (symtab == NULL || symtab_index >= nsyms)
printf (" bad symbol index: %08lx", (unsigned long) symtab_index);
@@ -1309,8 +1333,7 @@ dump_relocations (FILE *file,
print_vma (rels[i].r_addend, LONG_HEX);
}
- if (elf_header.e_machine == EM_SPARCV9
- && streq (rtype, "R_SPARC_OLO10"))
+ if (elf_header.e_machine == EM_SPARCV9 && streq (rtype, "R_SPARC_OLO10"))
printf (" + %lx", (unsigned long) ELF64_R_TYPE_DATA (info));
putchar ('\n');