mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-12 12:21:15 -08:00
cmpname: don't randomize init function names for libraries
Both shared and static libraries might be linked from C code and names of the initialization functions has to be known without parsing the file. Related to #177 and #74. FWIW it doesn't introduce regression on ADSF bundles (#74) and solves initialization problem (#177). Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
This commit is contained in:
parent
03045d98ae
commit
55bbfcfaeb
2 changed files with 10 additions and 10 deletions
|
|
@ -80,6 +80,11 @@
|
|||
|
||||
- Building with object files not created by ECL works (CFFI wrappers)
|
||||
|
||||
- Regression regarding initialization of build by ECL libraries from
|
||||
external code fixed. Static and shared libraries initialization
|
||||
funcitons has predetermined name while object files has randomized
|
||||
names.
|
||||
|
||||
* 16.0.0 changes since 15.3.7
|
||||
** API changes
|
||||
|
||||
|
|
|
|||
|
|
@ -116,6 +116,9 @@ the function name it precedes."
|
|||
name))
|
||||
|
||||
(defun compute-init-name (pathname &key (kind (guess-kind pathname)) (prefix nil))
|
||||
"Computes initialization function name. Libraries, FASLS and
|
||||
programs init function names can't be randomized to allow
|
||||
initialization from the C code which wants to use it."
|
||||
(let ((filename (pathname-name (translate-logical-pathname pathname)))
|
||||
(unique-name (unique-init-name pathname)))
|
||||
(case kind
|
||||
|
|
@ -124,19 +127,11 @@ the function name it precedes."
|
|||
((:fasl :fas)
|
||||
(init-function-name "CODE" :kind :fas :prefix prefix))
|
||||
((:static-library :lib)
|
||||
(init-function-name (if (string-equal "LSP"
|
||||
(remove-prefix
|
||||
+static-library-prefix+ filename))
|
||||
(remove-prefix +static-library-prefix+ filename)
|
||||
unique-name)
|
||||
(init-function-name (remove-prefix +static-library-prefix+ filename)
|
||||
:kind :lib
|
||||
:prefix prefix))
|
||||
((:shared-library :dll)
|
||||
(init-function-name (if (string-equal "LSP"
|
||||
(remove-prefix
|
||||
+shared-library-prefix+ filename))
|
||||
(remove-prefix +shared-library-prefix+ filename)
|
||||
unique-name)
|
||||
(init-function-name (remove-prefix +shared-library-prefix+ filename)
|
||||
:kind :dll
|
||||
:prefix prefix))
|
||||
((:program)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue