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]

Re: [patch/RFC] ld/pe-dll.c: mark .reloc section as discardableunless building a relocatable dll


> > >where the -mdll gcc switch passed this to ld:
> > >--dll -e _DllMainCRTStartup@12

I can't find -mdll documented anywhere in `info gcc` (gcc-3.3). In which
versions of gcc does this switch exist? I currently use
	LDFLAGS="-nostartfiles -e_DllMain -Wl,--dll -Wl,--subsystem=wince:3.00"
Does -mdll accomplish something similar?

Exactly what does --subsystem=wince:3.00 do? `info ld` says "Specifies
the subsystem under which your program will execute.", but how does the
MS OS use this information?

> 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

I use the following five step link process
	$(LD) $(LDFLAGS) -Wl,--base-file=$*.base -o $@ $^ $(LDLIBS)
	$(DLLTOOL) -D $*.dll -d $*.def -b $*.base -e $*.exp
	$(LD) $(LDFLAGS) -Wl,--base-file=$*.base -o $@ $^ $*.exp $(LDLIBS)
	$(DLLTOOL) -D $*.dll -d $*.def -b $*.base -e $*.exp -l lib$*.a
	$(LD) $(LDFLAGS) -o $@ $^ $*.exp $(LDLIBS)
because I was told that arm-wince-pe does not support --shared. If this
is true, what's holding it back?

Cheers,
Shaun


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]