This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [12/16][binutils][AARCH64]Add relocation support for large memory model. [BFD]Create GOT section for TLSLE_MOVW_TPREL_G(1, 1_NC, 2).
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Jiong Wang <jiong dot wang at foss dot arm dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 4 Dec 2015 10:25:29 +0100
- Subject: Re: [12/16][binutils][AARCH64]Add relocation support for large memory model. [BFD]Create GOT section for TLSLE_MOVW_TPREL_G(1, 1_NC, 2).
- Authentication-results: sourceware.org; auth=none
- References: <55EF2231 dot 1060805 at arm dot com> <5660504D dot 5060604 at foss dot arm dot com> <566056AC dot 6020405 at arm dot com> <56605846 dot 6090407 at foss dot arm dot com> <56605D9A dot 8070902 at foss dot arm dot com>
On 3 December 2015 at 16:19, Jiong Wang <jiong.wang@foss.arm.com> wrote:
>
>
> On 03/12/15 14:57, Jiong Wang wrote:
>>
>>
>>
>> On 03/12/15 14:50, Renlin Li wrote:
>>>
>>>
>>>
>>> On 03/12/15 14:23, Jiong Wang wrote:
>>>>
>>>>
>>>>
>>>> On 08/09/15 19:00, Renlin Li wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> This patch fixes a bug, got section is not generated for
>>>>> TLSLE_MOVW_TPREL_G1,TLSLE_MOVW_TPREL_G1_NC, TLSLE_MOVW_TPREL_G2 previously.
>>>>>
>>>>> LD regression test Okay. Okay to commit?
>>>>>
>>>>> Regards,
>>>>> Renlin
>>>>>
>>>>> bfd/ChangeLog:
>>>>>
>>>>> 2015-09-08 Renlin Li <renlin.li@arm.com>
>>>>>
>>>>> * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Create GOT section
>>>>> for TLSLE_MOVW_TPREL_G(1, 1_NC, 2) relocation.
>>>>
>>>>
>>>> This looks wrong to me, and will cause inconsistent inside AArch64
>>>> backend.
>>>>
>>>> All TLS Local Executable relocation types don't need any GOT entry, we
>>>> shouldn't listed them here.
>>>
>>>
>>> Yes, you are right. I am wrong there.
>>>
>>>>
>>>> Looks like this patch was trying to fix the following two testcase
>>>> failures:
>>>>
>>>> Running
>>>> /work/GNU-TOOLCHAIN/binutils-gdb/ld/testsuite/ld-aarch64/aarch64-elf.exp ...
>>>> FAIL: ld-aarch64/tls-relax-large-gd-le
>>>> FAIL: ld-aarch64/tls-relax-large-desc-le
>>>>
>>>> The correct fix is to add "-shared" to the test option, then the symbol
>>>> _GLOBAL_OFFSET_TABLE_ will be defined, always.
>>>
>>>
>>> -shared could make the test cases pass, but is it required? The test case
>>> itself should be legal even without "-shared".
>>
>>
>> For that two particular testcases, the most important thing is to make
>> sure the tls relaxations are tested, either "-shared" or not doesn't matter.
>
>
> Oh, for these GD->LE testcases, shouldn't be shared, otherwise the
> relaxation will not happen.
>
>
I guess I'm missing something obvious: these 2 testcases PASS for me
(target aarch64-linux-gnu).
In which configuration do you see them failing?
>>
>> As you have referenced _GLOBAL_OFFSET_TABLE_, you need to specify -shared,
>> or you can just remove the reference, they are not related what's tested.
>>
>>>
>>> Regards,
>>> Renlin Li
>>>
>>>
>>
>