This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch/RFC] ld/pe-dll.c: mark .reloc section as discardableunless building a relocatable dll
- From: Shaun Jackman <sjackman at pathwayconnect dot com>
- To: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- Cc: binutils <binutils at sources dot redhat dot com>
- Date: 28 Jul 2003 08:49:40 -0600
- Subject: Re: [patch/RFC] ld/pe-dll.c: mark .reloc section as discardableunless building a relocatable dll
- Organization: Pathway Connectivity
- References: <20030727210016.62339.qmail@web21409.mail.yahoo.com>
> > >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