Recent importlib changes

Dmitry Timoshkov dmitry at baikal.ru
Fri Dec 13 23:32:33 CST 2002


"Steven Edwards" <Steven_Ed4153 at yahoo.com> wrote:

> With the recent import lib changes on almost everything I try and build 
> I am getting these errors. When using the win32api package from mingw 
> prior to this patch these functions were exported.
> 
> Thanks
> Steven
> 
> brsfolder.o(.text+0xfe0):brsfolder.c: undefined reference to `HeapAlloc at 12'

[skipped]

It's an ld bug. Currently ld could not use forwarded references in import
libraries. I reported that bug almost 1.5 years ago in the binutils mailing
list, but it seems nobody interested in fixing it.

Moreover, in order to eliminate decorated (@xx) names in the dll export table
you need to apply the attached patch and use latest binutils. But unfortunately
even it doesn't resolve many other issues with dll linking.

-- 
Dmitry.
-------------- next part --------------
diff -u hq/wine/dlls/Makedll.rules.in wine/dlls/Makedll.rules.in
--- hq/wine/dlls/Makedll.rules.in	Fri Dec 13 06:12:34 2002
+++ wine/dlls/Makedll.rules.in	Sat Dec 14 04:59:20 2002
@@ -44,7 +44,7 @@
 # Rules for .dll files
 
 $(MODULE): $(RCOBJS) $(OBJS) $(MODULE).dbg.o $(SPEC_DEF) $(IMPORTLIBS) Makefile.in
-	$(DLLWRAP) -k --def $(SPEC_DEF) -o $@ $(RCOBJS) $(OBJS) $(MODULE).dbg.o $(DLLMAIN:%=--entry %) -L$(DLLDIR) $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(ALL_LIBS)
+	$(DLLWRAP) --def $(SPEC_DEF) $(DLLWRAPFLAGS) -o $@ $(RCOBJS) $(OBJS) $(MODULE).dbg.o $(DLLMAIN:%=--entry %) -L$(DLLDIR) $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(ALL_LIBS)
 
 $(SPEC_DEF): $(WINEBUILD)
 
diff -u hq/wine/library/Makefile.in wine/library/Makefile.in
--- hq/wine/library/Makefile.in	Mon Aug 05 03:22:04 2002
+++ wine/library/Makefile.in	Sat Dec 14 04:57:16 2002
@@ -33,7 +33,7 @@
 	$(RANLIB) $@
 
 libwine.dll: $(OBJS)
-	$(DLLWRAP) $(DLLWRAPFLAGS) --export-all --implib libwine.a -o libwine.dll $(OBJS) $(EXTRALIBS)
+	$(DLLWRAP) --export-all --implib libwine.a -o libwine.dll $(OBJS) $(EXTRALIBS)
 
 .PHONY: install_so install_a install_dll
 
diff -u hq/wine/Make.rules.in wine/Make.rules.in
--- hq/wine/Make.rules.in	Fri Dec 13 06:12:34 2002
+++ wine/Make.rules.in	Sat Dec 14 04:58:38 2002
@@ -39,7 +39,7 @@
 LDSHARED  = @LDSHARED@
 DLLTOOL   = @DLLTOOL@
 DLLWRAP   = @DLLWRAP@
-DLLWRAPFLAGS = --add-stdcall-alias
+DLLWRAPFLAGS = -k -Wl,--kill-at,--enable-stdcall-fixup
 AR        = @AR@ rc
 RANLIB    = @RANLIB@
 STRIP     = @STRIP@
diff -u hq/wine/unicode/Makefile.in wine/unicode/Makefile.in
--- hq/wine/unicode/Makefile.in	Wed Oct 02 02:51:18 2002
+++ wine/unicode/Makefile.in	Sat Dec 14 04:57:32 2002
@@ -98,7 +98,7 @@
 
 # --export-all doesn't work correctly because of dllwrap's bug
 libwine_unicode.dll: $(OBJS) wine_unicode.def
-	$(DLLWRAP) $(DLLWRAPFLAGS) --def $(SRCDIR)/wine_unicode.def --implib libwine_unicode.a -o libwine_unicode.dll $(OBJS)
+	$(DLLWRAP) --def $(SRCDIR)/wine_unicode.def --implib libwine_unicode.a -o libwine_unicode.dll $(OBJS)
 
 .PHONY: install_so install_a install_dll
 


More information about the wine-devel mailing list