I tried to play with the new static linker but had some problems.
I first tried to dump my image file with the "dump-scsh-program"
procedure, and then run the static compiler on the result, but the
generated executable writes plenty of strange error messages at
startup:
----------------------------------------------------------------------
% scsh
Scsh 0.4
> (define (main args) (display args) (newline))
> (dump-scsh-program main "test.image")
Writing test.image
#t
> ^D
Exit the Scheme Shell (y/n)? y
% static.scm -i test.image -o test
(ten minutes later)
% ./test -- hello there
Object file not specified on command line
Error during external name lookup
GCing to try to remove unbound externals
Object file not specified on command line
Error during external name lookup
Remaining unbound external(s):
df_pause
Object file not specified on command line
Error during external name lookup
df_sig2interrupt
[a lot of similar messages removed]
Error during external name lookup
df__exit
(scsh hello there)
----------------------------------------------------------------------
The results are OK, but I do not like all these error messages...
After that, I tried using Scheme 48's ",build" command to dump the
image file, and the final result is that the executable generated by
the linker does not write error messages, but dumps core (this may be
normal, since I didn't follow the official procedure, but I just want
to make sure):
----------------------------------------------------------------------
% scsh
Scsh 0.4
> (define (main args) (display args) (newline))
> ,build main test.image
Writing test.image
#t
> ^D
Exit the Scheme Shell (y/n)? y
% static.scm -i test.image -o test
(ten minutes later)
% ./test -- hello there
(hello there)
Bus error (core dumped)
----------------------------------------------------------------------
Am I missing something?
BTW, all these tests were made with scsh 0.4.4 running on Solaris
2.5.1.
Oh, and while I'm at it, the static linker itself displays strange
messages on startup (removed above):
----------------------------------------------------------------------
% static.scm
[for-syntax
]
Warning: Structure has undefined exports
#{Structure 139 scsh}
(ip/options ip/time-to-live socket/cant-signal)
error: -o is a required argument
usage: /local/software6/scsh-0.4.4/lib/scsh/scsh/static.scm -i image -o
executible
[--temp directory]
[--cc command]
[--ld command]
[--libs libraries]
----------------------------------------------------------------------
Thanks,
Michel.
|