Debian Codegraph @

test/arch-x86_64-large-bss.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 . $(dirnamescip-shell system . . dirname. $0)/common.inc
3
4 catscip-shell system . . cat. <<EOF | $CC -o $t/a.o -c -xc - -mcmodel=large
5 #include <stdio.h>
6 char arr1[0xc0000000];
7 extern char arr2[0xc0000000];
8 int main() {
9 printf("%d %lx\n", (void *)arr1 < (void *)arr2, arr2 - arr1);
10 }
11 EOF
12
13 catscip-shell system . . cat. <<EOF | $CC -o $t/b.o -c -xc - -mcmodel=large
14 char arr2[0xc0000000];
15 EOF
16
17 $CC -B. -o $t/exe $t/a.o $t/b.o
18 $QEMU $t/exe | grepscip-shell system . . grep. -E '^1 c0000000$'