projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3620d6
)
bfd_compress_section_contents access to elf_section_data
author
Alan Modra
<amodra@gmail.com>
Wed, 7 Dec 2022 03:15:46 +0000
(13:45 +1030)
committer
Alan Modra
<amodra@gmail.com>
Wed, 7 Dec 2022 03:22:28 +0000
(13:52 +1030)
* compress.c (bfd_compress_section_contents): Don't access
elf_section_data for non-ELF.
bfd/compress.c
patch
|
blob
|
history
diff --git
a/bfd/compress.c
b/bfd/compress.c
index 294349235439f77d39db2c2a0caf92b5be6468d2..6a30af5f8e6089934372a355eded47f6de257b0a 100644
(file)
--- 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