--- dwarf2-frame.c.orig 2009-10-21 21:34:20.000000000 -0700 +++ dwarf2-frame.c 2009-10-21 23:10:29.000000000 -0700 @@ -1525,6 +1525,14 @@ find_cie (struct dwarf2_cie_table *cie_t { struct dwarf2_cie **p_cie; + if (cie_table->num_entries == 0) + { + /* On Solaris 8 bsearch may call comparison function even when given + an empty table. As a work around, don't call bsearch under these + conditions. */ + return NULL; + } + p_cie = bsearch (&cie_pointer, cie_table->entries, cie_table->num_entries, sizeof (cie_table->entries[0]), bsearch_cie_cmp); if (p_cie != NULL)