Files
clang-p2996/lld/test/ELF/lto/common2.ll
Sam Clegg 3d63a409a0 [ELF] Remove -m argument to lld in test files. NFC.
This should be correctly implied by the linker.

This also makes the tests slightly easier to maintain and compare
with the equivalent tests under for other platforms.

Differential Revision: https://reviews.llvm.org/D47513

llvm-svn: 333567
2018-05-30 17:57:08 +00:00

29 lines
775 B
LLVM

; REQUIRES: x86
; RUN: llvm-as %s -o %t1.o
; RUN: ld.lld %t1.o -o %t -shared -save-temps
; RUN: llvm-dis < %t.0.2.internalize.bc | FileCheck %s
; RUN: llvm-readobj -t %t | FileCheck %s --check-prefix=SHARED
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@a = common global i8 0, align 8
; CHECK-DAG: @a = common global i8 0, align 8
@b = common hidden global i32 0, align 4
define i32 @f() {
%t = load i32, i32* @b, align 4
ret i32 %t
}
; CHECK-DAG: @b = internal global i32 0, align 4
; SHARED: Symbol {
; SHARED: Name: a
; SHARED-NEXT: Value:
; SHARED-NEXT: Size: 1
; SHARED-NEXT: Binding: Global
; SHARED-NEXT: Type: Object
; SHARED-NEXT: Other: 0
; SHARED-NEXT: Section: .bss
; SHARED-NEXT: }