[Bug 39792] Saturn PCB Design Toolkit 6.86 fails to load, reporting missing 'SHCore.dll' dependency (import descriptors with empty thunk list must be ignored)

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Dec 13 16:13:36 CST 2015


https://bugs.winehq.org/show_bug.cgi?id=39792

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |download
             Status|UNCONFIRMED                 |NEW
                 CC|                            |focht at gmx.net
          Component|-unknown                    |ntdll
            Summary|Saturn PCB Design Toolkit   |Saturn PCB Design Toolkit
                   |sometimes needs SHCore.dll  |6.86 fails to load,
                   |                            |reporting missing
                   |                            |'SHCore.dll' dependency
                   |                            |(import descriptors with
                   |                            |empty thunk list must be
                   |                            |ignored)
     Ever confirmed|0                           |1

--- Comment #1 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

confirming.

It seems the Delphi compiler the app was built with has a strange habit to emit
import descriptors with empty thunk list for API that ought to be delay loaded
at runtime.

Wine's loader needs to ignore these import descriptors, not trying to load the
dll.

--- snip ---
$ WINEDEBUG=+tid,+seh,+relay,+module,+imports wine ./PCB\ Toolkit\ V6.86.exe
>>log.txt 2>&1
...
0033:trace:module:load_dll looking for L"Z:\\home\\focht\\Downloads\\PCB
Toolkit V6.86.exe" in
L".;C:\\windows\\system32;C:\\windows\\system;C:\\windows;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem"
0033:trace:module:get_load_order looking for L"Z:\\home\\focht\\Downloads\\PCB
Toolkit V6.86.exe"
0033:trace:module:get_load_order got main exe default n,b for
L"Z:\\home\\focht\\Downloads\\PCB Toolkit V6.86.exe"
0033:trace:module:load_native_dll Trying native dll
L"Z:\\home\\focht\\Downloads\\PCB Toolkit V6.86.exe"
0033:trace:module:map_image mapped PE file at 0x400000-0xa2d000
0033:trace:module:map_image mapping section .text at 0x401000 off 600 size
37ba00 virt 37c000 flags 60000020
0033:trace:module:map_image clearing 0x77ca00 - 0x77d000
0033:trace:module:map_image mapping section .data at 0x77d000 off 37c000 size
2ec00 virt 4e000 flags c0000040
0033:trace:module:map_image clearing 0x7abc00 - 0x7ac000
0033:trace:module:map_image mapping section .tls at 0x7cb000 off 3aac00 size
200 virt 1000 flags c0000040
0033:trace:module:map_image clearing 0x7cb200 - 0x7cc000
0033:trace:module:map_image mapping section .rdata at 0x7cc000 off 3aae00 size
200 virt 1000 flags 50000040
0033:trace:module:map_image clearing 0x7cc200 - 0x7cd000
0033:trace:module:map_image mapping section .idata at 0x7cd000 off 3ab000 size
3a00 virt 4000 flags 40000040
0033:trace:module:map_image clearing 0x7d0a00 - 0x7d1000
0033:trace:module:map_image mapping section .didata at 0x7d1000 off 3aea00 size
a00 virt 1000 flags c0000040
0033:trace:module:map_image clearing 0x7d1a00 - 0x7d2000
0033:trace:module:map_image mapping section .edata at 0x7d2000 off 3af400 size
400 virt 1000 flags 40000040
0033:trace:module:map_image clearing 0x7d2400 - 0x7d3000
0033:trace:module:map_image mapping section .rsrc at 0x7d3000 off 3af800 size
210600 virt 211000 flags 40000040
0033:trace:module:map_image clearing 0x9e3600 - 0x9e4000
0033:trace:module:map_image mapping section .reloc at 0x9e4000 off 5bfe00 size
48e00 virt 49000 flags 50000040
0033:trace:module:map_image clearing 0xa2ce00 - 0xa2d000
0033:warn:module:alloc_module disabling no-exec because of L"PCB Toolkit
V6.86.exe"
0033:trace:module:load_dll Loaded module L"Z:\\home\\focht\\Downloads\\PCB
Toolkit V6.86.exe" (native) at 0x400000
0033:trace:module:alloc_tls_slot module 0x400000 data 0x7cb000-0x7cb0f0
zerofill 0 index 0x77d11c callback 0x7cc010 flags 0 -> slot 0
0033:trace:module:alloc_tls_slot thread 0033 tls block (nil) -> 0x115c40
0033:trace:module:alloc_tls_slot thread 0033 slot 0: 240/0 bytes at 0x1171c0
0033:trace:module:load_dll looking for L"ADVAPI32.DLL" in
L"Z:\\home\\focht\\Downloads;.;C:\\windows\\system32;C:\\windows\\system;C:\\windows;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem"
0033:trace:module:get_load_order looking for
L"C:\\windows\\system32\\ADVAPI32.DLL"
0033:trace:module:get_load_order got hardcoded default for L"ADVAPI32.DLL"
0033:trace:module:load_dll L"C:\\windows\\system32\\ADVAPI32.DLL" is a fake
Wine dll
0033:trace:module:load_builtin_dll Trying built-in L"ADVAPI32.DLL"
0033:trace:module:load_dll looking for L"kernel32.dll" in
L"Z:\\home\\focht\\Downloads;.;C:\\windows\\system32;C:\\windows\\system;C:\\windows;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem"
0033:trace:module:load_dll Found L"C:\\windows\\system32\\KERNEL32.dll" for
L"kernel32.dll" at 0x7b820000, count=2 
...
0033:trace:module:load_dll looking for L"SHCORE.DLL" in
L"Z:\\home\\focht\\Downloads;.;C:\\windows\\system32;C:\\windows\\system;C:\\windows;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem"
0033:trace:module:get_load_order looking for L"SHCORE.DLL"
0033:trace:module:get_load_order got hardcoded default for L"SHCORE.DLL"
0033:trace:module:load_builtin_dll Trying built-in L"SHCORE.DLL"
0033:warn:module:load_builtin_dll cannot open .so lib for builtin
L"SHCORE.DLL":
/home/focht/projects/wine/wine.repo/install/bin/../lib/wine/shcore.dll.so:
cannot open shared object file: No such file or directory
0033:warn:module:load_dll Failed to load module L"SHCORE.DLL"; status=c0000135
0033:err:module:import_dll Library SHCORE.DLL (which is needed by
L"Z:\\home\\focht\\Downloads\\PCB Toolkit V6.86.exe") not found
0033:err:module:LdrInitializeThunk Main exe initialization for
L"Z:\\home\\focht\\Downloads\\PCB Toolkit V6.86.exe" failed, status c0000135
... 
--- snip ---

