Revert "Don't call elf_hash on NULL value"
This reverts commit 505329b5b3.
This commit is contained in:
2
tccelf.c
2
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) {
|
if (ELFW(ST_BIND)(info) != STB_LOCAL) {
|
||||||
/* add another hashing entry */
|
/* add another hashing entry */
|
||||||
nbuckets = base[0];
|
nbuckets = base[0];
|
||||||
h = name ? elf_hash(name) % nbuckets : 0;
|
h = elf_hash(name) % nbuckets;
|
||||||
*ptr = base[2 + h];
|
*ptr = base[2 + h];
|
||||||
base[2 + h] = sym_index;
|
base[2 + h] = sym_index;
|
||||||
base[1]++;
|
base[1]++;
|
||||||
|
|||||||
Reference in New Issue
Block a user