diff options
author | Alan Modra <amodra@gmail.com> | 2008-12-10 06:32:52 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2008-12-10 06:32:52 +0000 |
commit | 64615358cc3bf603ff78364451421139343e2dc8 (patch) | |
tree | bfb8707a2c5adeb631463db92a4f24a368ad89e3 /bfd/elf32-spu.h | |
parent | b0c4170911beec5bdad9a622b8ae8053a8dcc55e (diff) | |
download | gdb-64615358cc3bf603ff78364451421139343e2dc8.zip gdb-64615358cc3bf603ff78364451421139343e2dc8.tar.gz gdb-64615358cc3bf603ff78364451421139343e2dc8.tar.bz2 |
bfd/
* elf32-spu.g (struct spu_elf_params, enum _ovly_flavour): New.
(spu_elf_setup): Declare.
(spu_elf_create_sections, spu_elf_size_stubs): Update prototype.
(spu_elf_build_stubs, spu_elf_check_vma): Likewise.
* elf32-spu.c (struct spu_link_hash_table): Add "params". Remove
various other fields now in "params". Adjust code throughout.
(struct call_info, struct function_info): Move earlier in file.
(struct spu_elf_stack_info): Likewise.
(spu_elf_setup): New function.
(spu_elf_create_sections): Remove args other than "info".
(spu_elf_size_stubs, spu_elf_build_stubs, spu_elf_check_vma): Likewise.
(maybe_needs_stubs): Remove "output_bfd" arg. Adjust all calls.
(interesting_section): Similarly with "obfd" arg.
(needs_ovl_stub): Adjust output_section test.
(allocate_spuear_stubs): Likewise.
(OVL_STUB_SIZE): Don't define.
(ovl_stub_size): New function, use in place of OVL_STUB_SIZE.
(build_stub): Test params->ovly_flavour rather than OVL_STUB_SIZE.
(spu_elf_auto_overlay): Remove args other than "info". Make use
of size returned from spu_elf_load_ovl_mgr.
(spu_elf_stack_analysis): Remove args other than "info".
(spu_elf_relocate_section): Tidy setting of "ea".
ld/
* emultempl/spuelf.em (params): New var, used instead of various others.
Adjust use throughout file.
(spu_after_open): Call spu_elf_setup.
(spu_place_special_section): Tidy.
(spu_elf_load_ovl_mgr): Return total size of sections loaded. Move
code setting overlay section alignment to..
(spu_before_allocation): ..here.
Diffstat (limited to 'bfd/elf32-spu.h')
-rw-r--r-- | bfd/elf32-spu.h | 63 |
1 files changed, 54 insertions, 9 deletions
diff --git a/bfd/elf32-spu.h b/bfd/elf32-spu.h index ec443fd..8cac3a3 100644 --- a/bfd/elf32-spu.h +++ b/bfd/elf32-spu.h @@ -18,6 +18,48 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +struct spu_elf_params +{ + /* Stash various callbacks for --auto-overlay. */ + void (*place_spu_section) (asection *, asection *, const char *); + bfd_size_type (*spu_elf_load_ovl_mgr) (void); + FILE *(*spu_elf_open_overlay_script) (void); + void (*spu_elf_relink) (void); + + /* Bit 0 set if --auto-overlay. + Bit 1 set if --auto-relink. + Bit 2 set if --overlay-rodata. */ + unsigned int auto_overlay : 3; +#define AUTO_OVERLAY 1 +#define AUTO_RELINK 2 +#define OVERLAY_RODATA 4 + + /* Type of overlays, enum _ovly_flavour. */ + unsigned int ovly_flavour : 2; + + /* Set if we should emit symbols for stubs. */ + unsigned int emit_stub_syms : 1; + + /* Set if we want stubs on calls out of overlay regions to + non-overlay regions. */ + unsigned int non_overlay_stubs : 1; + + /* Set if stack size analysis should be done. */ + unsigned int stack_analysis : 1; + + /* Set if __stack_* syms will be emitted. */ + unsigned int emit_stack_syms : 1; + + /* Range of valid addresses for loadable sections. */ + bfd_vma local_store_lo; + bfd_vma local_store_hi; + + /* Control --auto-overlay feature. */ + unsigned int auto_overlay_fixed; + unsigned int auto_overlay_reserved; + int extra_stack_space; +}; + /* Extra info kept for SPU sections. */ struct spu_elf_stack_info; @@ -45,22 +87,25 @@ struct _spu_elf_section_data #define spu_elf_section_data(sec) \ ((struct _spu_elf_section_data *) elf_section_data (sec)) +enum _ovly_flavour +{ + ovly_compact, + ovly_normal, + ovly_none +}; + struct _ovl_stream { const void *start; const void *end; }; +extern void spu_elf_setup (struct bfd_link_info *, struct spu_elf_params *); extern void spu_elf_plugin (int); extern bfd_boolean spu_elf_open_builtin_lib (bfd **, const struct _ovl_stream *); -extern bfd_boolean spu_elf_create_sections (struct bfd_link_info *, int, int); +extern bfd_boolean spu_elf_create_sections (struct bfd_link_info *); extern bfd_boolean spu_elf_find_overlays (struct bfd_link_info *); -extern int spu_elf_size_stubs (struct bfd_link_info *, - void (*) (asection *, asection *, const char *), - int); -extern bfd_boolean spu_elf_build_stubs (struct bfd_link_info *, int); -extern asection *spu_elf_check_vma (struct bfd_link_info *, int, - unsigned int, unsigned int, unsigned int, - unsigned int, int, void (*) (void), - FILE *(*) (void), void (*) (void)); +extern int spu_elf_size_stubs (struct bfd_link_info *); +extern bfd_boolean spu_elf_build_stubs (struct bfd_link_info *); +extern asection *spu_elf_check_vma (struct bfd_link_info *); |