lib: elf: Fix typo
PATCH 1/1 lib: elf: Fix typo
I guess someone had EFI on the mind when writing the comment and wrote EFI instead of ELF.
--- lib/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/elf.c +1 -1
@@ -188,7 +188,7 @@ unsigned long load_elf64_image_shdr(unsigned long addr)* A very simple ELF loader, assumes the image is valid, returns the * entry point address. * -* The loader firstly reads the EFI class to see if it's a 64-bit image. +* The loader firstly reads the ELF class to see if it's a 64-bit image. * If yes, call the ELF64 loader. Otherwise continue with the ELF32 loader. */ unsigned long load_elf_image_phdr (unsigned long addr)
Signature · 1 line
2.51.0
Hi Daniel,
Quoted 5 lines · Daniel Palmer
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
I guess someone had EFI on the mind when writing the comment and wrote EFI instead of ELF.
Looking at the code, I believe it should be "EI" instead?
https://elixir.bootlin.com/u-boot/v2025.10/source/lib/elf.c#L201
Also please add the following trailer to your commit:
which should automatically Cc the author of the patch, here Bin Meng (added manually in Cc) who could tell us what it should actually be.
Cheers,
Quentin
Hi Quentin,
Quoted 2 lines · Quentin Schulz
Looking at the code, I believe it should be "EI" instead?
Yeah, I think you are right. The comment seems like it should really be above the if where the check is happening but I guess the intent is to show the function is ok for either 32 or 64 bit because it checks the class.