This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] PR23837, Segmentation fault in resolve_symbol_value


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b0d99ba9e9c7d7967b53e271e683b7563b710dae

commit b0d99ba9e9c7d7967b53e271e683b7563b710dae
Author: Alan Modra <amodra@gmail.com>
Date:   Sun Oct 28 15:57:17 2018 +1030

    PR23837, Segmentation fault in resolve_symbol_value
    
    Local symbols don't have a sy_frag field.
    
    	PR 23837
    	* config/tc-hppa.c: Don't include struc-symbol.h.
    	(pa_build_unwind_subspace): Call get_symbol_frag rather than
    	referencing sy_frag.

Diff:
---
 gas/ChangeLog        | 7 +++++++
 gas/config/tc-hppa.c | 3 +--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 759186b..b1c67de 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2018-10-28  Alan Modra  <amodra@gmail.com>
+
+	PR 23837
+	* config/tc-hppa.c: Don't include struc-symbol.h.
+	(pa_build_unwind_subspace): Call get_symbol_frag rather than
+	referencing sy_frag.
+
 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
 
 	* config/tc-s12z.c (md_apply_fix): Handle BFD_RELOC_16 for fixups
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index ccae68c..7ced5ee 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -23,7 +23,6 @@
 
 #include "as.h"
 #include "safe-ctype.h"
-#include "struc-symbol.h"
 #include "subsegs.h"
 #include "dw2gencfi.h"
 
@@ -5991,7 +5990,7 @@ pa_build_unwind_subspace (struct call_info *call_info)
     {
       symbolP = symbol_new (name, now_seg,
 			    S_GET_VALUE (call_info->start_symbol),
-			    call_info->start_symbol->sy_frag);
+			    symbol_get_frag (call_info->start_symbol));
       gas_assert (symbolP);
       S_CLEAR_EXTERNAL (symbolP);
       symbol_table_insert (symbolP);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]