All of lore.kernel.org
 help / color / mirror / Atom feed
* Blackfin toolchain question
@ 2009-11-11 22:27 Dmitry Eremin-Solenikov
  2009-11-12  1:17 ` Holger Hans Peter Freyther
  2009-11-12 11:52 ` Phil Blundell
  0 siblings, 2 replies; 4+ messages in thread
From: Dmitry Eremin-Solenikov @ 2009-11-11 22:27 UTC (permalink / raw)
  To: openembedded-devel

Hello,

I'm currently trying to restore/update blackfin toolchain. One of the major problems I've stumbled upon
are versioned scripts/export symbols. Basically there are lot's of software starting from g++ itself
that have symbol versioning scripts. The problem is that blackfin arch prepends all symbols with underscore,
thus breaking all that scripts.

My first intention was to follow the alsa-libs approach: handle all prefixing on package-per-package basis.
However that would be a nigtmare.

My current intention (that at least partially works) is to make libtool (when it's used) generate correct
versioning scripts and resort to package-per-package updating after that.

The problem comes from C++ world, where versioning script can contain unmangled name, but it's demangled
name that should be prefixed with underscore.

So I have a bit hackish idea: maybe it's better to hack ld to accept scripts w/o underscores and prefix all
symbols with it? This will eliminate most of changes. The question is if this patch is acceptable for OE?
Does this approach sound too hackish?

-- 
With best wishes
Dmitry





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Blackfin toolchain question
  2009-11-11 22:27 Blackfin toolchain question Dmitry Eremin-Solenikov
@ 2009-11-12  1:17 ` Holger Hans Peter Freyther
  2009-11-12 10:19   ` Dmitry Eremin-Solenikov
  2009-11-12 11:52 ` Phil Blundell
  1 sibling, 1 reply; 4+ messages in thread
From: Holger Hans Peter Freyther @ 2009-11-12  1:17 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Dmitry Eremin-Solenikov

On Wednesday 11 November 2009 23:27:26 Dmitry Eremin-Solenikov wrote:
> Hello,
> 
> I'm currently trying to restore/update blackfin toolchain. One of the major
>  problems I've stumbled upon are versioned scripts/export symbols.
>  Basically there are lot's of software starting from g++ itself that have
>  symbol versioning scripts. The problem is that blackfin arch prepends all
>  symbols with underscore, thus breaking all that scripts.


Do you have a link to the ABI? Isn't this underscore thingie defined by SystemV 
ABI?

z.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Blackfin toolchain question
  2009-11-12  1:17 ` Holger Hans Peter Freyther
@ 2009-11-12 10:19   ` Dmitry Eremin-Solenikov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Eremin-Solenikov @ 2009-11-12 10:19 UTC (permalink / raw)
  To: Holger Hans Peter Freyther; +Cc: openembedded-devel

Holger Hans Peter Freyther wrote:
> On Wednesday 11 November 2009 23:27:26 Dmitry Eremin-Solenikov wrote:
>> Hello,
>>
>> I'm currently trying to restore/update blackfin toolchain. One of the major
>>  problems I've stumbled upon are versioned scripts/export symbols.
>>  Basically there are lot's of software starting from g++ itself that have
>>  symbol versioning scripts. The problem is that blackfin arch prepends all
>>  symbols with underscore, thus breaking all that scripts.
> 
> 
> Do you have a link to the ABI? Isn't this underscore thingie defined by SystemV 
> ABI?

I don't have a link to Blackfin ABI. However according to 
http://docs.blackfin.uclinux.org/doku.php?id=toolchain:application_binary_interface
underscore is a part of ABI.

-- 
With best wishes
Dmitry




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Blackfin toolchain question
  2009-11-11 22:27 Blackfin toolchain question Dmitry Eremin-Solenikov
  2009-11-12  1:17 ` Holger Hans Peter Freyther
@ 2009-11-12 11:52 ` Phil Blundell
  1 sibling, 0 replies; 4+ messages in thread
From: Phil Blundell @ 2009-11-12 11:52 UTC (permalink / raw)
  To: openembedded-devel

On Wed, 2009-11-11 at 22:27 +0000, Dmitry Eremin-Solenikov wrote:
> I'm currently trying to restore/update blackfin toolchain. One of the major problems I've stumbled upon
> are versioned scripts/export symbols. Basically there are lot's of software starting from g++ itself
> that have symbol versioning scripts. The problem is that blackfin arch prepends all symbols with underscore,
> thus breaking all that scripts.
> 
> My first intention was to follow the alsa-libs approach: handle all prefixing on package-per-package basis.
> However that would be a nigtmare.
> 
> My current intention (that at least partially works) is to make libtool (when it's used) generate correct
> versioning scripts and resort to package-per-package updating after that.
> 
> The problem comes from C++ world, where versioning script can contain unmangled name, but it's demangled
> name that should be prefixed with underscore.
> 
> So I have a bit hackish idea: maybe it's better to hack ld to accept scripts w/o underscores and prefix all
> symbols with it? This will eliminate most of changes. The question is if this patch is acceptable for OE?
> Does this approach sound too hackish?

How do other Blackfin folks deal with this issue?  It doesn't sound like
there is anything OE-specific about the problem you are facing, and I
would have thought that it is something that should be solved upstream
rather than with a local hack in OE.

Linker version scripts operate on symbol names, not on function names,
so I don't think that having the underscores automatically added here
would be appropriate.  

It is a little bit unfortunate that the Blackfin folks have decided to
put these underscores in their symbols.  The ELF gABI calls for symbol
names to be the same as C function names (i.e. no prefix) and, although
I guess the psABI is permitted to countermand that, the vast majority of
architectures do follow the gABI convention.  Underscore-prefixed symbol
names are fairly common in the a.out and COFF worlds but of course there
are no version scripts there so this issue does not arise.

p.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-12 11:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-11 22:27 Blackfin toolchain question Dmitry Eremin-Solenikov
2009-11-12  1:17 ` Holger Hans Peter Freyther
2009-11-12 10:19   ` Dmitry Eremin-Solenikov
2009-11-12 11:52 ` Phil Blundell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.