Stop the generation of mapping symbols in the debug sections of ARM and AArch64 binaries.
authorNick Clifton <nickc@redhat.com>
Mon, 24 Jul 2017 10:32:57 +0000 (11:32 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 24 Jul 2017 10:32:57 +0000 (11:32 +0100)
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.

gas/ChangeLog
gas/config/tc-aarch64.c
gas/config/tc-arm.c

index 17bdf52323c75167474c655cdccdbc768417b243..f8fc64f9fd7e44741fe9d6dd97342c94cc3186c0 100644 (file)
@@ -1,3 +1,10 @@
+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
index cdbe1efe22f9fe6fb2b84bb4b5214a680f6063d0..6a23f21b6c0fa0370ca5f329f98df86c1d3dd8b8 100644 (file)
@@ -6991,6 +6991,11 @@ aarch64_init_frag (fragS * fragP, int max_chars)
   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:
index a036b1a7d884ec2625b92d534d6ac63e27a8d7fb..a885efe4fce127e6608c658361932b2f82af7e30 100644 (file)
@@ -22005,13 +22005,18 @@ arm_init_frag (fragS * fragP, int max_chars ATTRIBUTE_UNUSED)
 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
This page took 0.050357 seconds and 4 git commands to generate.