mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
[AArch64] use subseg_text_p to check .text
2015-04-07 Renlin Li <renlin.li@arm.com> gas/ * config/tc-aarch64.c (mapping_state): Use subseg_text_p. (s_aarch64_inst): Likewise. (md_assemble): Likewise.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2015-04-07 Renlin Li <renlin.li@arm.com>
|
||||||
|
|
||||||
|
* config/tc-aarch64.c (mapping_state): Use subseg_text_p.
|
||||||
|
(s_aarch64_inst): Likewise.
|
||||||
|
(md_assemble): Likewise.
|
||||||
|
|
||||||
2015-04-06 H.J. Lu <hongjiu.lu@intel.com>
|
2015-04-06 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* write.c (compress_debug): Use bfd_putb64 to write uncompressed
|
* write.c (compress_debug): Use bfd_putb64 to write uncompressed
|
||||||
|
@ -1472,8 +1472,8 @@ mapping_state (enum mstate state)
|
|||||||
record_alignment (now_seg, 2);
|
record_alignment (now_seg, 2);
|
||||||
|
|
||||||
#define TRANSITION(from, to) (mapstate == (from) && state == (to))
|
#define TRANSITION(from, to) (mapstate == (from) && state == (to))
|
||||||
if (TRANSITION (MAP_UNDEFINED, MAP_DATA) && now_seg != text_section)
|
if (TRANSITION (MAP_UNDEFINED, MAP_DATA) && !subseg_text_p (now_seg))
|
||||||
/* Emit MAP_DATA within text section in order. Otherwise, it will be
|
/* Emit MAP_DATA within executable section in order. Otherwise, it will be
|
||||||
evaluated later in the next else. */
|
evaluated later in the next else. */
|
||||||
return;
|
return;
|
||||||
else if (TRANSITION (MAP_UNDEFINED, MAP_INSN))
|
else if (TRANSITION (MAP_UNDEFINED, MAP_INSN))
|
||||||
@ -1855,13 +1855,13 @@ s_aarch64_inst (int ignored ATTRIBUTE_UNUSED)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sections are assumed to start aligned. In text section, there is no
|
/* Sections are assumed to start aligned. In executable section, there is no
|
||||||
MAP_DATA symbol pending. So we only align the address during
|
MAP_DATA symbol pending. So we only align the address during
|
||||||
MAP_DATA --> MAP_INSN transition.
|
MAP_DATA --> MAP_INSN transition.
|
||||||
For other sections, this is not guaranteed, align it anyway. */
|
For other sections, this is not guaranteed, align it anyway. */
|
||||||
enum mstate mapstate = seg_info (now_seg)->tc_segment_info_data.mapstate;
|
enum mstate mapstate = seg_info (now_seg)->tc_segment_info_data.mapstate;
|
||||||
if (!need_pass_2 && ((now_seg == text_section && mapstate == MAP_DATA)
|
if (!need_pass_2 && ((subseg_text_p (now_seg) && mapstate == MAP_DATA)
|
||||||
|| now_seg != text_section))
|
|| !subseg_text_p (now_seg)))
|
||||||
frag_align_code (2, 0);
|
frag_align_code (2, 0);
|
||||||
|
|
||||||
#ifdef OBJ_ELF
|
#ifdef OBJ_ELF
|
||||||
@ -5705,14 +5705,14 @@ md_assemble (char *str)
|
|||||||
dump_opcode_operands (opcode);
|
dump_opcode_operands (opcode);
|
||||||
#endif /* DEBUG_AARCH64 */
|
#endif /* DEBUG_AARCH64 */
|
||||||
|
|
||||||
/* Sections are assumed to start aligned. In text section, there is no
|
/* Sections are assumed to start aligned. In executable section, there is no
|
||||||
MAP_DATA symbol pending. So we only align the address during
|
MAP_DATA symbol pending. So we only align the address during
|
||||||
MAP_DATA --> MAP_INSN transition.
|
MAP_DATA --> MAP_INSN transition.
|
||||||
For other sections, this is not guaranteed, align it anyway. */
|
For other sections, this is not guaranteed, align it anyway. */
|
||||||
enum mstate mapstate = seg_info (now_seg)->tc_segment_info_data.mapstate;
|
enum mstate mapstate = seg_info (now_seg)->tc_segment_info_data.mapstate;
|
||||||
if (!need_pass_2 && ((now_seg == text_section && mapstate == MAP_DATA)
|
if (!need_pass_2 && ((subseg_text_p (now_seg) && mapstate == MAP_DATA)
|
||||||
|| now_seg != text_section))
|
|| !subseg_text_p (now_seg)))
|
||||||
frag_align_code (2, 0);
|
frag_align_code (2, 0);
|
||||||
|
|
||||||
mapping_state (MAP_INSN);
|
mapping_state (MAP_INSN);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user