Open hannesweisbach opened 1 year ago
Aren't both messages printed no matter the order of the checks?
No, LOG_DEBUG
calls Logger::Instance()->Error()
, which in turn ends with throw BootGenException
which is caught in main()
and then the application exists.
I see (you mean LOG_ERROR
I presume). Then I agree that your suggested order is more natural.
Yes, LOG_ERROR
, of course 😅
Checking elf header size before elf magic may lead to presenting the user with a misleading error message in case the elf file header is corrupted or a non-elf file was entered into the bif file instead of an elf file (for example bl31.bin instead of bl31.elf.
Instead of receiving the misleading error message:
[ERROR] : ELF Parsing Error !!! Wrong Header Size
The user is now presented with a more accurate error message: [ERROR] : ELF Parsing Error !!! ELF magic identification word wrong