This is the mail archive of the binutils@sourceware.org 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: version scripts and default/C language mangling


Mike Frysinger <vapier@gentoo.org> writes:

> first, i'm asking what the default language is for the version script.  i'd 
> expect the answer to be "no language" which means the symbols would be matched 
> against any random leading char a target introduces.  i'm also OK with the 
> answer "C language", although it does prevent working with symbols that lack 
> the prefix char because they were created via assembly code.

The default language is "C".  I think the right thing to do in that case
is strip the leading character if present, and otherwise do nothing.
That is what bfd_demangle does.


> yes, but presumably changing ldlang.c to consider that value is unacceptable.  
> the current parsing code is also not given the current bfd, only 
> bfd_elf_version_expr structures, and those dont contain links back to a bfd 
> that i can see.  unless there is a way to get the current "active" bfd ?  then 
> it should be easy to drop in support in lang_vers_match() with the function 
> bfd_get_symbol_leading_char() you pointed out.

I think it would be entirely reasonable to change lang_vers_match to
take a BFD parameter, and change the corresponding calling code in
bfd/elflink.c.  Or, the output BFD is always available in
link_info.output_bfd.

Ian


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