Skip to content

hdf5: delay load optional DLLs#28376

Draft
mlt wants to merge 1 commit intomsys2:masterfrom
mlt:feat/hdf5-delay-load
Draft

hdf5: delay load optional DLLs#28376
mlt wants to merge 1 commit intomsys2:masterfrom
mlt:feat/hdf5-delay-load

Conversation

@mlt
Copy link
Copy Markdown
Contributor

@mlt mlt commented Mar 10, 2026

Blocked-by: #28593
This is a proof-of-concept to delay load optional dependencies (aws-c, compression zlib-ng and libsz) for HDF5.
image

$ h5cc -shlib h5_write.c
$ ntldd ./a.exe
        libhdf5-320.dll => C:\msys64\ucrt64\bin\libhdf5-320.dll (0x0000023d3ed70000)
        KERNEL32.dll => C:\WINDOWS\SYSTEM32\KERNEL32.dll (0x0000023d3f300000)
$ pacman -Q mingw-w64-ucrt-x86_64-aws-c-s3
error: package 'mingw-w64-ucrt-x86_64-aws-c-s3' was not found

$ rm SDS.h5 && ./a.exe && file SDS.h5
SDS.h5: Hierarchical Data Format (version 5) data

$ objdump -p /ucrt64/bin/libhdf5-320.dll | grep -i delay
Entry d 0000000000544960 00000100 Delay Import Directory
        [4085] +base[4086]  0ff5 __DELAY_IMPORT_DESCRIPTOR_libaws_c_auth_delay_a
        [4086] +base[4087]  0ff6 __DELAY_IMPORT_DESCRIPTOR_libaws_c_common_delay_a
        [4087] +base[4088]  0ff7 __DELAY_IMPORT_DESCRIPTOR_libaws_c_http_delay_a
        [4088] +base[4089]  0ff8 __DELAY_IMPORT_DESCRIPTOR_libaws_c_io_delay_a
        [4089] +base[4090]  0ff9 __DELAY_IMPORT_DESCRIPTOR_libaws_c_s3_delay_a
        [4090] +base[4091]  0ffa __DELAY_IMPORT_DESCRIPTOR_libaws_c_sdkutils_delay_a
        [4091] +base[4092]  0ffb __DELAY_IMPORT_DESCRIPTOR_libsz_delay_a
        [4092] +base[4093]  0ffc __DELAY_IMPORT_DESCRIPTOR_libz_ng_delay_a
        [4093] +base[4094]  0ffd __tailMerge_libaws_c_auth_delay_a
        [4094] +base[4095]  0ffe __tailMerge_libaws_c_common_delay_a
        [4095] +base[4096]  0fff __tailMerge_libaws_c_http_delay_a
        [4096] +base[4097]  1000 __tailMerge_libaws_c_io_delay_a
        [4097] +base[4098]  1001 __tailMerge_libaws_c_s3_delay_a
        [4098] +base[4099]  1002 __tailMerge_libaws_c_sdkutils_delay_a
        [4099] +base[4100]  1003 __tailMerge_libsz_delay_a
        [4100] +base[4101]  1004 __tailMerge_libz_ng_delay_a

General discussion on delay loading #11720

@mlt mlt force-pushed the feat/hdf5-delay-load branch 2 times, most recently from 2716923 to a8ea262 Compare March 10, 2026 23:04
@mlt mlt marked this pull request as ready for review March 10, 2026 23:55
@mlt mlt marked this pull request as draft March 22, 2026 14:28
@mlt mlt force-pushed the feat/hdf5-delay-load branch from a8ea262 to 20c73dd Compare March 23, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant