This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: export symbols
Ian Lance Taylor wrote:
> Alberich de megres <alberich2k5@gmail.com> writes:
>
>
>> but i just want to export some of symbol on main.c. Is it some way to
>> control which symbols i export?
>>
>
> http://sourceware.org/binutils/docs-2.19/ld/VERSION.html
>
> Ian
>
>
Beside the versioning of symbols, you could also use use one of the
following ld commands (check out the man page for more details):
--exclude-symbols symbol,symbol,...
--dynamic-list=dynamic-list-file
If you are using gcc for linking, then prepend -Wl, to the command, like
-Wl,--exclude-symbols,...
Hope that helps and best regards,
Andi