]> git.ipfire.org Git - thirdparty/libtool.git/commit
libtool: add @INIT@ to the preloader, for data imports on Windows
authorPeter Rosin <peda@lysator.liu.se>
Fri, 2 Nov 2012 22:50:43 +0000 (23:50 +0100)
committerPeter Rosin <peda@lysator.liu.se>
Fri, 2 Nov 2012 22:50:43 +0000 (23:50 +0100)
commit34fe402efa1e969cf902cf7370e29564c005d508
treeb68d63d35641b1b15d7597d65a40e395d37f80e9
parent2ed79f5937f28958b4fdf0b3aeed7330d675d2a1
libtool: add @INIT@ to the preloader, for data imports on Windows

* m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS) [dumpbin]: Adjust
lt_cv_sys_global_symbol_to_cdecl so that it declares imported
data symbols as __declspec(dllimport). Adjust
lt_cv_sys_global_symbol_to_c_name_address and
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix so that they
fill in "(void*) 0" for imported data symbols. Add new
lt_cv_sys_global_symbol_to_import which finds imported data
symbols if non-empty and export this variable to the libtool script
in the global_symbol_to_import variable. Adjust
lt_cv_sys_global_symbol_pipe so that data imports can be located.
* build-aux/ltmain.in (func_generate_dlsyms): When data imports
are present, as indicated by global_symbol_to_import, generate
a relocation function lt_syminit that fills in the addresses
of data imports at runtime and point to the new function with a
new virtual @INIT@ entry in the symbol list.
* libltdl/loaders/preopen.c (add_symlist): Look for the virtual
@INIT@ symbol (i.e. lt_syminit) and call it.
(vm_sym): Step past the @INIT@ symbol, if present.
* tests/demo.at (dlmain.c): Call the @INIT@ symbol, if present.
* NEWS: Update.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
NEWS
build-aux/ltmain.in
libltdl/loaders/preopen.c
m4/libtool.m4
tests/demo.at