mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
bfd/
* elfxx-mips.c (mips_elf_lay_out_got): Count VxWorks GOT relocs in g->relocs.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2013-02-12 Richard Sandiford <rdsandiford@googlemail.com>
|
||||||
|
|
||||||
|
* elfxx-mips.c (mips_elf_lay_out_got): Count VxWorks GOT relocs
|
||||||
|
in g->relocs.
|
||||||
|
|
||||||
2013-02-12 Alan Modra <amodra@gmail.com>
|
2013-02-12 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Provide
|
* elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Provide
|
||||||
|
@ -8649,20 +8649,7 @@ mips_elf_lay_out_got (bfd *output_bfd, struct bfd_link_info *info)
|
|||||||
/* VxWorks does not support multiple GOTs. It initializes $gp to
|
/* VxWorks does not support multiple GOTs. It initializes $gp to
|
||||||
__GOTT_BASE__[__GOTT_INDEX__], the value of which is set by the
|
__GOTT_BASE__[__GOTT_INDEX__], the value of which is set by the
|
||||||
dynamic loader. */
|
dynamic loader. */
|
||||||
if (htab->is_vxworks)
|
if (!htab->is_vxworks && s->size > MIPS_ELF_GOT_MAX_SIZE (info))
|
||||||
{
|
|
||||||
/* VxWorks executables do not need a GOT. */
|
|
||||||
if (info->shared)
|
|
||||||
{
|
|
||||||
/* Each VxWorks GOT entry needs an explicit relocation. */
|
|
||||||
unsigned int count;
|
|
||||||
|
|
||||||
count = g->global_gotno + g->local_gotno - htab->reserved_gotno;
|
|
||||||
if (count)
|
|
||||||
mips_elf_allocate_dynamic_relocations (dynobj, info, count);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (s->size > MIPS_ELF_GOT_MAX_SIZE (info))
|
|
||||||
{
|
{
|
||||||
if (!mips_elf_multi_got (output_bfd, info, s, page_gotno))
|
if (!mips_elf_multi_got (output_bfd, info, s, page_gotno))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -8687,6 +8674,10 @@ mips_elf_lay_out_got (bfd *output_bfd, struct bfd_link_info *info)
|
|||||||
BFD_ASSERT (g->tls_assigned_gotno
|
BFD_ASSERT (g->tls_assigned_gotno
|
||||||
== g->global_gotno + g->local_gotno + g->tls_gotno);
|
== g->global_gotno + g->local_gotno + g->tls_gotno);
|
||||||
|
|
||||||
|
/* Each VxWorks GOT entry needs an explicit relocation. */
|
||||||
|
if (htab->is_vxworks && info->shared)
|
||||||
|
g->relocs += g->global_gotno + g->local_gotno - htab->reserved_gotno;
|
||||||
|
|
||||||
/* Allocate room for the TLS relocations. */
|
/* Allocate room for the TLS relocations. */
|
||||||
if (g->relocs)
|
if (g->relocs)
|
||||||
mips_elf_allocate_dynamic_relocations (dynobj, info, g->relocs);
|
mips_elf_allocate_dynamic_relocations (dynobj, info, g->relocs);
|
||||||
|
Reference in New Issue
Block a user