From 62b3d97d4c7ff601bfc625ef6639908fab4eba27 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 18 Jan 2011 18:55:58 +0000 Subject: Don't compress empty debug sections. gas/ 2011-01-18 H.J. Lu PR gas/12409 * write.c (compress_debug): Return if section size is 0. gas/testsuite/ 2011-01-18 H.J. Lu PR gas/12409 * gas/elf/dwarf2-4.d: New. * gas/elf/dwarf2-4.s: Likewise. --- gas/write.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gas/write.c') diff --git a/gas/write.c b/gas/write.c index 018800e075..aabb96d236 100644 --- a/gas/write.c +++ b/gas/write.c @@ -1359,6 +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 || (flags & (SEC_ALLOC | SEC_HAS_CONTENTS)) == SEC_ALLOC) return; -- cgit v1.2.1