diff options
author | Alan Modra <amodra@gmail.com> | 2002-05-01 02:34:20 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-05-01 02:34:20 +0000 |
commit | 721956f4fe2d22b7c4199e99f47753a0911f7285 (patch) | |
tree | c166727f44ea1ca5c6c2c02d50b32708de50e053 /bfd/elf64-ppc.h | |
parent | 7d4a12d20fc8fce412add1de5657ccce5f1ab290 (diff) | |
download | gdb-721956f4fe2d22b7c4199e99f47753a0911f7285.zip gdb-721956f4fe2d22b7c4199e99f47753a0911f7285.tar.gz gdb-721956f4fe2d22b7c4199e99f47753a0911f7285.tar.bz2 |
* elf64-ppc.c (CROR_151515, CROR_313131): Define.
(ppc64_elf_relocate_section): Use them. Don't look for plt calls
on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
call branches. Correct undefined weak destination.
(ppc64_elf_func_desc_adjust): Always create at least one blr in
.sfpr, and correct case where either only savef* or restf* is
needed.
Long branch stubs, multiple stub sections.
* elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
(ppc64_elf_next_input_section): Declare.
* elf64-ppc.c: Move linker-only prototypes.
(STUB_SUFFIX): Define.
(enum ppc_stub_type): New.
(struct ppc_stub_hash_entry): New.
(struct ppc_branch_hash_entry): New.
(struct ppc_link_hash_entry): Add stub_cache, oh.
(struct ppc_link_hash_table): Add stub_hash_table etc. Remove
sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
Rename plt_overflow to stub_error.
(ppc_stub_hash_lookup): Define.
(ppc_branch_hash_lookup): Define.
(stub_hash_newfunc): New function.
(branch_hash_newfunc): New function.
(link_hash_newfunc): Init new fields.
(ppc64_elf_link_hash_table_create): Likewise.
(ppc64_elf_link_hash_table_free): New function.
(ppc_stub_name): New function.
(ppc_get_stub_entry): New function.
(ppc_add_stub): New function.
(create_linkage_sections): Use bfd_make_section_anyway. Create
.branch_lt and .rela.branch_lt sections. Don't create .stub.
(ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
and set up for plt call stubs. Link func and func desc syms.
(ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
(func_desc_adjust): Avoid hash lookup when func desc sym available
via shortcut, and set links when processing.
(ppc64_elf_hide_symbol): Likewise.
(allocate_dynrelocs): Don't allocate stub section here.
(ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
Remove sstub code.
(ppc_type_of_stub): New function.
(build_one_stub): Delete.
(ppc_build_one_stub): New function.
(ppc_size_one_stub): New function.
(ppc64_elf_setup_section_lists): New function.
(ppc64_elf_next_input_section): New function.
(group_sections): New function.
(get_local_syms): New function.
(ppc64_elf_size_stubs): Rewrite.
(ppc64_elf_build_stubs): Rewrite.
(ppc64_elf_relocate_section): Look up stub entry for REL24
relocs. Don't propagate REL14* to dynamic objects. Look for long
branch stubs if REL14* or REL24 relocs won't reach.
(bfd_elf64_bfd_link_hash_table_free): Define.
Diffstat (limited to 'bfd/elf64-ppc.h')
-rw-r--r-- | bfd/elf64-ppc.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/bfd/elf64-ppc.h b/bfd/elf64-ppc.h index b261a58..f5f6a8d 100644 --- a/bfd/elf64-ppc.h +++ b/bfd/elf64-ppc.h @@ -17,6 +17,14 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -boolean ppc64_elf_set_toc PARAMS ((bfd *, struct bfd_link_info *)); -boolean ppc64_elf_size_stubs PARAMS ((bfd *, struct bfd_link_info *, int *)); -boolean ppc64_elf_build_stubs PARAMS ((bfd *, struct bfd_link_info *)); +boolean ppc64_elf_set_toc + PARAMS ((bfd *, struct bfd_link_info *)); +int ppc64_elf_setup_section_lists + PARAMS ((bfd *, struct bfd_link_info *)); +void ppc64_elf_next_input_section + PARAMS ((bfd *, struct bfd_link_info *, asection *)); +boolean ppc64_elf_size_stubs + PARAMS ((bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, + asection *(*) (const char *, asection *), void (*) (void))); +boolean ppc64_elf_build_stubs + PARAMS ((struct bfd_link_info *)); |