aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-02-14 08:31:47 +0000
committerAlan Modra <amodra@gmail.com>2008-02-14 08:31:47 +0000
commitd40f3da9047364a8af792452aafac81fb5de5e74 (patch)
tree4391f5d43e0aace9c7761636a414c58a2b2d27d5
parentf6fbcbf926d2a76d7c00ef805f69483fd59db26b (diff)
downloadgdb-d40f3da9047364a8af792452aafac81fb5de5e74.zip
gdb-d40f3da9047364a8af792452aafac81fb5de5e74.tar.gz
gdb-d40f3da9047364a8af792452aafac81fb5de5e74.tar.bz2
* elflink.c (compute_bucket_count): Warning fixes.
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elflink.c10
2 files changed, 10 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index a8d88bd..d537146 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2008-02-14 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (compute_bucket_count): Warning fixes.
+
2008-02-12 DJ Delorie <dj@redhat.com>
* elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of
diff --git a/bfd/elflink.c b/bfd/elflink.c
index c658b14..a0bd0df 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -5234,13 +5234,13 @@ static const size_t elf_buckets[] =
Therefore the result is always a good payoff between few collisions
(= short chain lengths) and table size. */
static size_t
-compute_bucket_count (struct bfd_link_info *info, unsigned long int *hashcodes,
- unsigned long int nsyms, int gnu_hash)
+compute_bucket_count (struct bfd_link_info *info,
+ unsigned long int *hashcodes ATTRIBUTE_UNUSED,
+ unsigned long int nsyms,
+ int gnu_hash)
{
- size_t dynsymcount = elf_hash_table (info)->dynsymcount;
size_t best_size = 0;
unsigned long int i;
- bfd_size_type amt;
/* We have a problem here. The following code to optimize the table
size requires an integer type with more the 32 bits. If
@@ -5252,8 +5252,10 @@ compute_bucket_count (struct bfd_link_info *info, unsigned long int *hashcodes,
size_t maxsize;
BFD_HOST_U_64_BIT best_chlen = ~((BFD_HOST_U_64_BIT) 0);
bfd *dynobj = elf_hash_table (info)->dynobj;
+ size_t dynsymcount = elf_hash_table (info)->dynsymcount;
const struct elf_backend_data *bed = get_elf_backend_data (dynobj);
unsigned long int *counts;
+ bfd_size_type amt;
/* Possible optimization parameters: if we have NSYMS symbols we say
that the hashing table must at least have NSYMS/4 and at most