From ab3a59cf4c54c8f92f2e30f855684193c7ecb3d7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 26 Feb 1997 02:30:31 +0000 Subject: [PATCH] * objdump.c (adjust_section_vma): New static variable. (usage): Mention --adjust-section-vma. (OPTION_ADJUST_VMA): Define. (long_options): Add "addjust-vma". (display_bfd): If adjust_section_vma is not 0, add it to all the section addresses. (main): Handle OPTION_ADJUST_VMA. * binutils.texi, objdump.1: Document --adjust-vma. --- binutils/binutils.texi | 10 ++++++++++ binutils/objdump.1 | 12 ++++++++++++ 2 files changed, 22 insertions(+) diff --git a/binutils/binutils.texi b/binutils/binutils.texi index e3e1db19b92..fac0bb0168c 100644 --- a/binutils/binutils.texi +++ b/binutils/binutils.texi @@ -1051,6 +1051,7 @@ objdump [ -a | --archive-headers ] [ -w | --wide ] [ --start-address=@var{address} ] [ --stop-address=@var{address} ] [ --prefix-addresses] [ --show-raw-insn ] + [ --adjust-vma=@var{offset} ] [ --version ] [ --help ] @var{objfile}@dots{} @end smallexample @@ -1077,6 +1078,15 @@ header information (in a format similar to @samp{ls -l}). Besides the information you could list with @samp{ar tv}, @samp{objdump -a} shows the object file format of each archive member. +@item --adjust-vma=@var{offset} +@cindex section addresses in objdump +@cindex VMA in objdump +When dumping information, first add @var{offset} to all the section +addresses. This is useful if the section addresses do not correspond to +the symbol table, which can happen when putting sections at particular +addresses when using a format which can not represent section addresses, +such as a.out. + @item -b @var{bfdname} @itemx --target=@var{bfdname} @cindex object code format diff --git a/binutils/objdump.1 b/binutils/objdump.1 index b74d8256b8f..53e0501ece2 100644 --- a/binutils/objdump.1 +++ b/binutils/objdump.1 @@ -59,6 +59,9 @@ objdump \- display information from object files. .RB "[\|" "\-\-stop\-address="\c .I address\c \&\|] +.RB "[\|" "\-\-adjust\-vma="\c +.I offset\c +\&\|] .RB "[\|" \-\-version "\|]" .RB "[\|" \-\-help "\|]" .I objfile\c @@ -103,6 +106,15 @@ information you could list with `\|\c \|' shows the object file format of each archive member. +.TP +.BI "\-\-adjust\-vma=" "offset" +When dumping information, first add +.I offset +to all the section addresses. This is useful if the section addresses +do not correspond to the symbol table, which can happen when putting +sections at particular addresses when using a format which can not +represent section addresses, such as a.out. + .TP .BI "\-b " "bfdname"\c .TP -- 2.30.2