* [binutils-gdb] bfd_compress_section_contents access to elf_section_data
@ 2022-12-07 3:53 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-12-07 3:53 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=16fce1bddb03d493fdc17b2d33461f77f3b58499
commit 16fce1bddb03d493fdc17b2d33461f77f3b58499
Author: Alan Modra <amodra@gmail.com>
Date: Wed Dec 7 13:45:46 2022 +1030
bfd_compress_section_contents access to elf_section_data
* compress.c (bfd_compress_section_contents): Don't access
elf_section_data for non-ELF.
Diff:
---
bfd/compress.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bfd/compress.c b/bfd/compress.c
index 29434923543..6a30af5f8e6 100644
--- a/bfd/compress.c
+++ b/bfd/compress.c
@@ -682,7 +682,8 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec)
if (compressed_size >= uncompressed_size)
{
memcpy (buffer, input_buffer, uncompressed_size);
- elf_section_flags (sec) &= ~SHF_COMPRESSED;
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+ elf_section_flags (sec) &= ~SHF_COMPRESSED;
sec->compress_status = COMPRESS_SECTION_NONE;
}
else
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-07 3:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-07 3:53 [binutils-gdb] bfd_compress_section_contents access to elf_section_data Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).