This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: version scripts and default/C language mangling
- From: Will Newton <will dot newton at gmail dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: Ian Lance Taylor <iant at google dot com>, binutils at sourceware dot org
- Date: Tue, 17 Aug 2010 11:15:51 +0100
- Subject: Re: version scripts and default/C language mangling
- References: <201007061601.24599.vapier@gentoo.org> <201007111804.38441.vapier@gentoo.org> <mcrvd8lt9ap.fsf@google.com> <201007191931.02766.vapier@gentoo.org>
On Tue, Jul 20, 2010 at 12:31 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Monday, July 12, 2010 04:05:02 Ian Lance Taylor wrote:
>> Mike Frysinger 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.
>
> works for me
>
>> > 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.
>
> since the existing bfd_demangle user in this file is using
> link_info.output_bfd, i'm going to roll with that.
>
> how does the attached patch look ? ?seems to fix things with Blackfin targets,
> and no regressions are seen with x86_64-linux-gnu and bfin-linux-uclibc.
>
> i'll do some more system wide testing in the mean time ...
Hi Mike,
Did this patch pass your testing?
I would be interested in trying it out but it would appear that the
patch you sent has been mangled by Exchange (= characters everywhere).
Cheers,