Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

whatever #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions elfconvert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,28 @@ case $SAR_ARGV0 in
*) sbcl_subdir=k8
esac
sbcl=$RUNFILES/google3/third_party/lisp/sbcl/binary-distribution/$sbcl_subdir/bin/sbcl
args=(--noinform --dynamic-space-size 512MB)
args=(--noinform --dynamic-space-size 1GB)
mode='(setq *evaluator-mode* :compile)'
script=$RUNFILES/google3/third_party/lisp/sbcl/src/tools-for-build/elftool

action=$1
input=$2
output=$3

compactcore=/tmp/compact-$$.core
tmpcore=/tmp/patched-$$.core
DSS=16384

case $action in
split)
exec $sbcl ${args[@]} --eval "$mode" --load $script --eval \
'(sb-editcore:split-core "'$input'" "'$output'")' --quit ;;
exec $sbcl ${args[@]} --eval "$mode" --load $script \
--eval '(sb-editcore:reorganize-core "'$input'" "'$compactcore'")' \
--eval '(sb-editcore:move-dynamic-code-to-text-space "'$compactcore'" "'$tmpcore'")' \
--eval '(delete-file "'$compactcore'")' \
--eval '(sb-editcore:redirect-text-space-calls "'$tmpcore'")' \
--eval '(sb-editcore:split-core "'$tmpcore'" "'$output'" :dynamic-space-size '$DSS')' \
--eval '(delete-file "'$tmpcore'")' --quit ;;

copy)
exec $sbcl ${args[@]} --eval "$mode" --load $script --eval \
'(sb-editcore::copy-to-elf-obj "'$input'" "'$output'")' --quit ;;
Expand Down