aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-08-01 22:45:06 +0000
committerMark Mitchell <mark@codesourcery.com>1999-08-01 22:45:06 +0000
commit7a12753dad0addccb0f795b46ab9f12d5ac42f5c (patch)
treef77c5484b804533f031a84a167f3eaa94e4a262a /bfd/elf32-mips.c
parent8b237a8965b9c4f4c0ec0bb13571b45fef6ed8ce (diff)
downloadgdb-7a12753dad0addccb0f795b46ab9f12d5ac42f5c.zip
gdb-7a12753dad0addccb0f795b46ab9f12d5ac42f5c.tar.gz
gdb-7a12753dad0addccb0f795b46ab9f12d5ac42f5c.tar.bz2
Fix typo
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r--bfd/elf32-mips.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 21a765d..8ac5dcf 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -7774,7 +7774,7 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
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);
@@ -8044,7 +8044,8 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
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
@@ -8459,10 +8460,7 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
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: