public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Odd behavior with symbol naming mismatch between x86 and bfin platforms  using version scripts
@ 2010-02-08 17:01 Kevin P. Fleming
  2010-02-08 17:45 ` Ian Lance Taylor
  2010-02-08 20:20 ` Mike Frysinger
  0 siblings, 2 replies; 3+ messages in thread
From: Kevin P. Fleming @ 2010-02-08 17:01 UTC (permalink / raw)
  To: Binutils

One of our developers is running into an issue with version scripts not
seeing symbols with the same naming scheme when code is built using GCC
on an x86 platform vs. using the Blackfin tools (versions listed below).
The attached files demonstrate the problem; when run as:

$ CC=cc CFLAG="-fPIC" ./mk

everything works as expected.

when run as:

$ CC=bfin-linux-uclibc-gcc CFLAG="-mfdpic " ./mk

the test fails, because the 'testcallback' function appears in the
dynamic symbol table as '_testcallback', and this the version script
causes it to be filtered out.

For x86 builds, we are using:

> gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1
> GNU ld (GNU Binutils for Ubuntu) 2.20

For Blackfin builds:

> bfin-linux-uclibc-gcc (ADI/svn-3473) 4.3.3
> GNU ld version 2.17

Is this a compiler bug, or a linker bug, or expected behavior?

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kpfleming@digium.com
Check us out at www.digium.com & www.asterisk.org

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

* Re: Odd behavior with symbol naming mismatch between x86 and bfin platforms  using version scripts
  2010-02-08 17:01 Odd behavior with symbol naming mismatch between x86 and bfin platforms using version scripts Kevin P. Fleming
@ 2010-02-08 17:45 ` Ian Lance Taylor
  2010-02-08 20:20 ` Mike Frysinger
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2010-02-08 17:45 UTC (permalink / raw)
  To: Kevin P. Fleming; +Cc: Binutils

"Kevin P. Fleming" <kpfleming@digium.com> writes:

> One of our developers is running into an issue with version scripts not
> seeing symbols with the same naming scheme when code is built using GCC
> on an x86 platform vs. using the Blackfin tools (versions listed below).
> The attached files demonstrate the problem; when run as:
>
> $ CC=cc CFLAG="-fPIC" ./mk
>
> everything works as expected.
>
> when run as:
>
> $ CC=bfin-linux-uclibc-gcc CFLAG="-mfdpic " ./mk
>
> the test fails, because the 'testcallback' function appears in the
> dynamic symbol table as '_testcallback', and this the version script
> causes it to be filtered out.
>
> For x86 builds, we are using:
>
>> gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1
>> GNU ld (GNU Binutils for Ubuntu) 2.20
>
> For Blackfin builds:
>
>> bfin-linux-uclibc-gcc (ADI/svn-3473) 4.3.3
>> GNU ld version 2.17
>
> Is this a compiler bug, or a linker bug, or expected behavior?

I think this counts as painful but expected behaviour.

One could imagine adding extern "C" along the lines of extern "C++" to
remove the leading underscore on targets which use one.  Or one could
imagine doing that automatically, although that would not be a
backward compatible change.

Ian

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

* Re: Odd behavior with symbol naming mismatch between x86 and bfin platforms  using version scripts
  2010-02-08 17:01 Odd behavior with symbol naming mismatch between x86 and bfin platforms using version scripts Kevin P. Fleming
  2010-02-08 17:45 ` Ian Lance Taylor
@ 2010-02-08 20:20 ` Mike Frysinger
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2010-02-08 20:20 UTC (permalink / raw)
  To: binutils; +Cc: Kevin P. Fleming

[-- Attachment #1: Type: Text/Plain, Size: 406 bytes --]

On Monday 08 February 2010 12:00:58 Kevin P. Fleming wrote:
> One of our developers is running into an issue with version scripts not
> seeing symbols with the same naming scheme when code is built using GCC
> on an x86 platform vs. using the Blackfin tools (versions listed below).

i already explained to Doug that the current behavior is correct:
http://blackfin.uclinux.org/gf/forummessage/85711
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2010-02-08 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-08 17:01 Odd behavior with symbol naming mismatch between x86 and bfin platforms using version scripts Kevin P. Fleming
2010-02-08 17:45 ` Ian Lance Taylor
2010-02-08 20:20 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).