From 50de04681195b5958d21289a281a321617f8aee0 Mon Sep 17 00:00:00 2001 From: agoncharov <agoncharov> Date: Mon, 2 Aug 2010 03:58:59 +0000 Subject: [PATCH] Various, small (EXECUTABLE, FreeBSD, no warinings, typo) --- lisp/elf.c | 20 ++++---------------- lisp/lisp.c | 4 ++-- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/lisp/elf.c b/lisp/elf.c index d742a479a..862e496a5 100644 --- a/lisp/elf.c +++ b/lisp/elf.c @@ -8,7 +8,7 @@ Above changes put into main CVS branch. 05-Jul-2007. - $Id: elf.c,v 1.25 2010/07/31 02:45:45 rtoy Exp $ + $Id: elf.c,v 1.26 2010/08/02 03:58:59 agoncharov Exp $ */ #include <stdio.h> @@ -37,7 +37,6 @@ static Elf_Shdr sh; static char *section_names[] = {"CORDYN", "CORSTA", "CORRO"}; -#if defined(SOLARIS) || defined(__linux__) /* * Starting address of the three ELF sections/spaces. These must be * in the same order as section_names above! @@ -47,11 +46,10 @@ static char *section_names[] = {"CORDYN", "CORSTA", "CORRO"}; */ static os_vm_address_t section_addr[] = { - DYNAMIC_0_SPACE_START, - STATIC_SPACE_START, - READ_ONLY_SPACE_START + (os_vm_address_t) DYNAMIC_0_SPACE_START, + (os_vm_address_t) STATIC_SPACE_START, + (os_vm_address_t) READ_ONLY_SPACE_START }; -#endif /* Note: write errors are not fatal. */ static int @@ -482,17 +480,7 @@ map_core_sections(const char *exec_name) if (!strncmp(nambuf, section_names[j], 6)) { os_vm_address_t addr; -#if defined(SOLARIS) || defined(__linux__) - /* - * On Solaris, the section header sets the addr - * field to 0 because the linker script says the - * sections are NOTE sections. Hence, we need to - * look up the section addresses ourselves. - */ addr = section_addr[j]; -#else - addr = (os_vm_address_t) sh.sh_addr; -#endif /* Found a core section. Map it! */ if ((os_vm_address_t) os_map(exec_fd, sh.sh_offset, addr, sh.sh_size) diff --git a/lisp/lisp.c b/lisp/lisp.c index c17afe596..e9adc4a0d 100644 --- a/lisp/lisp.c +++ b/lisp/lisp.c @@ -1,7 +1,7 @@ /* * main() entry point for a stand alone lisp image. * - * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.76 2010/08/01 14:47:14 rtoy Exp $ + * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.77 2010/08/02 03:58:59 agoncharov Exp $ * */ @@ -375,7 +375,7 @@ prepend_core_path(const char *lib, const char *corefile) } /* - * The value of the variable builtin_image_flag indicate whther the + * The value of the variable builtin_image_flag indicate whether the * executable contains the lisp image or not. The variable * initial_function_addr indicates the address of the initial * function. How these are interpreted depends on the system. -- GitLab