On Fri, Jun 21, 2019 at 12:20 PM Martin Liška <[email protected]> wrote: > > Hi. > > The patch is about a new ELF section that will contain information > about LTO version. And for the future, used compression will be stored > here. The patch removes streaming of the version into each section.
I'd like each section to have a header containing a compression method (compressed or not, and now zlib vs. zstd). We currently have a mix and knowledge is hidden. I also remember I had old patches to make the data streamer compress the stream on-the-fly, not requiring the full uncompressed stream in memory and then re-access it for compression (needing more temporary memory). But IIRC the speedup was marginal. My thought is also that we should have exactly _one_ ELF section for the LTO bytecode and our own container inside (much like simple-object does for non-ELF). So having another one is, well, ugly ;) > Disadvantage is a format change that will lead to following errors when > LTO bytecode is used from a different version: > > $ gcc x.o > lto1: fatal error: bytecode stream in file ‘x.o’ generated with GCC compiler > older than 10.0 > > $ gcc-9 main.o > lto1: fatal error: bytecode stream in file ‘main.o’ generated with LTO > version 850.0 instead of the expected 8.0 > > I've been testing the patch. > Thoughts? > Martin
