.so.dll export list? Windows program unable to find shim entry point...

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Post Reply
JamesB7
Newbie
Newbie
Posts: 1
Joined: Tue Jan 21, 2025 12:22 pm

.so.dll export list? Windows program unable to find shim entry point...

Post by JamesB7 »

Hello,

When using wineg++ with a .cpp file and a .spec file for a shim, it creates a so .dll. If I use nm on the resulting DLL, I find entries __wine_spec_relay_entry_point_* for each of my ordinals. nm -D also shows T (export) for the shim name and U (import) for the underlying name. However, actual DLL import from a program I am trying to shim does not find the functions. How can I diagnose the problem here? Thanks!

Here's the debug output:

06b4:trace:module:build_module loaded L"\\??\\Z:\\usr\\local\\(...path to it...)\\(...library name...).dll" 00344590 7F740000
06b4:trace:module:load_dll Loaded module L"\\??\\Z:\\usr\\local\\(...path to it...)\\(...library name...).dll" at 7F740000
06b4:trace:module:process_attach (L"(...library name...).dll",00000000) - START
06b4:trace:module:MODULE_InitDLL (7F740000 L"(...library name...).dll",PROCESS_ATTACH,00000000) - CALL
06b4:trace:module:MODULE_InitDLL (7F740000,PROCESS_ATTACH,00000000) - RETURN 1
06b4:trace:module:process_attach (L"(...library name...).dll",00000000) - END
06b4:warn:module:LdrGetProcedureAddress "network_init_library" (ordinal 0) not found in L"Z:\\usr\\local\\(...path to it...)\\(...library name...).dll"
06b4:trace:module:FindResourceExW 73420000 #0006 #0279 0000
06b4:trace:module:LoadResource 73420000 73532FE8
06b4:trace:module:LdrUnloadDll (7F740000)
06b4:trace:module:LdrUnloadDll (L"(...library name...).dll") - START
06b4:trace:module:MODULE_DecRefCount (L"(...library name...).dll") ldr.LoadCount: 0

So you can see it is loading the .so.dll. Here's the output of nm for the .so.dll:

00015394 b completed.0
w __cxa_finalize@GLIBC_2.1.3
00012180 t deregister_tm_clones
U dladdr1@GLIBC_2.34
0001251c T DllMain
00012210 t __do_global_dtors_aux
00014ee8 d __do_global_dtors_aux_fini_array_entry
00015048 d __dso_handle
00014eec d _DYNAMIC
00015398 B _end
00012a70 t _fini
00012569 T F_network_alloc_server
00012883 T F_network_benchmark_begin
000128be T F_network_benchmark_end
000128f9 T F_network_benchmark_get_cpu
000126de T F_network_break
00012845 T F_network_channel_stats
000125a3 T F_network_free
000127cc T F_network_kick
0001254c T F_network_library_init
00012792 T F_network_outbuffer
000126a1 T F_network_run
0001274c T F_network_send
000125da T F_network_setup_callbacks
00012624 T F_network_setup_listener
00012715 T F_network_shutdown
0001266b T F_network_start
00012807 T F_network_stats
00012260 t frame_dummy
00014ee4 d __frame_dummy_init_array_entry
000135a8 r __FRAME_END__
00014ff4 d _GLOBAL_OFFSET_TABLE_
w __gmon_start__
00013050 r __GNU_EH_FRAME_HDR
00001000 t _init
w _ITM_deregisterTMCloneTable
w _ITM_registerTMCloneTable
U network_alloc_server
U network_benchmark_begin
U network_benchmark_end
U network_benchmark_get_cpu
U network_break
U network_channel_stats
U network_free
U network_kick
U network_library_init
U network_outbuffer
U network_run
U network_send
U network_setup_callbacks
U network_setup_listener
U network_shutdown
U network_start
U network_stats
000121c0 t register_tm_clones
00015394 d __TMC_END__
000129a0 t __wine_init_so_dll
00012940 t __wine_spec_dll_entry
00012518 t __wine_spec_get_pc_thunk_eax
0001504c D __wine_spec_nt_header
00001020 t __wine_spec_pe_header
0001227c t __wine_spec_relay_entry_point_1
000123e0 t __wine_spec_relay_entry_point_10
00012408 t __wine_spec_relay_entry_point_11
00012430 t __wine_spec_relay_entry_point_12
00012458 t __wine_spec_relay_entry_point_13
00012480 t __wine_spec_relay_entry_point_14
000124a8 t __wine_spec_relay_entry_point_15
000124d0 t __wine_spec_relay_entry_point_16
000124f8 t __wine_spec_relay_entry_point_17
000122a4 t __wine_spec_relay_entry_point_2
000122cc t __wine_spec_relay_entry_point_3
000122f4 t __wine_spec_relay_entry_point_4
00012318 t __wine_spec_relay_entry_point_5
00012340 t __wine_spec_relay_entry_point_6
00012368 t __wine_spec_relay_entry_point_7
00012390 t __wine_spec_relay_entry_point_8
000123b8 t __wine_spec_relay_entry_point_9
00012270 t __wine_spec_relay_entry_points
00012933 t __x86.get_pc_thunk.ax
00012170 t __x86.get_pc_thunk.bx
00012269 t __x86.get_pc_thunk.dx

