garbage collect debug sections when no alloc sections are kept
authorAlan Modra <amodra@gmail.com>
Fri, 19 May 2017 03:10:10 +0000 (12:40 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 19 May 2017 08:19:34 +0000 (17:49 +0930)
commiteb026f09eb6fcb96a5de1e655cdde041ba44affb
tree47bbe22ebbb48572a0ced8894d05fc2939d91289
parent50e1d299ef1d21b0833c2fe1484d3cc374e6486f
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.
bfd/ChangeLog
bfd/elflink.c
This page took 0.024978 seconds and 4 git commands to generate.