diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-07-03 16:06:31 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-07-03 16:06:31 +0000 |
commit | 9fd0b9a622aaa64017f232611120ff7fa828b67a (patch) | |
tree | 156699688e75cb5ad4d5dc5c596bee884650418d /bfd | |
parent | 9bb2949b19d073515dda13091ea423b57d6e760c (diff) | |
download | binutils-redhat-9fd0b9a622aaa64017f232611120ff7fa828b67a.tar.gz |
Don't compress empty debug section
2012-07-03 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/14319
* elf.c (_bfd_elf_make_section_from_shdr): Don't compress empty
debug section.
2012-07-03 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/14319
* binutils-all/compress.exp: Test compress empty debug sections.
* binutils-all/dw2-empty.S: New file.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 2b1e9e316c..5ab85252b5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,11 @@ 2012-07-03 H.J. Lu <hongjiu.lu@intel.com> + PR binutils/14319 + * elf.c (_bfd_elf_make_section_from_shdr): Don't compress empty + debug section. + +2012-07-03 H.J. Lu <hongjiu.lu@intel.com> + PR ld/3351 * elflink.c (_bfd_elf_update_dynamic_flags): New. (_bfd_elf_merge_symbol): Update both real and indirect symbol @@ -1025,7 +1025,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, else { /* Normal section. Check if we should compress. */ - if ((abfd->flags & BFD_COMPRESS)) + if ((abfd->flags & BFD_COMPRESS) && newsect->size != 0) action = compress; } |