diff options
author | Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> | 2015-03-24 19:18:04 +0530 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2015-03-25 20:42:00 +1030 |
commit | d422d1c433073ba412287334a7ec3aa95e03c5e9 (patch) | |
tree | d2eef2aaca76a0e8f91d1ae04bae511d4380da08 /bfd | |
parent | b422eb499be2858969fb7723b4e4e08cab20fcdc (diff) | |
download | gdb-d422d1c433073ba412287334a7ec3aa95e03c5e9.zip gdb-d422d1c433073ba412287334a7ec3aa95e03c5e9.tar.gz gdb-d422d1c433073ba412287334a7ec3aa95e03c5e9.tar.bz2 |
Garbage collecting debug sections
I noticed that _bfd_elf_gc_mark_extra_sections attempts to unmark
related debug sections when it finds an unmarked code section.
When it finds .text.foo is unmarked, for example, it removes
.debug_line.text.foo as well (using the section name as a suffix
match check.
However, it bails out after finding one such section.
bfd/
* elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
first matching debug section.
ld/testsuite/
* ld-gc/all-debug-sections.d: New file.
* ld-gc/all-debug-sections.s: Likewise.
* ld-gc/gc.exp: Execute new testcase.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elflink.c | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 469066b..78895be 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> + + * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on + first matching debug section. + 2015-03-24 H.J. Lu <hongjiu.lu@intel.com> PR gas/18087 diff --git a/bfd/elflink.c b/bfd/elflink.c index f93293b..9ccad8c 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -12102,7 +12102,6 @@ _bfd_elf_gc_mark_extra_sections (struct bfd_link_info *info, isec->name, ilen) == 0) { dsec->gc_mark = 0; - break; } } } |