This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Partial symbol export vs --export-dynamic
- To: Nick Clifton <nickc at cambridge dot redhat dot com>
- Subject: Re: Partial symbol export vs --export-dynamic
- From: Jean-Francois Panisset <panisset at discreet dot com>
- Date: Sun, 17 Jun 2001 15:36:19 -0400
- cc: binutils at sources dot redhat dot com
<m3n1771mhs.fsf@north-pole.nickc.cambridge.redhat.com>Nick Clifton writes
>Hi Jean-Francois,
>
>> - does the ELF format on Linux support exporting only some of the
>> application symbols, or does it have to all-or-nothing?
>
>The ELF format does support exporting only some of an applications
>symbols.
>
>> - how painful would it be for me to add this functionality to
>> ld/bfd, or is this a project way beyond the scope of a binutils
>> novice?
>
>BFD can be a tricky place for a novice, so I would not recommend it as
>a first project. As an alternative though, you might like to consider
>using the OBJCOPY program. A recent patch to this program gave it the
>ability to selectively convert global symbols into local symbols, (the
>--localize-symbols command line switch). With this you could use
>--export-dynamic switch to ld first and then --localize-symbols to
>objcopy to remove those symbols that you do not want to be exported.
>
>Cheers
> Nick
Unfortunately, there are about 100,000 symbols in the finaly binary,
so integrating objcopy into the Makefile to link the application
would probably not be a practical solution, I will try to play with
it though get a better understanding.
Thanks,
JF