X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Fcompress.c;h=728ba39dfbf748c688bb8c9f1a8d28c5a1ae9bd0;hb=refs%2Fheads%2Fconcurrent-displaced-stepping-2020-04-01;hp=8f96d064bde1369a8956a3d3ed9d8599b86ead86;hpb=fd3619828e94a24a92cddec42cbc0ab33352eeb4;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/compress.c b/bfd/compress.c index 8f96d064bd..728ba39dfb 100644 --- a/bfd/compress.c +++ b/bfd/compress.c @@ -1,5 +1,5 @@ /* Compressed section support (intended for debug sections). - Copyright (C) 2008-2019 Free Software Foundation, Inc. + Copyright (C) 2008-2020 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -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. */