aboutsummaryrefslogtreecommitdiff
path: root/binutils/binutils.texi
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-10-18 15:49:53 +0000
committerIan Lance Taylor <ian@airs.com>1994-10-18 15:49:53 +0000
commit6c7ed0842d19b5160d49a73653d1aa52e776fcae (patch)
tree0f1e6880007d64f882d5ba71b324ef279f05b8fc /binutils/binutils.texi
parent683f4743179061f53de59be3021abb8567574b37 (diff)
downloadgdb-6c7ed0842d19b5160d49a73653d1aa52e776fcae.zip
gdb-6c7ed0842d19b5160d49a73653d1aa52e776fcae.tar.gz
gdb-6c7ed0842d19b5160d49a73653d1aa52e776fcae.tar.bz2
* objcopy.c (struct section_list): Add fields used, adjust, val.
(adjust_start, set_start_set, set_start): New static variables. (adjust_section_vma, adjust_sections): New static variables. (copy_options): Add --adjust-start, --adjust-vma, --adjust-section-vma, --adjust-warnings, --no-adjust-warnings, --set-start. (parse_vma): New static function. (copy_usage): Mention new options. (copy_object): Handle --set-start and --adjust-start. (setup_section): Correct type of last argument to PTR. Set used field if section is removed. Handle --adjust-vma and --adjust-section-vma. (copy_section): Correct type of last argument to PTR. (mark_symbols_used_in_relocations): Likewise. (strip_main): Clear used field when handling -R. (copy_main): Handle new options. * binutils.texi (objcopy): Document new options. * objcopy.1: Document new options.
Diffstat (limited to 'binutils/binutils.texi')
-rw-r--r--binutils/binutils.texi36
1 files changed, 36 insertions, 0 deletions
diff --git a/binutils/binutils.texi b/binutils/binutils.texi
index 4acc69d..daa1777 100644
--- a/binutils/binutils.texi
+++ b/binutils/binutils.texi
@@ -747,6 +747,10 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ]
[ -b @var{byte} | --byte=@var{byte} ]
[ -i @var{interleave} | --interleave=@var{interleave} ]
[ -R @var{sectionname} | --remove-section=@var{sectionname} ]
+ [ --set-start=@var{val} ] [ --adjust-start=@var{incr} ]
+ [ --adjust-vma=@var{incr} ]
+ [ --adjust-section-vma=@var{section}@{=,+,-@}@var{val} ]
+ [ --adjust-warnings ] [ --no-adjust-warnings ]
[ -v | --verbose ] [ -V | --version ] [ --help ]
@var{infile} [@var{outfile}]
@end smallexample
@@ -827,6 +831,38 @@ copy with the @var{-b} or @samp{--byte} option. The default is 4.
@code{objcopy} ignores this option if you do not specify either @samp{-b} or
@samp{--byte}.
+@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.
+
+@item --adjust-start @var{incr}
+Adjust the start address by adding @var{incr}. Not all object file
+formats support setting the start address.
+
+@item --adjust-vma @var{incr}
+Adjust the address of all sections, as well as the start address, by
+adding @var{incr}. Some object file formats do not permit section
+addresses to be changed arbitrarily. Note that this does not relocate
+the sections; if the program expects sections to be loaded at a certain
+address, and this option is used to change the sections such that they
+are loaded at a different address, the program may fail.
+
+@item --adjust-section-vma @var{section}@{=,+,-@}@var{val}
+Set or adjust the address of the named @var{section}. If @samp{=} is
+used, the section address is set to @var{val}. Otherwise, @var{val} is
+added to or subtracted from the section address. See the comments under
+@samp{--adjust-vma}, above. If @var{section} does not exist in the
+input file, a warning will be issued, unless @samp{--no-adjust-warnings}
+is used.
+
+@item --adjust-warnings
+If @samp{--adjust-section-vma} is used, and the named section does not
+exist, issue a warning. This is the default.
+
+@item --no-adjust-warnings
+Do not issue a warning if @samp{--adjust-section-vma} is used, even if
+the named section does not exist.
+
@item -V
@itemx --version
Show the version number of @code{objcopy}.