[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/17931] --gc-sections doesn't work on section in a group

From: amodra at gmail dot com
Subject: [Bug ld/17931] --gc-sections doesn't work on section in a group
Date: Sat, 07 Feb 2015 01:55:00 +0000


--- Comment #3 from Alan Modra <amodra at gmail dot com> ---
I hear what you're saying, and accept that gc-sections could be made to work
for the specific case you present here.  However, I'm unconvinced that we
should do this in the linker, to work around what appears to be a gcc bug.

We've kept groups together under gc-sections right from the initial
implementation of section group support in 2001.  The major reason for doing
this is to keep on-the-side sections, eg. debug info, when any of their grouped
code or data sections are kept.  These on-the-side sections don't have
relocations from other sections that would cause them to be kept by the usual
gc-sections marking process.  For an example of sections that appear in a
loaded image, exception handling info, .eh_frame and associated sections, is
another set of on-the-side sections that a compiler could place in a group (and
should instead of relying on ld's eh_frame editing!).

Are there similar on-the-side code sections that would prevent us making an
exception for code sections in a group?  I don't know of any, but people do
weird things..

You are receiving this mail because:
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]