BFD: Exclude sections with no content from compress check.
[deliverable/binutils-gdb.git] / bfd / compress.c
index ce6bb2beaee689d0eb700f69a08e7eb5fe92ab5c..728ba39dfbf748c688bb8c9f1a8d28c5a1ae9bd0 100644 (file)
@@ -255,6 +255,9 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
              /* PR 24753: Linker created sections can be larger than
                 the file size, eg if they are being used to hold stubs.  */
              && (bfd_section_flags (sec) & SEC_LINKER_CREATED) == 0
+             /* PR 24753: Sections which have no content should also be
+                excluded as they contain no size on disk.  */
+             && (bfd_section_flags (sec) & SEC_HAS_CONTENTS) != 0
              /* The MMO file format supports its own special compression
                 technique, but it uses COMPRESS_SECTION_NONE when loading
                 a section's contents.  */
This page took 0.024889 seconds and 4 git commands to generate.