brintos

brintos / llvm-project-archived public Read only

0
0
Text · 957 B · a4a718a Raw
39 lines · c
1// Make sure BOLT correctly processes --hugify option2 3#include <stdio.h>4 5int main(int argc, char **argv) {6  printf("Hello world\n");7  return 0;8}9 10/*11REQUIRES: system-linux,bolt-runtime12 13RUN: %clang %cflags -no-pie %s -o %t.nopie.exe -Wl,-q14RUN: %clang %cflags -fpic %s -o %t.pie.exe -Wl,-q15 16RUN: llvm-bolt %t.nopie.exe --lite=0 -o %t.nopie --hugify17RUN: llvm-bolt %t.pie.exe --lite=0 -o %t.pie --hugify18 19RUN: llvm-nm --numeric-sort --print-armap %t.nopie | \20RUN:   FileCheck %s -check-prefix=CHECK-NM21RUN: %t.nopie | FileCheck %s -check-prefix=CHECK-NOPIE22 23RUN: llvm-nm --numeric-sort --print-armap %t.pie | \24RUN:   FileCheck %s -check-prefix=CHECK-NM25RUN: %t.pie | FileCheck %s -check-prefix=CHECK-PIE26 27CHECK-NM:       W  __hot_start28CHECK-NM-NEXT:  T _start29CHECK-NM:       T main30CHECK-NM:       W __hot_end31CHECK-NM:       t __bolt_hugify_start_program32CHECK-NM-NEXT:  W __bolt_runtime_start33 34CHECK-NOPIE: Hello world35 36CHECK-PIE: Hello world37 38*/39