+2017-07-24 Nick Clifton <nickc@redhat.com>
+
+ PR 21809
+ * config/tc-aarch64.c (aarch64_init_frag): Do not set a mapping
+ state for frags in debug sections.
+ * config/tc-arm.c (arm_init_frag): Likewise.
+
2017-07-24 Hans-Peter Nilsson <hp@bitrange.com>
* dwarf2dbg.c (dwarf2dbg_final_check): Rename local variable exp
if (!fragP->tc_frag_data.recorded)
fragP->tc_frag_data.recorded = 1;
+ /* PR 21809: Do not set a mapping state for debug sections
+ - it just confuses other tools. */
+ if (bfd_get_section_flags (NULL, now_seg) & SEC_DEBUGGING)
+ return;
+
switch (fragP->fr_type)
{
case rs_align_test:
void
arm_init_frag (fragS * fragP, int max_chars)
{
- int frag_thumb_mode;
+ bfd_boolean frag_thumb_mode;
/* If the current ARM vs THUMB mode has not already
been recorded into this frag then do so now. */
if ((fragP->tc_frag_data.thumb_mode & MODE_RECORDED) == 0)
fragP->tc_frag_data.thumb_mode = thumb_mode | MODE_RECORDED;
+ /* PR 21809: Do not set a mapping state for debug sections
+ - it just confuses other tools. */
+ if (bfd_get_section_flags (NULL, now_seg) & SEC_DEBUGGING)
+ return;
+
frag_thumb_mode = fragP->tc_frag_data.thumb_mode ^ MODE_RECORDED;
/* Record a mapping symbol for alignment frags. We will delete this