]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Explain frag alignment hacks
authorAlan Modra <amodra@gmail.com>
Wed, 3 Sep 2025 00:20:17 +0000 (09:50 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 3 Sep 2025 01:01:35 +0000 (10:31 +0930)
commitfcd717899e8a38dd152002ebcb432e6d508b7c38
tree977c0a6d12348234a443af311e613f6ac4d1ae69
parent11e5824cda9f8d94f6982124eb2c231dfab77bee
Explain frag alignment hacks

"the weird alignment hackery" comment doesn't help anyone understand
the code.  Explain what is going on.  Replace the zero length
obstack_alloc with obstack_finish, which by inspection of obstack.h is
all the zero length alloc does.

* frags.c (frag_alloc): Comment.  Replace zero length
obstack_alloc with obstack_finish.
(frag_new): Remove unnecessary obstack_finish.
* write.c (compress_frag, compress_debug): Likewise.
gas/frags.c
gas/write.c