-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
side deck filtering: blacklists and whitelists
Signed-off-by: Fyodor Kovin <[email protected]>
- Loading branch information
1 parent
2477bbd
commit 686c21f
Showing
5 changed files
with
303 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,41 @@ | ||
#!/bin/bash | ||
FILES="recovery.o http.o httpserver.o utils.o dataservice.o json.o alloc.o logging.o" | ||
trap 'exit 1' ERR | ||
|
||
ZSS=${ZSS:-$PWD/..} | ||
|
||
DEFS=$ZSS/build/side-deck-defs | ||
FILES="`cat $DEFS/files`" | ||
|
||
cd $ZSS/build/tmp-zss | ||
|
||
cd tmp-zss | ||
dd if=zssServer.x conv=unblock cbs=80 of=side-deck | ||
nm $FILES |grep ' T ' |awk '{ print $3 }' |sort -u >relevant-functions | ||
cat relevant-functions |while read fn; do grep ",'"$fn"'" side-deck; done > side-deck-filtered | ||
|
||
rm -f relevant-functions | ||
for f in $FILES | ||
do | ||
if [ -f $DEFS/$f-bl ] | ||
then | ||
echo "Found blacklist file for $f" | ||
nm $f |grep ' T ' |awk '{ print $3 }' |grep -v -f $DEFS/$f-bl >>relevant-functions | ||
elif [ -f $DEFS/$f-wl ] | ||
then | ||
echo "Found whilelist file for $f" | ||
nm $f |grep ' T ' |awk '{ print $3 }' |grep -f $DEFS/$f-wl >>relevant-functions | ||
else | ||
echo "Adding all functions from $f to the side deck" | ||
nm $f |grep ' T ' |awk '{ print $3 }' >>relevant-functions | ||
fi | ||
done | ||
sort -u -o relevant-functions relevant-functions | ||
|
||
cat relevant-functions |while read fn; do grep ",'"$fn"'" side-deck; done >side-deck-filtered | ||
|
||
# dd doesn't support file tags, while cat does. | ||
cat side-deck-filtered |dd conv=block cbs=80 bs=80 > zss.x | ||
mkdir -p ../../lib | ||
cp zss.x ../../lib | ||
echo Side deck ../../lib/zss.x build successfully out of $FILES | ||
cat side-deck-filtered |dd conv=block cbs=80 bs=80 |sed 's/\(.\{79\}\)./\1\n/g' >zss.x | ||
|
||
mkdir -p $ZSS/lib | ||
cp zss.x $ZSS/lib | ||
echo Side deck $ZSS/lib/zss.x build successfully out of $FILES | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
recovery.o http.o httpserver.o utils.o | ||
dataservice.o json.o xml.o logging.o | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
registerHttpServerModuleWithBase | ||
httpServerSetSessionTokenKey | ||
registerHttpService | ||
dequeueHttpRequest | ||
makeHttpRequestParser | ||
makeHttpResponse | ||
makeHttpServer2 | ||
makeHttpServer | ||
makeSecureHttpServer | ||
makeHttpConversation | ||
makeIntParamSpec | ||
makeInt64ParamSpec | ||
makeStringParamSpec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
addToStringList | ||
addToStringList | ||
addToStringListUnique | ||
firstStringListElt | ||
makeStringList | ||
stringListContains | ||
stringListContains | ||
stringListLast | ||
stringListLength | ||
stringListPrint |
Oops, something went wrong.