[U-Boot] efi_loader: Convert runtime reset from switch to if statements
Alexander Graf
agraf at suse.de
Tue Jun 12 07:54:40 UTC 2018
> We currently handle the UEFI runtime reset / power off case handling via
> a switch statement. Compilers (gcc in my case) may opt to handle these via
> jump tables which they may conveniently put into .rodata which is not part
> of the runtime section, so it will be unreachable when executed.
>
> Fix this by just converting the switch statement into an if/else statement.
> It produces smaller code that is faster and also correct because we no
> longer refer .rodata from efi runtime code.
>
> Reported-by: Andreas Färber <aferber at suse.de>
> Signed-off-by: Alexander Graf <agraf at suse.de>
Thanks, applied to efi-next
Alex
More information about the U-Boot
mailing list