public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Nitin Garg <nitingarg98@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Problem with libpthread of uClibc
Date: Sat, 30 May 2009 17:58:00 -0000	[thread overview]
Message-ID: <m3eiu7flu5.fsf@google.com> (raw)
In-Reply-To: <403c615d0905291353q309876b2ubac57c7ee7e4663e@mail.gmail.com> (Nitin Garg's message of "Fri\, 29 May 2009 15\:53\:31 -0500")

Nitin Garg <nitingarg98@gmail.com> writes:

> We are using ARM Cortex-A9 processor. The toolchain is gcc-4.0.0 with
> uClibc-0.9.30 and the kernel is 2.6.28.
>
> Using this toolchain when we build any application like "Hello World"
> and link it against pthread lib, the application does a segmentation
> fault when executed on target and gives "Illegal instruction" error
> message.
>
> I debugged the problem and it came out to be that "swp" instructions
> were disabled on the cortex-a9. The SWP instruction has been
> deprecated starting with the ARMv6 architecture. On newer ARMv7
> processors, this instruction is disabled by default but it can be
> enabled by bit 10 in the System Control register. We can also build
> the kernel with CONFIG_OABI_COMPAT enabled.
>
> The real problem seems to be in the linuxthreads of uClibc where "swp"
> is being used for locks.
> Shall this not be replaced with ldrex/strex for ARMv7 onwards?

This message is not appropriate for the mailing list gcc@gcc.gnu.org.
gcc@gcc.gnu.org is for the discussion of gcc development.  Please take
any followups to this message to gcc-help@gcc.gnu.org.  Thanks.

Actually I'm not sure there is any gcc issue here at all.  gcc 4.0.0 is
fairly old.

Ian

      reply	other threads:[~2009-05-30  0:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-30 16:43 Nitin Garg
2009-05-30 17:58 ` Ian Lance Taylor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3eiu7flu5.fsf@google.com \
    --to=iant@google.com \
    --cc=gcc@gcc.gnu.org \
    --cc=nitingarg98@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).