diff options
author | Alan Modra <amodra@gmail.com> | 2017-05-19 12:40:10 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-05-19 17:49:34 +0930 |
commit | eb026f09eb6fcb96a5de1e655cdde041ba44affb (patch) | |
tree | 47bbe22ebbb48572a0ced8894d05fc2939d91289 /bfd/ChangeLog | |
parent | 50e1d299ef1d21b0833c2fe1484d3cc374e6486f (diff) | |
download | gdb-eb026f09eb6fcb96a5de1e655cdde041ba44affb.zip gdb-eb026f09eb6fcb96a5de1e655cdde041ba44affb.tar.gz gdb-eb026f09eb6fcb96a5de1e655cdde041ba44affb.tar.bz2 |
garbage collect debug sections when no alloc sections are kept
The pr20882 testcase fails on a number of targets that add attribute
or note sections to object files, and the default linker script says
those sections should be kept. This patch changes --gc-sections to
drop debug and special sections like .comment when no SEC_ALLOC
section in an object file is kept. The assumption is that debug
sections are describing code and data that will become part of the
final image in memory.
* elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
debug and special sections when no non-note alloc sections in an
object are kept.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r-- | bfd/ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a85199a..a5ec80a 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2017-05-19 Alan Modra <amodra@gmail.com> + + * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep + debug and special sections when no non-note alloc sections in an + object are kept. + 2017-05-18 Alan Modra <amodra@gmail.com> * arc-got.h: Don't compare boolean values against TRUE or FALSE. |