Amir Ayupov f808ea00bd [BOLT][TEST] Import small tests
Summary:
Imported small internal tests:
- asm_func_debug.test
- basic_instrumentation.test
- bolt_icf.test
- ctc_and_unreachable.test
- double_jump.test
- exceptions_args.test
- exceptions_instrumentation.test
- fptr.test

(cherry picked from FBD32032684)
2021-10-29 13:31:22 -07:00

20 lines
455 B
C

// Make sure all printed values are the same and are updated after BOLT.
#include <stdio.h>
int main(int argc, char *argv[]);
unsigned long Global = (unsigned long)main + 0x7fffffff;
int main(int argc, char *argv[]) {
unsigned long Local = (unsigned long)&main + 0x7fffffff;
unsigned long Local2 = &main + 0x7fffffff;
printf("Global = 0x%lx\n", Global);
printf("Local = 0x%lx\n", Local);
printf("Local2 = 0x%lx\n", Local2);
return 0;
}