From 516e75beac7c7be9af74837a0e19388e801bf951 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 14 Feb 2012 01:01:30 +0000 Subject: [PATCH] * gas/elf/bad-group.s: Add section attributes. * gas/elf/elf.exp (groupautoa, groupautob): Don't run for hppa64-hpux. (ifunc-1, type): Don't run for hpux. * gas/elf/type-noifunc.e: Accept ANSI_COM. * gas/elf/section7.s: Always have whitespace before directives. * gas/elf/warn-2.s: Likewise. * gas/i386/ifunc-3.s: Move .size directive. --- gas/testsuite/ChangeLog | 10 ++++++++++ gas/testsuite/gas/elf/bad-group.s | 2 +- gas/testsuite/gas/elf/elf.exp | 21 ++++++++++++++++----- gas/testsuite/gas/elf/section7.s | 36 ++++++++++++++++++------------------ gas/testsuite/gas/elf/type-noifunc.e | 2 +- gas/testsuite/gas/elf/warn-2.s | 18 +++++++++--------- gas/testsuite/gas/i386/ifunc-3.s | 3 ++- 7 files changed, 57 insertions(+), 35 deletions(-) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 787f60d..cfa3ef3 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2012-02-14 Alan Modra + + * gas/elf/bad-group.s: Add section attributes. + * gas/elf/elf.exp (groupautoa, groupautob): Don't run for hppa64-hpux. + (ifunc-1, type): Don't run for hpux. + * gas/elf/type-noifunc.e: Accept ANSI_COM. + * gas/elf/section7.s: Always have whitespace before directives. + * gas/elf/warn-2.s: Likewise. + * gas/i386/ifunc-3.s: Move .size directive. + 2012-02-13 Alan Modra * gas/all/gas.exp (redef2): xfail m6811 and m6812. diff --git a/gas/testsuite/gas/elf/bad-group.s b/gas/testsuite/gas/elf/bad-group.s index 69710c7..dc927c6 100644 --- a/gas/testsuite/gas/elf/bad-group.s +++ b/gas/testsuite/gas/elf/bad-group.s @@ -3,7 +3,7 @@ main: .type main, @function .LFB0: - .section .text.unlikely + .section .text.unlikely,"ax",%progbits .L5: .globl __gxx_personality_v0 .section .gcc_except_table,"a",%progbits diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp index 7679722..9b7cc8f 100644 --- a/gas/testsuite/gas/elf/elf.exp +++ b/gas/testsuite/gas/elf/elf.exp @@ -95,8 +95,14 @@ if { [is_elf_format] } then { run_dump_test "group0c" run_dump_test "group1a" run_dump_test "group1b" - run_dump_test "groupautoa" case $target_triplet in { + { hppa64*-*-hpux* } { } + default { + run_dump_test "groupautoa" + } + } + case $target_triplet in { + { hppa64*-*-hpux* } { } { xtensa*-*-* } { } default { run_dump_test "groupautob" @@ -147,16 +153,21 @@ if { [is_elf_format] } then { } run_dump_test "symver" + # No indirect functions on non-GNU targets. # The MSP port sets the ELF header's OSABI field to ELFOSABI_STANDALONE. # The non-eabi ARM ports sets it to ELFOSABI_ARM. # So for these targets we cannot include an IFUNC symbol type # in the symbol type test. - if { [istarget "msp*-*-*"] - || [istarget "arm*-*-*"]} then { + if { [istarget "*-*-hpux*"] + || [istarget "msp*-*-*"] + || [istarget "arm*-*-*"]} then { + # hppa64 has a non-standard common directive + if { ![istarget "hppa64*-*-hpux*"] } then { run_elf_list_test "type-noifunc" "" "" "-s" "| grep \"1 *\\\[FONTC\\\]\"" + } } else { - run_dump_test ifunc-1 - run_elf_list_test "type" "" "" "-s" "| grep \"1 *\\\[FIONTCU\\\]\"" + run_dump_test ifunc-1 + run_elf_list_test "type" "" "" "-s" "| grep \"1 *\\\[FIONTCU\\\]\"" } run_dump_test "section6" diff --git a/gas/testsuite/gas/elf/section7.s b/gas/testsuite/gas/elf/section7.s index fe9aaa1..2d637b4 100644 --- a/gas/testsuite/gas/elf/section7.s +++ b/gas/testsuite/gas/elf/section7.s @@ -1,38 +1,38 @@ .section .bar,"a" .byte 0 -.pushsection .bar1,2,"a" + .pushsection .bar1,2,"a" .byte 2 -.popsection + .popsection .byte 0 -.pushsection .bar2,3,"a" + .pushsection .bar2,3,"a" .byte 2 -.popsection + .popsection .byte 0 -.pushsection .bar3,2,"a", %progbits + .pushsection .bar3,2,"a", %progbits .byte 3 -.popsection + .popsection .byte 0 -.pushsection .bar4 + .pushsection .bar4 .byte 4 -.popsection + .popsection .byte 0 -.pushsection .text,1,"axG",%progbits,foo,comdat + .pushsection .text,1,"axG",%progbits,foo,comdat .byte -1 -.popsection + .popsection .byte 0 -.pushsection .text,"axG",%progbits,foo,comdat + .pushsection .text,"axG",%progbits,foo,comdat .byte -2 -.popsection + .popsection .byte 0 -.pushsection .bar1,"a" + .pushsection .bar1,"a" .byte 1 -.popsection + .popsection .byte 0 -.pushsection .bar3,"a", %progbits + .pushsection .bar3,"a", %progbits .byte 1 -.popsection + .popsection .byte 0 -.pushsection .bar2,"a" + .pushsection .bar2,"a" .byte 1 -.popsection + .popsection .byte 0 diff --git a/gas/testsuite/gas/elf/type-noifunc.e b/gas/testsuite/gas/elf/type-noifunc.e index 8b2a6bc..ddeadd7 100644 --- a/gas/testsuite/gas/elf/type-noifunc.e +++ b/gas/testsuite/gas/elf/type-noifunc.e @@ -2,4 +2,4 @@ +.: 0+0 +1 +OBJECT +LOCAL +DEFAULT +. object +.: 0+1 +1 +TLS +LOCAL +DEFAULT +. tls_object +..: 0+2 +1 +NOTYPE +LOCAL +DEFAULT +. notype - +..: 0+1 +1 +(COMMON|OBJECT) +GLOBAL +DEFAULT +COM common + +..: 0+1 +1 +(COMMON|OBJECT) +GLOBAL +DEFAULT +(ANSI_|)COM common diff --git a/gas/testsuite/gas/elf/warn-2.s b/gas/testsuite/gas/elf/warn-2.s index 12b7139..7783f9d 100644 --- a/gas/testsuite/gas/elf/warn-2.s +++ b/gas/testsuite/gas/elf/warn-2.s @@ -6,18 +6,18 @@ .offset 40 -.ifeq nop_type - 1 + .ifeq nop_type - 1 nop 0 -.else -.ifeq nop_type - 2 + .else + .ifeq nop_type - 2 l.nop 0 -.else -.ifeq nop_type - 3 + .else + .ifeq nop_type - 3 nopr 1 -.else + .else nop -.endif -.endif -.endif + .endif + .endif + .endif ;# { dg-warning "Warning: dwarf line number information for .* ignored" "" { xfail i370-*-* mcore-*-* mn10200-*-* moxie-*-* openrisc-*-* or32-*-* v850-*-* } 0 } diff --git a/gas/testsuite/gas/i386/ifunc-3.s b/gas/testsuite/gas/i386/ifunc-3.s index dbcf494..18fd4d6 100644 --- a/gas/testsuite/gas/i386/ifunc-3.s +++ b/gas/testsuite/gas/i386/ifunc-3.s @@ -8,9 +8,10 @@ start1: .long bar1-base .type bar1,%gnu_indirect_function + .size bar1,.Lendbar1-bar1 bar1: ret - .size bar1,.-bar1 +.Lendbar1: .align 4 .long bar1-. -- 2.7.4