aboutsummaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2003-12-22 10:49:59 +0000
committerJakub Jelinek <jakub@redhat.com>2003-12-22 10:49:59 +0000
commit68b3b8dc9e908a61e60a7af7b366e1a1de9b8d36 (patch)
treef74cf4b0cf74f3900ede909eb3fb9033121e455b /binutils/objdump.c
parentad50f575f38a5d185a40172ff05b19f9feca407a (diff)
downloadfsf-binutils-gdb-68b3b8dc9e908a61e60a7af7b366e1a1de9b8d36.zip
fsf-binutils-gdb-68b3b8dc9e908a61e60a7af7b366e1a1de9b8d36.tar.gz
fsf-binutils-gdb-68b3b8dc9e908a61e60a7af7b366e1a1de9b8d36.tar.bz2
* objdump.c (disassemble_bytes): Subtract rel_offset from printed
reloc address. (disassemble_section): Set rel_offset to section->vma instead of pinfo->buffer_vma.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index f29ea71..f67aacb 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -1515,7 +1515,8 @@ disassemble_bytes (struct disassemble_info * info,
else
printf ("\t\t\t");
- objdump_print_value (section->vma + q->address, info, TRUE);
+ objdump_print_value (section->vma - rel_offset + q->address,
+ info, TRUE);
printf (": %s\t", q->howto->name);
@@ -1600,7 +1601,7 @@ disassemble_section (bfd *abfd, asection *section, void *info)
/* Dynamic reloc addresses are absolute, non-dynamic are section
relative. REL_OFFSET specifies the reloc address corresponding
to the start of this section. */
- rel_offset = pinfo->buffer_vma;
+ rel_offset = section->vma;
}
else
{