brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 32dfc91 Raw
49 lines · plain
1// REQUIRES: x862// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o3// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/comdat.s -o %t2.o4// RUN: ld.lld -shared %t.o %t2.o -o %t5// RUN: llvm-objdump -d %t | FileCheck %s6// RUN: llvm-readelf -S -s %t | FileCheck --check-prefix=READ %s7// RUN: ld.lld -shared --force-group-allocation %t.o %t2.o -o - | cmp - %t8 9// Check that we don't crash with --gc-section and that we print a list of10// reclaimed sections on stderr.11// RUN: ld.lld --gc-sections --print-gc-sections -shared %t.o %t.o %t2.o -o %t \12// RUN:   2>&1 | FileCheck --check-prefix=GC %s13// GC: removing unused section {{.*}}.o:(.text)14// GC: removing unused section {{.*}}.o:(.text3)15// GC: removing unused section {{.*}}.o:(.text)16// GC: removing unused section {{.*}}.o:(.text)17 18.globl foo19        .section	.text2,"axG",@progbits,foo,comdat,unique,020foo:21        nop22 23// CHECK: Disassembly of section .text2:24// CHECK-EMPTY:25// CHECK-NEXT: <foo>:26// CHECK-NEXT:   nop27// CHECK-NOT: nop28 29        .section bar, "ax"30        call foo31 32// CHECK: Disassembly of section bar:33// CHECK-EMPTY:34// CHECK-NEXT: <bar>:35// CHECK-NEXT:   callq  {{.*}} <foo@plt>36 37.weak zed38zed:39        .section .text3,"axG",@progbits,zed,comdat,unique,040 41# READ: .text2 PROGBITS {{.*}} AX42# READ: .text3 PROGBITS {{.*}} AX43 44# SYM:  NOTYPE LOCAL  DEFAULT UND45# SYM:  NOTYPE LOCAL  HIDDEN  [[#]] _DYNAMIC46# SYM:  NOTYPE GLOBAL DEFAULT [[#]] foo47# SYM:  NOTYPE GLOBAL DEFAULT [[#]] zed48# SYM:  NOTYPE GLOBAL DEFAULT UND   abc49