On sparc, undefined_tramp and closure_tramp are foreign data, not
foreign functions for linkage table stuff. (This should probably be changed.) In cold-fdefinition-object and cold-fset, we call lookup-foreign-symbol and stuff away the address of the entry in the linkage-table. I think we really want the contents of the entry since that contains the actual address for these functions. Thus, change lookup-foreign-symbol to take an link-type arg, and for sparc, when the link-type is :data, return the value from the linkage-table entry instead of returning the address of the linkage-table entry. I hope this fixes the occasional problem with undefined functions giving sigbus instead of an undefined-function error when loading kernel.core.
Please register or sign in to comment