This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: ld-auto-import documentation update
- From: "Ralf Habacker" <Ralf dot Habacker at freenet dot de>
- To: "Charles Wilson" <cwilson at ece dot gatech dot edu>
- Cc: "Binutils" <binutils at sources dot redhat dot com>
- Date: Sun, 22 Dec 2002 14:38:23 +0100
- Subject: RE: ld-auto-import documentation update
> Ralf Habacker wrote:
> > Charles Wilson writes:
> >
> > +2. Sometimes, it is useful to rename exports. For instance, the cygwin
> > +kernel does this regularly: a symbol @samp{_foo} will be exported as
> > +@samp{_foo}, but also as @samp{foo} by using special directives in the
> > +DEF file when creating the import library. This ability is not
> > +present without import libs.
> >
> > This isn't true. The gcc manual in
>
> > void __f () { /* do something */; }
> > void f () __attribute__ ((weak, alias ("__f")));
> >
> > declares f to be a weak alias for __f. In C++, the mangled name for
> the target
> > must be used.
>
> And it actually works as advertised on cygwin? Cool. Thanks for the
> correction. (I knew you could do this on ELF, but windows? Neato.)
>
I've tried the testcase with gcc version 2.95.3-5 (cygwin special).
Any idead where we should document this feature ? In the cygwin do or in the ld
or ??? At least this is an gcc feature.
Ralf