1 | // Make sure BOLT correctly processes --hugify option |
2 | |
3 | #include <stdio.h> |
4 | |
5 | int main(int argc, char **argv) { |
6 | printf(format: "Hello world\n" ); |
7 | return 0; |
8 | } |
9 | |
10 | /* |
11 | REQUIRES: system-linux,bolt-runtime |
12 | |
13 | RUN: %clang %cflags -no-pie %s -o %t.nopie.exe -Wl,-q |
14 | RUN: %clang %cflags -fpic -pie %s -o %t.pie.exe -Wl,-q |
15 | |
16 | RUN: llvm-bolt %t.nopie.exe --lite=0 -o %t.nopie --hugify |
17 | RUN: llvm-bolt %t.pie.exe --lite=0 -o %t.pie --hugify |
18 | |
19 | RUN: %t.nopie | FileCheck %s -check-prefix=CHECK-NOPIE |
20 | |
21 | CHECK-NOPIE: Hello world |
22 | |
23 | RUN: %t.pie | FileCheck %s -check-prefix=CHECK-PIE |
24 | |
25 | CHECK-PIE: Hello world |
26 | |
27 | */ |
28 | |