Skip to content
  1. Aug 11, 2013
  2. Nov 04, 2011
  3. Dec 23, 2010
  4. Dec 22, 2010
  5. Sep 08, 2010
  6. Aug 02, 2010
  7. Jul 31, 2010
    • rtoy's avatar
      For Linux and Darwin, we don't actually need to set the starting · 17a01e38
      rtoy authored
      address of the core sections.  In map_core_sections, we can map them
      to the correct addresses, just like we do on Solaris.
      
      lisp/elf.c:
      o Mmap the Lisp core sections with the correct address, not using the
        one in the executable itself, just like on Solaris.
      
      lisp/mach-o.c:
      o Add the array of addresses of the dynamic, static, and read-only
        spaces.
      o Mmap the Lisp core sections with the correct address, not using the
        one in the executable itself, just like on Solaris.
      o Small update to print out the names of the spaces, just like for elf
        files.
      
      tools/linker-x86.sh:
      o Don't need to tell the linker the starting addresses of the sections
        anymore for Linux and Darwin.  map_core_sections handles that.
      17a01e38
    • 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
    • rtoy's avatar
      Some cleanup of the names of main functions for creating executable · 35bcce9b
      rtoy authored
      images.
      
      lisp/elf.c:
      o Change write_elf_object, elf_cleanup, and elf_run_linker to
        write_space_object, obj_cleanup, and obj_run_linker.
      
      lisp/elf.h:
      o Update so that this can used for both elf and mach-o.  Not great,
        but I don't want to rename this file.
      
      lisp/mach-o.c:
      o Include elf.h
      o Remove items that are defined in elf.h.
      o Change function names from elf to mach_o.
      
      lisp/save.c:
      o Update names to new ones.
      35bcce9b
  8. Jul 30, 2010
    • 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
  9. Jul 29, 2010
    • rtoy's avatar
      Change how we build executables for Linux. We no longer need the · 3a882467
      rtoy authored
      hairy and fragile linker script.  Instead, we can use regular old gcc
      to do what we need.
      
      (Should also work for FreeBSD, but not yet implemented.)
      
      lisp/elf.c:
      o Include validate.h so we can get the starting addresses of the
        read-only, static, and dynamic spaces.
      o Add special case for linux to run the linker script correctly.
      
      lisp/elf.h:
      o There's a separate linker script for Linux.
      
      lisp/save.c:
      o Temporarily don't run elf_cleanup so we can have easier
        testing/debugging.
      
      tools/linker.sh:
      o Don't need BIFLAG anymore.
      
      tools/make-main-dist.sh:
      o Install linker-x86.sh.
      3a882467
  10. Jul 27, 2010
    • rtoy's avatar
      lisp/elf.c: · 05987e91
      rtoy authored
      o Print out the size of Elf_Ehdr and Elf32_Phdr, for debugging.
      o Pass the address of main to the linker script.  We will use the
        first word of main as the address of builtin_image_flag.  It seems
        highly unlikely that this would have have the value 0.
      
      tools/Linux-cmucl-linker-script:
      o Hardwire the value of SIZEOF_HEADERS.  This is needed on Debian to
        get the right number of segments.
      o Comment out some items and/or fix them so that Debian's linker
        doesn't complain.  Doesn't appear to do any harm on openSuSE 11.2.
      
      tools/linker.sh:
      o Update for the additional argument for the address of main to use as
        the address of builtin_image_flag.
      05987e91
  11. 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
  12. Jan 20, 2009
  13. 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
  14. Dec 14, 2007
  15. Aug 14, 2007
    • rtoy's avatar
      Add support for executable stuff using Sun C on sparc. The executable · aa09793a
      rtoy authored
      appears to be created successfully, and you can do things, but it is
      not usable.
      
      lisp/elf.h:
      o Set C_COMPILER to either "cc" or "gcc".  We use gcc everywhere,
        except if the C compiler is Sun C on sparc.
      
      lisp/elf.c:
      o Print out C_COMPILER as the first arg to the linker script.
      
      tools/linker.sh:
      o Rearrange code so test for number of args is done first.
      o Look at the first arg to determine the C compiler used.  If gcc, use
        the original code.  Add new code to support Sun C.
      aa09793a
  16. Jul 25, 2007
  17. 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
  18. Jul 20, 2007
  19. Jul 19, 2007
  20. Jul 09, 2007
  21. Jul 07, 2007
  22. Sep 15, 2005
  23. Jul 07, 2004
  24. Oct 13, 2003
  25. Sep 18, 2003
  26. Aug 21, 2003