dwarf2: Use octets for .debug_string offsets
authorChristian Eggers <ceggers@gmx.de>
Sun, 10 Mar 2019 18:21:56 +0000 (19:21 +0100)
committerAlan Modra <amodra@gmail.com>
Wed, 13 Mar 2019 02:59:35 +0000 (13:29 +1030)
Like other dwarf2 offsets, also the string offsets in the .debug_info
section which points into the .debug_str section must be expressed in
octets instead of bytes.

* dwarf2dbg.c (out_debug_str): Use octets for .debug_string pointers.

gas/ChangeLog
gas/dwarf2dbg.c

index d4ae7a02d91ab84b15f3298200cc2b0e32699bf3..368a73cb4479468a96abfc3214402dea5f1f8a02 100644 (file)
@@ -1,3 +1,7 @@
+2019-03-13  Christian Eggers  <ceggers@gmx.de>
+
+       * dwarf2dbg.c (out_debug_str): Use octets for .debug_string pointers.
+
 2019-03-13  Christian Eggers  <ceggers@gmx.de>
 
        * dwarf2dbg.c (out_debug_line): Use octets for .debug_line prologue.
index 896a8f125ac7fb19b8941169364ab9b6450bd7a9..d46913857672abd0b92c9037911bf93c9a1d9f39 100644 (file)
@@ -2103,7 +2103,7 @@ out_debug_str (segT str_seg, symbolS **name_sym, symbolS **comp_dir_sym,
      on the command line, so assume files[1] is the main input file.
      We're not supposed to get called unless at least one line number
      entry was emitted, so this should always be defined.  */
-  *name_sym = symbol_temp_new_now ();
+  *name_sym = symbol_temp_new_now_octets ();
   if (files_in_use == 0)
     abort ();
   if (files[1].dir)
@@ -2125,14 +2125,14 @@ out_debug_str (segT str_seg, symbolS **name_sym, symbolS **comp_dir_sym,
   memcpy (p, files[1].filename, len);
 
   /* DW_AT_comp_dir */
-  *comp_dir_sym = symbol_temp_new_now ();
+  *comp_dir_sym = symbol_temp_new_now_octets ();
   comp_dir = remap_debug_filename (getpwd ());
   len = strlen (comp_dir) + 1;
   p = frag_more (len);
   memcpy (p, comp_dir, len);
 
   /* DW_AT_producer */
-  *producer_sym = symbol_temp_new_now ();
+  *producer_sym = symbol_temp_new_now_octets ();
   sprintf (producer, "GNU AS %s", VERSION);
   len = strlen (producer) + 1;
   p = frag_more (len);
This page took 0.027602 seconds and 4 git commands to generate.