On Wed, 2019-07-31 at 21:46 +0200, Helge Deller wrote: > On 31.07.19 21:44, Sven Schnelle wrote: > > Hi James, > > > > On Wed, Jul 31, 2019 at 12:40:12PM -0700, James Bottomley wrote: > > > > > What about causing the compressed make to build both a stripped > > > and a non-stripped bzImage (say sbzImage and bzImage). That way > > > you always have the stripped one available for small size things > > > like boot from tape or DVD? but in the usual case we use the > > > bzImage with full contents. > > > > In that case we would also need to build two lifimages - how about > > adding a config option option? Something like "Strip debug > > information from compressed kernel images"? > > I agree, two lifimages don't make sense. Only one vmlinuz gets > installed. Instead of the config option, I tink my latest patch is > better. It doesn't solve the problem that if a stripped compressed image is > 128kb then it overwrites the decompress area starting at 0x00100000 so we can't decompress the end because we've already overwritten it before the decompressor gets to it. What we could possibly do is be clever and align the .rodata.compressed so its last text byte ends where the uncompressed kernel text would end. We could be even more clever and split .rodata.compressed into a load and a noload part so we would only load the part of the compressed kernel we need. Then the lifimage creation scripts could discard the noload part containing the debug symbols. James