Chris Hegarty wrote:
:
You are right, before these changes iphlpapi.dll is not loaded unless
NetworkInterface or ResolverConfigurationImpl are called. After these
changes iphlpapi.dll is loaded once net.dll is loaded.
I think we should use specify the loading of these dll's to be
delayed. I can confirm that with the below changes iphlpapi.dll is
only loaded when necessary.
diff -r ef5bbbe0dd75 make/java/net/Makefile
--- a/make/java/net/Makefile Mon Mar 21 22:02:00 2011 -0700
+++ b/make/java/net/Makefile Thu Mar 24 15:27:38 2011 +0000
@@ -37,10 +37,6 @@ AUTO_FILES_JAVA_DIRS = java/net
AUTO_FILES_JAVA_DIRS = java/net
ifeq ($(PLATFORM), windows)
- # Windows 9x module only needed on 32-bit build
- ifeq ($(ARCH_DATA_MODEL), 32)
- FILES_c += NetworkInterface_win9x.c
- endif
FILES_c += NTLMAuthSequence.c
FILES_c += NetworkInterface_winXP.c
else
@@ -96,7 +92,9 @@ include $(BUILDDIR)/common/Library.gmk
include $(BUILDDIR)/common/Library.gmk
ifeq ($(PLATFORM), windows)
- OTHER_LDLIBS = ws2_32.lib $(JVMLIB)
+ OTHER_LDLIBS = ws2_32.lib $(JVMLIB) \
+ secur32.lib iphlpapi.lib delayimp.lib \
+ /DELAYLOAD:secur32.dll /DELAYLOAD:iphlpapi.dll
else
OTHER_LDLIBS = $(LIBSOCKET) $(LIBNSL) -ldl $(JVMLIB)
Thanks for doing this, this seems a good candidate for a delayed load.
Thumbs up from me.
-Alan