1 | // Make sure all printed values are the same and are updated after BOLT. |
2 | |
3 | #include <stdio.h> |
4 | |
5 | int main(int argc, char *argv[]); |
6 | |
7 | unsigned long Global = (unsigned long)main + 0x7fffffff; |
8 | |
9 | int main(int argc, char *argv[]) { |
10 | |
11 | unsigned long Local = (unsigned long)&main + 0x7fffffff; |
12 | unsigned long Local2 = &main + 0x7fffffff; |
13 | |
14 | printf(format: "Global = 0x%lx\n" , Global); |
15 | printf(format: "Local = 0x%lx\n" , Local); |
16 | printf(format: "Local2 = 0x%lx\n" , Local2); |
17 | |
18 | return 0; |
19 | } |
20 | |