aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/spuelf.em
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-03-17 12:46:19 +0000
committerAlan Modra <amodra@gmail.com>2009-03-17 12:46:19 +0000
commita7e11ee1d2e57a66740e940cb511ddba421fac47 (patch)
treecbf7e7c6bf82272b80cd8bbcb3f1f0d208e06726 /ld/emultempl/spuelf.em
parent9efe6174dc55b401321d1b53cdd04888e470b4c2 (diff)
downloadfsf-binutils-gdb-a7e11ee1d2e57a66740e940cb511ddba421fac47.zip
fsf-binutils-gdb-a7e11ee1d2e57a66740e940cb511ddba421fac47.tar.gz
fsf-binutils-gdb-a7e11ee1d2e57a66740e940cb511ddba421fac47.tar.bz2
bfd/
* elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit. Add compact_stub. (emum _ovly_flavour): Delete ovly_compact, ovly_none. * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and ovly_return fields with ovly_entry[2]. Adjust all users. (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler when soft-icache. (spu_elf_build_stubs): Likewise. (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for ovly_flavour changes. Update all callers. (ovl_stub_size_log2): New function. (build_stub): Handle compact icache stubs. Use different manager entry point for stubs in non-icache area. (spu_elf_size_stubs): Don't allocate space for indirect branch descriptors. (spu_elf_build_stubs): And don't built them. ld/ * emultempl/spu_icache.S: Add new entry to dummy handler. * emultempl/spu_icache.o_c: Regenerate. * emultempl/spuelf.em (params): Init new field. (no_overlays): New static var. (spu_before_allocation): Use it. (OPTION_SPU_COMPACT_STUBS): Define. (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add compact-stubs. (PARSE_AND_LIST_ARGS_CASES): Handle compact-stubs. Adjust no-overlays handling. ld/testsuite/ * ld-spu/icache1.d: Update for fixed set_id, new manager entry, and reduced data.
Diffstat (limited to 'ld/emultempl/spuelf.em')
-rw-r--r--ld/emultempl/spuelf.em18
1 files changed, 13 insertions, 5 deletions
diff --git a/ld/emultempl/spuelf.em b/ld/emultempl/spuelf.em
index 396fe80..02b5499 100644
--- a/ld/emultempl/spuelf.em
+++ b/ld/emultempl/spuelf.em
@@ -37,11 +37,12 @@ static struct spu_elf_params params =
&spu_elf_load_ovl_mgr,
&spu_elf_open_overlay_script,
&spu_elf_relink,
- 0, ovly_normal, 0, 0, 0, 0, 0, 0,
+ 0, ovly_normal, 0, 0, 0, 0, 0, 0, 0,
0, 0x3ffff,
1, 0, 16, 0, 0, 2000
};
-
+
+static unsigned int no_overlays = 0;
static unsigned int num_lines_set = 0;
static unsigned int line_size_set = 0;
static char *auto_overlay_file = 0;
@@ -263,7 +264,7 @@ spu_before_allocation (void)
{
if (is_spu_target ()
&& !link_info.relocatable
- && params.ovly_flavour != ovly_none)
+ && !no_overlays)
{
/* Size the sections. This is premature, but we need to know the
rough layout so that overlays can be found. */
@@ -584,7 +585,8 @@ fi
PARSE_AND_LIST_PROLOGUE='
#define OPTION_SPU_PLUGIN 301
#define OPTION_SPU_NO_OVERLAYS (OPTION_SPU_PLUGIN + 1)
-#define OPTION_SPU_STUB_SYMS (OPTION_SPU_NO_OVERLAYS + 1)
+#define OPTION_SPU_COMPACT_STUBS (OPTION_SPU_NO_OVERLAYS + 1)
+#define OPTION_SPU_STUB_SYMS (OPTION_SPU_COMPACT_STUBS + 1)
#define OPTION_SPU_NON_OVERLAY_STUBS (OPTION_SPU_STUB_SYMS + 1)
#define OPTION_SPU_LOCAL_STORE (OPTION_SPU_NON_OVERLAY_STUBS + 1)
#define OPTION_SPU_STACK_ANALYSIS (OPTION_SPU_LOCAL_STORE + 1)
@@ -611,6 +613,7 @@ PARSE_AND_LIST_LONGOPTS='
{ "line-size", required_argument, NULL, OPTION_SPU_LINE_SIZE },
{ "non-ia-text", no_argument, NULL, OPTION_SPU_NON_IA_TEXT },
{ "no-overlays", no_argument, NULL, OPTION_SPU_NO_OVERLAYS },
+ { "compact-stubs", no_argument, NULL, OPTION_SPU_COMPACT_STUBS },
{ "emit-stub-syms", no_argument, NULL, OPTION_SPU_STUB_SYMS },
{ "extra-overlay-stubs", no_argument, NULL, OPTION_SPU_NON_OVERLAY_STUBS },
{ "local-store", required_argument, NULL, OPTION_SPU_LOCAL_STORE },
@@ -631,6 +634,7 @@ PARSE_AND_LIST_OPTIONS='
fprintf (file, _("\
--plugin Make SPU plugin.\n\
--no-overlays No overlay handling.\n\
+ --compact-stubs Use smaller and possibly slower call stubs.\n\
--emit-stub-syms Add symbols on overlay call stubs.\n\
--extra-overlay-stubs Add stubs on all calls out of overlay regions.\n\
--local-store=lo:hi Valid address range.\n\
@@ -662,7 +666,11 @@ PARSE_AND_LIST_ARGS_CASES='
break;
case OPTION_SPU_NO_OVERLAYS:
- params.ovly_flavour = ovly_none;
+ no_overlays = 1;
+ break;
+
+ case OPTION_SPU_COMPACT_STUBS:
+ params.compact_stub = 1;
break;
case OPTION_SPU_STUB_SYMS: