diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-08-24 13:02:39 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2016-07-14 11:32:48 +0100 |
commit | e511c9b19faec4d21aef49d12224316dea3d51eb (patch) | |
tree | 8709243de73a47b67633070aca6293ba0e1949f2 /binutils/NEWS | |
parent | 7df94786e4723ba93d8982e55fc5e652b4b80142 (diff) | |
download | binutils-gdb-e511c9b19faec4d21aef49d12224316dea3d51eb.tar.gz |
objcopy/strip: Allow section patterns starting with '!'.
For symbol matching, prefixing a pattern with '!' will indicate a
non-matching pattern, however, this is not the case for section
patterns. As a result it is not possible to say "apply this action to
all sections except ...".
With this commit the objcopy and strip tools now support '!' prefix for
section patterns, so we can say:
objcopy --remove-section="*" --remove-section="!.text*"
Which will remove all sections, except those matching the pattern
'.text*'.
binutils/ChangeLog:
* objcopy.c (find_section_list): Handle section patterns starting
with '!' being a non-matching pattern.
* doc/binutils.texi (objcopy): Give example of using '!' with
--remove-section and --only-section.
(strip): Give example of using '!' with --remove-section.
* testsuite/binutils-all/data-sections.s: New file.
* testsuite/binutils-all/only-section-01.d: New file.
* testsuite/binutils-all/remove-section-01.d: New file.
* testsuite/binutils-all/objcopy.exp: Run new tests.
* NEWS: Mention new feature.
Diffstat (limited to 'binutils/NEWS')
-rw-r--r-- | binutils/NEWS | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/binutils/NEWS b/binutils/NEWS index 5bc6888ab50..9625cf49e28 100644 --- a/binutils/NEWS +++ b/binutils/NEWS @@ -1,5 +1,15 @@ -*- text -*- +* The --remove-section option for objcopy and strip now accepts section + patterns starting with an exclamation point to indicate a non-matching + section. A non-matching section is removed from the set of sections + matched by an earlier --remove-section pattern. + +* The --only-section option for objcopy now accepts section patterns + starting with an exclamation point to indicate a non-matching section. + A non-matching section is removed from the set of sections matched by + an earlier --only-section pattern. + Changes in 2.27: * Add a configure option, --enable-64-bit-archive, to force use of a |