aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2013-02-11 17:31:23 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2013-02-11 17:31:23 +0000
commitd222d210283a5f08c3a0d347914011035f20d4be (patch)
tree919161bf83cb314c75f9bc9302d702b7106da94f /bfd/elfxx-mips.c
parent1fd20d7055267ce7d56a8adcdd1fbf80847300f3 (diff)
downloadgdb-d222d210283a5f08c3a0d347914011035f20d4be.zip
gdb-d222d210283a5f08c3a0d347914011035f20d4be.tar.gz
gdb-d222d210283a5f08c3a0d347914011035f20d4be.tar.bz2
bfd/
* elfxx-mips.c (mips_got_info): Move global_gotsym to... (mips_elf_link_hash_table): ...here. Update rest of file accordingly.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 3073f52..4a4e061 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -142,9 +142,6 @@ struct mips_got_page_entry
struct mips_got_info
{
- /* The global symbol in the GOT with the lowest index in the dynamic
- symbol table. */
- struct elf_link_hash_entry *global_gotsym;
/* The number of global .got entries. */
unsigned int global_gotno;
/* The number of global .got entries that are in the GGA_RELOC_ONLY area. */
@@ -460,6 +457,10 @@ struct mips_elf_link_hash_table
/* The master GOT information. */
struct mips_got_info *got_info;
+ /* The global symbol in the GOT with the lowest index in the dynamic
+ symbol table. */
+ struct elf_link_hash_entry *global_gotsym;
+
/* The size of the PLT header in bytes. */
bfd_vma plt_header_size;
@@ -3334,8 +3335,8 @@ mips_elf_global_got_index (bfd *abfd, bfd *ibfd, struct elf_link_hash_entry *h,
}
}
- if (gg->global_gotsym != NULL)
- global_got_dynindx = gg->global_gotsym->dynindx;
+ if (htab->global_gotsym != NULL)
+ global_got_dynindx = htab->global_gotsym->dynindx;
if (TLS_RELOC_P (r_type))
{
@@ -3622,7 +3623,7 @@ mips_elf_sort_hash_table (bfd *abfd, struct bfd_link_info *info)
/* Now we know which dynamic symbol has the lowest dynamic symbol
table index in the GOT. */
- g->global_gotsym = hsd.low;
+ htab->global_gotsym = hsd.low;
return TRUE;
}
@@ -4161,7 +4162,6 @@ mips_elf_get_got_for_bfd (struct htab *bfd2got, bfd *output_bfd,
bfdgot->bfd = input_bfd;
bfdgot->g = g;
- g->global_gotsym = NULL;
g->global_gotno = 0;
g->reloc_only_gotno = 0;
g->local_gotno = 0;
@@ -4461,8 +4461,6 @@ mips_elf_set_global_got_offset (void **entryp, void *p)
{
if (g)
{
- BFD_ASSERT (g->global_gotsym == NULL);
-
entry->gotidx = arg->value * (long) g->assigned_gotno++;
if (arg->info->shared
|| (elf_hash_table (arg->info)->dynamic_sections_created
@@ -4590,7 +4588,6 @@ mips_elf_multi_got (bfd *abfd, struct bfd_link_info *info,
if (g->next == NULL)
return FALSE;
- g->next->global_gotsym = NULL;
g->next->global_gotno = 0;
g->next->reloc_only_gotno = 0;
g->next->local_gotno = 0;
@@ -4941,7 +4938,6 @@ mips_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
g = bfd_alloc (abfd, amt);
if (g == NULL)
return FALSE;
- g->global_gotsym = NULL;
g->global_gotno = 0;
g->reloc_only_gotno = 0;
g->tls_gotno = 0;
@@ -10657,9 +10653,9 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
break;
case DT_MIPS_GOTSYM:
- if (gg->global_gotsym)
+ if (htab->global_gotsym)
{
- dyn.d_un.d_val = gg->global_gotsym->dynindx;
+ dyn.d_un.d_val = htab->global_gotsym->dynindx;
break;
}
/* In case if we don't have global got symbols we default