brintos

brintos / llvm-project-archived public Read only

0
0
Text · 554 B · fcc3eb6 Raw
16 lines · c
1// Test bolt instrumentation won't generate a binary with any segment that2// is writable and executable. Basically we want to put `.bolt.instr.counters`3// section into its own segment, separated from its surrounding RX sections.4 5// REQUIRES: system-linux6 7void foo() {}8void bar() { foo(); }9 10// RUN: %clang %cflags -c %s -o %t.o11// RUN: ld.lld -q -o %t.so %t.o -shared --init=foo --fini=foo12// RUN: llvm-bolt --instrument %t.so -o %tt.so13// RUN: llvm-readelf -l %tt.so | FileCheck %s14// CHECK-NOT: RWE15// CHECK: {{[0-9]*}} .bolt.instr.counters {{$}}16