Dump of PE section header table:

--- snip ---
   1. item:
    Name:                  .text
    VirtualSize:           0x0037C000
    VirtualAddress:        0x00001000
    SizeOfRawData:         0x0037BA00
    PointerToRawData:      0x00000600
    PointerToRelocations:  0x00000000
    PointerToLinenumbers:  0x00000000
    NumberOfRelocations:   0x0000
    NumberOfLinenumbers:   0x0000
    Characteristics:       0x60000020
    (CODE, EXECUTE, READ)

   2. item:
    Name:                  .data
    VirtualSize:           0x0004E000
    VirtualAddress:        0x0037D000
    SizeOfRawData:         0x0002EC00
    PointerToRawData:      0x0037C000
    PointerToRelocations:  0x00000000
    PointerToLinenumbers:  0x00000000
    NumberOfRelocations:   0x0000
    NumberOfLinenumbers:   0x0000
    Characteristics:       0xC0000040
    (INITIALIZED_DATA, READ, WRITE)

   3. item:
    Name:                  .tls
    VirtualSize:           0x00001000
    VirtualAddress:        0x003CB000
    SizeOfRawData:         0x00000200
    PointerToRawData:      0x003AAC00
    PointerToRelocations:  0x00000000
    PointerToLinenumbers:  0x00000000
    NumberOfRelocations:   0x0000
    NumberOfLinenumbers:   0x0000
    Characteristics:       0xC0000040
    (INITIALIZED_DATA, READ, WRITE)

   4. item:
    Name:                  .rdata
    VirtualSize:           0x00001000
    VirtualAddress:        0x003CC000
    SizeOfRawData:         0x00000200
    PointerToRawData:      0x003AAE00
    PointerToRelocations:  0x00000000
    PointerToLinenumbers:  0x00000000
    NumberOfRelocations:   0x0000
    NumberOfLinenumbers:   0x0000
    Characteristics:       0x50000040
    (INITIALIZED_DATA, SHARED, READ)

   5. item:
    Name:                  .idata
    VirtualSize:           0x00004000
    VirtualAddress:        0x003CD000
    SizeOfRawData:         0x00003A00
    PointerToRawData:      0x003AB000
    PointerToRelocations:  0x00000000
    PointerToLinenumbers:  0x00000000
    NumberOfRelocations:   0x0000
    NumberOfLinenumbers:   0x0000
    Characteristics:       0x40000040
    (INITIALIZED_DATA, READ)

   6. item:
    Name:                  .didata
    VirtualSize:           0x00001000
    VirtualAddress:        0x003D1000
    SizeOfRawData:         0x00000A00
    PointerToRawData:      0x003AEA00
    PointerToRelocations:  0x00000000
    PointerToLinenumbers:  0x00000000
    NumberOfRelocations:   0x0000
    NumberOfLinenumbers:   0x0000
    Characteristics:       0xC0000040
    (INITIALIZED_DATA, READ, WRITE)

...
--- snip ---

'.idata' = regular imports
'.didata' = delayed imports

Partial dump of PE import descriptor table:

