aboutsummaryrefslogtreecommitdiff
path: root/binutils/objcopy.1
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-10-18 19:20:58 +0000
committerIan Lance Taylor <ian@airs.com>1994-10-18 19:20:58 +0000
commit67f67ed998bb2be381c9eba2eafcbbdaaf2527d6 (patch)
tree1d29c206e11c157889705778510100525b335c8c /binutils/objcopy.1
parentc768bd3f2da5eaa0a1a458a3104670da1c0d531f (diff)
downloadgdb-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/objcopy.1')
-rw-r--r--binutils/objcopy.132
1 files changed, 31 insertions, 1 deletions
diff --git a/binutils/objcopy.1 b/binutils/objcopy.1
index 365c11a..ca863ff 100644
--- a/binutils/objcopy.1
+++ b/binutils/objcopy.1
@@ -55,6 +55,34 @@ uses BFD to do all its translation work; it knows about all the
formats BFD knows about, and thus is able to recognize most formats
without being told explicitly.
.PP
+.B objcopy
+can be used to generate S-records by using an output target of
+.B srec
+(e.g., use
+.B -O srec).
+.PP
+.B objcopy
+can be used to generate a raw binary file by using an output target of
+.B binary
+(e.g., use
+.B -O binary).
+When
+.B 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
+.B --set-start
+option may be used to specify a different starting point.
+.PP
+When generating an S-record or a raw binary file, it may be helpful to
+use
+.B -S
+to remove sections containing debugging information. In some cases
+.B -R
+will be useful to remove sections which contain information which is
+not needed by the binary file.
+.PP
.I infile
and
.I outfile
@@ -112,7 +140,9 @@ The interleave is ignored if neither \fB\-b\fP nor \fB\-\-byte\fP is given.
.TP
.B \fB\-\-set\-start=\fIval
Set the start address of the new file to \fIval\fP. Not all object
-file formats support setting the start address.
+file formats support setting the start address. When using the
+\fBbinary\fP output file format, the start address sets the virtual
+address of the first byte in the binary output file.
.TP
.B \fB\-\-adjust\-start=\fIincr
Adjust the start address by adding \fIincr\fP. Not all object file