brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · f92d819 Raw
40 lines · plain
1; REQUIRES: x862; RUN: llvm-as %s -o %t.o3 4; RUN: rm -f ptr5; RUN: echo "foo = 1;" > %t.script6; RUN: ld.lld %t.o -o %t2 --script %t.script -save-temps7;; Combined module is not empty, but it will be empty after optimization.8;; Ensure lld still emits empty combined obj in this case.9; RUN: llvm-nm %t2.lto.o | count 010 11; RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=VAL12; VAL:       Symbol {13; VAL:        Name: foo14; VAL-NEXT:   Value: 0x115; VAL-NEXT:   Size:16; VAL-NEXT:   Binding: Global17; VAL-NEXT:   Type: None18; VAL-NEXT:   Other:19; VAL-NEXT:   Section: Absolute20; VAL-NEXT: }21 22; RUN: echo "zed = 1;" > %t2.script23; RUN: ld.lld %t.o -o %t3 --script %t2.script24; RUN: llvm-readobj --symbols %t3 | FileCheck %s --check-prefix=ABS25; ABS:      Symbol {26; ABS:        Name: zed27; ABS-NEXT:   Value: 0x128; ABS-NEXT:   Size: 029; ABS-NEXT:   Binding: Global30; ABS-NEXT:   Type: None31; ABS-NEXT:   Other: 032; ABS-NEXT:   Section: Absolute33; ABS-NEXT: }34 35target triple = "x86_64-unknown-linux-gnu"36target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"37 38@foo = global i32 039@bar = global i32 040