File tree 2 files changed +39
-16
lines changed
2 files changed +39
-16
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /usr/ bin/bash
2
2
3
- # USAGE:
4
- #
5
- # 1) Build the source with gllvm and CFLAGS internally used by Symbiotic.
6
- # 2) CSEXEC_WRAP_DONT_USE_LD=1 \
7
- # CSEXEC_WRAP_CMD=$'csexec-symbiotic.sh\a--prp=memsafety' make check
8
- # 3) Wait for some time.
9
- # 4) ...
10
- # 5) Profit!
3
+ usage () {
4
+ cat << EOF
5
+ USAGE:
6
+ 1) Build the source with gllvm and CFLAGS internally used by Symbiotic and
7
+ LDFLAGS='-Wl,--dynamic-linker=/usr/bin/csexec-loader'.
8
+ 2) CSEXEC_WRAP_CMD=$'csexec-symbiotic.sh\a--prp=memsafety' make check
9
+ 3) Wait for some time.
10
+ 4) ...
11
+ 5) Profit!
12
+ EOF
13
+ }
11
14
12
15
set -e
13
16
14
- SYMBIOTIC_ARGS=" $1 "
15
- BINARY=" $2 "
16
- BINARY_ARGV=" $3 "
17
+ if [ $# -eq 0 ]; then
18
+ usage
19
+ exit 1
20
+ fi
21
+
22
+ i=1
23
+ while [ ! -e ${! i} ]; do
24
+ SYMBIOTIC_ARGS=" $SYMBIOTIC_ARGS ${! i} "
25
+ (( i++ ))
26
+ done
27
+
28
+ # Skip LD_LINUX_SO
29
+ (( i++ ))
30
+
31
+ # Skip --argv0
32
+ if [ ${! i} = " --argv0" ]; then
33
+ (( i += 2 ))
34
+ fi
35
+
36
+ BINARY=" ${! i} "
37
+ (( i++ ))
38
+
39
+ BINARY_ARGV=" ${! i} "
40
+ (( i++ ))
17
41
18
- i=4
19
42
while [ $i -le $# ]; do
20
43
BINARY_ARGV=" $BINARY_ARGV ,${! i} "
21
44
(( i++ ))
22
45
done
23
46
24
47
get-bc " $BINARY " 1> /dev/tty 2>&1
25
- echo " Executing $SYMBIOTIC_ARGS --argv='$BINARY_ARGV ' $BINARY .bc" 1> /dev/tty 2>&1
26
- symbiotic $SYMBIOTIC_ARGS --argv=" '$BINARY_ARGV '" " $BINARY .bc" 1> /dev/tty 2>&1
48
+ echo " Executing 'symbiotic $SYMBIOTIC_ARGS --argv='$BINARY_ARGV ' $BINARY .bc' " 1> /dev/tty 2>&1
49
+ exec symbiotic $SYMBIOTIC_ARGS --argv=" '$BINARY_ARGV '" " $BINARY .bc" 1> /dev/tty 2>&1
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ tar -Jcf "symbiotic-$VER.tar.xz" "symbiotic-$VER"
58
58
cat > symbiotic.spec << EOF
59
59
Name: $PKG
60
60
Version: $VER
61
- Release: 2 %{?dist}
61
+ Release: 3 %{?dist}
62
62
Summary: Tool for analysis of sequential computer programs written in C
63
63
License: Free
64
64
URL: https://github.com/staticafi/%{name}
You can’t perform that action at this time.
0 commit comments