Revert "Don't call elf_hash on NULL value"
authorThomas Preud'homme <robotux@celest.fr>
Thu, 31 Jan 2013 12:41:58 +0000 (31 13:41 +0100)
committerThomas Preud'homme <robotux@celest.fr>
Thu, 31 Jan 2013 12:43:04 +0000 (31 13:43 +0100)
tccelf.c

index 152c4fb..5fea23a 100644 (file)
--- 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]++;