|
Revision 7b5d546fdbf1d330ecc18d4c5b5d15db7cb5c783, 0.5 KB
(checked in by H. Peter Anvin <hpa@…>, 3 years ago)
|
|
prepcore: error out if the compressed image is too large to load
Export, from each loader stage, the symbol MaxLMA which indicates to
prepcore how big the image is allowed to be. Change prepcore to
enforce this limit and to error out otherwise.
Signed-off-by: H. Peter Anvin <hpa@…>
|
-
Property mode set to
100644
|
| Line | |
|---|
| 1 | ; |
|---|
| 2 | ; The prefix is a small structure that prefaces the actual code; |
|---|
| 3 | ; it gives the compression program necessary information. |
|---|
| 4 | ; |
|---|
| 5 | |
|---|
| 6 | section .prefix nowrite progbits align=16 |
|---|
| 7 | pfx_start dd _start ; Start of raw chunk |
|---|
| 8 | pfx_compressed dd __pm_code_lma ; Start of compressed chunk |
|---|
| 9 | pfx_cdatalen dd lzo_data_size ; Pointer to compressed size field |
|---|
| 10 | %if IS_ISOLINUX |
|---|
| 11 | pfx_checksum dd bi_length ; File length and checksum fields |
|---|
| 12 | %else |
|---|
| 13 | pfx_checksum dd 0 ; No checksum |
|---|
| 14 | %endif |
|---|
| 15 | pfx_maxlma dd MaxLMA ; Maximum size |
|---|
| 16 | |
|---|
| 17 | section .text16 |
|---|