llvm-project/bolt/test/program-header.test
2025-06-27 19:51:51 -07:00

15 lines
496 B
Plaintext

# Check that llvm-bolt does not add new segments when writing code in-place.
REQUIRES: system-linux
RUN: %clang %cflags %p/Inputs/hello.c -o %t -no-pie -Wl,-q -nostartfiles \
RUN: -nostdlib -ffreestanding
RUN: llvm-bolt %t -o %t.bolt --use-old-text --align-functions=1 \
RUN: --no-huge-pages --align-text=1 --use-gnu-stack \
RUN: | FileCheck %s --check-prefix=CHECK-BOLT
RUN: llvm-readelf -WS %t.bolt | FileCheck %s
CHECK-BOLT: not adding new segments
CHECK-NOT: .bolt.org.eh_frame_hdr