forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[XCOFF] Don't emit non-external labels in the symbol table and handle…
… MCSA_LGlobal Summary: We need to handle the MCSA_LGlobal case in emitSymbolAttribute for functions marked internal in the IR so that the appropriate storage class is emitted on the function descriptor csect. As part of this we need to make sure that external labels are not emitted into the symbol table, so we don't emit the descriptor label in the object writing path. Reviewers: jasonliu, DiggerLin, hubert.reinterpretcast Reviewed By: jasonliu Subscribers: Xiangling_L, wuzish, nemanjai, hiraditya, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74968
- Loading branch information
Showing
5 changed files
with
58 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
; RUN: llc -mtriple powerpc-ibm-aix -verify-machineinstrs -mcpu=pwr4 \ | ||
; RUN: -filetype=obj -o %t.o < %s | ||
; RUN: llvm-readobj --syms %t.o | FileCheck %s | ||
; RUN: not --crash llc -mtriple powerpc64-ibm-aix -verify-machineinstrs -mcpu=pwr4 \ | ||
; RUN: -filetype=obj -o %t.o < %s 2>&1 | FileCheck --check-prefix=64-CHECK %s | ||
|
||
define internal i32 @foo() { | ||
ret i32 1 | ||
} | ||
|
||
; CHECK: Symbol { | ||
; CHECK: Name: .foo | ||
; CHECK-NEXT: Value (RelocatableAddress): | ||
; CHECK-NEXT: Section: .text | ||
; CHECK-NEXT: Type: 0x0 | ||
; CHECK-NEXT: StorageClass: C_HIDEXT (0x6B) | ||
|
||
; CHECK: Symbol { | ||
; CHECK-NEXT: Index: [[#INDX:]] | ||
; CHECK-NEXT: Name: foo | ||
; CHECK-NEXT: Value (RelocatableAddress): | ||
; CHECK-NEXT: Section: .data | ||
; CHECK-NEXT: Type: 0x0 | ||
; CHECK-NEXT: StorageClass: C_HIDEXT (0x6B) | ||
; CHECK-NEXT: NumberOfAuxEntries: 1 | ||
; CHECK-NEXT: CSECT Auxiliary Entry { | ||
; CHECK-NEXT: Index: [[#INDX+1]] | ||
; CHECK-NEXT: SectionLen: 12 | ||
; CHECK-NEXT: ParameterHashIndex: | ||
; CHECK-NEXT: TypeChkSectNum: | ||
; CHECK-NEXT: SymbolAlignmentLog2: | ||
; CHECK-NEXT: SymbolType: XTY_SD (0x1) | ||
; CHECK-NEXT: StorageMappingClass: XMC_DS (0xA) | ||
|
||
; Make sure no label is emitted. | ||
; CHECK-NOT: Name: foo | ||
|
||
;64-CHECK: LLVM ERROR: 64-bit XCOFF object files are not supported yet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters