Date: Wednesday, December 22, 2010 @ 22:20:27 Author: rtoy Path: /project/cmucl/cvsroot/src/lisp
Modified: Config.x86_netbsd elf.c lisp.c
Add support for NetBSD for the new executable image implementation.
lisp/Config_x86_netbsd: o Define EXEC_FINAL_OBJ, like other x86 ports.
lisp/elf.c: o Use the new linker.sh command script to link the executable.
lisp/lisp.c: o Use new method of getting the initial_function.
-------------------+ Config.x86_netbsd | 2 ++ elf.c | 4 ++-- lisp.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-)
Index: src/lisp/Config.x86_netbsd diff -u src/lisp/Config.x86_netbsd:1.1 src/lisp/Config.x86_netbsd:1.2 --- src/lisp/Config.x86_netbsd:1.1 Thu Sep 17 12:59:53 2009 +++ src/lisp/Config.x86_netbsd Wed Dec 22 22:20:27 2010 @@ -5,3 +5,5 @@ OS_SRC += NetBSD-os.c elf.c OS_LINK_FLAGS = -dynamic -export-dynamic OS_LIBS = + +EXEC_FINAL_OBJ = exec-final.o Index: src/lisp/elf.c diff -u src/lisp/elf.c:1.31 src/lisp/elf.c:1.32 --- src/lisp/elf.c:1.31 Wed Dec 22 15:16:29 2010 +++ src/lisp/elf.c Wed Dec 22 22:20:27 2010 @@ -8,7 +8,7 @@
Above changes put into main CVS branch. 05-Jul-2007.
- $Id: elf.c,v 1.31 2010-12-22 20:16:29 rtoy Exp $ + $Id: elf.c,v 1.32 2010-12-23 03:20:27 rtoy Exp $ */
#include <stdio.h> @@ -361,7 +361,7 @@ free(paths); printf("\t[%s: linking %s... \n", command, file); fflush(stdout); -#if defined(__linux__) || defined(__FreeBSD__) || defined(SOLARIS) +#if defined(__linux__) || defined(__FreeBSD__) || defined(SOLARIS) || defined(__NetBSD__) sprintf(command_line, "%s %s 0x%lx '%s' 0x%lx 0x%lx 0x%lx", command, C_COMPILER, init_func_address, file, (unsigned long) READ_ONLY_SPACE_START, Index: src/lisp/lisp.c diff -u src/lisp/lisp.c:1.79 src/lisp/lisp.c:1.80 --- src/lisp/lisp.c:1.79 Wed Dec 22 21:14:57 2010 +++ src/lisp/lisp.c Wed Dec 22 22:20:27 2010 @@ -1,7 +1,7 @@ /* * main() entry point for a stand alone lisp image. * - * $Header: /project/cmucl/cvsroot/src/lisp/lisp.c,v 1.79 2010-12-23 02:14:57 rtoy Exp $ + * $Header: /project/cmucl/cvsroot/src/lisp/lisp.c,v 1.80 2010-12-23 03:20:27 rtoy Exp $ * */
@@ -452,7 +452,7 @@ lispobj initial_function = 0;
if (builtin_image_flag != 0) { -#if defined(SOLARIS) || (defined(i386) && (defined(__linux__) || defined(DARWIN) || defined(__FreeBSD__))) +#if defined(SOLARIS) || (defined(i386) && (defined(__linux__) || defined(DARWIN) || defined(__FreeBSD__) || defined(__NetBSD__))) initial_function = (lispobj) initial_function_addr; #else initial_function = (lispobj) & initial_function_addr;