This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [2.25][AARCH64][GAS]Backport "Positively emit symbols for alignment."
- From: Tristan Gingold <gingold at adacore dot com>
- To: Renlin Li <renlin dot li at arm dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, Nicholas Clifton <nickc at redhat dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Wed, 17 Jun 2015 12:06:33 +0200
- Subject: Re: [2.25][AARCH64][GAS]Backport "Positively emit symbols for alignment."
- Authentication-results: sourceware.org; auth=none
- References: <553A3CAD dot 3050208 at arm dot com> <55814031 dot 2010000 at arm dot com>
> On 17 Jun 2015, at 11:38, Renlin Li <renlin.li@arm.com> wrote:
>
> Hi all,
>
> This is a backport patch from the discussion here:
>
> https://sourceware.org/ml/binutils/2015-05/msg00027.html
> https://sourceware.org/ml/binutils/2015-05/msg00027.html
>
> The expected results of testcases are modified to account the status of binutils 2.25.
>
> Binutils, ld, gas regression test Okay. Okay to commit for branch 2.25?
Yes, this is ok for 2.25
>
>
> Regards,
> Renlin Li
>
>
> gas/ChangeLog:
>
> 2015-06-17 Renlin Li <renlin.li@arm.com>
>
> Backport from mainline.
> 2015-05-05 Renlin Li <renlin.li@arm.com>
>
> * config/tc-aarch64.c (aarch64_init_frag): Always generate mapping symbols.
>
> gas/testsuite/ChangeLog:
>
> 2015-06-17 Renlin Li <renlin.li@arm.com>
>
> Backport from mainline.
> 2015-05-05 Renlin Li <renlin.li@arm.com>
>
> * gas/aarch64/mapping_5.d: New.
> * gas/aarch64/mapping_5.s: New.
> * gas/aarch64/mapping_6.d: New.
> * gas/aarch64/mapping_6.s: New.
>
>
> On 24/04/15 13:53, Renlin Li wrote:
>> Hi all,
>>
>> In arm_init_frag(), when ARM or THUMB are recorded, it will simply return without doing anything. This is not correct in a few cases.
>>
>> For the following two cases:
>> case 1:
>> nop ----> MAP_ARM
>> .long 0 ---> MAP_DATA
>> .align 4 --->
>> ---->(1)
>> ----> start new frag
>> .word 0x12345678
>>
>> (1) paddings here are all treated as data, because the previous state is MAP_DATA.
>>
>> case 2:
>> nop ----> MAP_ARM
>> .long 0 ---> MAP_DATA
>> .byte 1
>> .align 2 ---> (1)
>> ----> (2)
>> ----> start new frag
>> .long 0x12345678 ----> (3)
>>
>> stage 1: while parsing the input file:
>> (1) arm_init_frag early returns, No state change, no new symbol. (3)No state change, no new symbol.
>> stage 2: Later, while writing the object file:
>> (2)MAP_DATA, MAP_ARM are inserted by insert_data_mapping_symol to handle alignment. (3) interpreted as instruction because of the MAP_ARM inserted at (2)
>>
>>
>> This change might generate redundant symbols, some of them can be removed later. In check_mapping_symbols(), the symbols at the end of a section, and overlapping symbols will be removed.
>>
>> gas checked without any new issues. Okay to commit?
>>
>> By the way, Nick, aarch64 has the same issue. The same can be done to aarch64_init_frag(). Another way is to remove fragP->tc_frag_data.recorded. It's only used in a few places. But I am sure what dose it intended to do, Could you please explain a little bit for me?
>>
>> Regards,
>> Renlin Li
>>
>>
>> gas/ChangeLog:
>>
>> 2015-04-24 Renlin Li <renlin.li@arm.com>
>>
>> * config/tc-arm.c (arm_init_frag): Always emit mapping symbols.
>>
>> gas/testsuite/ChangeLog:
>>
>> 2015-04-24 Renlin Li <renlin.li@arm.com>
>>
>> * gas/arm/thumb2_vpool_be.d: Adjust the desired output.
>> * gas/arm/vldconst_be.d: Ditto.
>>
>
> <aarch64-backport.diff>