diff options
author | Ian Lance Taylor <ian@airs.com> | 1994-10-18 19:20:58 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1994-10-18 19:20:58 +0000 |
commit | 67f67ed998bb2be381c9eba2eafcbbdaaf2527d6 (patch) | |
tree | 1d29c206e11c157889705778510100525b335c8c /binutils/binutils.texi | |
parent | c768bd3f2da5eaa0a1a458a3104670da1c0d531f (diff) | |
download | gdb-67f67ed998bb2be381c9eba2eafcbbdaaf2527d6.zip gdb-67f67ed998bb2be381c9eba2eafcbbdaaf2527d6.tar.gz gdb-67f67ed998bb2be381c9eba2eafcbbdaaf2527d6.tar.bz2 |
* objcopy.c (copy_object): If the output file format is `binary',
and the start address was not set using --set-start, default the
start address to zero. This hack is because the `binary' output
file format uses the start address to set the virtual address of
the first byte in the file.
* binutils.texi, objcopy.1: Add some notes on generating S-records
and binary files.
Diffstat (limited to 'binutils/binutils.texi')
-rw-r--r-- | binutils/binutils.texi | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/binutils/binutils.texi b/binutils/binutils.texi index daa1777..5e2f2c7 100644 --- a/binutils/binutils.texi +++ b/binutils/binutils.texi @@ -767,6 +767,22 @@ translation work; it has access to all the formats described in @sc{bfd} and thus is able to recognize most formats without being told explicitly. @xref{BFD,,BFD,ld.info,Using LD}. +@code{objcopy} can be used to generate S-records by using an output +target of @samp{srec} (e.g., use @samp{-O srec}). + +@code{objcopy} can be used to generate a raw binary file by using an +output target of @samp{binary} (e.g., use @samp{-O binary}). When +@code{objcopy} generates a raw binary file, it will essentially produce +a memory dump of the contents of the input object file. All symbols and +relocation information will be discarded. By default, the memory dump +will start at virtual address zero; the @samp{--set-start} option may be +used to specify a different starting point. + +When generating an S-record or a raw binary file, it may be helpful to +use @samp{-S} to remove sections containing debugging information. In +some cases @samp{-R} will be useful to remove sections which contain +information which is not needed by the binary file. + @table @code @item @var{infile} @itemx @var{outfile} @@ -833,7 +849,9 @@ copy with the @var{-b} or @samp{--byte} option. The default is 4. @item --set-start @var{val} Set the address of the new file to @var{val}. Not all object file -formats support setting the start address. +formats support setting the start address. When using the @samp{binary} +output file format, the start address sets the virtual address of the +first byte in the binary output file. @item --adjust-start @var{incr} Adjust the start address by adding @var{incr}. Not all object file |