diff options
author | Nick Clifton <nickc@redhat.com> | 2014-11-04 16:00:10 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2014-11-04 16:00:10 +0000 |
commit | 79f2a78e76fae1885163027f843e1bafde984b4c (patch) | |
tree | e09e898de8e864b6bb83ca39d9e39977f963cd58 /bfd/compress.c | |
parent | e0a31db1b16fe0a010aa46185e4a31a08e7fd97f (diff) | |
download | gdb-79f2a78e76fae1885163027f843e1bafde984b4c.zip gdb-79f2a78e76fae1885163027f843e1bafde984b4c.tar.gz gdb-79f2a78e76fae1885163027f843e1bafde984b4c.tar.bz2 |
Fix problem with linker created sections being mistakenly flagged
as corrupt by the new error checking code in bfd_get_full_section_contents.
PR binutils/17512
* compress.c (bfd_get_full_section_contents): Improve test for
linker created objects.
Diffstat (limited to 'bfd/compress.c')
-rw-r--r-- | bfd/compress.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/compress.c b/bfd/compress.c index 083a7df..6831562 100644 --- a/bfd/compress.c +++ b/bfd/compress.c @@ -179,8 +179,9 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr) case COMPRESS_SECTION_NONE: /* PR binutils/17512: Avoid malloc or file reading errors due to ridiculous section sizes. But ignore linker created objects - with no contents (yet). */ + and bfds with no contents (yet). */ if (bfd_get_size (abfd) > 0 + && (sec->flags & SEC_LINKER_CREATED) == 0 && sz > (bfd_size_type) bfd_get_size (abfd)) return FALSE; |