public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nitin Garg <nitingarg98@gmail.com>
To: uclibc@uclibc.org, gcc@gcc.gnu.org
Subject: Problem with libpthread of uClibc
Date: Sat, 30 May 2009 16:43:00 -0000	[thread overview]
Message-ID: <403c615d0905291353q309876b2ubac57c7ee7e4663e@mail.gmail.com> (raw)

Hi,

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?

Regards,
Nitin

             reply	other threads:[~2009-05-29 20:53 UTC|newest]

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

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=403c615d0905291353q309876b2ubac57c7ee7e4663e@mail.gmail.com \
    --to=nitingarg98@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=uclibc@uclibc.org \
    /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).