This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFC] Support -fsection-anchors on darwin
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Richard Sandiford <richard at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: Mon, 20 Feb 2006 14:21:35 -0500
- Subject: Re: [PATCH/RFC] Support -fsection-anchors on darwin
- References: <873bie2wki.fsf@talisman.home>
Not every file format supports a static BSS (SBSS) section with
.space or .zero directives. Some implement SBSS as local common (LCOMM).
On targets that use lcomm for SBSS, section-anchors currently converts the
SBSS to initialized zeroes, which may overflow the section size or section
relocations.
One can say that targets with file formats that do not support an
explicit BSS section should update the section-anchors hook to prevent
uninitialized data from using that mechnism. Or, the default
section-anchors function could check for BSS_SECTION_ASM_OP instead of
requiring overriding hooks.
There is nothing inherent in the section anchors concept that
prevents it from being used with uninitialized data allocated in COMMON
section, but setting the anchor through labels in the section instead of
using the address of the section symbol makes this difficult for sections
like COMMON.
David