aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmisc.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-10-04 13:14:05 +1030
committerAlan Modra <amodra@gmail.com>2022-10-04 18:42:54 +1030
commit758dd750bc6d752b290aefdd62048ca2ea5899d4 (patch)
tree3e7808b8069ea87866143d6d29d917a472ad0a5e /ld/ldmisc.h
parent034235cebd790d4f9a1728043a175d7d7d9338b1 (diff)
downloadbinutils-758dd750bc6d752b290aefdd62048ca2ea5899d4.zip
binutils-758dd750bc6d752b290aefdd62048ca2ea5899d4.tar.gz
binutils-758dd750bc6d752b290aefdd62048ca2ea5899d4.tar.bz2
Support objcopy changing compression to or from zstd
Commit 2cac01e3ffff lacked support for objcopy changing compression style. Add that support, which meant a rewrite of bfd_compress_section_contents. In the process I've fixed some memory leaks. * compress.c (bfd_is_section_compressed_info): Rename from bfd_is_section_compressed_with_header and add ch_type param to return compression header ch_type field. Update all callers. (decompress_section_contents): Remove buffer and size params. Rewrite. Update callers. (bfd_init_section_compress_status): Free contents on failure. (bfd_compress_section): Likewise. * elf.c (_bfd_elf_make_section_from_shdr): Support objcopy changing between any of the three compression schemes. Report "unable to compress/decompress" rather than "unable to initialize compress/decompress status" on compress/decompress failures. * bfd-in2.h: Regenerate.
Diffstat (limited to 'ld/ldmisc.h')
0 files changed, 0 insertions, 0 deletions