From: H.J. Lu Date: Wed, 19 Jan 2011 00:24:23 +0000 (+0000) Subject: Don't compress debug sections smaller than 32 bytes. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6ac88ef38d4da039b342dff4c457044f924bfc8a;p=binutils-gdb.git Don't compress debug sections smaller than 32 bytes. 2011-01-18 H.J. Lu * write.c (compress_debug): Return if section size is small than 32 byte. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index bb47e720f82..d9cf957812a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2011-01-18 H.J. Lu + + * write.c (compress_debug): Return if section size is smaller + than 32 bytes. + 2011-01-18 H.J. Lu PR gas/12409 diff --git a/gas/write.c b/gas/write.c index aabb96d236c..5f10bad2230 100644 --- a/gas/write.c +++ b/gas/write.c @@ -1359,7 +1359,7 @@ compress_debug (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED) flagword flags = bfd_get_section_flags (abfd, sec); if (seginfo == NULL - || sec->size == 0 + || sec->size < 32 || (flags & (SEC_ALLOC | SEC_HAS_CONTENTS)) == SEC_ALLOC) return;