bfd/
[deliverable/binutils-gdb.git] / ld / emultempl / spuelf.em
index 396fe807f4053d1735ee43261743bf5b7a500fcf..06c22b8e0714b1cd62d20c6b69a233d32451b3a1 100644 (file)
@@ -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,8 +264,10 @@ spu_before_allocation (void)
 {
   if (is_spu_target ()
       && !link_info.relocatable
-      && params.ovly_flavour != ovly_none)
+      && !no_overlays)
     {
+      int ret;
+
       /* Size the sections.  This is premature, but we need to know the
         rough layout so that overlays can be found.  */
       expld.phase = lang_mark_phase_enum;
@@ -272,9 +275,11 @@ spu_before_allocation (void)
       one_lang_size_sections_pass (NULL, TRUE);
 
       /* Find overlays by inspecting section vmas.  */
-      if (spu_elf_find_overlays (&link_info))
+      ret = spu_elf_find_overlays (&link_info);
+      if (ret == 0)
+       einfo ("%X%P: can not find overlays: %E\n");
+      else if (ret == 2)
        {
-         int ret;
          lang_output_section_statement_type *os;
 
          if (params.auto_overlay != 0)
@@ -584,7 +589,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 +617,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 +638,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 +670,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:
This page took 0.023893 seconds and 4 git commands to generate.