read.c assign_symbol: use notes obstack for dummy listing frag
authorAlan Modra <amodra@gmail.com>
Tue, 5 Jul 2022 01:22:17 +0000 (10:52 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 9 Jul 2022 11:51:56 +0000 (21:21 +0930)
* read.c (assign_symbol): Use notes_calloc for dummy_frag.

gas/read.c

index 71bb30e4e70f5a928d6d8ff52b86c39be99a30d3..2f9a22a8d76fd6bb59fc5baded46638cc26408ef 100644 (file)
@@ -3094,7 +3094,7 @@ assign_symbol (char *name, int mode)
       if (listing & LISTING_SYMBOLS)
        {
          extern struct list_info_struct *listing_tail;
-         fragS *dummy_frag = XCNEW (fragS);
+         fragS *dummy_frag = notes_calloc (1, sizeof (*dummy_frag));
          dummy_frag->line = listing_tail;
          dummy_frag->fr_symbol = symbolP;
          symbol_set_frag (symbolP, dummy_frag);