summaryrefslogtreecommitdiff
path: root/GPG-KEY
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2023-04-22 01:45:43 +0200
committerMark Wielaard <mark@klomp.org>2023-05-08 18:14:15 +0200
commit6cad4e56a930034765f8e79ba2eaa2ff1cd8394f (patch)
tree9de41b3dbe84013dda5eea22169d02022736d885 /GPG-KEY
parentfa7da8bfad1ec2ac61859aa0b4b09b42ea657ea2 (diff)
downloadelfutils-6cad4e56a930034765f8e79ba2eaa2ff1cd8394f.tar.gz
elfcompress: Don't compress if section already compressed unless forced
Before commit a5b07cdf9 "support ZSTD compression algorithm" elfcompress would not try to compress a section if it already had the requested compression type (or was already uncompressed) unless the --force flag was given. An else if construct was changed to an if in the commit causing elfcompress to warn (in verbose mode) but then still try to (re)compress the section. Add an explicit check so if nothing needs (un)compressing, the file isn't changed. The diff looks large, but git diff -b -w is just: + if (force || type != schtype) + { if (shdr->sh_type != SHT_NOBITS && (shdr->sh_flags & SHF_ALLOC) == 0) { @@ -554,6 +556,7 @@ process_file (const char *fname) printf ("[%zd] %s ignoring %s section\n", ndx, sname, (shdr->sh_type == SHT_NOBITS ? "no bits" : "allocated")); } + } Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'GPG-KEY')
0 files changed, 0 insertions, 0 deletions