u-boot/board/nokia/rx51
Pali Rohár 892759f5a0 Nokia RX-51: Fix compilation with non-zero CONFIG_SYS_TEXT_BASE
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>
Reviewed-by: Tom Rini <trini@konsulko.com>
2022-10-18 13:40:40 -04:00
..
Kconfig Nokia RX-51: Move board required options from defconfig to Kconfig 2022-08-20 16:18:40 -04:00
lowlevel_init.S Nokia RX-51: Fix compilation with non-zero CONFIG_SYS_TEXT_BASE 2022-10-18 13:40:40 -04:00
MAINTAINERS Nokia RX-51: Convert documentation to rst format 2022-01-29 10:23:40 +01:00
Makefile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
rx51.c Nokia RX-51: Fix double space key press 2022-10-12 11:11:58 -04:00
tag_omap.h Nokia RX-51: Update my email address 2020-05-11 10:16:49 +05:30