diff options
author | Nick Clifton <nickc@redhat.com> | 2001-01-09 20:25:31 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2001-01-09 20:25:31 +0000 |
commit | 8b1e6df337acf62900dda4e8aad874b999563510 (patch) | |
tree | 09b817ba0eba8acb0858f9833f998dce9fd0b5b6 /binutils/objdump.c | |
parent | 8c1f9e76d2e75bd32925048a0ee9871aec6e81fe (diff) | |
download | gdb-8b1e6df337acf62900dda4e8aad874b999563510.zip gdb-8b1e6df337acf62900dda4e8aad874b999563510.tar.gz gdb-8b1e6df337acf62900dda4e8aad874b999563510.tar.bz2 |
Add OBJDUMP_DEFS to configure and makefile
Check for DISASSEMBLER_NEEDS_RELOCS in objdump and read in relocs if set.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r-- | binutils/objdump.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c index cc31746..a665831 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -1358,13 +1358,15 @@ disassemble_bytes (info, disassemble_fn, insns, data, info->bytes_per_line = 0; info->bytes_per_chunk = 0; +#ifdef DISASSEMBLER_NEEDS_RELOCS /* FIXME: This is wrong. It tests the number of octets in the last instruction, not the current one. */ if (*relppp < relppend && (**relppp)->address >= addr_offset - && (**relppp)->address < addr_offset + octets / opb) + && (**relppp)->address <= addr_offset + octets / opb) info->flags = INSN_HAS_RELOC; else +#endif info->flags = 0; octets = (*disassemble_fn) (section->vma + addr_offset, info); @@ -1504,12 +1506,20 @@ disassemble_bytes (info, disassemble_fn, insns, data, need_nl = true; } - if (dump_reloc_info - && (section->flags & SEC_RELOC) != 0) + if ((section->flags & SEC_RELOC) != 0 +#ifndef DISASSEMBLER_NEEDS_RELOCS + && dump_reloc_info +#endif + ) { while ((*relppp) < relppend && ((**relppp)->address >= (bfd_vma) addr_offset && (**relppp)->address < (bfd_vma) addr_offset + octets / opb)) +#ifdef DISASSEMBLER_NEEDS_RELOCS + if (! dump_reloc_info) + ++(*relppp); + else +#endif { arelent *q; @@ -1665,8 +1675,11 @@ disassemble_data (abfd) if (only != (char *) NULL && strcmp (only, section->name) != 0) continue; - if (dump_reloc_info - && (section->flags & SEC_RELOC) != 0) + if ((section->flags & SEC_RELOC) != 0 +#ifndef DISASSEMBLER_NEEDS_RELOCS + && dump_reloc_info +#endif + ) { long relsize; |