This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Section anchors and thread-local storage
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: David Edelsohn <dje dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 26 Nov 2012 08:26:13 +0000
- Subject: Re: [PATCH] Section anchors and thread-local storage
- References: <CAGWvny=ZU6Gny8p3aQ+wz5+CP5KNTY87H+OPjTxd2QtVHKy_+Q@mail.gmail.com>
David Edelsohn <dje.gcc@gmail.com> writes:
> I have been working to enable native thread-local storage on AIX. One
> problem I encountered is the AIX assembler has difficulty with the
> anchor symbol for TLS CSECTs. While the section anchors machinery
> uses a separate pool for TLS entries, should section anchor blocks be
> used for TLS symbols at all?
>
> powerpc-linux uses GOT annotations directly and never places TLS
> symbols in the TOC at all. Section anchors seem to be avoided by TLS
> code already. The appended patch rejects TLS symbols for object
> blocks in general. I could add a target hook, but I wanted to propose
> this policy in general before pursing a target-specific hook.
Yeah, TLS anchors "work" on mips64-linux-gnu, although admittedly
section anchors aren't yet enabled by default there, so perhaps not
many people have tried it.
A use_blocks_for_decl_p hook sounds good, and fits nicely with
targetm.use_blocks_for_constant_p.
Thanks,
Richard