fix bootimage lzma build

We were using the length of the uncompressed boot image when
generating the object file, whereas we should have been using the
compressed length.
This commit is contained in:
Joel Dice 2014-08-04 17:21:23 -06:00
parent 60ea4b2cc2
commit 8c1e7d48ad

View File

@ -1851,10 +1851,6 @@ void writeBootImage2(Thread* t,
abort();
}
SymbolInfo bootimageSymbols[]
= {SymbolInfo(0, bootimageStart),
SymbolInfo(bootimageData.length, bootimageEnd)};
uint8_t* bootimage;
unsigned bootimageLength;
if (useLZMA) {
@ -1874,6 +1870,10 @@ void writeBootImage2(Thread* t,
bootimageLength = bootimageData.length;
}
SymbolInfo bootimageSymbols[]
= {SymbolInfo(0, bootimageStart),
SymbolInfo(bootimageLength, bootimageEnd)};
platform->writeObject(bootimageOutput,
Slice<SymbolInfo>(bootimageSymbols, 2),
Slice<const uint8_t>(bootimage, bootimageLength),