Add support for converting LDR Rx,=<imm> to MOV or MVN in Thumb2 mode.
[deliverable/binutils-gdb.git] / gas / dwarf2dbg.c
index 9177bdf7d85156cf40a475e0697f2fe2f6533dca..ecaccc9cc2fc5e9b1e274647d2204ec1fd684a39 100644 (file)
@@ -1458,7 +1458,8 @@ out_file_list (void)
 
 /* Switch to SEC and output a header length field.  Return the size of
    offsets used in SEC.  The caller must set EXPR->X_add_symbol value
-   to the end of the section.  */
+   to the end of the section.  EXPR->X_add_number will be set to the
+   negative size of the header.  */
 
 static int
 out_header (asection *sec, expressionS *exp)
@@ -1467,7 +1468,7 @@ out_header (asection *sec, expressionS *exp)
   symbolS *end_sym;
 
   subseg_set (sec, 0);
-#if 1
+
   if (flag_dwarf_sections)
     {
       /* If we are going to put the start and end symbols in different
@@ -1478,7 +1479,6 @@ out_header (asection *sec, expressionS *exp)
       symbol_set_value_now (start_sym);
     }
   else
-#endif
     {
       start_sym = symbol_temp_new_now ();
       end_sym = symbol_temp_make ();
@@ -1639,6 +1639,7 @@ static void
 out_debug_aranges (segT aranges_seg, segT info_seg)
 {
   unsigned int addr_size = sizeof_address;
+  offsetT size;
   struct line_seg *s;
   expressionS exp;
   symbolS *aranges_end;
@@ -1647,21 +1648,27 @@ out_debug_aranges (segT aranges_seg, segT info_seg)
 
   sizeof_offset = out_header (aranges_seg, &exp);
   aranges_end = exp.X_add_symbol;
+  size = -exp.X_add_number;
 
   /* Version.  */
   out_two (DWARF2_ARANGES_VERSION);
+  size += 2;
 
   /* Offset to .debug_info.  */
   TC_DWARF2_EMIT_OFFSET (section_symbol (info_seg), sizeof_offset);
+  size += sizeof_offset;
 
   /* Size of an address (offset portion).  */
   out_byte (addr_size);
+  size++;
 
   /* Size of a segment descriptor.  */
   out_byte (0);
+  size++;
 
   /* Align the header.  */
-  frag_align (ffs (2 * addr_size) - 1, 0, 0);
+  while ((size++ % (2 * addr_size)) > 0)
+    out_byte (0);
 
   for (s = all_segs; s; s = s->next)
     {
This page took 0.023807 seconds and 4 git commands to generate.