Skip to content
Snippets Groups Projects
Commit 57711cc2 authored by Raymond Toy's avatar Raymond Toy
Browse files

First cut at removing ppc-darwin-dlshim.c. Not needed anymore because

dlsym works on OSX/ppc like on other ports.

A cross-compile was used with cross-ppc-ppc-darwin.lisp.  I'm not sure
a cross-compile is required, though.

 * code/ppc-vm.lisp:
   * EXTERN-ALIEN-NAME doesn't need to prepend an underscore anymore. 
 * lisp/Config.ppc_darwin:
   * Don't compile/link ppc-darwin-dlshim.c.
 * lisp/os-common.c:
   * Don't prepend underscore for call_into_lisp.
 * tools/cross-scripts/cross-ppc-ppc-darwin.lisp:
   * EXTERN-ALIEN-NAME doesn't need to prepend an underscore anymore.
parent 2c1badef
No related branches found
No related tags found
No related merge requests found
......@@ -297,10 +297,7 @@
;;;
(defun extern-alien-name (name)
(declare (type simple-base-string name))
#+darwin
(concatenate 'string "_" name)
#-darwin
(concatenate 'string "" name))
name)
#-linkage-table
(defun lisp::foreign-symbol-address-aux (name flavor)
......
......@@ -40,7 +40,8 @@ ASFLAGS = $(OSX_VERSION) -traditional -g -O3 -DDARWIN -Dppc $(LINKAGE) $(GENCGC)
UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
ASSEM_SRC = ppc-assem.S linux-stubs.S
ARCH_SRC = ppc-arch.c
OS_SRC = ppc-darwin-dlshim.c os-common.c Darwin-os.c
#OS_SRC = ppc-darwin-dlshim.c os-common.c Darwin-os.c
OS_SRC = os-common.c Darwin-os.c
ifdef FEATURE_EXECUTABLE
......
......@@ -543,12 +543,21 @@ os_dlsym(const char *sym_name, lispobj lib_list)
struct cons *lib_cons = CONS(CONS(lib_list_head)->car);
struct sap *dlhandle = (struct sap *) PTR(lib_cons->car);
#if 0 && defined(__ppc__)
sym_addr = dlsym((void *) dlhandle->pointer, (sym_name[0] == '_' ? sym_name + 1 : sym_name));
#else
sym_addr = dlsym((void *) dlhandle->pointer, sym_name);
#endif
if (sym_addr)
return sym_addr;
}
}
#if 0 && defined(__ppc__)
sym_addr = dlsym(program_handle, (sym_name[0] == '_' ? sym_name + 1 : sym_name));
#else
sym_addr = dlsym(program_handle, sym_name);
#endif
return sym_addr;
}
......
......@@ -219,7 +219,7 @@ os_foreign_linkage_init(void)
}
arch_make_linkage_entry(i, (void*) call_into_c, 1);
#elif (defined(DARWIN) && defined(__ppc__))
if (type != 1 || strcmp(c_symbol_name, "_call_into_c")) {
if (type != 1 || strcmp(c_symbol_name, "call_into_c")) {
fprintf(stderr, "linkage_data is %s but expected call_into_c\n",
(char *) c_symbol_name);
lose("First element of linkage_data is bogus.\n");
......@@ -241,7 +241,7 @@ os_foreign_linkage_init(void)
void *target_addr = os_dlsym(c_symbol_name, NIL);
if (!target_addr) {
#if 0
#if 1
int k;
unsigned short int* wide_string;
......
......@@ -31,7 +31,7 @@
(in-package :vm)
(defun extern-alien-name (name)
(declare (type simple-string name))
(concatenate 'string "_" name))
name)
;; When compiling the compiler, vm:fixup-code-object and
;; vm:sanctify-for-execution are undefined. Import these to get rid
;; of that error.
......@@ -199,7 +199,7 @@
(in-package :vm)
(defun extern-alien-name (name)
(declare (type simple-string name))
(concatenate 'string "_" name))
name)
(export 'extern-alien-name)
(export 'fixup-code-object)
(export 'sanctify-for-execution)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment