Commit f94eae0
grub-mkimage: Do not generate empty SBAT metadata
When creating core.elf with SBAT the grub-mkimage does not check if
an SBAT metadata file contains at least an SBAT header or not. It leads to
adding an empty SBAT ELF note for PowerPC and the .sbat section for EFI.
Fix this by checking the SBAT metadata file size against the SBAT header
size before adding SBAT contents to the ELF note or .sbat section.
Signed-off-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>1 parent 1aa0dd0 commit f94eae0
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| |||
963 | 966 | | |
964 | 967 | | |
965 | 968 | | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
966 | 975 | | |
967 | 976 | | |
968 | 977 | | |
| |||
1396 | 1405 | | |
1397 | 1406 | | |
1398 | 1407 | | |
1399 | | - | |
| 1408 | + | |
1400 | 1409 | | |
1401 | 1410 | | |
1402 | 1411 | | |
| |||
1857 | 1866 | | |
1858 | 1867 | | |
1859 | 1868 | | |
1860 | | - | |
1861 | 1869 | | |
1862 | 1870 | | |
1863 | 1871 | | |
| |||
0 commit comments