aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-08-26 00:17:28 +0000
committerUlrich Drepper <drepper@redhat.com>1998-08-26 00:17:28 +0000
commit7c71c3ea984e667edb041395fc780ac40088b002 (patch)
treeb4769f78404b593bc8530223eda5894f283cf51a /binutils/readelf.c
parenta12914abfdc71b9d753299798ec967634af0bf87 (diff)
downloadgdb-7c71c3ea984e667edb041395fc780ac40088b002.zip
gdb-7c71c3ea984e667edb041395fc780ac40088b002.tar.gz
gdb-7c71c3ea984e667edb041395fc780ac40088b002.tar.bz2
(process_syminfo): Print names of files symbols are bound to, not the index.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index f656eeb..e5263e7 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -3062,24 +3062,30 @@ process_syminfo (file)
printf (_("\nDynamic info segment at offset 0x%x contains %d entries:\n"),
dynamic_syminfo_offset, dynamic_syminfo_nent);
- printf (_(" Num: Name BoundTo Flags\n"));
+ printf (_(" Num: Name BoundTo Flags\n"));
for (i = 0; i < dynamic_syminfo_nent; ++i)
{
unsigned short int flags = dynamic_syminfo[i].si_flags;
- printf ("%4d: %-35s ", i,
+ printf ("%4d: %-30s ", i,
dynamic_strings + dynamic_symbols[i].st_name);
switch (dynamic_syminfo[i].si_boundto)
{
case SYMINFO_BT_SELF:
- fputs ("SELF ", stdout);
+ fputs ("SELF ", stdout);
break;
case SYMINFO_BT_PARENT:
- fputs ("PARENT ", stdout);
+ fputs ("PARENT ", stdout);
break;
default:
- printf ("%-7d ", dynamic_syminfo[i].si_boundto);
+ if (dynamic_syminfo[i].si_boundto > 0
+ && dynamic_syminfo[i].si_boundto < dynamic_size)
+ printf ("%-10s ",
+ dynamic_strings
+ + dynamic_segment[dynamic_syminfo[i].si_boundto].d_un.d_val);
+ else
+ printf ("%-10d ", dynamic_syminfo[i].si_boundto);
break;
}