[3/20] MIPS GOT: Remove bogus assert
Richard Sandiford
rdsandiford@googlemail.com
Mon Feb 11 17:27:00 GMT 2013
The mips_elf_sort_hash_table_f assertions trigger for nonsensical input like:
lw $4,%got_disp(foo)($gp)
lw $4,%gottprel(foo)($gp)
.section .tdata,"awT"
.globl foo
foo:
.word 1
It would be good in principle to issue some kind of diagnostic here,
but we certainly shouldn't assert, and what we do without the assert
is what we were asked to do.
Richard
bfd/
* elfxx-mips.c (mips_elf_sort_hash_table_f): Remove asserts.
Index: bfd/elfxx-mips.c
===================================================================
--- bfd/elfxx-mips.c 2013-02-11 14:06:30.786145692 +0000
+++ bfd/elfxx-mips.c 2013-02-11 14:06:31.292149605 +0000
@@ -3640,15 +3640,11 @@ mips_elf_sort_hash_table_f (struct mips_
break;
case GGA_NORMAL:
- BFD_ASSERT (h->tls_type == GOT_NORMAL);
-
h->root.dynindx = --hsd->min_got_dynindx;
hsd->low = (struct elf_link_hash_entry *) h;
break;
case GGA_RELOC_ONLY:
- BFD_ASSERT (h->tls_type == GOT_NORMAL);
-
if (hsd->max_unref_got_dynindx == hsd->min_got_dynindx)
hsd->low = (struct elf_link_hash_entry *) h;
h->root.dynindx = hsd->max_unref_got_dynindx++;
More information about the Binutils
mailing list