This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: 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 14:30:56 +1100 (EST)
- Subject: RE: Patch to pe-dll.c: Allow exclusion of whole libs with --export-all
> "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
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!