]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
frag_alloc use of obstack_alloc
authorAlan Modra <amodra@gmail.com>
Wed, 3 Sep 2025 01:29:54 +0000 (10:59 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 3 Sep 2025 01:44:21 +0000 (11:14 +0930)
commit180075d14fab9f75eaf679589f9d175fb5448d21
tree83939b5239866edc6b12137386f70ff7cc923e37
parentfcd717899e8a38dd152002ebcb432e6d508b7c38
frag_alloc use of obstack_alloc

Avoid the alignment hackery necessary when obstack_alloc is used.
obstack_alloc expands to obstack_blank plus obstack_finish, and the
latter call is where alignment of the tail of the obstack happens.

The docs say obstack_alloc "is invoked almost like malloc", which
implies a fixed size allocation and you don't need other obstack calls
in its use.  So I think trying to use obstack_alloc in frag_alloc was
always a poor choice.

* frags.c (frag_alloc): Replace obstack_alloc with obstack_blank.
gas/frags.c