]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Remove redundant section merge hash table field
authorAlan Modra <amodra@gmail.com>
Wed, 30 Oct 2024 22:20:22 +0000 (08:50 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 12 Nov 2024 06:36:35 +0000 (17:06 +1030)
commit510fa4aadb1c6509ebbbe55b901231c45039efd8
tree32bf0abfe94f83ad4226ceeb7c9960a0cf2a806c
parenta3741bc6c7018f5c7a5093eabdb7473d19ea6630
Remove redundant section merge hash table field

sec_merge_hash.size duplicates sec_merge_hash.table.count, albeit using
bfd_size_type rather than unsigned int.  The only reason to have the
duplicate field is to catch unsigned int overflows, and that can be
done easily enough when and if required.  Overflow isn't possible at
the moment.  See the needs_resize comment.

* merge.c (sec_merge_hash): Remove "size" field.
(NEEDS_RESIZE): Delete macro, replacing with..
(needs_resize): ..this inline function.
(sec_merge_resize): Rename from sec_merge_maybe_resize,
removing redundant check.
(sec_merge_hash_insert, sec_merge_hash_lookup): Adjust to suit.
(sec_merge_init, merge_strings): Likewise.
bfd/merge.c