This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Language support in version script


"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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]