From 7cc27f03b90c3fad20b4fc535f448c4ee42932d0 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 2 May 2006 12:17:30 +0000 Subject: [PATCH] * binutils-all/copy-2.d: Change the name of the section whose flags are changed to "foo" so that the test will work with PE based targets. Skip this test for AOUT based targeted. * binutils-all/copytest.s: New file. --- binutils/testsuite/ChangeLog | 7 +++++++ binutils/testsuite/binutils-all/copy-2.d | 12 ++++++++---- binutils/testsuite/binutils-all/copytest.s | 7 +++++++ 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 binutils/testsuite/binutils-all/copytest.s diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index e27aa34b935..a76b4146ac6 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2006-05-02 Nick Clifton + + * binutils-all/copy-2.d: Change the name of the section whose + flags are changed to "foo" so that the test will work with PE + based targets. Skip this test for AOUT based targeted. + * binutils-all/copytest.s: New file. + 2006-05-01 H.J. Lu * binutils-all/objcopy.exp: Run "copy-1" for ELF only. diff --git a/binutils/testsuite/binutils-all/copy-2.d b/binutils/testsuite/binutils-all/copy-2.d index 486c8e95130..582c8c298b3 100644 --- a/binutils/testsuite/binutils-all/copy-2.d +++ b/binutils/testsuite/binutils-all/copy-2.d @@ -1,14 +1,18 @@ #PROG: objcopy #objdump: -h -#objcopy: --set-section-flags .text=alloc,data +#objcopy: --set-section-flags foo=contents,alloc,load,code #name: copy with seting section flags 2 -#source: bintest.s +#source: copytest.s +#not-target: *-*-aout +# Note - we use copytest.s and a section named "foo" rather +# than .text because for some file formats (eg PE) the .text +# section has a fixed set of flags and these cannot be changed. .*: +file format .* Sections: Idx.* #... - [0-9]* .text.* - CONTENTS, ALLOC, LOAD, RELOC, DATA + [0-9]* foo.* + CONTENTS, ALLOC, LOAD, CODE #... diff --git a/binutils/testsuite/binutils-all/copytest.s b/binutils/testsuite/binutils-all/copytest.s new file mode 100644 index 00000000000..33c13b881a6 --- /dev/null +++ b/binutils/testsuite/binutils-all/copytest.s @@ -0,0 +1,7 @@ + .globl foo_symbol + .section foo +foo_symbol: + .long 1 + .section bar +bar_symbol: + .long 2 -- 2.30.2