summaryrefslogtreecommitdiff
path: root/gas/hash.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-04-14 09:00:35 +0000
committerNick Clifton <nickc@redhat.com>2005-04-14 09:00:35 +0000
commitef8e6bef51d705782c00a44072f458a538ee4c5e (patch)
tree5d003539384b30adc682ecc2586a6ea1d2cfd826 /gas/hash.c
parentd8e6c8fbe4d7492874b642e1576ef11897a1852e (diff)
downloadbinutils-redhat-ef8e6bef51d705782c00a44072f458a538ee4c5e.tar.gz
* as.c (main): Move parse_args before symbol_begin and frag_init so that the
hash table size can be set before it is used. * hash.c: Use an unsigned long type for the size of the hash tables. * hash.h (set_gas_hash_table_size): Update the prototype.
Diffstat (limited to 'gas/hash.c')
-rw-r--r--gas/hash.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gas/hash.c b/gas/hash.c
index 7ff2103d67..bc534e67ad 100644
--- a/gas/hash.c
+++ b/gas/hash.c
@@ -73,20 +73,20 @@ struct hash_control {
switch --reduce-memory-overheads, or set to other values by using
the --hash-size=<NUMBER> switch. */
-static unsigned int gas_hash_table_size = 65537;
+static unsigned long gas_hash_table_size = 65537;
void
-set_gas_hash_table_size (unsigned int size)
+set_gas_hash_table_size (unsigned long size)
{
gas_hash_table_size = size;
}
/* FIXME: This function should be amalgmated with bfd/hash.c:bfd_hash_set_default_size(). */
-static unsigned int
+static unsigned long
get_gas_hash_table_size (void)
{
/* Extend this prime list if you want more granularity of hash table size. */
- static const unsigned int hash_size_primes[] =
+ static const unsigned long hash_size_primes[] =
{
1021, 4051, 8599, 16699, 65537
};
@@ -107,9 +107,9 @@ get_gas_hash_table_size (void)
struct hash_control *
hash_new (void)
{
- unsigned int size;
+ unsigned long size;
+ unsigned long alloc;
struct hash_control *ret;
- unsigned int alloc;
size = get_gas_hash_table_size ();