bfd *dynobj;
asection *s;
boolean reltext;
- struct mips_got_info *g;
+ struct mips_got_info *g = NULL;
dynobj = elf_hash_table (info)->dynobj;
BFD_ASSERT (dynobj != NULL);
if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_UNREFEXTNO, 0))
return false;
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_GOTSYM, 0))
+ if (g != NULL && g->global_gotsym != NULL
+ && ! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_GOTSYM, 0))
return false;
if (IRIX_COMPAT (dynobj) == ict_irix5
break;
case DT_MIPS_GOTSYM:
- if (g->global_gotsym != NULL)
- dyn.d_un.d_val = g->global_gotsym->dynindx;
- else
- dyn.d_un.d_val = 0;
+ dyn.d_un.d_val = g->global_gotsym->dynindx;
break;
case DT_MIPS_HIPAGENO: