Add an --extract-symbol option to objcopy

Richard Sandiford richard@codesourcery.com
Thu Mar 1 16:40:00 GMT 2007


Nick Clifton <nickc@redhat.com> writes:
> Hi Richard,
>
>> 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.
>
> Approved, please apply.
>
> One minor point:
>
>> Index: binutils/NEWS
>> ===================================================================
>
>> +* Add --extract-symbol to objcopy.
>
> It would be nice if you extended this description a little bit.  We use 
> the NEWS files to make the release notes for any given particular 
> binutils release and just naming a new command line option without 
> describing what it does means that it is unlikely to grab the reader's 
> attention.  Maybe something like:
>
>    * Add --extract-symbol command line option to objcopy, which will
>      strip everything out of an ordinary object file or executable except
>      for its symbol table.  Files containing just symbols can be useful
>      to some OSes.

Thanks Nick.  Applied with that change.

Richard



More information about the Binutils mailing list