This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE[2]: Patch to pe-dll.c: Allow exclusion of whole libs with --export-all
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- To: binutils <binutils at sources dot redhat dot com>
- Date: Sat, 24 Nov 2001 17:54:55 +1100 (EST)
- Subject: RE[2]: Patch to pe-dll.c: Allow exclusion of whole libs with --export-all
--- Danny Smith <danny_r_smith_2001@yahoo.co.nz> wrote: > Date: Sat, 24
Nov 2001 14:30:56 +1100 (EST)
> From: Danny Smith <danny_r_smith_2001@yahoo.co.nz>
> Subject: RE: Patch to pe-dll.c: Allow exclusion of whole libs with
> --export-all
> To: binutils <binutils@sources.redhat.com>
>
> > "Ralf Habacker" <Ralf dot Habacker at freenet dot de>
> wrote:
> > -----Original Message-----
> >> From: binutils-owner@sources.redhat.com
> >> [mailto:binutils-owner@sources.redhat.com]On Behalf Of Danny Smith
> >> Sent: Thursday, November 22, 2001 2:12 AM
> >> To: binutils
> >> Subject: Patch to pe-dll.c: Allow exclusion of whole libs with
> >> --export-all
> >>
> >>
> >> The auto-export feature of ld for pe-dll targets needs an option to
> exclude
> >> whole libs from export. The following patch allows exclusion of
> specific
> or
> >> all libs.
> >>
> >> It also adds a few more default lib excludes and scans for backward
> >> compat implib symbols (__imp_)
> >>
> <snip>
>
> > How would libtool handle this ?
>
> > Ralf
>
> I don't quite know what your asking. How does libtool handle
> --exclude-symbols?
>
> The patch allows exclusion of whole archives from export table.
>
> Instad of writing:
> -Wl,--export-all,\
> -Wl,--exclude-symbols,\
> alloca.o,argv.o,asprintf.o,basename.o,bcmp.o,bcopy.o,bzero.o,\
> choose-temp.o,concat.o,cp-demangle.o,cplus-dem.o,dyn-string.o,\
> fdmatch.o,ffs.o,fibheap.o,floatformat.o,fnmatch.o,getopt.o,\
> getopt1.o,getpwd.o,getruntime.o,hashtab.o,hex.o,index.o,insque.o,\
> lbasename.o,make-temp-file.o,md5.o,mkstemps.o,objalloc.o,\
> obstack.o,partition.o,pexecute.o,random.o,regex.o,rindex.o,\
> safe-ctype.o,setenv.o,sigsetmask.o,sort.o,spaces.o,\
> splay-tree.o,strerror.o,strsignal.o,ternary.o,vasprintf.o,\
> vfork.o,waitpid.o,xatexit.o,xexit.o,xmalloc.o,xmemdup.o,\
> xstrdup.o,xstrerror.o
>
Oops, I didn't mean that. This is what I meant:
-Wl,--export-all,\
-Wl,--exclude-symbols,\
htab_find_with_hash,__getopt_initialized,_getopt_internal,_hex_value,\
objalloc_alloc,_obstack,_obstack_allocated_p,_obstack_begin,\
_obstack_begin_1,_obstack_free,_obstack_memory_used,_obstack_newchunk,\
...<snip>....
xre_set_syntax,xre_syntax_options,xrealloc,xregcomp,xregerror,xregexec,\
xregfree,xstrdup,xstrerror
ie, listing the 200-odd symbols that could be exported with export-all
> because you don't want to export any symbols from libiberty.a
>
> you can write:
> -Wl,--export-all,\
> -Wl,--exclude-libs,libiberty.a
>
>
> Code from libiberty.a can still be used by the dll (after of course you
> read and accept the license agreement), but the symbol names will not be
> exported.
>
> Danny
>
http://shopping.yahoo.com.au - Yahoo! Shopping
- Get organised for Christmas early this year!