Re: [patch/rfc] add support for hosts that have custom symbol prefixes

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

 



At Fri, 8 Sep 2006 16:18:55 -0400,
Mike Frysinger wrote:
> 
> On Friday 08 September 2006 09:53, Takashi Iwai wrote:
> > At Thu, 7 Sep 2006 20:47:00 -0400, Mike Frysinger wrote:
> > > some architectures, like Blackfin, have a prefix added to all symbols (in
> > > our case it's historical baggage)
> > >
> > > while normally packages shouldnt care, when code starts mixing assembler
> > > with C (like symbol versioning), you need to dip down into the inner
> > > details. find attached a patch which queries gcc for the prefix (all gcc
> > > toolchains have a builtin define of __USER_LABEL_PREFIX__) and then
> > > automatically has asm() constructs utilize this
> > >
> > > since most targets define __USER_LABEL_PREFIX__ to nothing, hopefully
> > > this shouldnt cause any problems :)
> >
> > So, the current build doesn't work for such architectures with
> > __USER_LABEL_PREFIX__?
> 
> correct ... on blackfin, __USER_LABEL_PREFIX__ is defined to _
> 
> so when you have a function foo() in C, the actual ELF symbol is _foo ... the 
> asm() tricks to do symbol aliasing then fail as they try to manipulate the 
> ELF symbol foo which doesnt exist
> 
> > > diff -r 46221e609f45 include/alsa-symbols.h
> > > --- a/include/alsa-symbols.h	Wed Sep 06 14:39:01 2006 +0200
> > > +++ b/include/alsa-symbols.h	Thu Sep 07 20:45:45 2006 -0400
> > > @@ -22,6 +22,14 @@
> > >  #ifndef __ALSA_SYMBOLS_H
> > >  #define __ALSA_SYMBOLS_H
> > >
> > > +#ifdef __USER_LABEL_PREFIX__
> > > +# define __SYMBOL_PREFIX __USER_LABEL_PREFIX__
> > > +#else
> > > +# define __SYMBOL_PREFIX
> > > +#endif
> > > +
> > > +#include "local.h"
> >
> > This inclusion looks superfluous.  This file itself is included from
> > local.h.
> 
> this is my first time hacking on ALSA code so i'll of course defer to anyone 
> with more experience :)  i added this as a sanity check rather than digging 
> through the include paths in the headers
> 
> if it isnt needed then simply disregard that hunk :)

I committed the patch to ALSA HG tree now.
Give it a try later.


thanks,

Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux