diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -920,10 +920,10 @@ void MCObjectFileInfo::initXCOFFMCObjectFileInfo(const Triple &T) { // The default csect for program code. Functions without a specified section // get placed into this csect. The choice of csect name is not a property of - // the ABI or object file format. For example, the XL compiler uses an unnamed - // csect for program code. + // the ABI or object file format, but various tools rely on the section + // name being empty (considering named symbols to be "user symbol names"). TextSection = Ctx->getXCOFFSection( - ".text", SectionKind::getText(), + "", SectionKind::getText(), XCOFF::CsectProperties(XCOFF::StorageMappingClass::XMC_PR, XCOFF::XTY_SD), /* MultiSymbolsAllowed*/ true); diff --git a/llvm/test/CodeGen/PowerPC/aix-alias-alignment-2.ll b/llvm/test/CodeGen/PowerPC/aix-alias-alignment-2.ll --- a/llvm/test/CodeGen/PowerPC/aix-alias-alignment-2.ll +++ b/llvm/test/CodeGen/PowerPC/aix-alias-alignment-2.ll @@ -59,10 +59,10 @@ ; SYM: SYMBOL TABLE: ; SYM-NEXT: 00000000 df *DEBUG* 00000000 -; SYM-NEXT: 00000000 l .text 0000008a .text -; SYM-NEXT: 00000000 g F .text (csect: .text) 00000000 .foo1 -; SYM-NEXT: 00000030 g F .text (csect: .text) 00000000 .foo2 -; SYM-NEXT: 00000060 g F .text (csect: .text) 00000000 .foo3 +; SYM-NEXT: 00000000 l .text 0000008a +; SYM-NEXT: 00000000 g F .text (csect: ) 00000000 .foo1 +; SYM-NEXT: 00000030 g F .text (csect: ) 00000000 .foo2 +; SYM-NEXT: 00000060 g F .text (csect: ) 00000000 .foo3 ; SYM-NEXT: 00000090 l .data 00000030 .data ; SYM-NEXT: 00000090 g O .data (csect: .data) 00000000 ConstVector ; SYM-NEXT: 00000098 g O .data (csect: .data) 00000000 var1 diff --git a/llvm/test/CodeGen/PowerPC/aix-alias-alignment.ll b/llvm/test/CodeGen/PowerPC/aix-alias-alignment.ll --- a/llvm/test/CodeGen/PowerPC/aix-alias-alignment.ll +++ b/llvm/test/CodeGen/PowerPC/aix-alias-alignment.ll @@ -62,8 +62,8 @@ ; SYM: SYMBOL TABLE: ; SYM-NEXT: 00000000 df *DEBUG* 00000000 -; SYM-NEXT: 00000000 l .text 00000029 .text -; SYM-NEXT: 00000000 g F .text (csect: .text) 00000000 .foo +; SYM-NEXT: 00000000 l .text 00000029 +; SYM-NEXT: 00000000 g F .text (csect: ) 00000000 .foo ; SYM-NEXT: 0000002c l .data 00000008 .data ; SYM-NEXT: 0000002c g O .data (csect: .data) 00000000 _MergedGlobals ; SYM-NEXT: 0000002c g O .data (csect: .data) 00000000 var1 diff --git a/llvm/test/CodeGen/PowerPC/aix-alias.ll b/llvm/test/CodeGen/PowerPC/aix-alias.ll --- a/llvm/test/CodeGen/PowerPC/aix-alias.ll +++ b/llvm/test/CodeGen/PowerPC/aix-alias.ll @@ -55,7 +55,7 @@ ; ASM-NEXT: .csect fun[DS] ; ASM-NEXT: fun_weak: # @fun ; ASM-NEXT: fun_hidden: -; ASM: .csect .text[PR],5 +; ASM: .csect [PR],5 ; ASM-NEXT: .fun: ; ASM-NEXT: .fun_weak: ; ASM-NEXT: .fun_hidden: @@ -63,7 +63,7 @@ ; ASM-NEXT: li 3, 0 ; ASM-NEXT: blr ; ASM-NEXT: # -- End function -; ASM: .csect .text[PR],5 +; ASM: .csect [PR],5 ; ASM-NEXT: .test: ; ASM-NEXT: # %bb.0: # %entry ; ASM: bl .fun diff --git a/llvm/test/CodeGen/PowerPC/aix-dwarf.ll b/llvm/test/CodeGen/PowerPC/aix-dwarf.ll --- a/llvm/test/CodeGen/PowerPC/aix-dwarf.ll +++ b/llvm/test/CodeGen/PowerPC/aix-dwarf.ll @@ -123,18 +123,18 @@ ; RELO-NEXT: OFFSET TYPE VALUE ; RELO-NEXT: 00000006 R_POS .dwabrev ; RELO-NEXT: 00000027 R_POS .dwline -; RELO-NEXT: 00000009 R_POS .text -; RELO-NEXT: 0000003a R_POS .text +; RELO-NEXT: 00000009 R_POS +; RELO-NEXT: 0000003a R_POS ; RELO: RELOCATION RECORDS FOR [.dwline]: ; RELO-NEXT: OFFSET TYPE VALUE -; RELO-NEXT: 00000000 R_POS .text +; RELO-NEXT: 00000000 R_POS ; RELO64: RELOCATION RECORDS FOR [.dwinfo]: ; RELO64-NEXT: OFFSET TYPE VALUE ; RELO64-NEXT: 000000000000000e R_POS .dwabrev ; RELO64-NEXT: 000000000000000b R_POS .dwline -; RELO64-NEXT: 0000000000000041 R_POS .text -; RELO64-NEXT: 000000000000004e R_POS .text +; RELO64-NEXT: 0000000000000041 R_POS +; RELO64-NEXT: 000000000000004e R_POS ; RELO64: RELOCATION RECORDS FOR [.dwline]: ; RELO64-NEXT: OFFSET TYPE VALUE -; RELO64-NEXT: 000000000000000c R_POS .text +; RELO64-NEXT: 000000000000000c R_POS diff --git a/llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable-clobber-register.ll b/llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable-clobber-register.ll --- a/llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable-clobber-register.ll +++ b/llvm/test/CodeGen/PowerPC/aix-emit-tracebacktable-clobber-register.ll @@ -99,7 +99,7 @@ ; COMMON-NEXT: .align 2 ; COMMON-NEXT: .vbyte 4, 0 ; COMMON-NEXT: .vbyte 4, 0 -; CHECK-ASM-NEXT: .csect .text[PR],5 +; CHECK-ASM-NEXT: .csect [PR],5 ; CHECK-FUNC-NEXT: .csect .foov[PR],5 ; COMMON-NEXT: # -- End function ; COMMON: .toc diff --git a/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll b/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll --- a/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll +++ b/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll @@ -41,7 +41,7 @@ ; BIT64-NEXT: .vbyte 8, .main # @main ; BIT64-NEXT: .vbyte 8, TOC[TC0] ; BIT64-NEXT: .vbyte 8, 0 -; COMMON-NEXT: .csect .text[PR] +; COMMON-NEXT: .csect [PR] ; COMMON-NEXT: .main: ; COMMON: .csect .data[RW] @@ -180,7 +180,7 @@ ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+10]] -; CHECKSYM-NEXT: Name: .text +; CHECKSYM-NEXT: Name: ; CHECKSYM-NEXT: Value (RelocatableAddress): 0x0 ; CHECKSYM-NEXT: Section: .text ; CHECKSYM-NEXT: Type: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-extern.ll b/llvm/test/CodeGen/PowerPC/aix-extern.ll --- a/llvm/test/CodeGen/PowerPC/aix-extern.ll +++ b/llvm/test/CodeGen/PowerPC/aix-extern.ll @@ -51,7 +51,7 @@ ; BIT64-NEXT: .vbyte 8, .foo # @foo ; BIT64-NEXT: .vbyte 8, TOC[TC0] ; BIT64-NEXT: .vbyte 8, 0 -; COMMON-NEXT: .csect .text[PR] +; COMMON-NEXT: .csect [PR] ; COMMON-NEXT: .foo: ; COMMON: .globl main[DS] # -- Begin function main @@ -64,7 +64,7 @@ ; BIT64-NEXT: .vbyte 8, .main # @main ; BIT64-NEXT: .vbyte 8, TOC[TC0] ; BIT64-NEXT: .vbyte 8, 0 -; COMMON-NEXT: .csect .text[PR] +; COMMON-NEXT: .csect [PR] ; COMMON-NEXT: .main: ; COMMON: .csect .data[RW] @@ -203,7 +203,7 @@ ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index+10]] -; CHECKSYM-NEXT: Name: .text +; CHECKSYM-NEXT: Name: ; CHECKSYM-NEXT: Value (RelocatableAddress): 0x0 ; CHECKSYM-NEXT: Section: .text ; CHECKSYM-NEXT: Type: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-func-align.ll b/llvm/test/CodeGen/PowerPC/aix-func-align.ll --- a/llvm/test/CodeGen/PowerPC/aix-func-align.ll +++ b/llvm/test/CodeGen/PowerPC/aix-func-align.ll @@ -23,13 +23,13 @@ ret i32 0 } -; CHECK: .csect .text[PR],6 +; CHECK: .csect [PR],6 ; CHECK-NEXT: .foo: -; CHECK: .csect .text[PR],6 +; CHECK: .csect [PR],6 ; CHECK-NEXT: .bar: -; SYMS: Symbol {{[{][[:space:]] *}}Index: [[#INDX:]]{{[[:space:]] *}}Name: .text +; SYMS: Symbol {{[{][[:space:]] *}}Index: [[#INDX:]]{{[[:space:]] *Name: $}} ; SYMS-NEXT: Value (RelocatableAddress): 0x0 ; SYMS-NEXT: Section: .text ; SYMS-NEXT: Type: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-func-dsc-gen.ll b/llvm/test/CodeGen/PowerPC/aix-func-dsc-gen.ll --- a/llvm/test/CodeGen/PowerPC/aix-func-dsc-gen.ll +++ b/llvm/test/CodeGen/PowerPC/aix-func-dsc-gen.ll @@ -23,7 +23,7 @@ ; CHECK-NEXT: } ; CHECK-NEXT: Symbol { ; CHECK-NEXT: Index: [[#Index:]] -; CHECK-NEXT: Name: .text +; CHECK-NEXT: Name: ; CHECK-NEXT: Value (RelocatableAddress): 0x0 ; CHECK-NEXT: Section: .text ; CHECK-NEXT: Type: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-personality-alias.ll b/llvm/test/CodeGen/PowerPC/aix-personality-alias.ll --- a/llvm/test/CodeGen/PowerPC/aix-personality-alias.ll +++ b/llvm/test/CodeGen/PowerPC/aix-personality-alias.ll @@ -56,7 +56,7 @@ ; SYM64: .vbyte 8, .__gxx_personality_v0 ; SYM64: .vbyte 8, TOC[TC0] ; SYM64: .vbyte 8, 0 -; SYM: .csect .text[PR],5 +; SYM: .csect [PR],5 ; SYM: .__gxx_personality_v0: ; SYM: .__xlcxx_personality_v1: ; SYM: # %bb.0: # %entry diff --git a/llvm/test/CodeGen/PowerPC/aix-text-ref.ll b/llvm/test/CodeGen/PowerPC/aix-text-ref.ll new file mode 100644 --- /dev/null +++ b/llvm/test/CodeGen/PowerPC/aix-text-ref.ll @@ -0,0 +1,20 @@ +; RUN: llc -filetype=obj -mtriple powerpc-ibm-aix-xcoff -o %t.o < %s +; RUN: llvm-objdump --syms --symbol-description %t.o | FileCheck --check-prefix=CHECK32 %s +; RUN: llc -filetype=obj -mtriple powerpc64-ibm-aix-xcoff -o %t.o < %s +; RUN: llvm-objdump --syms --symbol-description %t.o | FileCheck --check-prefix=CHECK64 %s + +define i32 @main() { +entry: + %retval = alloca i32, align 4 + store i32 0, ptr %retval, align 4 + %call = call i32 @text() + ret i32 %call +} + +declare i32 @text(...) + +; CHECK32: 00000000 *UND* 00000000 (idx: {{[[:digit:]]*}}) .text[PR] +; CHECK32: 00000000 *UND* 00000000 (idx: {{[[:digit:]]*}}) text[DS] + +; CHECK64: 0000000000000000 *UND* 0000000000000000 (idx: {{[[:digit:]]*}}) .text[PR] +; CHECK64: 0000000000000000 *UND* 0000000000000000 (idx: {{[[:digit:]]*}}) text[DS] diff --git a/llvm/test/CodeGen/PowerPC/aix-text.ll b/llvm/test/CodeGen/PowerPC/aix-text.ll new file mode 100644 --- /dev/null +++ b/llvm/test/CodeGen/PowerPC/aix-text.ll @@ -0,0 +1,34 @@ +; RUN: llc -filetype=obj --function-sections -mtriple powerpc-ibm-aix-xcoff -o %t.o < %s +; RUN: llvm-objdump --syms --symbol-description %t.o | FileCheck --check-prefix=CHECKFS32 %s +; RUN: llc -filetype=obj --function-sections -mtriple powerpc64-ibm-aix-xcoff -o %t.o < %s +; RUN: llvm-objdump --syms --symbol-description %t.o | FileCheck --check-prefix=CHECKFS64 %s +; RUN: llc -filetype=obj -mtriple powerpc-ibm-aix-xcoff -o %t.o < %s +; RUN: llvm-objdump --syms --symbol-description %t.o | FileCheck --check-prefix=CHECK32 %s +; RUN: llc -filetype=obj -mtriple powerpc64-ibm-aix-xcoff -o %t.o < %s +; RUN: llvm-objdump --syms --symbol-description %t.o | FileCheck --check-prefix=CHECK64 %s + +define i32 @text() { +entry: + ret i32 1 +} + +define i32 @text2() { +entry: + ret i32 2 +} + +; CHECKFS32: 00000000 l .text 00000000 (idx: {{[[:digit:]]*}}) [PR] +; CHECKFS32-NEXT: 00000000 g .text {{([[:xdigit:]]{8})}} (idx: {{[[:digit:]]*}}) .text[PR] +; CHECKFS32-NEXT: {{([[:xdigit:]]{8})}} g .text {{([[:xdigit:]]{8})}} (idx: {{[[:digit:]]*}}) .text2[PR] + +; CHECKFS64: 0000000000000000 l .text 0000000000000000 +; CHECKFS64-NEXT: 0000000000000000 g .text {{([[:xdigit:]]{16})}} (idx: {{[[:digit:]]*}}) .text[PR] +; CHECKFS64-NEXT: {{([[:xdigit:]]{16})}} g .text {{([[:xdigit:]]{16})}} (idx: {{[[:digit:]]*}}) .text2[PR] + +; CHECK32: 00000000 l .text {{([[:xdigit:]]{8})}} (idx: {{[[:digit:]]*}}) [PR] +; CHECK32-NEXT: {{([[:xdigit:]]{8})}} g F .text (csect: (idx: {{[[:digit:]]*}}) [PR]) 00000000 (idx: {{[[:digit:]]*}}) .text +; CHECK32-NEXT: {{([[:xdigit:]]{8})}} g F .text (csect: (idx: {{[[:digit:]]*}}) [PR]) 00000000 (idx: {{[[:digit:]]*}}) .text2 + +; CHECK64: 0000000000000000 l .text {{([[:xdigit:]]{16})}} (idx: {{[[:digit:]]*}}) [PR] +; CHECK64-NEXT: {{([[:xdigit:]]{16})}} g F .text (csect: (idx: {{[[:digit:]]*}}) [PR]) 0000000000000000 (idx: {{[[:digit:]]*}}) .text +; CHECK64-NEXT: {{([[:xdigit:]]{8})}} g F .text (csect: (idx: {{[[:digit:]]*}}) [PR]) 0000000000000000 (idx: {{[[:digit:]]*}}) .text2 diff --git a/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc-large.ll b/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc-large.ll --- a/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc-large.ll +++ b/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc-large.ll @@ -240,7 +240,7 @@ ; SYM-NEXT: } ; SYM-NEXT: Symbol { ; SYM-NEXT: Index: 3 -; SYM-NEXT: Name: .text +; SYM-NEXT: Name: ; SYM-NEXT: Value (RelocatableAddress): 0x0 ; SYM-NEXT: Section: .text ; SYM-NEXT: Type: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc.ll b/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc.ll --- a/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc.ll +++ b/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-reloc.ll @@ -201,7 +201,7 @@ ; SYM-NEXT: } ; SYM-NEXT: Symbol { ; SYM-NEXT: Index: 3 -; SYM-NEXT: Name: .text +; SYM-NEXT: Name: ; SYM-NEXT: Value (RelocatableAddress): 0x0 ; SYM-NEXT: Section: .text ; SYM-NEXT: Type: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-variables.ll b/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-variables.ll --- a/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-variables.ll +++ b/llvm/test/CodeGen/PowerPC/aix-tls-xcoff-variables.ll @@ -19,7 +19,7 @@ ; SECTION-NEXT: Sections [ ; SECTION-NEXT: Section { ; SECTION-NEXT: Index: 1 -; SECTION-NEXT: Name: .text +; SECTION-NEXT: Name: ; SECTION-NEXT: PhysicalAddress: 0x0 ; SECTION-NEXT: VirtualAddress: 0x0 ; SECTION-NEXT: Size: 0x4 @@ -117,7 +117,7 @@ ; SYMS-NEXT: Symbol { ; SYMS-NEXT: Index: [[#INDX+4]] -; SYMS-NEXT: Name: .text +; SYMS-NEXT: Name: ; SYMS-NEXT: Value (RelocatableAddress): 0x0 ; SYMS-NEXT: Section: .text ; SYMS-NEXT: Type: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-weak.ll b/llvm/test/CodeGen/PowerPC/aix-weak.ll --- a/llvm/test/CodeGen/PowerPC/aix-weak.ll +++ b/llvm/test/CodeGen/PowerPC/aix-weak.ll @@ -50,7 +50,7 @@ ; BIT64-NEXT: .vbyte 8, .foo_weak # @foo_weak ; BIT64-NEXT: .vbyte 8, TOC[TC0] ; BIT64-NEXT: .vbyte 8, 0 -; COMMON-NEXT: .csect .text[PR] +; COMMON-NEXT: .csect [PR] ; COMMON-NEXT: .foo_weak: ; COMMON: .weak foo_ref_weak[DS] # -- Begin function foo_ref_weak @@ -63,7 +63,7 @@ ; BIT64-NEXT: .vbyte 8, .foo_ref_weak # @foo_ref_weak ; BIT64-NEXT: .vbyte 8, TOC[TC0] ; BIT64-NEXT: .vbyte 8, 0 -; COMMON-NEXT: .csect .text[PR] +; COMMON-NEXT: .csect [PR] ; COMMON-NEXT: .foo_ref_weak: ; COMMON: .globl main[DS] # -- Begin function main @@ -76,7 +76,7 @@ ; BIT64-NEXT: .vbyte 8, .main # @main ; BIT64-NEXT: .vbyte 8, TOC[TC0] ; BIT64-NEXT: .vbyte 8, 0 -; COMMON-NEXT: .csect .text[PR] +; COMMON-NEXT: .csect [PR] ; COMMON-NEXT: .main: ; COMMON: .csect .data[RW] @@ -110,7 +110,7 @@ ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: Symbol { ; CHECKSYM-NEXT: Index: [[#Index:]] -; CHECKSYM-NEXT: Name: .text +; CHECKSYM-NEXT: Name: ; CHECKSYM-NEXT: Value (RelocatableAddress): 0x0 ; CHECKSYM-NEXT: Section: .text ; CHECKSYM-NEXT: Type: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-cold.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-cold.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-cold.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-cold.ll @@ -3,8 +3,8 @@ ; CHECK: SYMBOL TABLE: ; CHECK-NEXT: 0000000000000000 df *DEBUG* 0000000000000000 -; CHECK-NEXT: 0000000000000000 l .text 000000000000001e .text -; CHECK-NEXT: 0000000000000000 g F .text (csect: .text) 0000000000000000 .cold_fun +; CHECK-NEXT: 0000000000000000 l .text 000000000000001e +; CHECK-NEXT: 0000000000000000 g F .text (csect: ) 0000000000000000 .cold_fun ; CHECK-NEXT: 0000000000000020 g O .data 0000000000000018 cold_fun define dso_local void @cold_fun() #1 { diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll @@ -45,7 +45,7 @@ ; CHECK-NOT: .toc -; CHECK: .csect .text[PR],5 +; CHECK: .csect [PR],5 ; CHECK-NEXT: .file ; CHECK: .csect .data[RW],5 @@ -218,7 +218,7 @@ ; SYMS-NEXT: } ; SYMS-NEXT: Symbol { ; SYMS-NEXT: Index: [[#INDX:]] -; SYMS-NEXT: Name: .text +; SYMS-NEXT: Name: ; SYMS-NEXT: Value (RelocatableAddress): 0x0 ; SYMS-NEXT: Section: .text ; SYMS-NEXT: Type: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-funcsect.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-funcsect.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-funcsect.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-funcsect.ll @@ -114,7 +114,7 @@ ; XCOFF32-NEXT: 00000000 df *DEBUG* 00000000 (idx: 0) ; XCOFF32-NEXT: 00000000 *UND* 00000000 (idx: 1) .extern_foo[PR] ; XCOFF32-NEXT: 00000000 *UND* 00000000 (idx: 3) extern_foo[DS] -; XCOFF32-NEXT: 00000000 l .text 00000000 (idx: 5) .text[PR] +; XCOFF32-NEXT: 00000000 l .text 00000000 (idx: 5) [PR] ; XCOFF32-NEXT: 00000000 g .text 00000019 (idx: 7) .foo[PR] ; XCOFF32-NEXT: 00000000 g F .text (csect: (idx: 7) .foo[PR]) 00000000 (idx: 9) .alias_foo ; XCOFF32-NEXT: 00000020 g .text 00000020 .hidden (idx: 11) .hidden_foo[PR] @@ -149,7 +149,7 @@ ; XCOFF64-NEXT: 0000000000000000 df *DEBUG* 0000000000000000 (idx: 0) ; XCOFF64-NEXT: 0000000000000000 *UND* 0000000000000000 (idx: 1) .extern_foo[PR] ; XCOFF64-NEXT: 0000000000000000 *UND* 0000000000000000 (idx: 3) extern_foo[DS] -; XCOFF64-NEXT: 0000000000000000 l .text 0000000000000000 (idx: 5) .text[PR] +; XCOFF64-NEXT: 0000000000000000 l .text 0000000000000000 (idx: 5) [PR] ; XCOFF64-NEXT: 0000000000000000 g .text 0000000000000019 (idx: 7) .foo[PR] ; XCOFF64-NEXT: 0000000000000000 g F .text (csect: (idx: 7) .foo[PR]) 0000000000000000 (idx: 9) .alias_foo ; XCOFF64-NEXT: 0000000000000020 g .text 0000000000000020 .hidden (idx: 11) .hidden_foo[PR] diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc-symb.mir b/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc-symb.mir --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc-symb.mir +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc-symb.mir @@ -21,7 +21,7 @@ ... # RELOC: Relocation {{[{][[:space:]] *}}Virtual Address: 0x8 -# RELOC-NEXT: Symbol: .text ([[#TXT_INDX:]]) +# RELOC-NEXT: Symbol: ([[#TXT_INDX:]]) # RELOC-NEXT: IsSigned: No # RELOC-NEXT: FixupBitValue: 0 # RELOC-NEXT: Length: 32 @@ -36,7 +36,7 @@ # RELOC-NEXT: Type: R_NEG (0x1) # RELOC-NEXT: } -# SYM: Symbol {{[{][[:space:]] *}}Index: [[#TXT_INDX]]{{[[:space:]] *}}Name: .text +# SYM: Symbol {{[{][[:space:]] *}}Index: [[#TXT_INDX]]{{[[:space:]] *}}Name: # SYM-NEXT: Value (RelocatableAddress): 0x0 # SYM-NEXT: Section: .text # SYM-NEXT: Type: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll @@ -211,7 +211,7 @@ ; SYM-NEXT: } ; SYM-NEXT: Symbol { ; SYM-NEXT: Index: [[#INDX+4]] -; SYM-NEXT: Name: .text +; SYM-NEXT: Name: ; SYM-NEXT: Value (RelocatableAddress): 0x0 ; SYM-NEXT: Section: .text ; SYM-NEXT: Type: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-symbol-rename.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-symbol-rename.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-symbol-rename.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-symbol-rename.ll @@ -54,7 +54,7 @@ ; ASM-NEXT: .vbyte 4, ._Renamed..24f_o # @"f$o" ; ASM-NEXT: .vbyte 4, TOC[TC0] ; ASM-NEXT: .vbyte 4, 0 -; ASM-NEXT: .csect .text[PR],5 +; ASM-NEXT: .csect [PR],5 ; ASM-NEXT: ._Renamed..24f_o: ; ASM: bl ._Renamed..40f_o[PR] ; ASM-NEXT: nop @@ -67,7 +67,7 @@ ; ASM-NEXT: .vbyte 4, ._Renamed..26f_o # @"f&o" ; ASM-NEXT: .vbyte 4, TOC[TC0] ; ASM-NEXT: .vbyte 4, 0 -; ASM-NEXT: .csect .text[PR],5 +; ASM-NEXT: .csect [PR],5 ; ASM-NEXT: ._Renamed..26f_o: ; ASM: bl ._Renamed..24f_o ; ASM: .globl _Renamed..265ff__o[DS] # -- Begin function f&_o @@ -79,7 +79,7 @@ ; ASM-NEXT: .vbyte 4, ._Renamed..265ff__o # @"f&_o" ; ASM-NEXT: .vbyte 4, TOC[TC0] ; ASM-NEXT: .vbyte 4, 0 -; ASM-NEXT: .csect .text[PR],5 +; ASM-NEXT: .csect [PR],5 ; ASM-NEXT: ._Renamed..265ff__o: ; ASM: .csect .data[RW],2 ; ASM-NEXT: .globl _Renamed..60f_o diff --git a/llvm/test/CodeGen/PowerPC/pgo-ref-directive.ll b/llvm/test/CodeGen/PowerPC/pgo-ref-directive.ll --- a/llvm/test/CodeGen/PowerPC/pgo-ref-directive.ll +++ b/llvm/test/CodeGen/PowerPC/pgo-ref-directive.ll @@ -104,8 +104,8 @@ ; WITHVNDS-OBJ: SYMBOL TABLE: ; WITHVNDS-OBJ-NEXT: 00000000 df *DEBUG* 00000000 -; WITHVNDS-OBJ-NEXT: 00000000 l .text 00000008 .text -; WITHVNDS-OBJ-NEXT: 00000000 g F .text (csect: .text) 00000000 .main +; WITHVNDS-OBJ-NEXT: 00000000 l .text 00000008 +; WITHVNDS-OBJ-NEXT: 00000000 g F .text (csect: ) 00000000 .main ; WITHVNDS-OBJ-NEXT: 00000008 l .text 00000006 __llvm_prf_names ; WITHVNDS-OBJ-NEXT: 00000010 l O .data 00000008 __llvm_prf_cnts ; WITHVNDS-OBJ-NEXT: 00000018 l O .data 00000008 __llvm_prf_data diff --git a/llvm/test/CodeGen/PowerPC/test_func_desc.ll b/llvm/test/CodeGen/PowerPC/test_func_desc.ll --- a/llvm/test/CodeGen/PowerPC/test_func_desc.ll +++ b/llvm/test/CodeGen/PowerPC/test_func_desc.ll @@ -37,7 +37,7 @@ ; 64BIT-NEXT: .vbyte 8, .foo ; 64BIT-NEXT: .vbyte 8, TOC[TC0] ; 64BIT-NEXT: .vbyte 8, 0 -; CHECK-NEXT: .csect .text[PR],5 +; CHECK-NEXT: .csect [PR],5 ; CHECK-LABEL: .foo: ; CHECK: .globl main[DS] @@ -50,7 +50,7 @@ ; 64BIT-NEXT: .vbyte 8, .main ; 64BIT-NEXT: .vbyte 8, TOC[TC0] ; 64BIT-NEXT: .vbyte 8, 0 -; CHECK-NEXT: .csect .text[PR],5 +; CHECK-NEXT: .csect [PR],5 ; CHECK-LABEL: .main: ; CHECK: bl .foo ; CHECK: bl .extern_foo @@ -66,7 +66,7 @@ ; 64BIT-NEXT: .vbyte 8, .static_foo ; 64BIT-NEXT: .vbyte 8, TOC[TC0] ; 64BIT-NEXT: .vbyte 8, 0 -; CHECK-NEXT: .csect .text[PR],5 +; CHECK-NEXT: .csect [PR],5 ; CHECK-LABEL: .static_foo: ; CHECK-NOT: .csect extern_foo diff --git a/llvm/test/DebugInfo/XCOFF/empty.ll b/llvm/test/DebugInfo/XCOFF/empty.ll --- a/llvm/test/DebugInfo/XCOFF/empty.ll +++ b/llvm/test/DebugInfo/XCOFF/empty.ll @@ -35,7 +35,7 @@ !11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) !12 = !DILocation(line: 3, column: 3, scope: !8) -; ASM32: .csect .text[PR],5 +; ASM32: .csect [PR],5 ; ASM32-NEXT: .file "1.c" ; ASM32-NEXT: .globl main[DS] # -- Begin function main ; ASM32-NEXT: .globl .main @@ -44,7 +44,7 @@ ; ASM32-NEXT: .vbyte 4, .main # @main ; ASM32-NEXT: .vbyte 4, TOC[TC0] ; ASM32-NEXT: .vbyte 4, 0 -; ASM32-NEXT: .csect .text[PR],5 +; ASM32-NEXT: .csect [PR],5 ; ASM32-NEXT: .main: ; ASM32-NEXT: L..func_begin0: ; ASM32-NEXT: # %bb.0: # %entry @@ -236,7 +236,7 @@ ; ASM32-NEXT: .byte 1 ; ASM32-NEXT: L..debug_line_end0: -; ASM64: .csect .text[PR],5 +; ASM64: .csect [PR],5 ; ASM64-NEXT: .file "1.c" ; ASM64-NEXT: .globl main[DS] # -- Begin function main ; ASM64-NEXT: .globl .main @@ -245,7 +245,7 @@ ; ASM64-NEXT: .vbyte 8, .main # @main ; ASM64-NEXT: .vbyte 8, TOC[TC0] ; ASM64-NEXT: .vbyte 8, 0 -; ASM64-NEXT: .csect .text[PR],5 +; ASM64-NEXT: .csect [PR],5 ; ASM64-NEXT: .main: ; ASM64-NEXT: L..func_begin0: ; ASM64-NEXT: # %bb.0: # %entry diff --git a/llvm/test/DebugInfo/XCOFF/explicit-section.ll b/llvm/test/DebugInfo/XCOFF/explicit-section.ll --- a/llvm/test/DebugInfo/XCOFF/explicit-section.ll +++ b/llvm/test/DebugInfo/XCOFF/explicit-section.ll @@ -42,7 +42,7 @@ !15 = !DILocation(line: 3, column: 10, scope: !14) !16 = !DILocation(line: 3, column: 3, scope: !14) -; CHECK: .csect .text[PR],5 +; CHECK: .csect [PR],5 ; CHECK-NEXT: .file "2.c" ; CHECK-NEXT: .globl bar[DS] # -- Begin function bar ; CHECK-NEXT: .globl .bar @@ -51,7 +51,7 @@ ; CHECK-NEXT: .vbyte 4, .bar # @bar ; CHECK-NEXT: .vbyte 4, TOC[TC0] ; CHECK-NEXT: .vbyte 4, 0 -; CHECK-NEXT: .csect .text[PR],5 +; CHECK-NEXT: .csect [PR],5 ; CHECK-NEXT: .bar: ; CHECK-NEXT: L..func_begin0: ; CHECK-NEXT: # %bb.0: # %entry diff --git a/llvm/test/DebugInfo/XCOFF/function-sections.ll b/llvm/test/DebugInfo/XCOFF/function-sections.ll --- a/llvm/test/DebugInfo/XCOFF/function-sections.ll +++ b/llvm/test/DebugInfo/XCOFF/function-sections.ll @@ -37,7 +37,7 @@ !13 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 6, type: !9, scopeLine: 7, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2) !14 = !DILocation(line: 8, column: 3, scope: !13) -; CHECK: .csect .text[PR],5 +; CHECK: .csect [PR],5 ; CHECK-NEXT: .file "1.c" ; CHECK-NEXT: .csect .foo[PR],5 ; CHECK-NEXT: .globl foo[DS] # -- Begin function foo diff --git a/llvm/test/MC/PowerPC/aix-file-symbols-empty.s b/llvm/test/MC/PowerPC/aix-file-symbols-empty.s --- a/llvm/test/MC/PowerPC/aix-file-symbols-empty.s +++ b/llvm/test/MC/PowerPC/aix-file-symbols-empty.s @@ -9,6 +9,6 @@ # CHECK: SYMBOL TABLE: # CHECK-NEXT: 00000000 df *DEBUG* 00000000 .file -# CHECK-NEXT: 00000000 l .text 00000000 .text -# CHECK-NEXT: 00000000 g F .text (csect: .text) 00000000 .var1 -# CHECK-NEXT: 00000000 g F .text (csect: .text) 00000000 .var2 +# CHECK-NEXT: 00000000 l .text 00000000 +# CHECK-NEXT: 00000000 g F .text (csect: ) 00000000 .var1 +# CHECK-NEXT: 00000000 g F .text (csect: ) 00000000 .var2 diff --git a/llvm/test/MC/PowerPC/aix-file-symbols.s b/llvm/test/MC/PowerPC/aix-file-symbols.s --- a/llvm/test/MC/PowerPC/aix-file-symbols.s +++ b/llvm/test/MC/PowerPC/aix-file-symbols.s @@ -14,6 +14,6 @@ # CHECK-NEXT: 00000000 df *DEBUG* 00000000 1.c # CHECK-NEXT: 00000000 df *DEBUG* 00000000 2.c # CHECK-NEXT: 00000000 df *DEBUG* 00000000 3.c -# CHECK-NEXT: 00000000 l .text 00000000 .text -# CHECK-NEXT: 00000000 g F .text (csect: .text) 00000000 .var1 -# CHECK-NEXT: 00000000 g F .text (csect: .text) 00000000 .var2 +# CHECK-NEXT: 00000000 l .text 00000000 +# CHECK-NEXT: 00000000 g F .text (csect: ) 00000000 .var1 +# CHECK-NEXT: 00000000 g F .text (csect: ) 00000000 .var2 diff --git a/llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test b/llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test --- a/llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test +++ b/llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test @@ -68,9 +68,9 @@ ; SYM: SYMBOL TABLE: ; SYM-NEXT: 00000000 df *DEBUG* 00000000 ; SYM-NEXT: 00000000 *UND* 00000000 ei -; SYM-NEXT: 00000000 l .text 00000091 .text -; SYM-NEXT: 00000000 g F .text (csect: .text) 00000000 .bar -; SYM-NEXT: 00000050 g F .text (csect: .text) 00000000 .foo +; SYM-NEXT: 00000000 l .text 00000091 +; SYM-NEXT: 00000000 g F .text (csect: ) 00000000 .bar +; SYM-NEXT: 00000050 g F .text (csect: ) 00000000 .foo ; SYM-NEXT: 00000094 l .text 00000013 .rodata.str1.1L...str ; SYM-NEXT: 000000a8 g O .data 00000004 con ; SYM-NEXT: 000000ac w O .data 00000004 wi @@ -90,9 +90,9 @@ ; SYM-DES: SYMBOL TABLE: ; SYM-DES-NEXT: 00000000 df *DEBUG* 00000000 (idx: 0) ; SYM-DES-NEXT: 00000000 *UND* 00000000 (idx: 1) ei[UA] -; SYM-DES-NEXT: 00000000 l .text 00000091 (idx: 3) .text[PR] -; SYM-DES-NEXT: 00000000 g F .text (csect: (idx: 3) .text[PR]) 00000000 (idx: 5) .bar -; SYM-DES-NEXT: 00000050 g F .text (csect: (idx: 3) .text[PR]) 00000000 (idx: 7) .foo +; SYM-DES-NEXT: 00000000 l .text 00000091 (idx: 3) [PR] +; SYM-DES-NEXT: 00000000 g F .text (csect: (idx: 3) [PR]) 00000000 (idx: 5) .bar +; SYM-DES-NEXT: 00000050 g F .text (csect: (idx: 3) [PR]) 00000000 (idx: 7) .foo ; SYM-DES-NEXT: 00000094 l .text 00000013 (idx: 9) .rodata.str1.1L...str[RO] ; SYM-DES-NEXT: 000000a8 g O .data 00000004 (idx: 11) con[RW] ; SYM-DES-NEXT: 000000ac w O .data 00000004 (idx: 13) wi[RW]