aboutsummaryrefslogtreecommitdiff
path: root/binutils/doc
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2007-03-01 16:39:42 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2007-03-01 16:39:42 +0000
commitd3e52d400ebf3840199b62eaafa92954110dc4fa (patch)
tree7f4378331536c4e5e2ad822afd989d2cf101f111 /binutils/doc
parent336becc77940136f16d65d66361397d6c4556293 (diff)
downloadgdb-d3e52d400ebf3840199b62eaafa92954110dc4fa.zip
gdb-d3e52d400ebf3840199b62eaafa92954110dc4fa.tar.gz
gdb-d3e52d400ebf3840199b62eaafa92954110dc4fa.tar.bz2
binutils/
200x-xx-xx Phil Edwards <phil@codesourcery.com> Richard Sandiford <richard@codesourcery.com> * NEWS: Mention addition of --extract-symbol. * doc/binutils.texi: Document it. * objcopy.c (extract_symbol): New variable. (OPTION_EXTRACT_SYMBOLS): New command_line_switch. (copy_options): Add an entry for --extract-symbol. (copy_usage): Mention --extract-symbol. (copy_object): Set the start address to zero for --extract-symbol. Do not copy private BFD data in that case. (setup_section): Set the size, LMA and VMA to zero for --extract-symbol. Do not copy private BFD data in that case. (copy_section): Do not copy section contents if --extract-symbol is passed. (copy_main): Set extract_symbol to TRUE if --extract-symbol is passed. ld/testsuite/ * ld-elf/extract-symbol-1sym.d, ld-elf/extract-symbol-1sec.d, * ld-elf/extract-symbol-1.s, ld-elf/extract-symbol-1.ld: New tests. * ld-elf/binutils.exp: Run them.
Diffstat (limited to 'binutils/doc')
-rw-r--r--binutils/doc/binutils.texi16
1 files changed, 16 insertions, 0 deletions
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index 3751d04..1eb854e 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -996,6 +996,7 @@ objcopy [@option{-F} @var{bfdname}|@option{--target=}@var{bfdname}]
[@option{--add-gnu-debuglink=}@var{path-to-file}]
[@option{--keep-file-symbols}]
[@option{--only-keep-debug}]
+ [@option{--extract-symbol}]
[@option{--writable-text}]
[@option{--readonly-text}]
[@option{--pure}]
@@ -1489,6 +1490,21 @@ currently only supports the presence of one filename containing
debugging information, not multiple filenames on a one-per-object-file
basis.
+@item --extract-symbol
+Keep the file's section flags and symbols but remove all section data.
+Specifically, the option:
+
+@itemize
+@item sets the virtual and load addresses of every section to zero;
+@item removes the contents of all sections;
+@item sets the size of every section to zero; and
+@item sets the file's start address to zero.
+@end itemize
+
+This option is used to build a @file{.sym} file for a VxWorks kernel.
+It can also be a useful way of reducing the size of a @option{--just-symbols}
+linker input file.
+
@item -V
@itemx --version
Show the version number of @command{objcopy}.