From e6760bcc5348499c79e82045e12adf17f27d9a40 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 13 Nov 2007 13:20:02 +0000 Subject: [PATCH] 2007-11-13 H.J. Lu PR binutils/5233 * ld-elf/flags1.d: New. * ld-elf/flags1.ld: Likewise. * ld-elf/flags1.s: Likewise. --- ld/testsuite/ChangeLog | 9 ++++++++- ld/testsuite/ld-elf/flags1.d | 14 ++++++++++++++ ld/testsuite/ld-elf/flags1.ld | 12 ++++++++++++ ld/testsuite/ld-elf/flags1.s | 5 +++++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 ld/testsuite/ld-elf/flags1.d create mode 100644 ld/testsuite/ld-elf/flags1.ld create mode 100644 ld/testsuite/ld-elf/flags1.s diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 83fce111928..22024986c5f 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2007-11-13 H.J. Lu + + PR binutils/5233 + * ld-elf/flags1.d: New. + * ld-elf/flags1.ld: Likewise. + * ld-elf/flags1.s: Likewise. + 2007-11-13 Nick Clifton * ld-mn10300/i127740.s: New test: Checks relaxation and alignment. @@ -99,7 +106,7 @@ 2007-10-16 Nick Clifton - * lf-elfcomm/elfcomm.exp: Add tests of STT_COMMON symbol + * ld-elfcomm/elfcomm.exp: Add tests of STT_COMMON symbol generation. 2007-10-12 Joseph Myers diff --git a/ld/testsuite/ld-elf/flags1.d b/ld/testsuite/ld-elf/flags1.d new file mode 100644 index 00000000000..5a3407be0d4 --- /dev/null +++ b/ld/testsuite/ld-elf/flags1.d @@ -0,0 +1,14 @@ +#name: --set-section-flags test 1 (sections) +#ld: -Tflags1.ld +#objcopy_linked_file: --set-section-flags .post_text_reserve=contents,alloc,load,readonly,code +#readelf: -l --wide + +#... +Program Headers: + Type.* + LOAD +0x[0-9a-f]+ 0x0*0 0x0*0 0x0*0161 0x0*0161 RWE 0x[0-9a-f]+ + +#... + Segment Sections... + 00[ \t]+.text .post_text_reserve[ \t]* +#pass diff --git a/ld/testsuite/ld-elf/flags1.ld b/ld/testsuite/ld-elf/flags1.ld new file mode 100644 index 00000000000..a94cbe82596 --- /dev/null +++ b/ld/testsuite/ld-elf/flags1.ld @@ -0,0 +1,12 @@ +SECTIONS +{ + .text : + { + *(.text) + } =0 + .post_text_reserve : + { + . += 0x160; + } + /DISCARD/ : { *(.*) } +} diff --git a/ld/testsuite/ld-elf/flags1.s b/ld/testsuite/ld-elf/flags1.s new file mode 100644 index 00000000000..0562131edd9 --- /dev/null +++ b/ld/testsuite/ld-elf/flags1.s @@ -0,0 +1,5 @@ + .text +.globl start + .type start, @function +start: + .byte 0 -- 2.30.2