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

source code of bolt/test/runtime/X86/hugify.c