Skip to content
Snippets Groups Projects
  1. Jul 31, 2010
    • rtoy's avatar
      Update how executable images are done on Solaris to match Linux and · 1424559e
      rtoy authored
      Darwin.
      
      lisp/elf.h:
      o Solaris can use linux-x86.sh too.  (Need to rename this someday!)
      
      lisp/elf.c:
      o Use same command line for sparc as for linux.
      
      lisp/lisp.c:
      o Setup up initial_function the same way as on linux.
      
      tools/linker-x86.sh:
      o Add -rdynamic or -Bdynamic as needed.
      o Add support for Solaris using Sun C.
      1424559e
  2. Jul 30, 2010
    • rtoy's avatar
      First cut at executable images on Darwin/x86. The resulting · dc8b7cc2
      rtoy authored
      executable appears to work!
      
      bootfiles/20a/boot-2010-07-1.lisp:
      o Add :executable for darwin/x86.
      
      code/bsd-os.lisp:
      o Make :elf and :mach-o runtime features too.
      o Register :executable of :executable is defined.
      
      lisp/Config.x86_darwin:
      o Need mach-o.c
      o Add exec-final.c
      
      lisp/lisp.c:
      o Don't include elf.h if we're on Darwin since Darwin uses Mach-O, not
        ELF.
      o For Darwin, we get the initial function address from
        initial_function_addr, not from &initial_function_addr, like for
        Linux.
      
      lisp/save.c
      o Don't include libgen.h and elf.h on Darwin.
      
      tools/linker-x86.sh:
      o Update to support Darwin.
      
      tools/make-main-dist.sh:
      o Add support for executables on Darwin.
      
      lisp/mach-o.c:
      o Initial support for writing Mach-O files for the Lisp spaces.
      o Initial support for reading a Mach-O executable to find and map the
        Lisp spaces.
      dc8b7cc2
    • rtoy's avatar
      Some cleanup for Linux executables. The value of the · a5cd2c4f
      rtoy authored
      initial_function_addr is saved to a file and compiled in when linking
      the executable.  This makes building the executable more portable.
      All that's need is a way for gcc to link all of lisp.a and to set the
      starting address of some segments.
      
      lisp/lisp.c:
      o For Linux, use the value of initial_function_addr instead of the
        address.
      
      tools/linker-x86.sh:
      o Disable -x option, unless CMU_DEBUG_LINKER is not empty.
      o Instead of using --defsym feature of GNU ld, save the initial
        function address in a file to be compiled when making the
        executable.
      
      lisp/elf.c:
      o Remove printing of the sizeof elf headers
      o Print some info about the object being written and print somewhat
        neatly.
      
      lisp/save.c:
      o Rework printing info of the core objects.  Let write_elf_object do
        it.
      a5cd2c4f
  3. Jul 26, 2010
    • rtoy's avatar
      Make executables work again on Linux. (At least on openSuSE 11.2). · bf794a29
      rtoy authored
      lisp/lisp.c:
      o Apparently tzset can call malloc on openSuSE 11.2.  This messes up
        mapping the dynamic space on executables because the heap appears to
        be allocated at the same place as the dynamic space.  Move tzset to
        the very end, after the Lisp spaces have been mapped.
      
      tools/Linux-cmucl-linker-script:
      o Update the linker script from the default version on openSuSE 11.2.
      bf794a29
  4. Feb 01, 2010
    • rtoy's avatar
      Patch from Stelian Ionescu on cmucl-imp, 2010/02/01: · 911be032
      rtoy authored
          When run on a kernel compiled without COMPAT_BRK CMUCL segfaults,
          so I copied the kludge used by SBCL - check the current
          personality, and if necessary, enable ADDR_NO_RANDOMIZE and
          re-exec itself.
      
      Linux-os.c:
      o Check for personality and rexec if necessary.
      
      os.h:
      o New prototype for os_init needed because it needs argv and envp.
      
      lisp.c:
      Darwin-os.c:
      FreeBSD-os.c:
      NetBSD-os.c:
      OpenBSD-os.c:
      hpux-os.c:
      irix-os.c:
      mach-os.c:
      osf1-os.c:
      solaris-os.c:
      sunos-os.c:
      o Update call to os_init, which needs argv and envp now.
      911be032
  5. Dec 18, 2009
  6. Jul 13, 2009
    • rtoy's avatar
      lisp/lisp.c: · 4de992e8
      rtoy authored
      o Make debug_lisp_search global instead of static.
      
      lisp/elf.c:
      o Use debug_lisp_search to control printing of some debug information
        when searching for the linker script.
      o Update to support executables with Unicode support.  (CMUCL_LIB is a
        wide string, so we need to hack that into a C string.  This needs
        work.)
      4de992e8
  7. Jan 20, 2009
  8. Jan 05, 2009
    • rtoy's avatar
      Fix for handling arithmetic errors with x87. · 9edd3c4b
      rtoy authored
      Use bootstrap-2009-01-1.lisp to bootstrap this change.
      
      code/float-trap.lisp:
      o FLOATING-POINT-MODES for :X87 needs to massage the results into the
        expected format (SSE2 MXCSR order).
      o Update for changed VOP names too.
      
      compiler/x86/float.lisp:
      o Rename the floating-point-modes and set-floating-point-modes VOPS to
        x87-floating-point-modes and set-x87-floating-point-modes.  Change
        the translations accordingly too.
      
      compiler/x86/parms.lisp:
      o The float property bytes have been updated to match the SSE2 MXCSR
        register for both SSE2 and X87 builds because the code assumes SSE2
        format.
      
      lisp/Linux-os.c:
      o Don't OR in the SSE2 modes if we're not running an SSE2 build.
        Doing this can erroneously mask out exceptions because the Lisp code
        didn't set up the sse2 modes.  (This happens if you select the x87
        core on a chip that supports sse2.)
      
      lisp/globals.h:
      o Declare fpu_mode.
      
      lisp/lisp.c:
      o Set fpu_mode to be the mode determined from the core file.  Needed
        in Linux-os.c to process the SSE2 modes correctly with an x87 core
        on a sse2-capable chip.
      9edd3c4b
  9. Dec 22, 2008
  10. Dec 09, 2008
  11. Nov 12, 2008
  12. Mar 18, 2008
    • cshapiro's avatar
      The FreeBSD-os.h header imported headers that its definitions did not · 86957330
      cshapiro authored
      make direct use of.  Remove the includes of these headers and fix-up
      several files that indirectly depended on them.
      
      * FreeBSD-os.c - add stdio.h and unistd.h includes that were
        implicitly depended on.  Remove unused or commented system includes.
      
      * FreeBSD-os.h - remove unused includes.  Include signal.h to directly
        provide the SIGBUS, SIGSEGV, and sub-code definitions.  Redefine
        os_vm_address_t and os_vm_size_t in terms of standard types.  Now
        that the sys/param.h include is gone we no longer need to undefine
        PAGE_SIZE.
      
      * elf.c - add includes that were implicitly depended on.
      
      * lisp.c - remove unused system includes including sys/param.h which
        redefines PAGE_SIZE.
      86957330
    • cshapiro's avatar
      Replace uses of MAXPATHLEN with FILENAME_MAX. FILENAME_MAX is defined · 0d69c949
      cshapiro authored
      by ANSI C and usually expands to the same value as MAXPATHLEN.
      0d69c949
  13. Jul 25, 2007
    • cshapiro's avatar
      Use sa_sigaction signal handlers on Linux. The glibc definition of · 342beebb
      cshapiro authored
      sigset_t is different from the one used in the Linux kernel.  This means
      that we cannot make assignments of sigset_t objects without corrupting
      memory.  To work around this problem we update uc_sigmask differently
      on Linux than on other systems.  Also, remove x87 control word updates
      since the x87 is setup correctly inside call_into_lisp.
      342beebb
  14. Jul 24, 2007
    • rtoy's avatar
      Add initial support executables on Solaris with gcc. Executables are · 9072cd2c
      rtoy authored
      created and will run, but you can't load new files.  Still needs work.
      
      src/exec-init.c:
      o New file that defines builtin_image_flag and initial_function_addr,
        instead of being defined in lisp.c
      
      code/sunos-os.lisp:
      o Register the :executable feature if needed.
      
      lisp/GNUmakefile:
      o Add exec-init.c to list of src files.
      o Remove exec-init.o from lisp.a when building on Solaris.
      
      lisp/elf.c:
      o Port the elf code to Solaris.
        - Basically set up the correct values for the elf header and
          sections.
        - The ELF core sections on Solaris don't have valid addresses so we
          explicitly set them when mapping the core sections.
      
      lisp/elf.h
      o Use SOLARIS instead of sparc.
      
      lisp/lisp.c:
      o builtin_image_flag and initial_function_addr moved to exec-init.c.
      
      tools/linker.sh:
      o Support Solaris
      
      tools/make-main-dist.sh:
      o Support Solaris
      
      tools/SunOS-cmucl-linker-script:
      o New file for SunOS executable.
      9072cd2c
  15. Jul 23, 2007
  16. Jul 21, 2007
  17. Jul 09, 2007
  18. Jul 08, 2007
  19. Jul 07, 2007
  20. Jul 06, 2007
  21. May 30, 2007
    • rtoy's avatar
      This checkin adds some debugging code for the x86 heap corruption · f22fe508
      rtoy authored
      issue and also works around the heap corruption.  These are enabled if
      DEBUG_BAD_HEAP is #defined.
      
      gencgc.c:
      o Make print_ptr and verify_gc non-static so they can be used
        elsewhere.
      
      lisp.c:
      o Call verify_gc at startup (if enabled) so we can see the heap
        corruption.
      
      save.c:
      o Add debugging prints and stuff to see what's going on, if enabled.
      o The workaround is to skip over the call to
        update_dynamic_space_free_pointer in save().  See the comments there
        for more info.
      f22fe508
  22. Sep 15, 2005
  23. Sep 06, 2005
  24. Apr 15, 2005
    • rtoy's avatar
      lisp/lisp.c: · 1cceeb7e
      rtoy authored
      o Add function for ppc to compute the number of CPU cycles per
        timebase ticks.  Save this in a global variable.
      
      code/time.lisp:
      o Adjust cycle-count/float for ppc to use the cycles-per-tick to
        compute the actual number of CPU cycles, so we can display cycles
        instead of ticks.
      1cceeb7e
  25. Feb 04, 2005
  26. Jan 13, 2005
  27. Aug 17, 2004
  28. Jul 30, 2004
  29. Jul 08, 2004
    • rtoy's avatar
      Fix more compiler warnings: · a09fed84
      rtoy authored
      * alloc.c, coreparse.c, monitor.c, validate.c, vars.c:  #include some
        files to get declarations of functions.
      
      * coreparse.c, lisp.c, monitor.c: Fix printf warnings about args not
        matching the format string.
      a09fed84
  30. Jul 07, 2004
  31. May 20, 2004
  32. May 19, 2004
  33. Oct 13, 2003
  34. Sep 04, 2003
  35. Aug 21, 2003
  36. Aug 18, 2003
Loading