Commit | Line | Data |
---|---|---|
5d1634d7 | 1 | /* PowerPC64-specific support for 64-bit ELF. |
794e51c0 | 2 | Copyright 2002, 2003, 2004, 2005, 2007, 2008, 2010, 2011, 2012 |
74f0fb50 | 3 | Free Software Foundation, Inc. |
5d1634d7 | 4 | |
cd123cb7 | 5 | This file is part of BFD, the Binary File Descriptor library. |
5d1634d7 | 6 | |
cd123cb7 NC |
7 | This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by | |
9 | the Free Software Foundation; either version 3 of the License, or | |
10 | (at your option) any later version. | |
5d1634d7 | 11 | |
cd123cb7 NC |
12 | This program is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
5d1634d7 | 16 | |
cd123cb7 NC |
17 | You should have received a copy of the GNU General Public License |
18 | along with this program; if not, write to the Free Software | |
19 | Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, | |
20 | MA 02110-1301, USA. */ | |
5d1634d7 | 21 | |
e7d1c40c AM |
22 | /* Used to pass info between ld and bfd. */ |
23 | struct ppc64_elf_params | |
24 | { | |
25 | /* Linker stub bfd. */ | |
26 | bfd *stub_bfd; | |
27 | ||
28 | /* Linker call-backs. */ | |
29 | asection * (*add_stub_section) (const char *, asection *); | |
30 | void (*layout_sections_again) (void); | |
31 | ||
32 | /* Maximum size of a group of input sections that can be handled by | |
33 | one stub section. A value of +/-1 indicates the bfd back-end | |
34 | should use a suitable default size. */ | |
35 | bfd_signed_vma group_size; | |
36 | ||
37 | /* Whether to use a special call stub for __tls_get_addr. */ | |
38 | int no_tls_get_addr_opt; | |
39 | ||
40 | /* Whether to allow multiple toc sections. */ | |
41 | int no_multi_toc; | |
42 | ||
43 | /* Set if PLT call stubs should load r11. */ | |
44 | int plt_static_chain; | |
45 | ||
46 | /* Set if PLT call stubs need to be thread safe on power7+. */ | |
47 | int plt_thread_safe; | |
48 | ||
49 | /* Set if individual PLT call stubs should be aligned. */ | |
50 | int plt_stub_align; | |
51 | ||
52 | /* Whether to canonicalize .opd so that there are no overlapping | |
53 | .opd entries. */ | |
54 | int non_overlapping_opd; | |
55 | ||
56 | /* Whether to emit symbols for stubs. */ | |
57 | int emit_stub_syms; | |
7d4c687d AM |
58 | |
59 | /* Whether to generate out-of-line register save/restore for gcc -Os code. */ | |
60 | int save_restore_funcs; | |
e7d1c40c AM |
61 | }; |
62 | ||
bfeb4a28 | 63 | bfd_boolean ppc64_elf_init_stub_bfd |
e7d1c40c | 64 | (struct bfd_link_info *, struct ppc64_elf_params *); |
b34976b6 | 65 | bfd_boolean ppc64_elf_edit_opd |
e7d1c40c | 66 | (struct bfd_link_info *); |
e1918d23 | 67 | asection *ppc64_elf_tls_setup |
e7d1c40c | 68 | (struct bfd_link_info *); |
411e1bfb | 69 | bfd_boolean ppc64_elf_tls_optimize |
33c0ec9d | 70 | (struct bfd_link_info *); |
c5614fa4 | 71 | bfd_boolean ppc64_elf_edit_toc |
33c0ec9d | 72 | (struct bfd_link_info *); |
1bbe0902 AM |
73 | bfd_boolean ppc64_elf_has_small_toc_reloc |
74 | (asection *); | |
1c865ab2 | 75 | bfd_vma ppc64_elf_set_toc |
e7d1c40c | 76 | (struct bfd_link_info *, bfd *); |
721956f4 | 77 | int ppc64_elf_setup_section_lists |
e7d1c40c | 78 | (struct bfd_link_info *); |
927be08e AM |
79 | void ppc64_elf_start_multitoc_partition |
80 | (struct bfd_link_info *); | |
81 | bfd_boolean ppc64_elf_next_toc_section | |
4ce794b7 | 82 | (struct bfd_link_info *, asection *); |
927be08e AM |
83 | bfd_boolean ppc64_elf_layout_multitoc |
84 | (struct bfd_link_info *); | |
85 | void ppc64_elf_finish_multitoc_partition | |
86 | (struct bfd_link_info *); | |
70cc837d AM |
87 | bfd_boolean ppc64_elf_check_init_fini |
88 | (struct bfd_link_info *); | |
9b5ecbd0 | 89 | bfd_boolean ppc64_elf_next_input_section |
4ce794b7 | 90 | (struct bfd_link_info *, asection *); |
b34976b6 | 91 | bfd_boolean ppc64_elf_size_stubs |
e7d1c40c | 92 | (struct bfd_link_info *); |
b34976b6 | 93 | bfd_boolean ppc64_elf_build_stubs |
e7d1c40c | 94 | (struct bfd_link_info *, char **); |
99877b66 AM |
95 | void ppc64_elf_restore_symbols |
96 | (struct bfd_link_info *info); |