2019-12-31 11:29:50 +08:00
|
|
|
; This file tests TOC entry generation and undefined symbol generation.
|
|
|
|
|
2020-12-12 06:50:25 +08:00
|
|
|
; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \
|
|
|
|
; RUN: -xcoff-traceback-table=false < %s | FileCheck --check-prefixes CHECK,CHECK32 %s
|
|
|
|
; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \
|
|
|
|
; RUN: -xcoff-traceback-table=false < %s 2>&1 | FileCheck --check-prefixes CHECK,CHECK64 %s
|
[AIX] Emit TOC entries for ASM printing
Summary:
Emit the correct .toc psuedo op when we change to the TOC and emit
TC entries. Make sure TOC psuedos get the right symbols via overriding
getMCSymbolForTOCPseudoMO on AIX. Add a test for TOC assembly writing
and update tests to include TOC entries.
Also make sure external globals have a csect set and handle external function descriptor (originally authored by Jason Liu) so we can emit TOC entries for them.
Reviewers: DiggerLin, sfertile, Xiangling_L, jasonliu, hubert.reinterpretcast
Reviewed By: jasonliu
Subscribers: arphaman, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70461
2019-11-28 06:17:02 +08:00
|
|
|
|
2020-12-12 06:50:25 +08:00
|
|
|
; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \
|
|
|
|
; RUN: --xcoff-traceback-table=false -filetype=obj -o %t.o < %s
|
2019-12-05 00:22:57 +08:00
|
|
|
; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYM %s
|
|
|
|
|
2020-11-25 11:37:03 +08:00
|
|
|
; RUN: not --crash llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff -filetype=obj -o %t.o 2>&1 \
|
2019-12-05 00:22:57 +08:00
|
|
|
; RUN: < %s | FileCheck --check-prefix=XCOFF64 %s
|
|
|
|
; XCOFF64: LLVM ERROR: 64-bit XCOFF object files are not supported yet.
|
|
|
|
|
[AIX] Emit TOC entries for ASM printing
Summary:
Emit the correct .toc psuedo op when we change to the TOC and emit
TC entries. Make sure TOC psuedos get the right symbols via overriding
getMCSymbolForTOCPseudoMO on AIX. Add a test for TOC assembly writing
and update tests to include TOC entries.
Also make sure external globals have a csect set and handle external function descriptor (originally authored by Jason Liu) so we can emit TOC entries for them.
Reviewers: DiggerLin, sfertile, Xiangling_L, jasonliu, hubert.reinterpretcast
Reviewed By: jasonliu
Subscribers: arphaman, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70461
2019-11-28 06:17:02 +08:00
|
|
|
@a = external global i32, align 4
|
|
|
|
@b = external global i64, align 8
|
|
|
|
@c = external global i16, align 2
|
|
|
|
@globa = common global i32 0, align 4
|
|
|
|
|
|
|
|
@ptr = internal global void (...)* null, align 4
|
|
|
|
|
|
|
|
declare void @foo()
|
|
|
|
|
|
|
|
define void @bar() {
|
|
|
|
%1 = alloca i8*, align 8
|
[AIX] Avoid unset csect assert for functions defined after their use in TOC
Summary:
If a function is defined after it appears in a TOC expression, we may
try to access an unset containing csect when returning a symbol for the
expression.
Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast
Reviewed By: hubert.reinterpretcast
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71125
2019-12-18 05:56:59 +08:00
|
|
|
%2 = alloca i8*, align 8
|
[AIX] Emit TOC entries for ASM printing
Summary:
Emit the correct .toc psuedo op when we change to the TOC and emit
TC entries. Make sure TOC psuedos get the right symbols via overriding
getMCSymbolForTOCPseudoMO on AIX. Add a test for TOC assembly writing
and update tests to include TOC entries.
Also make sure external globals have a csect set and handle external function descriptor (originally authored by Jason Liu) so we can emit TOC entries for them.
Reviewers: DiggerLin, sfertile, Xiangling_L, jasonliu, hubert.reinterpretcast
Reviewed By: jasonliu
Subscribers: arphaman, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70461
2019-11-28 06:17:02 +08:00
|
|
|
store i32 0, i32* @a, align 4
|
|
|
|
store i64 0, i64* @b, align 8
|
|
|
|
store i16 0, i16* @c, align 2
|
|
|
|
store i32 0, i32* @globa, align 4
|
|
|
|
store void (...)* bitcast (void ()* @bar to void (...)*), void (...)** @ptr, align 4
|
|
|
|
store i8* bitcast (void ()* @foo to i8*), i8** %1, align 8
|
[AIX] Avoid unset csect assert for functions defined after their use in TOC
Summary:
If a function is defined after it appears in a TOC expression, we may
try to access an unset containing csect when returning a symbol for the
expression.
Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast
Reviewed By: hubert.reinterpretcast
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71125
2019-12-18 05:56:59 +08:00
|
|
|
store i8* bitcast (void ()* @foobar to i8*), i8** %2, align 8
|
[AIX] Emit TOC entries for ASM printing
Summary:
Emit the correct .toc psuedo op when we change to the TOC and emit
TC entries. Make sure TOC psuedos get the right symbols via overriding
getMCSymbolForTOCPseudoMO on AIX. Add a test for TOC assembly writing
and update tests to include TOC entries.
Also make sure external globals have a csect set and handle external function descriptor (originally authored by Jason Liu) so we can emit TOC entries for them.
Reviewers: DiggerLin, sfertile, Xiangling_L, jasonliu, hubert.reinterpretcast
Reviewed By: jasonliu
Subscribers: arphaman, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70461
2019-11-28 06:17:02 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-12-06 04:21:53 +08:00
|
|
|
; We initialize a csect when we first reference an external global, so make sure we don't run into problems when we see it again.
|
|
|
|
define void @bar2() {
|
|
|
|
store i32 0, i32* @a, align 4
|
|
|
|
store i64 0, i64* @b, align 8
|
|
|
|
store i16 0, i16* @c, align 2
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
[AIX] Avoid unset csect assert for functions defined after their use in TOC
Summary:
If a function is defined after it appears in a TOC expression, we may
try to access an unset containing csect when returning a symbol for the
expression.
Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast
Reviewed By: hubert.reinterpretcast
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71125
2019-12-18 05:56:59 +08:00
|
|
|
define void @foobar() {
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-12-31 11:29:50 +08:00
|
|
|
; Test tc entry assembly generation.
|
|
|
|
|
[AIX] Emit TOC entries for ASM printing
Summary:
Emit the correct .toc psuedo op when we change to the TOC and emit
TC entries. Make sure TOC psuedos get the right symbols via overriding
getMCSymbolForTOCPseudoMO on AIX. Add a test for TOC assembly writing
and update tests to include TOC entries.
Also make sure external globals have a csect set and handle external function descriptor (originally authored by Jason Liu) so we can emit TOC entries for them.
Reviewers: DiggerLin, sfertile, Xiangling_L, jasonliu, hubert.reinterpretcast
Reviewed By: jasonliu
Subscribers: arphaman, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70461
2019-11-28 06:17:02 +08:00
|
|
|
; CHECK-NOT: .comm a
|
|
|
|
; CHECK-NOT: .lcomm a
|
|
|
|
; CHECK-NOT: .comm b
|
|
|
|
; CHECK-NOT: .lcomm b
|
|
|
|
; CHECK-NOT: .comm c
|
|
|
|
; CHECK-NOT: .lcomm c
|
|
|
|
; CHECK: .comm globa[RW],4,2
|
|
|
|
; CHECK32: .lcomm ptr,4,ptr[BS],2
|
|
|
|
; CHECK64: .lcomm ptr,8,ptr[BS],2
|
|
|
|
; CHECK: .toc
|
2020-06-04 00:23:12 +08:00
|
|
|
; CHECK-NEXT: L..C0:
|
[AIX] Emit TOC entries for ASM printing
Summary:
Emit the correct .toc psuedo op when we change to the TOC and emit
TC entries. Make sure TOC psuedos get the right symbols via overriding
getMCSymbolForTOCPseudoMO on AIX. Add a test for TOC assembly writing
and update tests to include TOC entries.
Also make sure external globals have a csect set and handle external function descriptor (originally authored by Jason Liu) so we can emit TOC entries for them.
Reviewers: DiggerLin, sfertile, Xiangling_L, jasonliu, hubert.reinterpretcast
Reviewed By: jasonliu
Subscribers: arphaman, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70461
2019-11-28 06:17:02 +08:00
|
|
|
; CHECK-NEXT: .tc a[TC],a[UA]
|
2020-06-04 00:23:12 +08:00
|
|
|
; CHECK-NEXT: L..C1:
|
[AIX] Emit TOC entries for ASM printing
Summary:
Emit the correct .toc psuedo op when we change to the TOC and emit
TC entries. Make sure TOC psuedos get the right symbols via overriding
getMCSymbolForTOCPseudoMO on AIX. Add a test for TOC assembly writing
and update tests to include TOC entries.
Also make sure external globals have a csect set and handle external function descriptor (originally authored by Jason Liu) so we can emit TOC entries for them.
Reviewers: DiggerLin, sfertile, Xiangling_L, jasonliu, hubert.reinterpretcast
Reviewed By: jasonliu
Subscribers: arphaman, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70461
2019-11-28 06:17:02 +08:00
|
|
|
; CHECK-NEXT: .tc b[TC],b[UA]
|
2020-06-04 00:23:12 +08:00
|
|
|
; CHECK-NEXT: L..C2:
|
[AIX] Emit TOC entries for ASM printing
Summary:
Emit the correct .toc psuedo op when we change to the TOC and emit
TC entries. Make sure TOC psuedos get the right symbols via overriding
getMCSymbolForTOCPseudoMO on AIX. Add a test for TOC assembly writing
and update tests to include TOC entries.
Also make sure external globals have a csect set and handle external function descriptor (originally authored by Jason Liu) so we can emit TOC entries for them.
Reviewers: DiggerLin, sfertile, Xiangling_L, jasonliu, hubert.reinterpretcast
Reviewed By: jasonliu
Subscribers: arphaman, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70461
2019-11-28 06:17:02 +08:00
|
|
|
; CHECK-NEXT: .tc c[TC],c[UA]
|
2020-06-04 00:23:12 +08:00
|
|
|
; CHECK-NEXT: L..C3:
|
[AIX] Emit TOC entries for ASM printing
Summary:
Emit the correct .toc psuedo op when we change to the TOC and emit
TC entries. Make sure TOC psuedos get the right symbols via overriding
getMCSymbolForTOCPseudoMO on AIX. Add a test for TOC assembly writing
and update tests to include TOC entries.
Also make sure external globals have a csect set and handle external function descriptor (originally authored by Jason Liu) so we can emit TOC entries for them.
Reviewers: DiggerLin, sfertile, Xiangling_L, jasonliu, hubert.reinterpretcast
Reviewed By: jasonliu
Subscribers: arphaman, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70461
2019-11-28 06:17:02 +08:00
|
|
|
; CHECK-NEXT: .tc globa[TC],globa[RW]
|
2020-06-04 00:23:12 +08:00
|
|
|
; CHECK-NEXT: L..C4:
|
[AIX] Emit TOC entries for ASM printing
Summary:
Emit the correct .toc psuedo op when we change to the TOC and emit
TC entries. Make sure TOC psuedos get the right symbols via overriding
getMCSymbolForTOCPseudoMO on AIX. Add a test for TOC assembly writing
and update tests to include TOC entries.
Also make sure external globals have a csect set and handle external function descriptor (originally authored by Jason Liu) so we can emit TOC entries for them.
Reviewers: DiggerLin, sfertile, Xiangling_L, jasonliu, hubert.reinterpretcast
Reviewed By: jasonliu
Subscribers: arphaman, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70461
2019-11-28 06:17:02 +08:00
|
|
|
; CHECK-NEXT: .tc ptr[TC],ptr[BS]
|
2020-06-04 00:23:12 +08:00
|
|
|
; CHECK-NEXT: L..C5:
|
[AIX] Emit TOC entries for ASM printing
Summary:
Emit the correct .toc psuedo op when we change to the TOC and emit
TC entries. Make sure TOC psuedos get the right symbols via overriding
getMCSymbolForTOCPseudoMO on AIX. Add a test for TOC assembly writing
and update tests to include TOC entries.
Also make sure external globals have a csect set and handle external function descriptor (originally authored by Jason Liu) so we can emit TOC entries for them.
Reviewers: DiggerLin, sfertile, Xiangling_L, jasonliu, hubert.reinterpretcast
Reviewed By: jasonliu
Subscribers: arphaman, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70461
2019-11-28 06:17:02 +08:00
|
|
|
; CHECK-NEXT: .tc bar[TC],bar[DS]
|
2020-06-04 00:23:12 +08:00
|
|
|
; CHECK-NEXT: L..C6:
|
[AIX] Emit TOC entries for ASM printing
Summary:
Emit the correct .toc psuedo op when we change to the TOC and emit
TC entries. Make sure TOC psuedos get the right symbols via overriding
getMCSymbolForTOCPseudoMO on AIX. Add a test for TOC assembly writing
and update tests to include TOC entries.
Also make sure external globals have a csect set and handle external function descriptor (originally authored by Jason Liu) so we can emit TOC entries for them.
Reviewers: DiggerLin, sfertile, Xiangling_L, jasonliu, hubert.reinterpretcast
Reviewed By: jasonliu
Subscribers: arphaman, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70461
2019-11-28 06:17:02 +08:00
|
|
|
; CHECK-NEXT: .tc foo[TC],foo[DS]
|
2020-06-04 00:23:12 +08:00
|
|
|
; CHECK-NEXT: L..C7:
|
[AIX] Avoid unset csect assert for functions defined after their use in TOC
Summary:
If a function is defined after it appears in a TOC expression, we may
try to access an unset containing csect when returning a symbol for the
expression.
Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast
Reviewed By: hubert.reinterpretcast
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71125
2019-12-18 05:56:59 +08:00
|
|
|
; CHECK-NEXT: .tc foobar[TC],foobar[DS]
|
[AIX] Emit TOC entries for ASM printing
Summary:
Emit the correct .toc psuedo op when we change to the TOC and emit
TC entries. Make sure TOC psuedos get the right symbols via overriding
getMCSymbolForTOCPseudoMO on AIX. Add a test for TOC assembly writing
and update tests to include TOC entries.
Also make sure external globals have a csect set and handle external function descriptor (originally authored by Jason Liu) so we can emit TOC entries for them.
Reviewers: DiggerLin, sfertile, Xiangling_L, jasonliu, hubert.reinterpretcast
Reviewed By: jasonliu
Subscribers: arphaman, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70461
2019-11-28 06:17:02 +08:00
|
|
|
|
2019-12-31 11:29:50 +08:00
|
|
|
|
|
|
|
; Test undefined symbol generation.
|
|
|
|
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM: File: {{.*}}aix-xcoff-toc.ll.tmp.o
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM: Symbol {{[{][[:space:]] *}}Index: [[#UNDEF_INDX:]]{{[[:space:]] *}}Name: a
|
|
|
|
; SYM-NEXT: Value (RelocatableAddress): 0x0
|
|
|
|
; SYM-NEXT: Section: N_UNDEF
|
|
|
|
; SYM-NEXT: Type: 0x0
|
|
|
|
; SYM-NEXT: StorageClass: C_EXT (0x2)
|
|
|
|
; SYM-NEXT: NumberOfAuxEntries: 1
|
|
|
|
; SYM-NEXT: CSECT Auxiliary Entry {
|
|
|
|
; SYM-NEXT: Index: [[#UNDEF_INDX+1]]
|
|
|
|
; SYM-NEXT: SectionLen: 0
|
|
|
|
; SYM-NEXT: ParameterHashIndex: 0x0
|
|
|
|
; SYM-NEXT: TypeChkSectNum: 0x0
|
|
|
|
; SYM-NEXT: SymbolAlignmentLog2: 0
|
|
|
|
; SYM-NEXT: SymbolType: XTY_ER (0x0)
|
|
|
|
; SYM-NEXT: StorageMappingClass: XMC_UA (0x4)
|
|
|
|
; SYM-NEXT: StabInfoIndex: 0x0
|
|
|
|
; SYM-NEXT: StabSectNum: 0x0
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: Symbol {
|
|
|
|
; SYM-NEXT: Index: [[#UNDEF_INDX+2]]
|
|
|
|
; SYM-NEXT: Name: b
|
|
|
|
; SYM-NEXT: Value (RelocatableAddress): 0x0
|
|
|
|
; SYM-NEXT: Section: N_UNDEF
|
|
|
|
; SYM-NEXT: Type: 0x0
|
|
|
|
; SYM-NEXT: StorageClass: C_EXT (0x2)
|
|
|
|
; SYM-NEXT: NumberOfAuxEntries: 1
|
|
|
|
; SYM-NEXT: CSECT Auxiliary Entry {
|
|
|
|
; SYM-NEXT: Index: [[#UNDEF_INDX+3]]
|
|
|
|
; SYM-NEXT: SectionLen: 0
|
|
|
|
; SYM-NEXT: ParameterHashIndex: 0x0
|
|
|
|
; SYM-NEXT: TypeChkSectNum: 0x0
|
|
|
|
; SYM-NEXT: SymbolAlignmentLog2: 0
|
|
|
|
; SYM-NEXT: SymbolType: XTY_ER (0x0)
|
|
|
|
; SYM-NEXT: StorageMappingClass: XMC_UA (0x4)
|
|
|
|
; SYM-NEXT: StabInfoIndex: 0x0
|
|
|
|
; SYM-NEXT: StabSectNum: 0x0
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: Symbol {
|
|
|
|
; SYM-NEXT: Index: [[#UNDEF_INDX+4]]
|
|
|
|
; SYM-NEXT: Name: c
|
|
|
|
; SYM-NEXT: Value (RelocatableAddress): 0x0
|
|
|
|
; SYM-NEXT: Section: N_UNDEF
|
|
|
|
; SYM-NEXT: Type: 0x0
|
|
|
|
; SYM-NEXT: StorageClass: C_EXT (0x2)
|
|
|
|
; SYM-NEXT: NumberOfAuxEntries: 1
|
|
|
|
; SYM-NEXT: CSECT Auxiliary Entry {
|
|
|
|
; SYM-NEXT: Index: [[#UNDEF_INDX+5]]
|
|
|
|
; SYM-NEXT: SectionLen: 0
|
|
|
|
; SYM-NEXT: ParameterHashIndex: 0x0
|
|
|
|
; SYM-NEXT: TypeChkSectNum: 0x0
|
|
|
|
; SYM-NEXT: SymbolAlignmentLog2: 0
|
|
|
|
; SYM-NEXT: SymbolType: XTY_ER (0x0)
|
|
|
|
; SYM-NEXT: StorageMappingClass: XMC_UA (0x4)
|
|
|
|
; SYM-NEXT: StabInfoIndex: 0x0
|
|
|
|
; SYM-NEXT: StabSectNum: 0x0
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: Symbol {
|
|
|
|
; SYM-NEXT: Index: [[#UNDEF_INDX+6]]
|
2020-08-12 03:26:19 +08:00
|
|
|
; SYM-NEXT: Name: .foo
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Value (RelocatableAddress): 0x0
|
|
|
|
; SYM-NEXT: Section: N_UNDEF
|
|
|
|
; SYM-NEXT: Type: 0x0
|
|
|
|
; SYM-NEXT: StorageClass: C_EXT (0x2)
|
|
|
|
; SYM-NEXT: NumberOfAuxEntries: 1
|
|
|
|
; SYM-NEXT: CSECT Auxiliary Entry {
|
|
|
|
; SYM-NEXT: Index: [[#UNDEF_INDX+7]]
|
|
|
|
; SYM-NEXT: SectionLen: 0
|
|
|
|
; SYM-NEXT: ParameterHashIndex: 0x0
|
|
|
|
; SYM-NEXT: TypeChkSectNum: 0x0
|
|
|
|
; SYM-NEXT: SymbolAlignmentLog2: 0
|
|
|
|
; SYM-NEXT: SymbolType: XTY_ER (0x0)
|
2020-08-12 03:26:19 +08:00
|
|
|
; SYM-NEXT: StorageMappingClass: XMC_PR (0x0)
|
|
|
|
; SYM-NEXT: StabInfoIndex: 0x0
|
|
|
|
; SYM-NEXT: StabSectNum: 0x0
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: Symbol {
|
|
|
|
; SYM-NEXT: Index: [[#UNDEF_INDX+8]]
|
|
|
|
; SYM-NEXT: Name: foo
|
|
|
|
; SYM-NEXT: Value (RelocatableAddress): 0x0
|
|
|
|
; SYM-NEXT: Section: N_UNDEF
|
|
|
|
; SYM-NEXT: Type: 0x0
|
|
|
|
; SYM-NEXT: StorageClass: C_EXT (0x2)
|
|
|
|
; SYM-NEXT: NumberOfAuxEntries: 1
|
|
|
|
; SYM-NEXT: CSECT Auxiliary Entry {
|
|
|
|
; SYM-NEXT: Index: [[#UNDEF_INDX+9]]
|
|
|
|
; SYM-NEXT: SectionLen: 0
|
|
|
|
; SYM-NEXT: ParameterHashIndex: 0x0
|
|
|
|
; SYM-NEXT: TypeChkSectNum: 0x0
|
|
|
|
; SYM-NEXT: SymbolAlignmentLog2: 0
|
|
|
|
; SYM-NEXT: SymbolType: XTY_ER (0x0)
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: StorageMappingClass: XMC_DS (0xA)
|
|
|
|
; SYM-NEXT: StabInfoIndex: 0x0
|
|
|
|
; SYM-NEXT: StabSectNum: 0x0
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: }
|
2019-12-31 11:29:50 +08:00
|
|
|
|
|
|
|
; Test TOC entry symbol generation.
|
|
|
|
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM: Symbol {{[{][[:space:]] *}}Index: [[#TOC_INDX:]]{{[[:space:]] *}}Name: TOC
|
[AIX] Avoid unset csect assert for functions defined after their use in TOC
Summary:
If a function is defined after it appears in a TOC expression, we may
try to access an unset containing csect when returning a symbol for the
expression.
Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast
Reviewed By: hubert.reinterpretcast
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71125
2019-12-18 05:56:59 +08:00
|
|
|
; SYM-NEXT: Value (RelocatableAddress): 0xA8
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: Section: .data
|
|
|
|
; SYM-NEXT: Type: 0x0
|
|
|
|
; SYM-NEXT: StorageClass: C_HIDEXT (0x6B)
|
|
|
|
; SYM-NEXT: NumberOfAuxEntries: 1
|
|
|
|
; SYM-NEXT: CSECT Auxiliary Entry {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+1]]
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: SectionLen: 0
|
|
|
|
; SYM-NEXT: ParameterHashIndex: 0x0
|
|
|
|
; SYM-NEXT: TypeChkSectNum: 0x0
|
|
|
|
; SYM-NEXT: SymbolAlignmentLog2: 2
|
|
|
|
; SYM-NEXT: SymbolType: XTY_SD (0x1)
|
|
|
|
; SYM-NEXT: StorageMappingClass: XMC_TC0 (0xF)
|
|
|
|
; SYM-NEXT: StabInfoIndex: 0x0
|
|
|
|
; SYM-NEXT: StabSectNum: 0x0
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: Symbol {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+2]]
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: Name: a
|
[AIX] Avoid unset csect assert for functions defined after their use in TOC
Summary:
If a function is defined after it appears in a TOC expression, we may
try to access an unset containing csect when returning a symbol for the
expression.
Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast
Reviewed By: hubert.reinterpretcast
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71125
2019-12-18 05:56:59 +08:00
|
|
|
; SYM-NEXT: Value (RelocatableAddress): 0xA8
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: Section: .data
|
|
|
|
; SYM-NEXT: Type: 0x0
|
|
|
|
; SYM-NEXT: StorageClass: C_HIDEXT (0x6B)
|
|
|
|
; SYM-NEXT: NumberOfAuxEntries: 1
|
|
|
|
; SYM-NEXT: CSECT Auxiliary Entry {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+3]]
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: SectionLen: 4
|
|
|
|
; SYM-NEXT: ParameterHashIndex: 0x0
|
|
|
|
; SYM-NEXT: TypeChkSectNum: 0x0
|
|
|
|
; SYM-NEXT: SymbolAlignmentLog2: 2
|
|
|
|
; SYM-NEXT: SymbolType: XTY_SD (0x1)
|
|
|
|
; SYM-NEXT: StorageMappingClass: XMC_TC (0x3)
|
|
|
|
; SYM-NEXT: StabInfoIndex: 0x0
|
|
|
|
; SYM-NEXT: StabSectNum: 0x0
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: Symbol {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+4]]
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: Name: b
|
[AIX] Avoid unset csect assert for functions defined after their use in TOC
Summary:
If a function is defined after it appears in a TOC expression, we may
try to access an unset containing csect when returning a symbol for the
expression.
Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast
Reviewed By: hubert.reinterpretcast
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71125
2019-12-18 05:56:59 +08:00
|
|
|
; SYM-NEXT: Value (RelocatableAddress): 0xAC
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: Section: .data
|
|
|
|
; SYM-NEXT: Type: 0x0
|
|
|
|
; SYM-NEXT: StorageClass: C_HIDEXT (0x6B)
|
|
|
|
; SYM-NEXT: NumberOfAuxEntries: 1
|
|
|
|
; SYM-NEXT: CSECT Auxiliary Entry {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+5]]
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: SectionLen: 4
|
|
|
|
; SYM-NEXT: ParameterHashIndex: 0x0
|
|
|
|
; SYM-NEXT: TypeChkSectNum: 0x0
|
|
|
|
; SYM-NEXT: SymbolAlignmentLog2: 2
|
|
|
|
; SYM-NEXT: SymbolType: XTY_SD (0x1)
|
|
|
|
; SYM-NEXT: StorageMappingClass: XMC_TC (0x3)
|
|
|
|
; SYM-NEXT: StabInfoIndex: 0x0
|
|
|
|
; SYM-NEXT: StabSectNum: 0x0
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: Symbol {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+6]]
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: Name: c
|
[AIX] Avoid unset csect assert for functions defined after their use in TOC
Summary:
If a function is defined after it appears in a TOC expression, we may
try to access an unset containing csect when returning a symbol for the
expression.
Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast
Reviewed By: hubert.reinterpretcast
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71125
2019-12-18 05:56:59 +08:00
|
|
|
; SYM-NEXT: Value (RelocatableAddress): 0xB0
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: Section: .data
|
|
|
|
; SYM-NEXT: Type: 0x0
|
|
|
|
; SYM-NEXT: StorageClass: C_HIDEXT (0x6B)
|
|
|
|
; SYM-NEXT: NumberOfAuxEntries: 1
|
|
|
|
; SYM-NEXT: CSECT Auxiliary Entry {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+7]]
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: SectionLen: 4
|
|
|
|
; SYM-NEXT: ParameterHashIndex: 0x0
|
|
|
|
; SYM-NEXT: TypeChkSectNum: 0x0
|
|
|
|
; SYM-NEXT: SymbolAlignmentLog2: 2
|
|
|
|
; SYM-NEXT: SymbolType: XTY_SD (0x1)
|
|
|
|
; SYM-NEXT: StorageMappingClass: XMC_TC (0x3)
|
|
|
|
; SYM-NEXT: StabInfoIndex: 0x0
|
|
|
|
; SYM-NEXT: StabSectNum: 0x0
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: Symbol {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+8]]
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: Name: globa
|
[AIX] Avoid unset csect assert for functions defined after their use in TOC
Summary:
If a function is defined after it appears in a TOC expression, we may
try to access an unset containing csect when returning a symbol for the
expression.
Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast
Reviewed By: hubert.reinterpretcast
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71125
2019-12-18 05:56:59 +08:00
|
|
|
; SYM-NEXT: Value (RelocatableAddress): 0xB4
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: Section: .data
|
|
|
|
; SYM-NEXT: Type: 0x0
|
|
|
|
; SYM-NEXT: StorageClass: C_HIDEXT (0x6B)
|
|
|
|
; SYM-NEXT: NumberOfAuxEntries: 1
|
|
|
|
; SYM-NEXT: CSECT Auxiliary Entry {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+9]]
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: SectionLen: 4
|
|
|
|
; SYM-NEXT: ParameterHashIndex: 0x0
|
|
|
|
; SYM-NEXT: TypeChkSectNum: 0x0
|
|
|
|
; SYM-NEXT: SymbolAlignmentLog2: 2
|
|
|
|
; SYM-NEXT: SymbolType: XTY_SD (0x1)
|
|
|
|
; SYM-NEXT: StorageMappingClass: XMC_TC (0x3)
|
|
|
|
; SYM-NEXT: StabInfoIndex: 0x0
|
|
|
|
; SYM-NEXT: StabSectNum: 0x0
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: Symbol {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+10]]
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: Name: ptr
|
[AIX] Avoid unset csect assert for functions defined after their use in TOC
Summary:
If a function is defined after it appears in a TOC expression, we may
try to access an unset containing csect when returning a symbol for the
expression.
Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast
Reviewed By: hubert.reinterpretcast
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71125
2019-12-18 05:56:59 +08:00
|
|
|
; SYM-NEXT: Value (RelocatableAddress): 0xB8
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: Section: .data
|
|
|
|
; SYM-NEXT: Type: 0x0
|
|
|
|
; SYM-NEXT: StorageClass: C_HIDEXT (0x6B)
|
|
|
|
; SYM-NEXT: NumberOfAuxEntries: 1
|
|
|
|
; SYM-NEXT: CSECT Auxiliary Entry {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+11]]
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: SectionLen: 4
|
|
|
|
; SYM-NEXT: ParameterHashIndex: 0x0
|
|
|
|
; SYM-NEXT: TypeChkSectNum: 0x0
|
|
|
|
; SYM-NEXT: SymbolAlignmentLog2: 2
|
|
|
|
; SYM-NEXT: SymbolType: XTY_SD (0x1)
|
|
|
|
; SYM-NEXT: StorageMappingClass: XMC_TC (0x3)
|
|
|
|
; SYM-NEXT: StabInfoIndex: 0x0
|
|
|
|
; SYM-NEXT: StabSectNum: 0x0
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: Symbol {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+12]]
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: Name: bar
|
[AIX] Avoid unset csect assert for functions defined after their use in TOC
Summary:
If a function is defined after it appears in a TOC expression, we may
try to access an unset containing csect when returning a symbol for the
expression.
Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast
Reviewed By: hubert.reinterpretcast
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71125
2019-12-18 05:56:59 +08:00
|
|
|
; SYM-NEXT: Value (RelocatableAddress): 0xBC
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: Section: .data
|
|
|
|
; SYM-NEXT: Type: 0x0
|
|
|
|
; SYM-NEXT: StorageClass: C_HIDEXT (0x6B)
|
|
|
|
; SYM-NEXT: NumberOfAuxEntries: 1
|
|
|
|
; SYM-NEXT: CSECT Auxiliary Entry {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+13]]
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: SectionLen: 4
|
|
|
|
; SYM-NEXT: ParameterHashIndex: 0x0
|
|
|
|
; SYM-NEXT: TypeChkSectNum: 0x0
|
|
|
|
; SYM-NEXT: SymbolAlignmentLog2: 2
|
|
|
|
; SYM-NEXT: SymbolType: XTY_SD (0x1)
|
|
|
|
; SYM-NEXT: StorageMappingClass: XMC_TC (0x3)
|
|
|
|
; SYM-NEXT: StabInfoIndex: 0x0
|
|
|
|
; SYM-NEXT: StabSectNum: 0x0
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: Symbol {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+14]]
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: Name: foo
|
[AIX] Avoid unset csect assert for functions defined after their use in TOC
Summary:
If a function is defined after it appears in a TOC expression, we may
try to access an unset containing csect when returning a symbol for the
expression.
Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast
Reviewed By: hubert.reinterpretcast
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71125
2019-12-18 05:56:59 +08:00
|
|
|
; SYM-NEXT: Value (RelocatableAddress): 0xC0
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: Section: .data
|
|
|
|
; SYM-NEXT: Type: 0x0
|
|
|
|
; SYM-NEXT: StorageClass: C_HIDEXT (0x6B)
|
|
|
|
; SYM-NEXT: NumberOfAuxEntries: 1
|
|
|
|
; SYM-NEXT: CSECT Auxiliary Entry {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+15]]
|
2019-12-05 00:22:57 +08:00
|
|
|
; SYM-NEXT: SectionLen: 4
|
|
|
|
; SYM-NEXT: ParameterHashIndex: 0x0
|
|
|
|
; SYM-NEXT: TypeChkSectNum: 0x0
|
|
|
|
; SYM-NEXT: SymbolAlignmentLog2: 2
|
|
|
|
; SYM-NEXT: SymbolType: XTY_SD (0x1)
|
|
|
|
; SYM-NEXT: StorageMappingClass: XMC_TC (0x3)
|
|
|
|
; SYM-NEXT: StabInfoIndex: 0x0
|
|
|
|
; SYM-NEXT: StabSectNum: 0x0
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: }
|
[AIX] Avoid unset csect assert for functions defined after their use in TOC
Summary:
If a function is defined after it appears in a TOC expression, we may
try to access an unset containing csect when returning a symbol for the
expression.
Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast
Reviewed By: hubert.reinterpretcast
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71125
2019-12-18 05:56:59 +08:00
|
|
|
; SYM-NEXT: Symbol {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+16]]
|
[AIX] Avoid unset csect assert for functions defined after their use in TOC
Summary:
If a function is defined after it appears in a TOC expression, we may
try to access an unset containing csect when returning a symbol for the
expression.
Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast
Reviewed By: hubert.reinterpretcast
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71125
2019-12-18 05:56:59 +08:00
|
|
|
; SYM-NEXT: Name: foobar
|
|
|
|
; SYM-NEXT: Value (RelocatableAddress): 0xC4
|
|
|
|
; SYM-NEXT: Section: .data
|
|
|
|
; SYM-NEXT: Type: 0x0
|
|
|
|
; SYM-NEXT: StorageClass: C_HIDEXT (0x6B)
|
|
|
|
; SYM-NEXT: NumberOfAuxEntries: 1
|
|
|
|
; SYM-NEXT: CSECT Auxiliary Entry {
|
2019-12-20 04:30:12 +08:00
|
|
|
; SYM-NEXT: Index: [[#TOC_INDX+17]]
|
[AIX] Avoid unset csect assert for functions defined after their use in TOC
Summary:
If a function is defined after it appears in a TOC expression, we may
try to access an unset containing csect when returning a symbol for the
expression.
Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast
Reviewed By: hubert.reinterpretcast
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71125
2019-12-18 05:56:59 +08:00
|
|
|
; SYM-NEXT: SectionLen: 4
|
|
|
|
; SYM-NEXT: ParameterHashIndex: 0x0
|
|
|
|
; SYM-NEXT: TypeChkSectNum: 0x0
|
|
|
|
; SYM-NEXT: SymbolAlignmentLog2: 2
|
|
|
|
; SYM-NEXT: SymbolType: XTY_SD (0x1)
|
|
|
|
; SYM-NEXT: StorageMappingClass: XMC_TC (0x3)
|
|
|
|
; SYM-NEXT: StabInfoIndex: 0x0
|
|
|
|
; SYM-NEXT: StabSectNum: 0x0
|
|
|
|
; SYM-NEXT: }
|
|
|
|
; SYM-NEXT: }
|