gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: gcl-2.5.0


From: Camm Maguire
Subject: [Gcl-devel] Re: gcl-2.5.0
Date: 10 Aug 2002 10:24:00 -0400

Greetings!

Matt Kaufmann <address@hidden> writes:

> Hi, Gordon --
> 
> Thanks for the attempt.  I'm afraid there is still a problem.  GCL 2.5.0 died
> with "Illegal instruction" when loading a file.  Below is a transcript showing
> the unsuccessful attempt with GCL 2.5.0 followed by a corresponding successful
> attempt using GCL 2.4.0.
> 
> Let me know if you'd like me to try to construct a smaller example.
> 
> -- Matt
> glenmorangie.cs.utexas.edu% gcl-2.5.0
> GCL (GNU Common Lisp)  Version(2.5.0) Fri Aug  9 15:33:00 CDT 2002
> Licensed under GNU Library General Public License
> Contains Enhancements by W. Schelter
> Loading init.lsp
> Loading acl2r.lisp
> Finished loading acl2r.lisp
> Loading acl2-init.lisp
> Loading acl2.lisp
> Loading acl2-fns.lisp
> Finished loading acl2-fns.lisp
> Compiling acl2-fns.lisp.
> End of Pass 1.  
> 
> ;; Note: Tail-recursive call of GET-TYPE-FROM-DCLS was replaced by iteration.
> ;; Note: Tail-recursive call of COLLECT-TYPES was replaced by iteration.
> ;; Note: Tail-recursive call of REV1@ was replaced by iteration.
> ;; Note: Tail-recursive call of ACL2-READ-CHARACTER-STRING was replaced by 
> iteration.[GC for 50 RELOCATABLE-BLOCKS pages..(T=1).GC finished]
> 
> End of Pass 2.  
> OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
> Finished compiling acl2-fns.lisp.
> Loading acl2-fns.o
> start address -T 0x8315000 Finished loading acl2-fns.o
> [GC for 33 SYMBOL pages..(T=1).GC finished]
> Finished loading acl2.lisp
> Finished loading acl2-init.lisp
> Loading enable-eval.lisp
> Disabling evaluation inside breaks.
> Finished loading enable-eval.lisp
> Finished loading init.lsp
> 
> >(load "axioms.lisp")
> 
> Loading axioms.lisp
> Illegal instruction


> glenmorangie.cs.utexas.edu% gcl-2.4.0
> GCL (GNU Common Lisp)  Version(2.4.0) Mon Oct 29 16:42:35 CST 2001
> Licensed under GNU Library General Public License
> Contains Enhancements by W. Schelter
> Loading init.lsp
> Loading acl2r.lisp
> Finished loading acl2r.lisp
> Loading acl2-init.lisp
> Loading acl2.lisp
> Loading acl2-fns.lisp
> Finished loading acl2-fns.lisp
> Compiling acl2-fns.lisp.
> End of Pass 1.  
> 
> ;; Note: Tail-recursive call of GET-TYPE-FROM-DCLS was replaced by iteration.
> ;; Note: Tail-recursive call of COLLECT-TYPES was replaced by iteration.
> ;; Note: Tail-recursive call of REV1@ was replaced by iteration.
> ;; Note: Tail-recursive call of ACL2-READ-CHARACTER-STRING was replaced by 
> iteration.
> End of Pass 2.  
> OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
> Finished compiling acl2-fns.lisp.
> Loading acl2-fns.o
> symbol "_setjmp" is not in base imagestart address -T 82ea000 Finished 
> loading acl2-fns.o

   ^^^^^^

Here is the problem.  It exists in 2.4.0 as well as the current cvs,
both of which are apparently using the original custom relocation
code as opposed to libbfd.  libbfd would stop here too, but with
clearer output, and a genuine job stopping error.

Luckily, this is rather easy to fix, though I'd like to trace its
origin rather than just hacking around it.  libc labels is setjmp
symbol appended with a @@GLIBC.., while the compiler puts a plain
setjmp reference into compiled objects.  ldso is smart enough to
figure this out, and Dr. Schelter had worked around one known case in
the custom relocation code you are apparently using.  Unfortunately,
wither newer libc, setjmp, _setjmp, __sigsetjmp, ... are all appearing
at times, and need to be mapped to the same place.  The current libbfd
strategy is to map *each* symbol with a @@GLIBC to its plain
counterpart, which may or may not catch the example you have.  You can
check out 'nm acl2-fn.o' and 'nm --dynamic /lib/libc...... |grep
setjmp' to get an idea.

Going forward, I'd ideally like the following:
1) the full configure and make output
2) some small stand-alone lisp which shows the problem, maybe just
   acl2-fns.lisp if it can be compiled with no external references.
3) the output of the two nm commands listed above. 

If you'd like to try your hand at a patch, the relevant files are 
1) rsym-elf.c and sfaslelf.c for the custom relocation
2) sfasli.c and sfaslbfd.c for the bfd relocations.

Lastly, if you don't use save-image and use the system ld to link the
final image, you can configure to use dlopen, but this is 'deprecated'
:-).  

Take care,


> [GC for 50 RELOCATABLE-BLOCKS pages..(T=1).GC finished]
> Finished loading acl2.lisp
> Finished loading acl2-init.lisp
> Loading enable-eval.lisp
> Disabling evaluation inside breaks.
> Finished loading enable-eval.lisp
> Finished loading init.lsp
> 
> >(load "axioms.lisp")
> 
> Loading axioms.lisp
> [GC for 33 SYMBOL pages..(T=1).GC finished]
> [GC for 200 CONS pages..(T=2).GC finished]
> [GC for 50 RELOCATABLE-BLOCKS pages..(T=1).GC finished]
> [GC for 50 RELOCATABLE-BLOCKS pages..(T=1).GC finished]
> [GC for 200 CONS pages..(T=2).GC finished]
> [GC for 50 RELOCATABLE-BLOCKS pages..(T=2).GC finished]
> [GC for 200 CONS pages..(T=2).GC finished]
> [GC for 200 CONS pages..(T=2).GC finished]
> [GC for 50 RELOCATABLE-BLOCKS pages..(T=3).GC finished]
> [GC for 50 RELOCATABLE-BLOCKS pages..(T=2).GC finished]
> [GC for 50 RELOCATABLE-BLOCKS pages..(T=2).GC finished]
> Finished loading axioms.lisp
> T
> 
> >
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]