[binutils-gdb] dwarf2: Use octets for .debug_string offsets
Alan Modra
amodra@sourceware.org
Wed Mar 13 04:25:00 GMT 2019
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5c4e5fe61bb00395f697a928524da1e94087c677
commit 5c4e5fe61bb00395f697a928524da1e94087c677
Author: Christian Eggers <ceggers@gmx.de>
Date: Sun Mar 10 19:21:56 2019 +0100
dwarf2: Use octets for .debug_string offsets
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.
Diff:
---
gas/ChangeLog | 4 ++++
gas/dwarf2dbg.c | 6 +++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index d4ae7a0..368a73c 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,9 @@
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.
2019-03-13 Christian Eggers <ceggers@gmx.de>
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c
index 896a8f1..d469138 100644
--- a/gas/dwarf2dbg.c
+++ b/gas/dwarf2dbg.c
@@ -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);
More information about the Binutils-cvs
mailing list