info->stream = &sfile;
info->bytes_per_line = 0;
info->bytes_per_chunk = 0;
- info->flags = 0;
+ info->flags = disassemble_all ? DISASSEMBLE_DATA : 0;
+ if (machine)
+ info->flags |= USER_SPECIFIED_MACHINE_TYPE;
if (info->disassembler_needs_relocs
&& (bfd_get_file_flags (aux->abfd) & EXEC_P) == 0
|| (distance_to_rel > 0
&& distance_to_rel < (bfd_signed_vma) (previous_octets/ opb)))
{
- info->flags = INSN_HAS_RELOC;
+ info->flags |= INSN_HAS_RELOC;
aux->reloc = **relppp;
}
else
bfd_boolean insns;
addr = section->vma + addr_offset;
- addr = (addr ^ sign_adjust) - sign_adjust;
+ addr = ((addr & ((sign_adjust << 1) - 1)) ^ sign_adjust) - sign_adjust;
if (sym != NULL && bfd_asymbol_value (sym) <= addr)
{
else
nextstop_offset = bfd_asymbol_value (nextsym) - section->vma;
- if (nextstop_offset > stop_offset)
+ if (nextstop_offset > stop_offset
+ || nextstop_offset <= addr_offset)
nextstop_offset = stop_offset;
/* If a symbol is explicitly marked as being an object
disassemble_bytes (pinfo, paux->disassemble_fn, insns, data,
addr_offset, nextstop_offset,
rel_offset, &rel_pp, rel_ppend);
-
+
addr_offset = nextstop_offset;
sym = nextsym;
}