This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [AArch64][TLSLE][3/3] Implement local executable mode for all memory model
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Jiong Wang <jiong dot wang at arm dot com>
- Cc: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>, gcc-patches <gcc-patches at gnu dot org>
- Date: Thu, 27 Aug 2015 15:14:41 +0200
- Subject: Re: [AArch64][TLSLE][3/3] Implement local executable mode for all memory model
- Authentication-results: sourceware.org; auth=none
- References: <n99h9r5oosb dot fsf at arm dot com> <CAFqB+Pwi=xRgu7e-mxmwijS-QyVjzP4dCwow-25Nmwr1qKce6w at mail dot gmail dot com> <n99fv3f5oo1 dot fsf at arm dot com> <CAKdteOYN603DnpwdxEOtmOsd5yhFy92nNVoCB3nMkkVhxbyuRg at mail dot gmail dot com> <n998u8x3yzp dot fsf at arm dot com> <CAKdteOZDnKhEaw6rACrv-vu6c3fwDh99=zCHiQ-DE_rhFd8Tew at mail dot gmail dot com> <n9961413w63 dot fsf at arm dot com> <n991tep3v59 dot fsf at arm dot com>
On 27 August 2015 at 12:03, Jiong Wang <jiong.wang@arm.com> wrote:
>
> Jiong Wang writes:
>>>>
>>>> Those relocation types required by tls-size 12 & 24 are supported by
>>>> binutils-2.25 already, and you have passed compilation and failed at
>>>> exectuion, so there do have something wrong I guess.
>>>>
>>>> Either the generated instruction sequence or the bare-metal environment.
>>>>
>>>> One thing strange to me is those testcases are guarded by:
>>>>
>>>> /* { dg-require-effective-target tls_native } */
>>>>
>>>> while for bare-metal environment, normally you don't have tls_native
>>>> support right? then these testcases should have been marked as
>>>> unsupported otherwise they will generate native tls instruction
>>>> sequences while the bare-metal runtime environment may don't support
>>>> initialize tp register etc, thus caused the exectuion error.
>>>>
>>>> Could you please double check this? thanks
>>>>
>>>
>>> Well, the "tls_native" check passes (there is no "emutls" string in
>>> the generated assembly).
>>> This BTW, does not involve the binutils, since it only check the
>>> assembly output.
>>>
>>> Could it be a configure error instead? (where GCC wouldn't notice that
>>> it shouldn't generate such relocations)
>>
>> to me, it's more like this. native tls is enabled on a no such support
>> platform.
>>
>> I am trying to setup a bare-metal environment for reproducing. I was
>> testing on linux environment.
>
> Finished test on my local aarch64-none-elf bare-metal. they are marked
> as unsupported correctly. gcc is doing correct configuration on my
> environment. looks like somehow gcc is doing wrong tls enable on your
> bare-metal platform.
>
I checked libgcc's configure output and it answers "no" to the
question "whether the thread-local storage support is from emutls"
What is the result in your case?
And before that 'assembler supports thread-local storage' is yes, too.
> UNSUPPORTED: gcc.target/aarch64/tlsdesc_hoist.c
> UNSUPPORTED: gcc.target/aarch64/tlsle12_1.c
> UNSUPPORTED: gcc.target/aarch64/tlsle24_1.c
> UNSUPPORTED: gcc.target/aarch64/tlsle32_1.c
> --
> Regards,
> Jiong
>