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:

> 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


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