brintos

brintos / llvm-project-archived public Read only

0
0
Text · 522 B · 2986fe7 Raw
23 lines · c
1// This test checks that the data object located in text section2// is properly emitted in the new section.3 4// RUN: %clang %cflags %s -o %t.exe -Wl,-q5// RUN: llvm-bolt %t.exe -o %t.bolt --lite=0 --use-old-text=06// RUN: llvm-objdump -j .text -d --disassemble-symbols=arr %t.bolt | \7// RUN:   FileCheck %s8 9// CHECK: {{.*}} <arr>:10 11extern void exit(int);12 13typedef void (*FooPtr)();14 15void exitOk() { exit(0); }16 17__attribute__((section(".text"))) const FooPtr arr[] = {exitOk, 0};18 19int main() {20  arr[0]();21  return -1;22}23