(long_options): Add "no-show-raw-insn".
(disassemble_bytes): Handle --no-show-raw-insn.
* binutils.texi, objdump.1: Document --no-show-raw-insn.
+Sat Mar 15 15:35:56 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * objdump.c (usage): Mention --no-show-raw-insn.
+ (long_options): Add "no-show-raw-insn".
+ (disassemble_bytes): Handle --no-show-raw-insn.
+ * binutils.texi, objdump.1: Document --no-show-raw-insn.
+
+Wed Mar 12 11:42:00 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * rddbg.c (free_saved_stabs): Set the strings to NULL after being
+ freed.
+
+Fri Feb 28 17:18:45 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * bucomm.c (set_default_bfd_target): New function.
+ * bucomm.h (set_default_bfd_target): Declare.
+ * ar.c (main): Call set_default_bfd_target.
+ * nlmconv.c (main): Likewise.
+ * nm.c (main): Likewise.
+ * objcopy.c (main): Likewise.
+ * objdump.c (main): Likewise.
+ * size.c (main): Likewise.
+ * strings.c (main): Likewise.
+ * Makefile.in (bucomm.o): New target, to define TARGET.
+
Tue Feb 25 21:28:38 1997 Ian Lance Taylor <ian@cygnus.com>
* objdump.c (adjust_section_vma): New static variable.
-*- text -*-
-Changes since binutils 2.7
+Changes in binutils 2.8:
* The objdump disassembly format has been changed, and hopefully improved. Use
- the new --prefix-addresses option to get the old format.
+ the new --prefix-addresses option to get the old format. There are also new
+ --disassemble-zeroes and --no-show-raw-insn options which affect disassembler
+ output.
* Formats may now be specified as configuration triplets. For example,
objdump -b i386-pc-linux. The triplets are not passed through config.sub,
* objdump --dynamic-reloc now works on ELF executables and shared libraries.
-Changes since binutils 2.6
+* Added --adjust-vma option to objdump.
+
+Changes in binutils 2.7:
* Added --enable-shared and --enable-commonbfdlib options to configure.
* Added support for Alpha OpenVMS/AXP.
-Changes since binutils 2.5
+Changes in binutils 2.6:
* Added -N/--strip-symbol and -K/--keep-symbol arguments to strip and objcopy.
* ar and ranlib now work on AIX. The tools are now built by default on AIX.
-Changes since binutils 2.4
+Changes in binutils 2.5:
* Changed objdump -dr to dump the relocs interspersed with the assembly
listing, for a more useful listing of relocateable files.
* strip and objcopy should now be able to handle dynamically linked ELF
executables.
-Changes since binutils 2.3
+Changes in binutils 2.4:
* Support for HP-PA (by Jeff Law), i386 Mach (by David Mackenzie), RS/6000 and
PowerPC (except ar and ranlib; by Ian Taylor).
* Programs `strip' and `objcopy' will not attempt to write dynamically linked
ELF output files, since BFD currently can't create them properly.
-Changes since binutils 2.2
+Changes in binutils 2.3:
* A new --stabs argument has been added to objdump to dump stabs sections in
ELF and COFF files.
* The strings program has been added.
-Changes since binutils 2.1
+Changes in binutils 2.2:
* The 'copy' program has been renamed to 'objcopy', for consistency with
'objdump', and because 'copy' might more plausibly be used as a synonym for
* There is the beginnings of a test suite.
-Changes since binutils 2.0
+Changes in binutils 2.1:
* There is now support for writing ECOFF files, so ld and the other utilities
should work on Risc/Ultrix and Irix. Please let us know how well this works.
[ -t | --syms ] [ -T | --dynamic-syms ] [ -x | --all-headers ]
[ -w | --wide ] [ --start-address=@var{address} ]
[ --stop-address=@var{address} ]
- [ --prefix-addresses] [ --show-raw-insn ]
+ [ --prefix-addresses] [ --[no-]show-raw-insn ]
[ --adjust-vma=@var{offset} ]
[ --version ] [ --help ]
@var{objfile}@dots{}
in symbolic form. This is the default except when
@code{--prefix-addresses} is used.
+@item --no-show-raw-insn
+When disassembling instructions, do not print the instruction bytes.
+This is the default when @code{--prefix-addresses} is used.
+
@item --stabs
@cindex stab
@cindex .stab
.RB "[\|" \-R | \-\-dynamic\-reloc "\|]"
.RB "[\|" \-s | \-\-full\-contents "\|]"
.RB "[\|" \-S | \-\-source "\|]"
-.RB "[\|" \-\-show\-raw\-insn "\|]"
+.RB "[\|" \-\-[no\-]show\-raw\-insn "\|]"
.RB "[\|" \-\-stabs "\|]"
.RB "[\|" \-t | \-\-syms "\|]"
.RB "[\|" \-T | \-\-dynamic\-syms "\|]"
.B \-\-prefix\-addresses
is used.
+.TP
+.B \-\-no\-show\-raw\-insn
+When disassembling instructions, do not print the instruction bytes.
+This is the default when
+.B \-\-prefix\-addresses
+is used.
+
.TP
.B \-\-stabs
Display the contents of the .stab, .stab.index, and .stab.excl
static bfd_vma start_address = (bfd_vma) -1; /* --start-address */
static bfd_vma stop_address = (bfd_vma) -1; /* --stop-address */
static int dump_debugging; /* --debugging */
+static bfd_vma adjust_section_vma = 0; /* --adjust-vma */
/* Extra info to pass to the disassembler address printing function. */
struct objdump_disasm_info {
[--syms] [--all-headers] [--dynamic-syms] [--dynamic-reloc]\n\
[--wide] [--version] [--help] [--private-headers]\n\
[--start-address=addr] [--stop-address=addr]\n\
- [--prefix-addresses] [--show-raw-insn]\n\
+ [--prefix-addresses] [--[no-]show-raw-insn] [--adjust-vma=offset]\n\
[-EB|-EL] [--endian={big|little}] objfile...\n\
at least one option besides -l (--line-numbers) must be given\n");
list_supported_targets (program_name, stream);
#define OPTION_ENDIAN (150)
#define OPTION_START_ADDRESS (OPTION_ENDIAN + 1)
#define OPTION_STOP_ADDRESS (OPTION_START_ADDRESS + 1)
+#define OPTION_ADJUST_VMA (OPTION_STOP_ADDRESS + 1)
static struct option long_options[]=
{
+ {"adjust-vma", required_argument, NULL, OPTION_ADJUST_VMA},
{"all-headers", no_argument, NULL, 'x'},
{"private-headers", no_argument, NULL, 'p'},
{"architecture", required_argument, NULL, 'm'},
{"help", no_argument, NULL, 'H'},
{"info", no_argument, NULL, 'i'},
{"line-numbers", no_argument, NULL, 'l'},
+ {"no-show-raw-insn", no_argument, &show_raw_insn, -1},
{"prefix-addresses", no_argument, &prefix_addresses, 1},
{"reloc", no_argument, NULL, 'r'},
{"section", required_argument, NULL, 'j'},
buf[j - i] = '\0';
}
- if (! prefix_addresses || show_raw_insn)
+ if (prefix_addresses
+ ? show_raw_insn > 0
+ : show_raw_insn >= 0)
{
long j;
printf ("%s", buf);
- if (! prefix_addresses || show_raw_insn)
+ if (prefix_addresses
+ ? show_raw_insn > 0
+ : show_raw_insn >= 0)
{
while (pb < bytes)
{
asymbol *sym;
long place;
- sym = find_symbol_for_address (abfd, section, i, true, &place);
+ sym = find_symbol_for_address (abfd, section, section->vma + i,
+ true, &place);
++place;
while (i < stop)
{
long nextstop;
boolean insns;
- disasm_info.symbol = sym;
+ if (sym != NULL && bfd_asymbol_value (sym) <= section->vma + i)
+ disasm_info.symbol = sym;
+ else
+ disasm_info.symbol = NULL;
printf ("\n");
objdump_print_addr_with_sym (abfd, section, sym,
false);
printf (":\n");
- if (sym == NULL)
+ if (sym != NULL && bfd_asymbol_value (sym) > section->vma + i)
+ nextsym = sym;
+ else if (sym == NULL)
nextsym = NULL;
else
{
nextsym = sorted_syms[place];
}
- if (nextsym == NULL)
+ if (sym != NULL && bfd_asymbol_value (sym) > section->vma + i)
+ {
+ nextstop = bfd_asymbol_value (sym) - section->vma;
+ if (nextstop > stop)
+ nextstop = stop;
+ }
+ else if (nextsym == NULL)
nextstop = stop;
else
{
disassembling them. */
if (disassemble_all
|| sym == NULL
+ || bfd_asymbol_value (sym) > section->vma + i
|| ((sym->flags & BSF_OBJECT) == 0
&& (strstr (bfd_asymbol_name (sym), "gnu_compiled")
== NULL)
return;
}
+ /* If we are adjusting section VMA's, change them all now. Changing
+ the BFD information is a hack. However, we must do it, or
+ bfd_find_nearest_line will not do the right thing. */
+ if (adjust_section_vma != 0)
+ {
+ asection *s;
+
+ for (s = abfd->sections; s != NULL; s = s->next)
+ {
+ s->vma += adjust_section_vma;
+ s->lma += adjust_section_vma;
+ }
+ }
+
printf ("\n%s: file format %s\n", bfd_get_filename (abfd),
abfd->xvec->name);
if (dump_ar_hdrs)
START_PROGRESS (program_name, 0);
bfd_init ();
+ set_default_bfd_target ();
while ((c = getopt_long (argc, argv, "pib:m:VdDlfahrRtTxsSj:wE:",
long_options, (int *) 0))
case 'w':
wide_output = 1;
break;
+ case OPTION_ADJUST_VMA:
+ adjust_section_vma = parse_vma (optarg, "--adjust-vma");
+ break;
case OPTION_START_ADDRESS:
start_address = parse_vma (optarg, "--start-address");
break;