}
entry_.key_ = *key;
- ptr = htab_find_slot (got->entries, &entry_, (howto != SEARCH
- ? INSERT : NO_INSERT));
+ ptr = htab_find_slot (got->entries, &entry_,
+ (howto == SEARCH || howto == MUST_FIND ? NO_INSERT
+ : INSERT));
if (ptr == NULL)
{
if (howto == SEARCH)
/* Entry not found. */
return NULL;
+ if (howto == MUST_FIND)
+ abort ();
+
/* We're out of memory. */
bfd_set_error (bfd_error_no_memory);
return NULL;
if (*ptr == NULL)
/* We didn't find the entry and we're asked to create a new one. */
{
- BFD_ASSERT (howto != MUST_FIND && howto != SEARCH);
+ if (howto == MUST_FIND)
+ abort ();
+
+ BFD_ASSERT (howto != SEARCH);
entry = bfd_alloc (elf_hash_table (info)->dynobj, sizeof (*entry));
if (entry == NULL)
}
entry_.bfd = abfd;
- ptr = htab_find_slot (multi_got->bfd2got, &entry_, (howto != SEARCH
- ? INSERT : NO_INSERT));
+ ptr = htab_find_slot (multi_got->bfd2got, &entry_,
+ (howto == SEARCH || howto == MUST_FIND ? NO_INSERT
+ : INSERT));
if (ptr == NULL)
{
if (howto == SEARCH)
/* Entry not found. */
return NULL;
+ if (howto == MUST_FIND)
+ abort ();
+
/* We're out of memory. */
bfd_set_error (bfd_error_no_memory);
return NULL;
if (*ptr == NULL)
/* Entry was not found. Create new one. */
{
- BFD_ASSERT (howto != MUST_FIND && howto != SEARCH);
+ if (howto == MUST_FIND)
+ abort ();
+
+ BFD_ASSERT (howto != SEARCH);
entry = ((struct elf_m68k_bfd2got_entry *)
bfd_alloc (elf_hash_table (info)->dynobj, sizeof (*entry)));
BFD_ASSERT (sgot != NULL);
if (got == NULL)
- {
- got = elf_m68k_get_bfd2got_entry (elf_m68k_multi_got (info),
- input_bfd, MUST_FIND,
- NULL)->got;
- BFD_ASSERT (got != NULL);
- }
+ got = elf_m68k_get_bfd2got_entry (elf_m68k_multi_got (info),
+ input_bfd, MUST_FIND,
+ NULL)->got;
/* Get GOT offset for this symbol. */
elf_m68k_init_got_entry_key (&key_, h, input_bfd, r_symndx,