This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[3/20] MIPS GOT: Remove bogus assert


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++;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]