[PATCH][GAS][AARCH64]Fix "align directive causes MAP_DATA symbol to be lost"

Renlin Li renlin.li@arm.com
Tue Mar 24 17:37:00 GMT 2015


Hi all,

This is a similar patch to the one for ARM: 
https://sourceware.org/ml/binutils/2015-03/msg00042.html

A MAP_DATA symbol is postponed until the code is in MAP_INSN state.
When we have the following similar asm,

.text
.long 123  --> (1)
.align 4 --> (2)
     ret

(1) MAP_DATA is ignored because the code is initially in MAP_UNDEFINED mode.

a (2).align directive will triggle a frag initialization to setup the 
MAP_INSN state and mapping symbol, and start a new frag. And the 
MAP_DATA symbol for (1) is left forgotten silently.

This patch change the structure a little bit to correctly emit MAP_DATA 
mapping symbol.
Two test cases are also adjusted. Gas regression tests Okay.
Okay to commit?

Regards,
Renlin Li

gas/ChangeLog:

2015-03-24  Renlin Li  <renlin.li@arm.com>

     * config/tc-aarch64.c (mapping_state): Remove first MAP_DATA 
emitting code.
     (mapping_state_2): Emit first MAP_DATA symbol here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aarch64.diff
Type: text/x-patch
Size: 2420 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150324/a872d9c6/attachment.bin>


More information about the Binutils mailing list