mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +08:00
* elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
rather than htab. (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero relbrlt size. (ppc64_elf_build_stubs): Allocate space for relbrlt.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2003-11-04 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
|
||||||
|
rather than htab.
|
||||||
|
(ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
|
||||||
|
relbrlt size.
|
||||||
|
(ppc64_elf_build_stubs): Allocate space for relbrlt.
|
||||||
|
|
||||||
2003-11-04 Alan Modra <amodra@bigpond.net.au>
|
2003-11-04 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* bfd-in.h (_bfd_elf_tls_setup): Declare.
|
* bfd-in.h (_bfd_elf_tls_setup): Declare.
|
||||||
|
@ -6354,13 +6354,16 @@ static bfd_boolean
|
|||||||
ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
|
ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
|
||||||
{
|
{
|
||||||
struct ppc_stub_hash_entry *stub_entry;
|
struct ppc_stub_hash_entry *stub_entry;
|
||||||
|
struct bfd_link_info *info;
|
||||||
struct ppc_link_hash_table *htab;
|
struct ppc_link_hash_table *htab;
|
||||||
bfd_vma off;
|
bfd_vma off;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
/* Massage our args to the form they really have. */
|
/* Massage our args to the form they really have. */
|
||||||
stub_entry = (struct ppc_stub_hash_entry *) gen_entry;
|
stub_entry = (struct ppc_stub_hash_entry *) gen_entry;
|
||||||
htab = in_arg;
|
info = in_arg;
|
||||||
|
|
||||||
|
htab = ppc_hash_table (info);
|
||||||
|
|
||||||
if (stub_entry->stub_type == ppc_stub_plt_call)
|
if (stub_entry->stub_type == ppc_stub_plt_call)
|
||||||
{
|
{
|
||||||
@ -6427,6 +6430,9 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
|
|||||||
br_entry->iter = htab->stub_iteration;
|
br_entry->iter = htab->stub_iteration;
|
||||||
br_entry->offset = htab->brlt->_raw_size;
|
br_entry->offset = htab->brlt->_raw_size;
|
||||||
htab->brlt->_raw_size += 8;
|
htab->brlt->_raw_size += 8;
|
||||||
|
|
||||||
|
if (info->shared)
|
||||||
|
htab->relbrlt->_raw_size += sizeof (Elf64_External_Rela);
|
||||||
}
|
}
|
||||||
|
|
||||||
stub_entry->stub_type += ppc_stub_plt_branch - ppc_stub_long_branch;
|
stub_entry->stub_type += ppc_stub_plt_branch - ppc_stub_long_branch;
|
||||||
@ -7007,8 +7013,13 @@ ppc64_elf_size_stubs (bfd *output_bfd,
|
|||||||
}
|
}
|
||||||
htab->brlt->_raw_size = 0;
|
htab->brlt->_raw_size = 0;
|
||||||
htab->brlt->_cooked_size = 0;
|
htab->brlt->_cooked_size = 0;
|
||||||
|
if (info->shared)
|
||||||
|
{
|
||||||
|
htab->relbrlt->_raw_size = 0;
|
||||||
|
htab->relbrlt->_cooked_size = 0;
|
||||||
|
}
|
||||||
|
|
||||||
bfd_hash_traverse (&htab->stub_hash_table, ppc_size_one_stub, htab);
|
bfd_hash_traverse (&htab->stub_hash_table, ppc_size_one_stub, info);
|
||||||
|
|
||||||
/* Ask the linker to do its stuff. */
|
/* Ask the linker to do its stuff. */
|
||||||
(*htab->layout_sections_again) ();
|
(*htab->layout_sections_again) ();
|
||||||
@ -7211,6 +7222,13 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
|
|||||||
if (htab->brlt->contents == NULL)
|
if (htab->brlt->contents == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (info->shared && htab->relbrlt->_raw_size != 0)
|
||||||
|
{
|
||||||
|
htab->relbrlt->contents = bfd_zalloc (htab->relbrlt->owner,
|
||||||
|
htab->relbrlt->_raw_size);
|
||||||
|
if (htab->relbrlt->contents == NULL)
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Build the stubs as directed by the stub hash table. */
|
/* Build the stubs as directed by the stub hash table. */
|
||||||
bfd_hash_traverse (&htab->stub_hash_table, ppc_build_one_stub, info);
|
bfd_hash_traverse (&htab->stub_hash_table, ppc_build_one_stub, info);
|
||||||
|
Reference in New Issue
Block a user