mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
794e51c094
* elf64-ppc.c: Define more insns used in plt call stubs. (ppc64_elf_brtaken_reloc): Assume isa version 2 or above. (ppc64_elf_relocate_section): Likewise. (enum ppc_stub_type): Add ppc_stub_plt_call_r2save. (struct ppc_link_hash_table): Increase size of stub_count array. Add plt_stub_align and plt_thread_safe. (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define. (plt_stub_size, plt_stub_pad): New functions. (build_plt_stub): Emit barriers for power7 thread safety. Don't emit needless save of r2. (build_tls_get_addr_stub): Adjust params. (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning plt stubs. Adjust build_*plt_stub calls. (ppc_size_one_stub): Similarly. (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align params. Choose default for plt_thread_safe based on existence of calls to thread creation functions. Modify plt_call to plt_call_r2save when no tocsave reloc found. Align tail of stub sections. (ppc64_elf_build_stubs): Align tail of stub sections. Adjust output of stub statistics. (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save. * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype. ld/ * emultempl/ppc64elf.em (PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Handle --{no-,}plt-thread-safe and --{no-,}plt-align. (plt_thread_safe, plt_stub_align): New vars. (gld${EMULATION_NAME}_after_allocation): Pass them to ppc64_elf_size_stubs. Align stub sections according to plt_stub_align. * ld.texinfo: Document new command line options, and an old undocumented option.
57 lines
2.1 KiB
C
57 lines
2.1 KiB
C
/* PowerPC64-specific support for 64-bit ELF.
|
|
Copyright 2002, 2003, 2004, 2005, 2007, 2008, 2010, 2011, 2012
|
|
Free Software Foundation, Inc.
|
|
|
|
This file is part of BFD, the Binary File Descriptor library.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
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., 51 Franklin Street - Fifth Floor, Boston,
|
|
MA 02110-1301, USA. */
|
|
|
|
void ppc64_elf_init_stub_bfd
|
|
(bfd *, struct bfd_link_info *);
|
|
bfd_boolean ppc64_elf_edit_opd
|
|
(struct bfd_link_info *, bfd_boolean);
|
|
asection *ppc64_elf_tls_setup
|
|
(struct bfd_link_info *, int, int *);
|
|
bfd_boolean ppc64_elf_tls_optimize
|
|
(struct bfd_link_info *);
|
|
bfd_boolean ppc64_elf_edit_toc
|
|
(struct bfd_link_info *);
|
|
bfd_boolean ppc64_elf_has_small_toc_reloc
|
|
(asection *);
|
|
bfd_vma ppc64_elf_toc
|
|
(bfd *);
|
|
int ppc64_elf_setup_section_lists
|
|
(struct bfd_link_info *, asection *(*) (const char *, asection *),
|
|
void (*) (void));
|
|
void ppc64_elf_start_multitoc_partition
|
|
(struct bfd_link_info *);
|
|
bfd_boolean ppc64_elf_next_toc_section
|
|
(struct bfd_link_info *, asection *);
|
|
bfd_boolean ppc64_elf_layout_multitoc
|
|
(struct bfd_link_info *);
|
|
void ppc64_elf_finish_multitoc_partition
|
|
(struct bfd_link_info *);
|
|
bfd_boolean ppc64_elf_check_init_fini
|
|
(struct bfd_link_info *);
|
|
bfd_boolean ppc64_elf_next_input_section
|
|
(struct bfd_link_info *, asection *);
|
|
bfd_boolean ppc64_elf_size_stubs
|
|
(struct bfd_link_info *, bfd_signed_vma, bfd_boolean, int, int);
|
|
bfd_boolean ppc64_elf_build_stubs
|
|
(bfd_boolean, struct bfd_link_info *, char **);
|
|
void ppc64_elf_restore_symbols
|
|
(struct bfd_link_info *info);
|