diff options
author | Alan Modra <amodra@gmail.com> | 2018-09-12 14:57:48 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2018-09-17 23:31:18 +0930 |
commit | c12d9fa2afe7abcbe407a00e15719e1a1350c2a7 (patch) | |
tree | a766a5fd206554f404b2e84ed11582b8c84d0d90 /binutils/testsuite | |
parent | a4b9568c7ee95891de6f5ba846f2d1aaf61569cd (diff) | |
download | gdb-c12d9fa2afe7abcbe407a00e15719e1a1350c2a7.zip gdb-c12d9fa2afe7abcbe407a00e15719e1a1350c2a7.tar.gz gdb-c12d9fa2afe7abcbe407a00e15719e1a1350c2a7.tar.bz2 |
Support objcopy --remove-section=.relaFOO
* objcopy.c (handle_remove_section_option): Don't require a dot
after .rela and .rel to handle a possible relocation section.
* testsuite/binutils-all/remove-relocs-07.s,
* testsuite/binutils-all/remove-relocs-07.d,
* testsuite/binutils-all/remove-relocs-08.d: New tests.
* testsuite/binutils-all/remove-relocs-01.d,
* testsuite/binutils-all/remove-relocs-04.d,
* testsuite/binutils-all/remove-relocs-05.d,
* testsuite/binutils-all/remove-relocs-06.d: Exclude mips64-openbsd.
Diffstat (limited to 'binutils/testsuite')
7 files changed, 18 insertions, 0 deletions
diff --git a/binutils/testsuite/binutils-all/remove-relocs-01.d b/binutils/testsuite/binutils-all/remove-relocs-01.d index 9cd0bfe..702747b 100644 --- a/binutils/testsuite/binutils-all/remove-relocs-01.d +++ b/binutils/testsuite/binutils-all/remove-relocs-01.d @@ -2,6 +2,7 @@ #source: remove-relocs-01.s #objcopy: --remove-relocations=.data.relocs.01 #readelf: -r +#notarget: "mips64*-*-openbsd*" Relocation section '\.rela?\.data\.relocs\.02' at offset 0x[0-9a-f]+ contains 3 entries: .* diff --git a/binutils/testsuite/binutils-all/remove-relocs-04.d b/binutils/testsuite/binutils-all/remove-relocs-04.d index 99f5a61..1b8eab3 100644 --- a/binutils/testsuite/binutils-all/remove-relocs-04.d +++ b/binutils/testsuite/binutils-all/remove-relocs-04.d @@ -2,6 +2,7 @@ #source: remove-relocs-01.s #objcopy: --remove-relocations=.data.relocs.0\[12\] #readelf: -r +#notarget: "mips64*-*-openbsd*" Relocation section '\.rela?\.data\.relocs\.03' at offset 0x[0-9a-f]+ contains 3 entries: .* diff --git a/binutils/testsuite/binutils-all/remove-relocs-05.d b/binutils/testsuite/binutils-all/remove-relocs-05.d index e2166c9..a429182 100644 --- a/binutils/testsuite/binutils-all/remove-relocs-05.d +++ b/binutils/testsuite/binutils-all/remove-relocs-05.d @@ -2,6 +2,7 @@ #source: remove-relocs-01.s #objcopy: --remove-section=.rela.data.relocs.01 --remove-section=.rel.data.relocs.01 #readelf: -r +#notarget: "mips64*-*-openbsd*" Relocation section '\.rela?\.data\.relocs\.02' at offset 0x[0-9a-f]+ contains 3 entries: .* diff --git a/binutils/testsuite/binutils-all/remove-relocs-06.d b/binutils/testsuite/binutils-all/remove-relocs-06.d index 09fed58..5214bc7 100644 --- a/binutils/testsuite/binutils-all/remove-relocs-06.d +++ b/binutils/testsuite/binutils-all/remove-relocs-06.d @@ -2,6 +2,7 @@ #source: remove-relocs-01.s #objcopy: --remove-relocations=.data.relocs.* --remove-relocations=!.data.relocs.02 #readelf: -r +#notarget: "mips64*-*-openbsd*" Relocation section '\.rela?\.data\.relocs\.02' at offset 0x[0-9a-f]+ contains 3 entries: .* diff --git a/binutils/testsuite/binutils-all/remove-relocs-07.d b/binutils/testsuite/binutils-all/remove-relocs-07.d new file mode 100644 index 0000000..c69df8d --- /dev/null +++ b/binutils/testsuite/binutils-all/remove-relocs-07.d @@ -0,0 +1,6 @@ +#PROG: objcopy +#source: remove-relocs-07.s +#objcopy: --remove-relocations=FOO +#readelf: -r + +There are no relocations in this file\. diff --git a/binutils/testsuite/binutils-all/remove-relocs-07.s b/binutils/testsuite/binutils-all/remove-relocs-07.s new file mode 100644 index 0000000..1e95375 --- /dev/null +++ b/binutils/testsuite/binutils-all/remove-relocs-07.s @@ -0,0 +1,2 @@ + .section "FOO","aw",%progbits + .dc.a x diff --git a/binutils/testsuite/binutils-all/remove-relocs-08.d b/binutils/testsuite/binutils-all/remove-relocs-08.d new file mode 100644 index 0000000..f54462d --- /dev/null +++ b/binutils/testsuite/binutils-all/remove-relocs-08.d @@ -0,0 +1,6 @@ +#PROG: objcopy +#source: remove-relocs-07.s +#objcopy: --remove-section=.relFOO --remove-section=.relaFOO +#readelf: -r + +There are no relocations in this file\. |