[PATCH 01/26] spl: legacy: Fix referencing _image_binary_end

Sean Anderson seanga2 at gmail.com
Thu Oct 12 06:30:12 CEST 2023


On 10/11/23 23:41, Simon Glass wrote:
> On Wed, 11 Oct 2023 at 18:56, Sean Anderson <seanga2 at gmail.com> wrote:
>>
>> On non-arm architectures, _image_binary_end is defined as a ulong and not a
>> char[]. Dereference it when accessing it, which is correct for both.
> 
> Is 'dereference' the right word?

Yeah...

"Take the address of it when accessing it"?

--Sean

>>
>> Fixes: 1b8a1be1a1f ("spl: spl_legacy: Fix spl_end address")
>> Signed-off-by: Sean Anderson <seanga2 at gmail.com>
>> ---
>>
>>   common/spl/spl_legacy.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Simon Glass <sjg at chromium.org>
> 
> 
>>
>> diff --git a/common/spl/spl_legacy.c b/common/spl/spl_legacy.c
>> index 095443c63d8..e9564e5c2a5 100644
>> --- a/common/spl/spl_legacy.c
>> +++ b/common/spl/spl_legacy.c
>> @@ -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) ||
>> --
>> 2.37.1
>>



More information about the U-Boot mailing list