diff options
author | Alan Modra <amodra@gmail.com> | 2002-01-16 05:50:03 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-01-16 05:50:03 +0000 |
commit | 5d1634d792f2d90ada5c17faf98672c58717fc79 (patch) | |
tree | 378657bea3bcae56accb2bda0ac6979693926c98 /bfd/elf64-ppc.h | |
parent | b84da006ed75bf3318d1562f08cf63f804ebff46 (diff) | |
download | gdb-5d1634d792f2d90ada5c17faf98672c58717fc79.zip gdb-5d1634d792f2d90ada5c17faf98672c58717fc79.tar.gz gdb-5d1634d792f2d90ada5c17faf98672c58717fc79.tar.bz2 |
* elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
when plt_not_loaded.
* elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
clear .plt SEC_CODE here. Create .stub and correct .glink flags.
(PLT_INITIAL_ENTRY_SIZE): Set to 24.
(ppc64_elf_glink_code): Delete.
(PPC64_ELF_GLINK_SIZE): Delete.
(ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
ORI_R0_R0_0): Define.
(PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
(struct ppc_link_hash_table): Add sstub and plt_overflow.
(ppc64_elf_link_hash_table_create): Init them.
(ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
Don't copy to shared lib.
(ppc64_elf_check_relocs): Call bfd_set_error on errors.
(ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
(allocate_dynrelocs <plt>): Don't change function sym here. Make
room for .stub and .glink code.
(ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
DT_PPC64_GLINK.
(ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
bfd_elf64_bfd_final_link.
(bfd_elf64_bfd_final_link): Don't define.
(ppc64_elf_size_stubs): New.
(build_plt_stub): New.
(build_one_stub): New.
(ppc64_elf_build_stubs): New.
(ppc64_elf_relocate_section <toc relocs>): Remove assert.
(ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
(ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
case output sections not separate. Adjust DT_RELASZ to not
include plt relocs. Set reserved got entry. Set got and plt
entry size.
(elf_backend_got_header_size): Set to 8.
* elf64-ppc.h: New file.
Diffstat (limited to 'bfd/elf64-ppc.h')
-rw-r--r-- | bfd/elf64-ppc.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bfd/elf64-ppc.h b/bfd/elf64-ppc.h new file mode 100644 index 0000000..b261a58 --- /dev/null +++ b/bfd/elf64-ppc.h @@ -0,0 +1,22 @@ +/* PowerPC64-specific support for 64-bit ELF. + Copyright 2002 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 2 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., 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 *)); |