Skip to content
Snippets Groups Projects
Commit 6a4fd3c3 authored by rtoy's avatar rtoy
Browse files

Initial support for linkage-tables on PPC/Darwin. This is a

relatively straightforward port of the sparc version of
linkage-tables.  Some refinements are probably still needed, as well
as some testing.

Use boot-2005-02-ppc-linkage.lisp to bootstrap this change from the
2005-02 snapshot.

* code/ppc-vm.lisp
  o Add appropriate FOREIGN-SYMBOL-ADDRESS-AUX and FIND-FOREIGN-SYMBOL
    functions for linkage-table.

* compiler/generic/new-genesis.lisp
  o Basically do the same as the sparc port for linkage-tables.
  o need to extern-alien-name on the cold linkages since they C names
    depend on the backend conventions.

* compiler/ppc/alloc.lisp
  o Load "undefined_tramp" appropriately for linkage-tables.

* compiler/ppc/c-call.lisp
  o Define new vops (FOREIGN-SYMBOL-CODE-ADDRESS,
    FOREIGN-SYMBOL-DATA-ADDRESS) for linkage-tables so we can access
    correctly.

* compiler/ppc/cell.lisp
  o Load "closure_tramp" appropriately for linkage-tables
  o Load "undefined_tramp" appropriately for linkage-tables

* compiler/ppc/parms.lisp
  o Put the foreign linkage space start at the end of the static space
    to make it easier to bootstrap.  (We need already mapped memory.)
    We can move this later.
  o Correct TARGET-FOREIGN-LINKAGE-ENTRY-SIZE.
  o Add new static-symbol *linkage-table-data*
  o While were at it, add SPARE-9 and SPARE-0 static symbols so we
    have 10 spares.

* lisp/Config.ppc_darwin
  o Add -DLINKAGE_TABLE to CFLAGS/ASFLAGS if we have linkage-table
    support.

* lisp/Darwin-os.c
  o Add os_dlsym to support linkage-tables.  (This nees a little
    refactoring because we just copied the #defines for dlopen modes.)

* lisp/os-common.c
  o The checking of the linkage tables that is done for sparc almost
    works for ppc, but not quite.  Implement one for ppc.

* lisp/ppc-arch.c
  o Add PPC version of arch_make_jump_entry, arch_make_linkage_entry,
    arch_linkage_entry.

* lisp/ppc-assem.S
  o Add lazy_resolve_linkage to support linkage-tables.  This needs
    some more work.
  o Add undefined_foreign_symbol_trap.  This probably needs work, and
    definitely needs testing.

* lisp/ppc-validate.h
  o Define the start of the linkage space and size.
parent cdc21869
No related branches found
No related tags found
Loading
Loading
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