Here's the output of nm -D:

w __cxa_finalize@GLIBC_2.1.3
U dladdr1@GLIBC_2.34
0001251c T DllMain
00015398 B _end
00012569 T F_network_alloc_server
00012883 T F_network_benchmark_begin
000128be T F_network_benchmark_end
000128f9 T F_network_benchmark_get_cpu
000126de T F_network_break
00012845 T F_network_channel_stats
000125a3 T F_network_free
000127cc T F_network_kick
0001254c T F_network_library_init
00012792 T F_network_outbuffer
000126a1 T F_network_run
0001274c T F_network_send
000125da T F_network_setup_callbacks
00012624 T F_network_setup_listener
00012715 T F_network_shutdown
0001266b T F_network_start
00012807 T F_network_stats
w __gmon_start__
w _ITM_deregisterTMCloneTable
w _ITM_registerTMCloneTable
U network_alloc_server
U network_benchmark_begin
U network_benchmark_end
U network_benchmark_get_cpu
U network_break
U network_channel_stats
U network_free
U network_kick
U network_library_init
U network_outbuffer
U network_run
U network_send
U network_setup_callbacks
U network_setup_listener
U network_shutdown
U network_start
U network_stats
0001504c D __wine_spec_nt_header

Here is the .spec file:

@ stdcall network_library_init () F_network_library_init
@ stdcall network_alloc_server (long long) F_network_alloc_server
@ stdcall network_free (ptr) F_network_free
@ stdcall network_setup_callbacks (ptr ptr ptr ptr ptr ptr ptr) F_network_setup_callbacks
@ stdcall network_setup_listener (ptr long ptr long long long) F_network_setup_listener
@ stdcall network_start (ptr) F_network_start
@ stdcall network_run (ptr long long) F_network_run
@ stdcall network_break (ptr) F_network_break
@ stdcall network_shutdown (ptr) F_network_shutdown
@ stdcall network_send (ptr long long ptr long long) F_network_send
@ stdcall network_outbuffer (ptr long) F_network_outbuffer
@ stdcall network_kick (ptr long) F_network_kick
@ stdcall network_stats (ptr long ptr) F_network_stats
@ stdcall network_channel_stats (ptr long ptr) F_network_channel_stats
@ stdcall network_benchmark_begin (ptr long) F_network_benchmark_begin
@ stdcall network_benchmark_end (ptr long) F_network_benchmark_end
@ stdcall network_benchmark_get_cpu (ptr long) F_network_benchmark_get_cpu

The F_network_library_init C function just calls the underlying Linux library's network_library_init. This spec file gives it the same name.

It seems quite straightforward, so I'm at a loss why it can't find it. Is there anything that can dump Wine-specific headers that would tell me why it can't find it, for example? Thanks!
Post Reply