Add ability for objcopy to insert new symbols into a binary.
authorRonald Hoogenbllon <rhoogenboom@irdeto.com>
Wed, 21 Oct 2015 14:16:35 +0000 (15:16 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 21 Oct 2015 14:16:35 +0000 (15:16 +0100)
commit2b35fb28f397a26c0da03f7579116d28af2af824
tree7dc8a9042b84587fa9c317fbf1feda1caf6a1f97
parent1283d92f0e4704bb31b1e163b9c88216756ef62c
Add ability for objcopy to insert new symbols into a binary.

PR binutils/19104
binutils * objcopy.c (command_line_switch): Add OPTION_ADD_SYMBOL.
(copy_options): Add add-symbol.
(copy_usage): Likewise.
(parse_symflags): New function.
(need_sym_before): New function.
(create_new_symbol): New function.
(filter_symbols): Add code to insert new symbols.
(copy_main): Process OPTION_ADD_SYMBOL.
* doc/binutils.texi: Document new feature.
* NEWS: Add note about the new feature.

tests * binutils-all/add-symbol.d: New test.
* binutils-all/objcopy.exp: Run the new test.
binutils/ChangeLog
binutils/NEWS
binutils/doc/binutils.texi
binutils/objcopy.c
binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/add-symbol.d [new file with mode: 0644]
binutils/testsuite/binutils-all/objcopy.exp