gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / bfd / elf32-spu.h
CommitLineData
e9f53129
AM
1/* SPU specific support for 32-bit ELF.
2
b3adc24a 3 Copyright (C) 2006-2020 Free Software Foundation, Inc.
e9f53129
AM
4
5 This file is part of BFD, the Binary File Descriptor library.
6
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
cd123cb7 9 the Free Software Foundation; either version 3 of the License, or
e9f53129
AM
10 (at your option) any later version.
11
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.
16
17 You should have received a copy of the GNU General Public License
863f7a5f
NC
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. */
e9f53129 21
64615358
AM
22struct spu_elf_params
23{
24 /* Stash various callbacks for --auto-overlay. */
25 void (*place_spu_section) (asection *, asection *, const char *);
26 bfd_size_type (*spu_elf_load_ovl_mgr) (void);
27 FILE *(*spu_elf_open_overlay_script) (void);
28 void (*spu_elf_relink) (void);
29
30 /* Bit 0 set if --auto-overlay.
31 Bit 1 set if --auto-relink.
32 Bit 2 set if --overlay-rodata. */
33 unsigned int auto_overlay : 3;
34#define AUTO_OVERLAY 1
35#define AUTO_RELINK 2
36#define OVERLAY_RODATA 4
37
38 /* Type of overlays, enum _ovly_flavour. */
a7e11ee1
AM
39 unsigned int ovly_flavour : 1;
40 unsigned int compact_stub : 1;
64615358
AM
41
42 /* Set if we should emit symbols for stubs. */
43 unsigned int emit_stub_syms : 1;
44
45 /* Set if we want stubs on calls out of overlay regions to
46 non-overlay regions. */
47 unsigned int non_overlay_stubs : 1;
48
cd4a7468
AM
49 /* Set if lr liveness analysis should be done. */
50 unsigned int lrlive_analysis : 1;
51
64615358
AM
52 /* Set if stack size analysis should be done. */
53 unsigned int stack_analysis : 1;
54
55 /* Set if __stack_* syms will be emitted. */
56 unsigned int emit_stack_syms : 1;
57
fb266b8b
AM
58 /* Set if non-icache code should be allowed in icache lines. */
59 unsigned int non_ia_text : 1;
60
9cc305ec
TS
61 /* Set when the .fixup section should be generated. */
62 unsigned int emit_fixups : 1;
63
64615358
AM
64 /* Range of valid addresses for loadable sections. */
65 bfd_vma local_store_lo;
66 bfd_vma local_store_hi;
67
68 /* Control --auto-overlay feature. */
cd4a7468
AM
69 unsigned int num_lines;
70 unsigned int line_size;
71 unsigned int max_branch;
64615358
AM
72 unsigned int auto_overlay_fixed;
73 unsigned int auto_overlay_reserved;
74 int extra_stack_space;
75};
76
e9f53129
AM
77/* Extra info kept for SPU sections. */
78
49fa1e15
AM
79struct spu_elf_stack_info;
80
e9f53129
AM
81struct _spu_elf_section_data
82{
83 struct bfd_elf_section_data elf;
84
47f6dab9
AM
85 union {
86 /* Info kept for input sections. */
87 struct {
88 /* Stack analysis info kept for this section. */
89 struct spu_elf_stack_info *stack_info;
90 } i;
49fa1e15 91
47f6dab9
AM
92 /* Info kept for output sections. */
93 struct {
94 /* Non-zero for overlay output sections. */
95 unsigned int ovl_index;
96 unsigned int ovl_buf;
97 } o;
98 } u;
e9f53129
AM
99};
100
101#define spu_elf_section_data(sec) \
102 ((struct _spu_elf_section_data *) elf_section_data (sec))
103
64615358
AM
104enum _ovly_flavour
105{
64615358 106 ovly_normal,
a7e11ee1 107 ovly_soft_icache
64615358
AM
108};
109
e9f53129
AM
110struct _ovl_stream
111{
7a8757b3
AM
112 const void *start;
113 const void *end;
e9f53129
AM
114};
115
64615358 116extern void spu_elf_setup (struct bfd_link_info *, struct spu_elf_params *);
e9f53129
AM
117extern void spu_elf_plugin (int);
118extern bfd_boolean spu_elf_open_builtin_lib (bfd **,
119 const struct _ovl_stream *);
64615358 120extern bfd_boolean spu_elf_create_sections (struct bfd_link_info *);
9cc305ec 121extern bfd_boolean spu_elf_size_sections (bfd *, struct bfd_link_info *);
ad2adbc8 122extern int spu_elf_find_overlays (struct bfd_link_info *);
64615358 123extern int spu_elf_size_stubs (struct bfd_link_info *);
bbb0fc04 124extern void spu_elf_place_overlay_data (struct bfd_link_info *);
64615358 125extern asection *spu_elf_check_vma (struct bfd_link_info *);
This page took 0.713964 seconds and 4 git commands to generate.