public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Kalai Rajah N <kalairajah@gmail.com>
Cc: "gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: Re: Thumb inline assembly
Date: Mon, 10 Jun 2013 22:51:00 -0000	[thread overview]
Message-ID: <CAKOQZ8xEqJX1cEHBOKdswKc6gh1SVczQu_-0ZNsgxtNkoyOj2A@mail.gmail.com> (raw)
In-Reply-To: <CAPTDLfFZp2Z_arQO0iRRFFQMxuj1=AC6zxgv4Q=F2GVxY23qVA@mail.gmail.com>

On Mon, Jun 10, 2013 at 2:41 PM, Kalai Rajah N <kalairajah@gmail.com> wrote:

>  I'm trying to do a simple register read through ARM inline assembly.
> If I embed the asm in the function directly, it works ...

...

> I see the following errors:
> /tmp/ccYu7aUS.ltrans0.ltrans.o: In function `read_reg_ok':
> ccYu7aUS.ltrans0.o:(.text.check_reset_value.4010+0x60): undefined
> reference to `r6'
> ccYu7aUS.ltrans0.o:(.text.check_reset_value.4010+0x64): undefined
> reference to `r4'
> ccYu7aUS.ltrans0.o:(.text.check_reset_value.4010+0x68): undefined
> reference to `r5'
> collect2: error: ld returned 1 exit status
>
> What am I doing wrong?


Your test case has no mention of r4, r5, or r6.  It always helps to
show a complete standalone test case.

The error messages indicate some confusion: there are references to
symbols using the names of registers.  But I don't know where those
are coming from.

Ian

  reply	other threads:[~2013-06-10 22:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-10 21:41 Kalai Rajah N
2013-06-10 22:51 ` Ian Lance Taylor [this message]
2013-06-10 23:19   ` Kalai Rajah N
2013-06-10 23:59     ` Ian Lance Taylor
2013-06-11  0:06       ` Kalai Rajah N
2013-06-11  0:13         ` Ian Lance Taylor
     [not found]           ` <CAPTDLfH--WkreVXSDb7nt6KsKP+vBH3q_eoJX7yvqm=O8QzF0A@mail.gmail.com>
2013-06-11  0:20             ` Fwd: " Kalai Rajah N
2013-06-11  0:31               ` Ian Lance Taylor
2013-06-11  0:41                 ` Kalai Rajah N
2013-06-11  1:01                   ` Ian Lance Taylor
2013-06-11 18:27                     ` Kalai Rajah N

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=CAKOQZ8xEqJX1cEHBOKdswKc6gh1SVczQu_-0ZNsgxtNkoyOj2A@mail.gmail.com \
    --to=iant@google.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=kalairajah@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).