[FFmpeg-devel] [PATCH] Add --enable-auto-image-base to link options for Windows DLLs.

Zuxy Meng zuxy.meng
Fri May 18 10:43:39 CEST 2007


Hi,

--enable-auto-image-base will cause ld to calculate a preferred base
address by hashing the DLL's name, instead of always setting DLL's
base to 0x10000000, therefore the chance of runtime relocation is
reduced. Libtool has already set this by default and cygwin guys
recommend all DLL to be built with this option.

-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
-------------- next part --------------
Index: configure
===================================================================
--- configure	?????? 9053??
+++ configure	????????????
@@ -1167,7 +1167,7 @@
     SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)'
     SLIB_EXTRA_CMD="-lib /machine:i386 /def:\$(@:${SLIBSUF}=.def)"
     SLIB_INSTALL_EXTRA_CMD="-install -m 644 \$(SLIBNAME_WITH_MAJOR:\$(SLIBSUF)=.lib) \"\$(shlibdir)/\$(SLIBNAME_WITH_MAJOR:\$(SLIBSUF)=.lib)\""
-    SHFLAGS="-shared -Wl,--output-def,\$(@:${SLIBSUF}=.def),--out-implib,lib\$(SLIBNAME:\$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc"
+    SHFLAGS="-shared -Wl,--output-def,\$(@:${SLIBSUF}=.def),--out-implib,lib\$(SLIBNAME:\$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc,--enable-auto-image-base"
     enabled network && add_extralibs -lws2_32
     ;;
   cygwin*)



More information about the ffmpeg-devel mailing list