PR23837, Segmentation fault in resolve_symbol_value
authorAlan Modra <amodra@gmail.com>
Sun, 28 Oct 2018 05:27:17 +0000 (15:57 +1030)
committerAlan Modra <amodra@gmail.com>
Sun, 28 Oct 2018 05:35:51 +0000 (16:05 +1030)
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.

gas/ChangeLog
gas/config/tc-hppa.c

index 759186b00cd12653304b4615c9b998685dd0d213..b1c67de928c0fd68df532567afc2444902224822 100644 (file)
@@ -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
index ccae68cb4060688e282f4662065fe2a380fe80df..7ced5ee5d5521c36277c488a2de7a7d268212546 100644 (file)
@@ -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);