-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_symcc.sh
executable file
·154 lines (127 loc) · 3.06 KB
/
build_symcc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#!/bin/bash
export CC=/symcc/build/symcc
export CXX=/symcc/build/sym++
export FUZZER_LIB=$PWD/driver_symcc.a
export LIB_FUZZING_ENGINE=$PWD/driver_symcc.a
export CFLAGS=
export CXXFLAGS=
export SYMCC_NO_SYMBOLIC_INPUT=1
export SYMCC_LIBCXX_PATH=/src/libcxx_symcc/install/lib
export OUT=$PWD
export ARCHITECTURE=
export SANITIZER=
$CC -c standaloneengine.c -o driver_symcc.o
ar r driver_symcc.a driver_symcc.o
cp driver_symcc.a /usr/lib/libFuzzingEngine.a
mkdir -p binutils
echo "binutils"
cd binutils
wget https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.gz
tar xvf binutils-2.33.1.tar.gz
cd binutils-2.33.1
./configure --disable-shared
make -j
cp binutils/nm-new ../../nm.symcc
cp binutils/size ../../size.symcc
cp binutils/objdump ../../objdump.symcc
cp binutils/readelf ../../readelf.symcc
cd ../..
echo "libjpeg"
cd libjpeg
git clone https://github.com/libjpeg-turbo/libjpeg-turbo.git
./build.sh
cp libjpeg.symsan ../libjpeg.symcc
cd ..
echo "libpng"
cd libpng
tar xvf libpng-1.2.56.tar.gz
./build.sh
cp libpng.symsan ../libpng.symcc
cd ..
echo "freetype"
cd freetype
tar xvf freetype2.tar.gz
tar xvf libarchive-3.4.3.tar.xz
./build.sh
cp freetype.symsan ../freetype.symcc
cd ..
echo "harfbuzz"
cd harfbuzz
git clone https://github.com/behdad/harfbuzz.git
./build.sh
cp harfbuzz.symsan ../harfubzz.symcc
cd ..
echo "jsoncpp"
cd json
git clone https://github.com/open-source-parsers/jsoncpp
./build.sh
cp jsoncpp/jsoncpp.symsan ../json.symcc
cd ..
echo "lcms"
cd lcms
git clone https://github.com/mm2/Little-CMS.git
./build.sh
cp lcms.symsan ../lcms.symcc
cd ..
echo "xml"
cd xml
git clone https://gitlab.gnome.org/GNOME/libxml2.git
./build.sh
cp xml.symsan ../xml.symcc
cd ..
echo "openssl"
cd openssl
git clone https://github.com/openssl/openssl.git
./build.sh
cp x509.symsan ../openssl.symcc
cd ..
echo "vorbis"
cd vorbis
git clone https://github.com/xiph/ogg.git
git clone https://github.com/xiph/vorbis.git
./build.sh
cp vorbis.symsan ../vorbis.symcc
cd ..
echo "woff2"
cd woff2
git clone https://github.com/google/woff2.git
git clone https://github.com/google/oss-fuzz.git
git clone https://github.com/google/brotli.git
./build.sh
cp woff2.symsan ../woff2.symcc
cd ..
echo "re2"
cd re2
git clone https://github.com/google/re2.git
./build.sh
cp re2.symsan ../re2.symcc
cd ..
echo "proj"
cd proj
git clone https://github.com/OSGeo/PROJ
./build.sh
cp proj.symsan ../proj.symcc
cd ..
echo "openthread"
cd openthread
git clone https://github.com/openthread/openthread.git
./build.sh
cp openthread.symsan ../opthread.symcc
cd ..
echo "mbedtls"
cd mbedtls
git clone https://github.com/openssl/openssl.git
git clone https://github.com/google/boringssl.git
git clone https://github.com/ARMmbed/mbedtls.git
git clone https://github.com/ARMmbed/mbed-crypto mbedtls/crypto
./build.sh
cp mbedtls/programs/fuzz/fuzz_dtlsclient ../mbedtls.symcc
cd ..
echo "curl"
cd curl
git clone https://github.com/curl/curl.git
git clone https://github.com/curl/curl-fuzzer.git curl_fuzzer
cp ossfuzz.sh curl_fuzzer
cp install_openssl.sh curl_fuzzer/scripts/
./build.sh
cp curl_fuzzer/curl_fuzzer_http ../curl.symcc