rems-project / sail

Sail architecture definition language
Other
631 stars 117 forks source link

Remove zlib dependency #798

Closed Timmmm closed 6 days ago

Timmmm commented 1 week ago

Currently the Sail C runtime depends on zlib because the load_elf() and lookup_sym() functions that read ELF files support transparently accessing ELFs via gzopen. I suspect that isn't really needed, and I'm looking at making binary versions of the RISC-V emulator available where it would be nice to avoid the dependency. Would it be ok if I removed support for this?

arichardson commented 1 week ago

I agree that this is not necessary. If needed it could be build-time option that defaults to off, but that doesn't add much value. Only supporting zlib also doesn't make much sense - libarchive would support more formats transparently.

And realistically, if you really want this feature your run scripts can just extract the file to a tempdir before running.

Alasdair commented 6 days ago

I thought we were doing something a bit fancier where we supported individually compressed ELF sections (like GNU zdebug). As it's just decompressing elf.gz files I think we could probably remove it.