public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: "Pali Rohár" <pali@kernel.org>
Cc: u-boot@lists.denx.de, maemo-leste@lists.dyne.org
Subject: Re: [PATCH] Nokia RX-51: Fix compilation with non-zero CONFIG_SYS_TEXT_BASE
Date: Mon, 10 Oct 2022 09:54:02 -0400	[thread overview]
Message-ID: <20221010135402.GE2020586@bill-the-cat> (raw)
In-Reply-To: <20221009193713.12765-1-pali@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

On Sun, Oct 09, 2022 at 09:37:13PM +0200, Pali Rohár wrote:

> For some unknown reason GNU assembler version 2.31.1 (arm-linux-gnueabi-as
> from Debian Buster) cannot compile following code from located in file
> board/nokia/rx51/lowlevel_init.S:
> 
>   kernoffs:
>     .word  KERNEL_OFFSET - (. - CONFIG_SYS_TEXT_BASE)
> 
> when CONFIG_SYS_TEXT_BASE is set to 0x80008000. It throws strange compile
> error which is even without line number:
> 
>     AS      board/nokia/rx51/lowlevel_init.o
>   {standard input}: Assembler messages:
>   {standard input}: Error: attempt to get value of unresolved symbol `L0'
>   make[2]: *** [scripts/Makefile.build:293: board/nokia/rx51/lowlevel_init.o] Error 1
> 
> I have no idea about this error and my experiments showed that ARM GNU
> assembler is happy with negation of that number. So changing code to:
> 
>   kernoffs:
>     .word  . - CONFIG_SYS_TEXT_BASE - KERNEL_OFFSET
> 
> and then replacing mathematical addition by substraction of "kernoffs"
> value (so calculation of address does not change) compiles assembler file
> without any error now.
> 
> There should be not any functional change.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>
> ---
> Btw, is somebody understanding that compile error message? Is there (or
> was there) some real issue in the code, so assembler refuse to compile
> it? Or have I triggered bug in GNU assembler?

I would suggest filing a bug with upstream GNU assembler and seeing what
they say.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2022-10-10 13:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-09 19:37 [PATCH] Nokia RX-51: Fix compilation with non-zero CONFIG_SYS_TEXT_BASE Pali Rohár
2022-10-10 13:54 ` Tom Rini [this message]
2022-10-10 16:18   ` Pali Rohár
2022-10-10 16:21     ` Tom Rini
2022-10-10 17:21       ` Pali Rohár
2022-10-14 16:46 ` Tom Rini
2022-10-18 22:16 ` Tom Rini

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=20221010135402.GE2020586@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=maemo-leste@lists.dyne.org \
    --cc=pali@kernel.org \
    --cc=u-boot@lists.denx.de \
    /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