aboutsummaryrefslogtreecommitdiff
path: root/tccelf.c
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2013-01-31 13:41:58 +0100
committerThomas Preud'homme <robotux@celest.fr>2013-01-31 13:43:04 +0100
commitae33c30b49d2246b3ffc7834bb4bbacc7bb749f0 (patch)
treeae0378b27e578f471c67b8afa93da71aabd27f91 /tccelf.c
parent2f6b8469cc27c0679460a2b70a35f8ba830281fc (diff)
downloadtinycc-ae33c30b49d2246b3ffc7834bb4bbacc7bb749f0.tar.gz
tinycc-ae33c30b49d2246b3ffc7834bb4bbacc7bb749f0.tar.bz2
Revert "Don't call elf_hash on NULL value"
This reverts commit 505329b5b3ee4cb47d0a3590ccd62a65dbf83fc9.
Diffstat (limited to 'tccelf.c')
-rw-r--r--tccelf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tccelf.c b/tccelf.c
index 152c4fb..5fea23a 100644
--- a/tccelf.c
+++ b/tccelf.c
@@ -114,7 +114,7 @@ ST_FUNC int put_elf_sym(Section *s, uplong value, unsigned long size,
if (ELFW(ST_BIND)(info) != STB_LOCAL) {
/* add another hashing entry */
nbuckets = base[0];
- h = name ? elf_hash(name) % nbuckets : 0;
+ h = elf_hash(name) % nbuckets;
*ptr = base[2 + h];
base[2 + h] = sym_index;
base[1]++;