mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 19:09:31 +08:00
* elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
size_t. Rename second i to j.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2001-11-11 Hans-Peter Nilsson <hp@bitrange.com>
|
||||||
|
|
||||||
|
* elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
|
||||||
|
size_t. Rename second i to j.
|
||||||
|
|
||||||
Sat Nov 10 08:56:02 2001 Jeffrey A Law (law@cygnus.com)
|
Sat Nov 10 08:56:02 2001 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
* binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
|
* binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
|
||||||
|
@ -349,7 +349,13 @@ _bfd_elf_strtab_finalize (tab)
|
|||||||
{
|
{
|
||||||
struct elf_strtab_hash_entry **array, **a, **end, *e;
|
struct elf_strtab_hash_entry **array, **a, **end, *e;
|
||||||
htab_t lasttab = NULL, last4tab = NULL;
|
htab_t lasttab = NULL, last4tab = NULL;
|
||||||
bfd_size_type size, amt, i;
|
bfd_size_type size, amt;
|
||||||
|
|
||||||
|
/* GCC 2.91.66 (egcs-1.1.2) on i386 miscompiles this function when i is
|
||||||
|
a 64-bit bfd_size_type: a 64-bit target or --enable-64-bit-bfd.
|
||||||
|
Besides, indexing with a long long wouldn't give anything but extra
|
||||||
|
cycles. */
|
||||||
|
size_t i;
|
||||||
|
|
||||||
/* Now sort the strings by length, longest first. */
|
/* Now sort the strings by length, longest first. */
|
||||||
array = NULL;
|
array = NULL;
|
||||||
@ -380,7 +386,7 @@ _bfd_elf_strtab_finalize (tab)
|
|||||||
{
|
{
|
||||||
register hashval_t hash;
|
register hashval_t hash;
|
||||||
unsigned int c;
|
unsigned int c;
|
||||||
unsigned int i;
|
unsigned int j;
|
||||||
const unsigned char *s;
|
const unsigned char *s;
|
||||||
PTR *p;
|
PTR *p;
|
||||||
|
|
||||||
@ -389,7 +395,7 @@ _bfd_elf_strtab_finalize (tab)
|
|||||||
{
|
{
|
||||||
s = e->root.string + e->len - 1;
|
s = e->root.string + e->len - 1;
|
||||||
hash = 0;
|
hash = 0;
|
||||||
for (i = 0; i < 4; i++)
|
for (j = 0; j < 4; j++)
|
||||||
{
|
{
|
||||||
c = *--s;
|
c = *--s;
|
||||||
hash += c + (c << 17);
|
hash += c + (c << 17);
|
||||||
|
Reference in New Issue
Block a user