brintos

brintos / llvm-project-archived public Read only

0
0
Text · 752 B · bd12526 Raw
19 lines · c
1/// Verify that unnamed symbols are not added as function entry points. Such2/// symbols are used by relocations in debugging sections.3 4// clang-format off5 6// RUN: %clang %cflags -g -Wl,-q -o %t %s7 8/// Verify that the binary indeed contains a fake label ".L0 " at _start.9// RUN: llvm-readelf -s %t | FileCheck %s --check-prefix=CHECK-ELF10// CHECK-ELF-DAG: [[#%x,START:]] {{.*}} FUNC GLOBAL DEFAULT [[#%d,SECTION:]] _start{{$}}11// CHECK-ELF-DAG: [[#%x,START]] {{.*}} NOTYPE LOCAL DEFAULT [[#SECTION]] .L0 {{$}}12 13/// Verify that BOLT did not create an extra entry point for the fake label.14// RUN: llvm-bolt -o %t.bolt %t --print-cfg | FileCheck %s15// CHECK: Binary Function "_start" after building cfg {16// CHECK:  IsMultiEntry: 017 18void _start() {}19