diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-01-18 18:55:59 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-01-18 18:55:59 +0000 |
commit | 24a2d04da085e1e795c6e271ae43235383b53a04 (patch) | |
tree | 78eff6f416fc224bed3fe180061170fafcb96849 /gas/write.c | |
parent | 2b52916eef5b07a8651af45db0992936f98263d2 (diff) | |
download | gdb-24a2d04da085e1e795c6e271ae43235383b53a04.zip gdb-24a2d04da085e1e795c6e271ae43235383b53a04.tar.gz gdb-24a2d04da085e1e795c6e271ae43235383b53a04.tar.bz2 |
Don't compress empty debug sections.
gas/
2011-01-18 H.J. Lu <hongjiu.lu@intel.com>
PR gas/12409
* write.c (compress_debug): Return if section size is 0.
gas/testsuite/
2011-01-18 H.J. Lu <hongjiu.lu@intel.com>
PR gas/12409
* gas/elf/dwarf2-4.d: New.
* gas/elf/dwarf2-4.s: Likewise.
Diffstat (limited to 'gas/write.c')
-rw-r--r-- | gas/write.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gas/write.c b/gas/write.c index 018800e..aabb96d 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; |