]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spl: legacy: Fix referencing _image_binary_end
authorSean Anderson <seanga2@gmail.com>
Sat, 14 Oct 2023 20:47:37 +0000 (16:47 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 18 Oct 2023 00:50:52 +0000 (20:50 -0400)
On non-arm architectures, _image_binary_end is defined as a ulong and not a
char[]. Take the address of it when accessing it, which is correct for
both.

Fixes: 1b8a1be1a1f ("spl: spl_legacy: Fix spl_end address")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/spl/spl_legacy.c

index 095443c63d8daae0f8d29914642bcb52b0d7b164..e9564e5c2a5c60a149a9041f85f90b747b60fdac 100644 (file)
@@ -19,7 +19,7 @@
 static void spl_parse_legacy_validate(uintptr_t start, uintptr_t size)
 {
        uintptr_t spl_start = (uintptr_t)_start;
-       uintptr_t spl_end = (uintptr_t)_image_binary_end;
+       uintptr_t spl_end = (uintptr_t)&_image_binary_end;
        uintptr_t end = start + size;
 
        if ((start >= spl_start && start < spl_end) ||