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: Ian Lance Taylor <iant at google dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: binutils at sourceware dot org
- Date: Sun, 11 Jul 2010 04:56:56 -0700
- Subject: Re: version scripts and default/C language mangling
- References: <201007061601.24599.vapier@gentoo.org>
Mike Frysinger <vapier@gentoo.org> writes:
> the current version script page does not define a default language:
> http://sourceware.org/binutils/docs/ld/VERSION.html
> presumably it works with linker-visible symbols by default which means targets
> that have an ABI prefix (like the Blackfin port) wont usually match.
A leading underscore is normally returned by bfd_get_symbol_leading_char
on the BFD, which returns '\0' if there is no leading character. I
think you are suggesting that the version script handling is not
checking for that.
> at the moment, ldlang.c:lang_vers_match() doesnt do demangling for C symbols,
> and the cplus_demangle() doesnt account for the ABI prefix. that is only
> declared via USER_LABEL_PREFIX in the emulparams subfolder, but it isnt
> exported to any C code that i can see. not that we'd really want to since
> this is a bfd target specific issue. any tips on how best to proceed here to
> fix things ?
USER_LABEL_PREFIX only affects the default linker script. The relevant
code here is
#define elf_symbol_leading_char '_'
in bfd/elf32-bfin.c.
Ian