gas: utility notes memory alloc functions
authorAlan Modra <amodra@gmail.com>
Wed, 6 Jul 2022 23:10:26 +0000 (08:40 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 9 Jul 2022 11:45:30 +0000 (21:15 +0930)
commitc30081c1f955a9fea2da8988bab96191e3d2171e
treeb8ecf3a18a6dcbf012f432928e46daabf0e1826c
parentd3be5dab558ab91789800a03fc2c1dc3c529eaf5
gas: utility notes memory alloc functions

Makes it a little easier to use the notes obstack for persistent
storage.

* as.h (gas_mul_overflow): Define.
* symbols.h (notes_alloc, notes_calloc, notes_memdup),
(notes_strdup, notes_concat, notes_free): Declare.
* symbols.c (notes_alloc, notes_calloc, notes_memdup),
(notes_strdup, notes_concat, notes_free): New functions.
(save_symbol_name): Use notes_strdup.
(symbol_create, local_symbol_make, local_symbol_convert),
(symbol_clone, decode_local_label_name): Use notes_alloc.
gas/as.h
gas/symbols.c
gas/symbols.h