]> git.dujemihanovic.xyz Git - u-boot.git/commit
examples: fix building on arm64
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 3 Nov 2024 05:35:49 +0000 (06:35 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 14 Nov 2024 16:51:07 +0000 (10:51 -0600)
commita3c101a613481ecc7286e1949e6aa97474c7a4fe
tree379f232f57eb3da4c6809d0f0b79f87730f661bb
parente2635570e08199bb5644ce164def2a46d1dee9c0
examples: fix building on arm64

Commit f9886bc60f42 ("Added arm64 assembly for examples/api crt0") tried to
add arm64 support to the examples but crt0.S does not even build for
qemu_arm64_defconfig with CONFIG_API=y, CONFIG_EXAMPLES=y:

    examples/api/crt0.S: Assembler messages:
    examples/api/crt0.S:32: Error:
        expected a register at operand 1 -- `ldr ip,=search_hint'
    examples/api/crt0.S:33: Error:
        unexpected register type at operand 1 -- `str sp,[ip]'
    make[2]: *** [scripts/Makefile.build:292: examples/api/crt0.o] Error 1

Do not define _start twice.
Use valid register names.
Move syscall_ptr and search_hint to the data section to avoid an invalid
relocation.

Fixes: f9886bc60f42 ("Added arm64 assembly for examples/api crt0")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
examples/api/crt0.S