mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
MIPS/BFD: Fix assertion in `mips_elf_sort_hash_table'
Move the assertion on non-NULL `htab' in `mips_elf_sort_hash_table' to the beginning, before the pointer is dereferenced (`mips_elf_hash_table (info)' and `elf_hash_table (info)' both point to the same memory location, differently typed). bfd/ * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on non-NULL `htab' to the beginning.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
|
||||||
|
|
||||||
|
* elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
|
||||||
|
non-NULL `htab' to the beginning.
|
||||||
|
|
||||||
2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
|
2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
|
||||||
|
|
||||||
* elflink.c (elf_gc_sweep): Wrap overlong line.
|
* elflink.c (elf_gc_sweep): Wrap overlong line.
|
||||||
|
@ -3832,12 +3832,12 @@ mips_elf_sort_hash_table (bfd *abfd, struct bfd_link_info *info)
|
|||||||
struct mips_elf_hash_sort_data hsd;
|
struct mips_elf_hash_sort_data hsd;
|
||||||
struct mips_got_info *g;
|
struct mips_got_info *g;
|
||||||
|
|
||||||
if (elf_hash_table (info)->dynsymcount == 0)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
htab = mips_elf_hash_table (info);
|
htab = mips_elf_hash_table (info);
|
||||||
BFD_ASSERT (htab != NULL);
|
BFD_ASSERT (htab != NULL);
|
||||||
|
|
||||||
|
if (elf_hash_table (info)->dynsymcount == 0)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
g = htab->got_info;
|
g = htab->got_info;
|
||||||
if (g == NULL)
|
if (g == NULL)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Reference in New Issue
Block a user