In linux/unix world symlink *.so files are widely used. I.e. it is common to see libfoo.so and libfoo.so.X files that are just symlinks to libfoo.so.X.Y.Z (which is regular file). I never so such stuff on Windows (although Windows does support symlinks).
Never-the-less, when I recently downloaded PHP binary distribution for Windows, I saw very similar picture:
- icudt.dll (size is only 36 bytes)
- icudt46.dll (normal size)
- icudt49.dll (normal size)
- icuuc.dll (size is only 36 bytes)
- icuuc46.dll (normal size)
- icuuc49.dll (normal size)
- and so on.
Unversioned *.dll files are obviously regular files (not NTFS symlinks or junction points). However, they have very small size (from 36 to 40 bytes) and very specific content. E.g. the content of icudt.dll is:
!<symlink>яюi_c_u_d_t_4_9_._d_l_l___
(“_” here means “\x0”, “яю” here is “\xFF\xFE”).
How these symlink-like DLLs are supposed to work?
- Can windows work with them as with usual DLLs?
- Or maybe some special functions in WinAPI for such DLLs?
- Or such DLLs are recognized only by PHP?
- Maybe PHP source is written in the way that it explicitly reads and analyses every DLL to resolve such pseudo-symlinks?
Note: PHP is said to by built by VC9, thus it is probably not a cygwin/mingw-related stuff (as someone may think first).
Note 2: No such small-sized DLLs were found in C:\Windows dir.
Windows won’t recognize these files as DLLs or any kind of links to DLL. As Hans Passant correctly suggested it’s Cygwin-specific files and only Cygwin-based builds would recognize them as symlinks by Cygwin framework, not by Windows OS.
If you try to use them in any of the standard Win32 APIs you’ll get bunch of loading errors claiming the executable’s format is invalid. The mere fact PHP was compiled by VC9 also doesn’t mean VC9 created the files in question as they most likely were prepared by means of some Cygwin tool.
P.S. The smallest possible executable file size for Windows is 97 bytes as described here.