This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
If the DLL was built with --shared, the .reloc section is not marked as discardable.
The patch only effects .exe files and dll's built with --dll switch.
Uh, oh, I see the problem now. Some makefiles (eg the mingw runtime rule for libmingwm10.dll)and libtool still use the 'old' way of building relocatable dll's with dlltool. eg
gcc -s -Wl,--base-file,mydll.base -o mydll.dll mydll.o -Wl,-e,_mydll_init@12 dlltool --base-file mydll.base --def mydll.def --output-exp mydll.exp --dllname mydll.dll
gcc -s -Wl,--base-file,mydll.base,mydll.exp -o mydll.dll mydll.o -Wl,-e,_mydll_init@12
dlltool --base-file mydll.base --def mydll.def --output-exp mydll.exp --dllname mydll.dll
gcc -Wl,mydll.exp -o mydll.dll mydll.o -Wl,-e,_mydll_init@12
or the equivalent using --dll switch.
So I see where my patch will cause problems. I withdraw it.
Perhaps a new switch (--discardable-pe-dll-relocs) could be introduced and build_filler_bfd would use that?
I suppose --strip -R .reloc isn't too hard, so maybe we just need to document how to build a non-relocatable dll now using that.
Also need to note the fact that the gcc -mdll switch is now effectiveley
the same as -shared.
-- Chuck
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |