Don't attempt to compress bss sections
authorAlan Modra <amodra@gmail.com>
Thu, 22 Sep 2022 23:34:52 +0000 (09:04 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 23 Sep 2022 02:25:47 +0000 (11:55 +0930)
commit4bea06d73c04cd4c78765fa8a9a5fe8346c5ed90
tree0d293682904893e373c303bb3193292235428779
parent35cff32e9e048c9b97c57388f07a219ac26ca310
Don't attempt to compress bss sections

It doesn't make sense to try to compress a section without contents
since those sections take no space on disk.  Compression can only
increase the disk image size.

* coffgen.c (make_a_section_from_file): Exclude !SEC_HAS_CONTENTS
sections from compression and decompression.
* elf.c (_bfd_elf_make_section_from_shdr): Likewise.
bfd/coffgen.c
bfd/elf.c