* gdb/procfs.c (info_mappings_callback): Cast map->pr_size to
[deliverable/binutils-gdb.git] / bfd / elf32-spu.h
CommitLineData
e9f53129
AM
1/* SPU specific support for 32-bit ELF.
2
c65be8d7 3 Copyright 2006, 2007, 2008 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
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20
64615358
AM
21struct spu_elf_params
22{
23 /* Stash various callbacks for --auto-overlay. */
24 void (*place_spu_section) (asection *, asection *, const char *);
25 bfd_size_type (*spu_elf_load_ovl_mgr) (void);
26 FILE *(*spu_elf_open_overlay_script) (void);
27 void (*spu_elf_relink) (void);
28
29 /* Bit 0 set if --auto-overlay.
30 Bit 1 set if --auto-relink.
31 Bit 2 set if --overlay-rodata. */
32 unsigned int auto_overlay : 3;
33#define AUTO_OVERLAY 1
34#define AUTO_RELINK 2
35#define OVERLAY_RODATA 4
36
37 /* Type of overlays, enum _ovly_flavour. */
38 unsigned int ovly_flavour : 2;
39
40 /* Set if we should emit symbols for stubs. */
41 unsigned int emit_stub_syms : 1;
42
43 /* Set if we want stubs on calls out of overlay regions to
44 non-overlay regions. */
45 unsigned int non_overlay_stubs : 1;
46
cd4a7468
AM
47 /* Set if lr liveness analysis should be done. */
48 unsigned int lrlive_analysis : 1;
49
64615358
AM
50 /* Set if stack size analysis should be done. */
51 unsigned int stack_analysis : 1;
52
53 /* Set if __stack_* syms will be emitted. */
54 unsigned int emit_stack_syms : 1;
55
56 /* Range of valid addresses for loadable sections. */
57 bfd_vma local_store_lo;
58 bfd_vma local_store_hi;
59
60 /* Control --auto-overlay feature. */
cd4a7468
AM
61 unsigned int num_lines;
62 unsigned int line_size;
63 unsigned int max_branch;
64615358
AM
64 unsigned int auto_overlay_fixed;
65 unsigned int auto_overlay_reserved;
66 int extra_stack_space;
67};
68
e9f53129
AM
69/* Extra info kept for SPU sections. */
70
49fa1e15
AM
71struct spu_elf_stack_info;
72
e9f53129
AM
73struct _spu_elf_section_data
74{
75 struct bfd_elf_section_data elf;
76
47f6dab9
AM
77 union {
78 /* Info kept for input sections. */
79 struct {
80 /* Stack analysis info kept for this section. */
81 struct spu_elf_stack_info *stack_info;
82 } i;
49fa1e15 83
47f6dab9
AM
84 /* Info kept for output sections. */
85 struct {
86 /* Non-zero for overlay output sections. */
87 unsigned int ovl_index;
88 unsigned int ovl_buf;
89 } o;
90 } u;
e9f53129
AM
91};
92
93#define spu_elf_section_data(sec) \
94 ((struct _spu_elf_section_data *) elf_section_data (sec))
95
64615358
AM
96enum _ovly_flavour
97{
98 ovly_compact,
99 ovly_normal,
cd4a7468 100 ovly_soft_icache,
64615358
AM
101 ovly_none
102};
103
e9f53129
AM
104struct _ovl_stream
105{
7a8757b3
AM
106 const void *start;
107 const void *end;
e9f53129
AM
108};
109
64615358 110extern void spu_elf_setup (struct bfd_link_info *, struct spu_elf_params *);
e9f53129
AM
111extern void spu_elf_plugin (int);
112extern bfd_boolean spu_elf_open_builtin_lib (bfd **,
113 const struct _ovl_stream *);
64615358 114extern bfd_boolean spu_elf_create_sections (struct bfd_link_info *);
c65be8d7 115extern bfd_boolean spu_elf_find_overlays (struct bfd_link_info *);
64615358 116extern int spu_elf_size_stubs (struct bfd_link_info *);
64615358 117extern asection *spu_elf_check_vma (struct bfd_link_info *);
This page took 0.180642 seconds and 4 git commands to generate.