Reverts patches providing octet support in dwarf
[deliverable/binutils-gdb.git] / gas / dwarf2dbg.c
index 90b47b02fc049a9655c5057439b98de82ef5b192..dce96033df7f74378d07a3ca0cb310c72f5ef869 100644 (file)
@@ -1136,28 +1136,16 @@ get_frag_fix (fragS *frag, segT seg)
 
 /* Set an absolute address (may result in a relocation entry).  */
 
-static void
-out_inc_line_addr (int line_delta, addressT addr_delta);
-
 static void
 out_set_addr (symbolS *sym)
 {
   expressionS exp;
-  addressT expr_addr, expr_addr_aligned;
 
   memset (&exp, 0, sizeof exp);
+  out_opcode (DW_LNS_extended_op);
+  out_uleb128 (sizeof_address + 1);
 
-  /* The expression at the bottom must be aligned to OCTETS_PER_BYTE.  The
-     statements after the for loop will contribute 3 more octets.  */
-  expr_addr = frag_now_fix_octets () + 3;
-  expr_addr_aligned = (expr_addr + OCTETS_PER_BYTE - 1) & -OCTETS_PER_BYTE;
-  for ( ; expr_addr != expr_addr_aligned; expr_addr++)
-    out_inc_line_addr (0, 0);  /* NOP */
-
-  out_opcode (DW_LNS_extended_op);   /* 1 octet */
-  out_uleb128 (sizeof_address + 1);  /* 1 octet */
-
-  out_opcode (DW_LNE_set_address);   /* 1 octet */
+  out_opcode (DW_LNE_set_address);
   exp.X_op = O_symbol;
   exp.X_add_symbol = sym;
   exp.X_add_number = 0;
@@ -1827,7 +1815,6 @@ out_debug_line (segT line_seg)
   symbolS *line_end;
   struct line_seg *s;
   int sizeof_offset;
-  addressT section_end, section_end_aligned;
 
   memset (&exp, 0, sizeof exp);
   sizeof_offset = out_header (line_seg, &exp);
@@ -1844,7 +1831,7 @@ out_debug_line (segT line_seg)
   exp.X_op_symbol = prologue_start;
   exp.X_add_number = 0;
   emit_expr (&exp, sizeof_offset);
-  symbol_set_value_now_octets (prologue_start);
+  symbol_set_value_now (prologue_start);
 
   /* Parameters of the state machine.  */
   out_byte (DWARF2_LINE_MIN_INSN_LENGTH);
@@ -1869,7 +1856,7 @@ out_debug_line (segT line_seg)
 
   out_file_list ();
 
-  symbol_set_value_now_octets (prologue_end);
+  symbol_set_value_now (prologue_end);
 
   /* For each section, emit a statement program.  */
   for (s = all_segs; s; s = s->next)
@@ -1889,17 +1876,7 @@ out_debug_line (segT line_seg)
        in the DWARF Line Number header.  */
     subseg_set (subseg_get (".debug_line_end", FALSE), 0);
 
-  /* Pad size of .debug_line section to a multiple of OCTETS_PER_BYTE.
-     Simply sizing the section in md_section_align() is not sufficient,
-     also the size field in the .debug_line header must be a multiple
-     of OCTETS_PER_BYTE.  Not doing so will introduce gaps within the
-     .debug_line sections after linking.  */
-  section_end = frag_now_fix_octets ();
-  section_end_aligned = (section_end + OCTETS_PER_BYTE - 1) & -OCTETS_PER_BYTE;
-  for ( ; section_end != section_end_aligned; section_end++)
-    out_inc_line_addr (0, 0);  /* NOP */
-
-  symbol_set_value_now_octets (line_end);
+  symbol_set_value_now (line_end);
 }
 
 static void
@@ -2018,7 +1995,7 @@ out_debug_aranges (segT aranges_seg, segT info_seg)
   md_number_to_chars (p, 0, addr_size);
   md_number_to_chars (p + addr_size, 0, addr_size);
 
-  symbol_set_value_now_octets (aranges_end);
+  symbol_set_value_now (aranges_end);
 }
 
 /* Emit data for .debug_abbrev.  Note that this must be kept in
@@ -2133,7 +2110,7 @@ out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg, segT ranges_seg,
      dwarf2 draft has no standard code for assembler.  */
   out_two (DW_LANG_Mips_Assembler);
 
-  symbol_set_value_now_octets (info_end);
+  symbol_set_value_now (info_end);
 }
 
 /* Emit the three debug strings needed in .debug_str and setup symbols
This page took 0.02425 seconds and 4 git commands to generate.