bfd/
* elfxx-mips.c (mips_got_info): Move global_gotsym to... (mips_elf_link_hash_table): ...here. Update rest of file accordingly.
This commit is contained in:
parent
1fd20d7055
commit
d222d21028
|
@ -1,3 +1,8 @@
|
||||||
|
2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
|
||||||
|
|
||||||
|
* elfxx-mips.c (mips_got_info): Move global_gotsym to...
|
||||||
|
(mips_elf_link_hash_table): ...here. Update rest of file accordingly.
|
||||||
|
|
||||||
2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
|
2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
|
||||||
|
|
||||||
* elfxx-mips.c (mips_elf_count_global_tls_entries)
|
* elfxx-mips.c (mips_elf_count_global_tls_entries)
|
||||||
|
|
|
@ -142,9 +142,6 @@ struct mips_got_page_entry
|
||||||
|
|
||||||
struct mips_got_info
|
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. */
|
/* The number of global .got entries. */
|
||||||
unsigned int global_gotno;
|
unsigned int global_gotno;
|
||||||
/* The number of global .got entries that are in the GGA_RELOC_ONLY area. */
|
/* 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. */
|
/* The master GOT information. */
|
||||||
struct mips_got_info *got_info;
|
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. */
|
/* The size of the PLT header in bytes. */
|
||||||
bfd_vma plt_header_size;
|
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)
|
if (htab->global_gotsym != NULL)
|
||||||
global_got_dynindx = gg->global_gotsym->dynindx;
|
global_got_dynindx = htab->global_gotsym->dynindx;
|
||||||
|
|
||||||
if (TLS_RELOC_P (r_type))
|
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
|
/* Now we know which dynamic symbol has the lowest dynamic symbol
|
||||||
table index in the GOT. */
|
table index in the GOT. */
|
||||||
g->global_gotsym = hsd.low;
|
htab->global_gotsym = hsd.low;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -4161,7 +4162,6 @@ mips_elf_get_got_for_bfd (struct htab *bfd2got, bfd *output_bfd,
|
||||||
bfdgot->bfd = input_bfd;
|
bfdgot->bfd = input_bfd;
|
||||||
bfdgot->g = g;
|
bfdgot->g = g;
|
||||||
|
|
||||||
g->global_gotsym = NULL;
|
|
||||||
g->global_gotno = 0;
|
g->global_gotno = 0;
|
||||||
g->reloc_only_gotno = 0;
|
g->reloc_only_gotno = 0;
|
||||||
g->local_gotno = 0;
|
g->local_gotno = 0;
|
||||||
|
@ -4461,8 +4461,6 @@ mips_elf_set_global_got_offset (void **entryp, void *p)
|
||||||
{
|
{
|
||||||
if (g)
|
if (g)
|
||||||
{
|
{
|
||||||
BFD_ASSERT (g->global_gotsym == NULL);
|
|
||||||
|
|
||||||
entry->gotidx = arg->value * (long) g->assigned_gotno++;
|
entry->gotidx = arg->value * (long) g->assigned_gotno++;
|
||||||
if (arg->info->shared
|
if (arg->info->shared
|
||||||
|| (elf_hash_table (arg->info)->dynamic_sections_created
|
|| (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)
|
if (g->next == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
g->next->global_gotsym = NULL;
|
|
||||||
g->next->global_gotno = 0;
|
g->next->global_gotno = 0;
|
||||||
g->next->reloc_only_gotno = 0;
|
g->next->reloc_only_gotno = 0;
|
||||||
g->next->local_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);
|
g = bfd_alloc (abfd, amt);
|
||||||
if (g == NULL)
|
if (g == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
g->global_gotsym = NULL;
|
|
||||||
g->global_gotno = 0;
|
g->global_gotno = 0;
|
||||||
g->reloc_only_gotno = 0;
|
g->reloc_only_gotno = 0;
|
||||||
g->tls_gotno = 0;
|
g->tls_gotno = 0;
|
||||||
|
@ -10657,9 +10653,9 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DT_MIPS_GOTSYM:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
/* In case if we don't have global got symbols we default
|
/* In case if we don't have global got symbols we default
|
||||||
|
|
Loading…
Reference in New Issue