aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1993-06-26 00:47:23 +0000
committerKen Raeburn <raeburn@cygnus>1993-06-26 00:47:23 +0000
commitd086adf85a813121766725323465e52e3f39db82 (patch)
tree4a398835a8683c0fd05c1604a4ff5c79c618019b /binutils
parent41e170e271e1d68418cee0b872d15c68e4450403 (diff)
downloadgdb-d086adf85a813121766725323465e52e3f39db82.zip
gdb-d086adf85a813121766725323465e52e3f39db82.tar.gz
gdb-d086adf85a813121766725323465e52e3f39db82.tar.bz2
Elf bfd routines and types are now size-independent again.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog9
-rw-r--r--binutils/objdump.c20
2 files changed, 23 insertions, 6 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index ed74a42..b264561 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,12 @@
+Fri Jun 25 20:44:43 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
+
+ * objdump.c: Use size-independend bfd elf section names.
+
+Sun Jun 20 23:09:06 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
+
+ * objdump.c (objdump_print_address): Handle wide offsets by
+ calling sprintf_vma.
+
Fri Jun 18 14:29:12 1993 Per Bothner (bothner@deneb.cygnus.com)
* objdump.c (syms2): Removed unused variable.
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 0042f9c..6ddf9a2 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -39,7 +39,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define BYTES_IN_WORD 32
#include "aout/aout64.h"
#include "elf/internal.h"
-extern Elf32_Internal_Shdr *bfd_elf32_find_section();
+extern Elf_Internal_Shdr *bfd_elf_find_section();
#endif /* ELF_STAB_DISPLAY */
extern char *xmalloc ();
@@ -284,11 +284,19 @@ objdump_print_address (vma, info)
fprintf (info->stream, " <%s", syms[thisplace]->name);
if (syms[thisplace]->value > vma)
{
- fprintf (info->stream, "-%04x", syms[thisplace]->value - vma);
+ char buf[30], *p = buf;
+ sprintf_vma (buf, syms[thisplace]->value - vma);
+ while (*p == '0')
+ p++;
+ fprintf (info->stream, "-%s", p);
}
else if (vma > syms[thisplace]->value)
{
- fprintf (info->stream, "+%04x", vma - syms[thisplace]->value);
+ char buf[30], *p = buf;
+ sprintf_vma (buf, vma - syms[thisplace]->value);
+ while (*p == '0')
+ p++;
+ fprintf (info->stream, "+%s", p);
}
fprintf (info->stream, ">");
}
@@ -564,20 +572,20 @@ dump_elf_stabs_1 (abfd, name1, name2)
char *name1; /* Section name of .stab */
char *name2; /* Section name of its string section */
{
- Elf32_Internal_Shdr *stab_hdr, *stabstr_hdr;
+ Elf_Internal_Shdr *stab_hdr, *stabstr_hdr;
char *strtab;
struct internal_nlist *stabs, *stabs_end;
int i;
unsigned file_string_table_offset, next_file_string_table_offset;
- stab_hdr = bfd_elf32_find_section (abfd, name1);
+ stab_hdr = bfd_elf_find_section (abfd, name1);
if (0 == stab_hdr)
{
printf ("Contents of %s section: none.\n\n", name1);
return;
}
- stabstr_hdr = bfd_elf32_find_section (abfd, name2);
+ stabstr_hdr = bfd_elf_find_section (abfd, name2);
if (0 == stabstr_hdr)
{
fprintf (stderr, "%s: %s has no %s section.\n", program_name,