[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: C++ symbol mangling difference between arches



On 2009-06-25, Raphael Hertzog <hertzog@debian.org> wrote:
> it is well known that C++ symbol mangling result in different symbol
> names from one architecture to the other. It means that libraries that
> want to provide symbol files have to maintain one symbol file for each

> architecture. To avoid this problem Modestas Vainius has written a patch
> that lets you encode in a specific way the small parts in the symbol name 
> that vary between architecture.

Yay Modestas.

> You can check the patch here:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=0001-Implementation-of-the-subst-tag.patch;att=1;bug=533916
>
> The symbol name in symbols files become templates that are used at build
> time to generate the correct symbol name. The part that are substituded
> are delimited by curly brackets like this:
>  (subst)_ZN6Phonon11AudioOutput13volumeChangedE{qreal}@Base 4:4.2.0
>
> In this specific case, the symbol is considered to be
> _ZN6Phonon11AudioOutput13volumeChangedEf@Base on armel
> and _ZN6Phonon11AudioOutput13volumeChangedEd@Base on other arches
> because qreal is a float on armel and a double otherwise.

The qreal things is not a different symbol mangling, but different code.
qreal is a typedef to either float or douxble wrapped in a ifdef.

/Sune


Reply to: