This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Language support in version script
- From: Geoff Keating <geoffk at geoffk dot org>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com
- Date: 04 Aug 2003 11:56:29 -0700
- Subject: Re: Language support in version script
- References: <20030804175156.GA16804@lucon.org>
"H. J. Lu" <hjl@lucon.org> writes:
> According to the ld manual, version script supports:
>
> You can also specify the language in the version script:
>
> VERSION extern "lang" { version-script-commands }
>
> The supported `lang's are `C', `C++', and `Java'. The linker will
> iterate over the list of symbols at the link time and demangle them
> according to `lang' before matching them to the patterns specified in
> `version-script-commands'.
>
> I am not sure what it tries to say and there are no examples. After
> some digging, version script does support
>
> extern "lang" { symbol; ...}
>
> as symbol names. Does ld manual need some improvements.?
I thought the description you quoted was pretty complete, and I've never
used this feature. You ought to be able to say
extern "C++" { foo::*; }
to get all functions from class or namespace "foo", for example.
--
- Geoffrey Keating <geoffk@geoffk.org>