When generating XCOFF, the compiler generates a csect with an internal name. Each function results in a label within the csect. This patch replaces the internal name ".text" with an empty string "". This avoids adding special code to handle a function text() in the source file, and works better with some XCOFF tools that are confused when the csect and the first function have the same address. Reviewed By: hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D154854
21 lines
832 B
LLVM
21 lines
832 B
LLVM
; 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]
|