--- snip ---
->Import Table
   1. ImageImportDescriptor:
    OriginalFirstThunk:  0x003CD1B8
    TimeDateStamp:       0x00000000  (GMT: Thu Jan 01 00:00:00 1970)
    ForwarderChain:      0x00000000
    Name:                0x003CE3A8  ("ADVAPI32.DLL")
    FirstThunk:          0x003CD200

    Ordinal/Hint API name
    ------------ ---------------------------------------
    0x0000       "RegCloseKey"
...
    0x0000       "RegUnLoadKeyW"

   21. ImageImportDescriptor:
    OriginalFirstThunk:  0x003CE3A0
    TimeDateStamp:       0x00000000  (GMT: Thu Jan 01 00:00:00 1970)
    ForwarderChain:      0x00000000
    Name:                0x003CE49C  ("SHCORE.DLL")
    FirstThunk:          0x003CE3A4

    Ordinal/Hint API name
    ------------ ---------------------------------------
    <empty>

--- snip ---

Actually there are more descriptors with empty imports list.
It's just that Wine provides builtins for these otherwise it would fail
earlier.

* DWMAPI.DLL
* MSIMG32.DLL
* IMM32.DLL
* WTSAPI32.DLL
* WINDOWSCODECS.DLL
* UXTHEME.DLL
* SHELL32.DLL
* SHCORE.DLL <-- no builtin

Dump of PE delay import directory ('.didata'):

--- snip ---
...
   11. DelayImportDescriptor:
    grAttrs:          0x00000001  (dlattrRva)
    DLLName (R)VA:    0x003D1521  ("SHCORE.DLL")
    Hmod (R)VA:       0x003D1480
    IAT (R)VA:        0x003D1484
    INT (R)VA:        0x003D148C
    BoundIAT (R)VA:   0x003D1494
    UnloadIAT (R)VA:  0x003D149C
    TimeDateStamp:    0x00000000  (GMT: Thu Jan 01 00:00:00 1970)

    Ordinal/Hint API name
    ------------ ---------------------------------------
    0x0000       "GetDpiForMonitor"

--- snip ---

ProtectionID scan:

--- snip ---
-=[ ProtectionID v0.6.6.7 DECEMBER]=-
(c) 2003-2015 CDKiLLER & TippeX
Build 24/12/14-22:48:13
Ready...
Scanning -> Z:\home\focht\Downloads\PCB Toolkit V6.86.exe
[x] Error - Unable to open file.. skipped -> LastError : 0x20 (032)
[i] Error Translation : Sharing violation.

- Scan Took : 0.5 Second(s) [000000005h (5) tick(s)] [0 of 573 scan(s) done]

Scanning -> Z:\home\focht\Downloads\PCB Toolkit V6.86.exe
File Type : 32-Bit Exe (Subsystem : Win GUI / 2), Size : 6327296 (0608C00h)
Byte(s)
Compilation TimeStamp : 0x562C447D -> Sun 25th Oct 2015 02:54:53 (GMT)
[TimeStamp] 0x562C447D -> Sun 25th Oct 2015 02:54:53 (GMT) | PE Header | - |
Offset: 0x00000208 | VA: 0x00400208 | -
[File Heuristics] -> Flag #1 : 00000000000001001000000100100000 (0x00048120)
[Entrypoint Section Entropy] : 6.54 (section #0) ".text   " | Size : 0x37BA00
(3652096) byte(s)
[DllCharacteristics] -> Flag : (0x0000) -> NONE
[SectionCount] 9 (0x9) | ImageSize 0x62D000 (6475776) byte(s)
[Export] 73% of function(s) (17 of 23) are in file | 0 are forwarded | 15 code
| 8 data | 0 uninit data | 0 unknown |
[VersionInfo] Company Name : Saturn PCB Design. Inc.
[VersionInfo] Product Name : Saturn PCB Toolkit
[VersionInfo] Product Version : 6.86
[VersionInfo] File Version : 6.8.6.0
[VersionInfo] Version Comments : www.saturnpcb.com
[CdKeySerial] found "Unregistered" @ VA: 0x0012C5E1 / Offset: 0x0012BBE1
[CdKeySerial] found "Invalid code" @ VA: 0x003A0872 / Offset: 0x0039F872
[CdKeySerial] found "Invalid code" @ VA: 0x003A08BF / Offset: 0x0039F8BF
[CdKeySerial] found "Invalid code" @ VA: 0x003A1294 / Offset: 0x003A0294
[CdKeySerial] found "Invalid code" @ VA: 0x003A12E1 / Offset: 0x003A02E1
[CompilerDetect] -> Borland Delphi (unknown version) - 20% probability
[!] File appears to have no protection or is using an unknown protection
- Scan Took : 1.837 Second(s) [00000048Bh (1163) tick(s)] [499 of 573 scan(s)
done]
--- snip ---

$ sha1sum PCB\ Toolkit\ V6.86.zip 
d8b9d485bb89a9b22bbfd217d1a2a5502f20977e  PCB Toolkit V6.86.zip

$ du -sh PCB\ Toolkit\ V6.86.zip 
2.9M    PCB Toolkit V6.86.zip

$ wine --version
wine-1.8-rc4

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list