From 4cb99ff2a19b9c1ad46106872a4888ede341d5d4 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 24 Oct 1996 21:21:17 +0000 Subject: [PATCH] * objdump.c (prefix_addresses): New static variable. (long_options): Add "prefix-addresses". (compare_symbols): Sort BSF_FUNCTION symbols before other symbols. (find_symbol_for_address): New static function, broken out of objdump_print_address. (objdump_print_addr_with_sym): New static function, broken out of objdump_print_address. (objdump_print_address): Call new functions. (disassemble_bytes): New static function, broken out of disassemble_data. Change disassembly format, unless prefix_addresses is set. (disassemble_data): Call disassemble_bytes. Unless prefix_addresses is set, disassemble in chunks headed by a symbol. * binutils.texi, objdump.1: Document --prefix-addresses. --- binutils/binutils.texi | 10 ++++++++-- binutils/objdump.1 | 12 ++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/binutils/binutils.texi b/binutils/binutils.texi index a1b6335..07f3414 100644 --- a/binutils/binutils.texi +++ b/binutils/binutils.texi @@ -1040,7 +1040,8 @@ objdump [ -a | --archive-headers ] [ -s | --full-contents ] [ --stabs ] [ -t | --syms ] [ -T | --dynamic-syms ] [ -x | --all-headers ] [ -w | --wide ] [ --start-address=@var{address} ] - [ --stop-address=@var{address} ] [ --show-raw-insn ] + [ --stop-address=@var{address} ] + [ --prefix-addresses] [ --show-raw-insn ] [ --version ] [ --help ] @var{objfile}@dots{} @end smallexample @@ -1165,6 +1166,10 @@ can be useful when disasembling object files which do not describe architecture information, such as S-records. You can list the available architectures with the @samp{-i} option. +@item --prefix-addresses +When disassembling, print the complete address on each line. This is +the older disassembly format. + @item -r @itemx --reloc @cindex relocation entries, in object file @@ -1194,7 +1199,8 @@ Display source code intermixed with disassembly, if possible. Implies @item --show-raw-insn When disassembling instructions, print the instruction in hex as well as -in symbolic form. Not all targets handle this correctly yet. +in symbolic form. This is the default except when +@code{--prefix-addresses} is used. @item --stabs @cindex stab diff --git a/binutils/objdump.1 b/binutils/objdump.1 index 8e29249..82f9d2b 100644 --- a/binutils/objdump.1 +++ b/binutils/objdump.1 @@ -42,6 +42,7 @@ objdump \- display information from object files. .RB " | " "\-\-architecture="\c .I machine\c \&\|] +.RB "[\|" \-\-prefix\-addresses "\|]" .RB "[\|" \-r | \-\-reloc "\|]" .RB "[\|" \-R | \-\-dynamic\-reloc "\|]" .RB "[\|" \-s | \-\-full\-contents "\|]" @@ -225,6 +226,11 @@ architecture information, such as S-records. You can list the available architectures with the \fB\-i\fP option. .TP +.B \-\-prefix\-addresses +When disassembling, print the complete address on each line. This is +the older disassembly format. + +.TP .B \-r .TP .B \-\-reloc @@ -254,9 +260,11 @@ Display source code intermixed with disassembly, if possible. Implies \fB-d\fP. .TP -.B \-\-show-raw-insn +.B \-\-show\-raw\-insn When disassembling instructions, print the instruction in hex as well as -in symbolic form. Not all targets handle this correctly yet. +in symbolic form. This is the default except when +.B \-\-prefix\-addresses +is used. .TP .B \-\-stabs -- 2.7.4