1 # This shell script emits a C file. -*- C -*-
2 # Copyright (C) 2006-2022 Free Software Foundation, Inc.
4 # This file is part of the GNU Binutils.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
22 # This file is sourced from elf.em, and defines extra spu specific
27 #include "elf32-spu.h"
29 static void spu_place_special_section (asection *, asection *, const char *);
30 static bfd_size_type spu_elf_load_ovl_mgr (void);
31 static FILE *spu_elf_open_overlay_script (void);
32 static void spu_elf_relink (void);
34 static struct spu_elf_params params =
36 &spu_place_special_section,
37 &spu_elf_load_ovl_mgr,
38 &spu_elf_open_overlay_script,
40 0, ovly_normal, 0, 0, 0, 0, 0, 0, 0, 0,
45 static unsigned int no_overlays = 0;
46 static unsigned int num_lines_set = 0;
47 static unsigned int line_size_set = 0;
48 static char *auto_overlay_file = 0;
52 static const char ovl_mgr[] = {
55 if ! cat ${srcdir}/emultempl/spu_ovl.o_c >> e${EMULATION_NAME}.c
57 echo >&2 "Missing ${srcdir}/emultempl/spu_ovl.o_c"
58 echo >&2 "You must build gas/as-new with --target=spu"
65 static const char icache_mgr[] = {
68 if ! cat ${srcdir}/emultempl/spu_icache.o_c >> e${EMULATION_NAME}.c
70 echo >&2 "Missing ${srcdir}/emultempl/spu_icache.o_c"
71 echo >&2 "You must build gas/as-new with --target=spu"
78 static const struct _ovl_stream ovl_mgr_stream = {
80 ovl_mgr + sizeof (ovl_mgr)
83 static const struct _ovl_stream icache_mgr_stream = {
85 icache_mgr + sizeof (icache_mgr)
92 extern const bfd_target spu_elf32_vec;
94 return link_info.output_bfd->xvec == &spu_elf32_vec;
97 /* Create our note section. */
100 spu_after_open (void)
102 if (is_spu_target ())
104 /* Pass params to backend. */
105 if ((params.auto_overlay & AUTO_OVERLAY) == 0)
106 params.auto_overlay = 0;
107 params.emit_stub_syms |= link_info.emitrelocations;
108 spu_elf_setup (&link_info, ¶ms);
110 if (bfd_link_relocatable (&link_info))
111 lang_add_unique (".text.ia.*");
113 if (!bfd_link_relocatable (&link_info)
114 && link_info.input_bfds != NULL
115 && !spu_elf_create_sections (&link_info))
116 einfo (_("%X%P: can not create note section: %E\n"));
119 gld${EMULATION_NAME}_after_open ();
122 /* If O is NULL, add section S at the end of output section OUTPUT_NAME.
123 If O is not NULL, add section S at the beginning of output section O,
124 except for soft-icache which adds to the end.
126 Really, we should be duplicating ldlang.c map_input_to_output_sections
127 logic here, ie. using the linker script to find where the section
128 goes. That's rather a lot of code, and we don't want to run
129 map_input_to_output_sections again because most sections are already
130 mapped. So cheat, and put the section in a fixed place, ignoring any
131 attempt via a linker script to put .stub, .ovtab, and built-in
132 overlay manager code somewhere else. */
135 spu_place_special_section (asection *s, asection *o, const char *output_name)
137 lang_output_section_statement_type *os;
140 os = lang_output_section_get (o);
142 os = lang_output_section_find (output_name);
145 os = ldelf_place_orphan (s, output_name, 0);
146 os->addr_tree = NULL;
148 else if (params.ovly_flavour != ovly_soft_icache
149 && o != NULL && os->children.head != NULL)
151 lang_statement_list_type add;
153 lang_list_init (&add);
154 lang_add_section (&add, s, NULL, NULL, os);
155 *add.tail = os->children.head;
156 os->children.head = add.head;
160 if (params.ovly_flavour == ovly_soft_icache && o != NULL)
162 /* Pad this stub section so that it finishes at the
163 end of the icache line. */
166 push_stat_ptr (&os->children);
167 e_size = exp_intop (params.line_size - s->size);
168 lang_add_assignment (exp_assign (".", e_size, false));
171 lang_add_section (&os->children, s, NULL, NULL, os);
174 s->output_section->size += s->size;
177 /* Load built-in overlay manager. */
180 spu_elf_load_ovl_mgr (void)
182 struct elf_link_hash_entry *h;
183 const char *ovly_mgr_entry;
184 const struct _ovl_stream *mgr_stream;
185 bfd_size_type total = 0;
187 ovly_mgr_entry = "__ovly_load";
188 mgr_stream = &ovl_mgr_stream;
189 if (params.ovly_flavour == ovly_soft_icache)
191 ovly_mgr_entry = "__icache_br_handler";
192 mgr_stream = &icache_mgr_stream;
194 h = elf_link_hash_lookup (elf_hash_table (&link_info),
195 ovly_mgr_entry, false, false, false);
198 && (h->root.type == bfd_link_hash_defined
199 || h->root.type == bfd_link_hash_defweak)
202 /* User supplied __ovly_load. */
204 else if (mgr_stream->start == mgr_stream->end)
205 einfo (_("%F%P: no built-in overlay manager\n"));
208 lang_input_statement_type *ovl_is;
210 ovl_is = lang_add_input_file ("builtin ovl_mgr",
211 lang_input_file_is_file_enum,
214 if (!spu_elf_open_builtin_lib (&ovl_is->the_bfd, mgr_stream))
215 einfo (_("%X%P: can not open built-in overlay manager: %E\n"));
220 if (!load_symbols (ovl_is, NULL))
221 einfo (_("%X%P: can not load built-in overlay manager: %E\n"));
223 /* Map overlay manager sections to output sections.
224 First try for a matching output section name, if that
225 fails then try mapping .abc.xyz to .abc, otherwise map
227 for (in = ovl_is->the_bfd->sections; in != NULL; in = in->next)
228 if ((in->flags & (SEC_ALLOC | SEC_LOAD))
229 == (SEC_ALLOC | SEC_LOAD))
231 const char *oname = in->name;
232 if (strncmp (in->name, ".ovl.init", 9) != 0)
235 if (!lang_output_section_find (oname))
237 lang_output_section_statement_type *os = NULL;
238 char *p = strchr (oname + 1, '.');
241 size_t len = p - oname;
242 p = memcpy (xmalloc (len + 1), oname, len);
244 os = lang_output_section_find (p);
254 spu_place_special_section (in, NULL, oname);
261 /* Go find if we need to do anything special for overlays. */
264 spu_before_allocation (void)
267 && !bfd_link_relocatable (&link_info)
272 /* Size the sections. This is premature, but we need to know the
273 rough layout so that overlays can be found. */
274 expld.phase = lang_mark_phase_enum;
275 expld.dataseg.phase = exp_seg_none;
276 one_lang_size_sections_pass (NULL, true);
278 /* Find overlays by inspecting section vmas. */
279 ret = spu_elf_find_overlays (&link_info);
281 einfo (_("%X%P: can not find overlays: %E\n"));
284 lang_output_section_statement_type *os;
286 if (params.auto_overlay != 0)
288 einfo (_("%P: --auto-overlay ignored with user overlay script\n"));
289 params.auto_overlay = 0;
292 /* Ensure alignment of overlay sections is sufficient. */
293 for (os = (void *) lang_os_list.head;
296 if (os->bfd_section != NULL
297 && spu_elf_section_data (os->bfd_section) != NULL
298 && spu_elf_section_data (os->bfd_section)->u.o.ovl_index != 0)
300 if (os->bfd_section->alignment_power < 4)
301 os->bfd_section->alignment_power = 4;
303 /* Also ensure size rounds up. */
304 os->block_value = 16;
307 ret = spu_elf_size_stubs (&link_info);
309 einfo (_("%X%P: can not size overlay stubs: %E\n"));
311 spu_elf_load_ovl_mgr ();
313 spu_elf_place_overlay_data (&link_info);
316 /* We must not cache anything from the preliminary sizing. */
317 lang_reset_memory_regions ();
321 && !bfd_link_relocatable (&link_info))
322 spu_elf_size_sections (link_info.output_bfd, &link_info);
324 gld${EMULATION_NAME}_before_allocation ();
332 static struct tflist *tmp_file_list;
334 static void clean_tmp (void)
336 for (; tmp_file_list != NULL; tmp_file_list = tmp_file_list->next)
337 unlink (tmp_file_list->name);
341 new_tmp_file (char **fname)
346 if (tmp_file_list == NULL)
348 tf = xmalloc (sizeof (*tf));
349 tf->next = tmp_file_list;
351 memcpy (tf->name, "ldXXXXXX", sizeof (tf->name));
354 fd = mkstemp (*fname);
356 *fname = mktemp (*fname);
359 fd = open (*fname, O_RDWR | O_CREAT | O_EXCL, 0600);
365 spu_elf_open_overlay_script (void)
369 if (auto_overlay_file == NULL)
371 int fd = new_tmp_file (&auto_overlay_file);
374 script = fdopen (fd, "w");
377 script = fopen (auto_overlay_file, "w");
382 einfo (_("%F%P: can not open script: %E\n"));
390 spu_elf_relink (void)
392 const char *pex_return;
394 char **argv = xmalloc ((my_argc + 4) * sizeof (*argv));
396 memcpy (argv, my_argv, my_argc * sizeof (*argv));
397 argv[my_argc++] = "--no-auto-overlay";
398 if (tmp_file_list != NULL && tmp_file_list->name == auto_overlay_file)
399 argv[my_argc - 1] = concat (argv[my_argc - 1], "=",
400 auto_overlay_file, (const char *) NULL);
401 argv[my_argc++] = "-T";
402 argv[my_argc++] = auto_overlay_file;
405 pex_return = pex_one (PEX_SEARCH | PEX_LAST, (const char *) argv[0],
406 (char * const *) argv, (const char *) argv[0],
407 NULL, NULL, & status, & errno);
408 if (pex_return != NULL)
416 /* Final emulation specific call. */
419 gld${EMULATION_NAME}_finish (void)
421 if (is_spu_target ())
423 if (params.local_store_lo < params.local_store_hi)
427 s = spu_elf_check_vma (&link_info);
428 if (s != NULL && !params.auto_overlay)
429 einfo (_("%X%P: %pA exceeds local store range\n"), s);
431 else if (params.auto_overlay)
432 einfo (_("%P: --auto-overlay ignored with zero local store range\n"));
439 gld${EMULATION_NAME}_choose_target (int argc, char *argv[])
443 return ldemul_default_target (argc, argv);
448 if grep -q 'ld_elf.*ppc.*_emulation' ldemul-list.h; then
450 #include "safe-ctype.h"
451 #include "filenames.h"
452 #include "libiberty.h"
455 base_name (const char *path)
457 const char *file = strrchr (path, '/');
458 #ifdef HAVE_DOS_BASED_FILE_SYSTEM
460 char *bslash = strrchr (path, '\\\\');
462 if (file == NULL || (bslash != NULL && bslash > file))
477 /* This function is called when building a ppc32 or ppc64 executable
478 to handle embedded spu images. */
479 extern bool embedded_spu_file (lang_input_statement_type *, const char *);
482 embedded_spu_file (lang_input_statement_type *entry, const char *flags)
485 const char *pex_return;
491 union lang_statement_union **old_stat_tail;
492 union lang_statement_union **old_file_tail;
493 union lang_statement_union *new_ent;
494 lang_input_statement_type *search;
496 if (entry->the_bfd->format != bfd_object
497 || strcmp (entry->the_bfd->xvec->name, "elf32-spu") != 0
498 || (entry->the_bfd->tdata.elf_obj_data->elf_header->e_type != ET_EXEC
499 && entry->the_bfd->tdata.elf_obj_data->elf_header->e_type != ET_DYN))
502 /* Use the filename as the symbol marking the program handle struct. */
503 sym = base_name (bfd_get_filename (entry->the_bfd));
505 handle = xstrdup (sym);
506 for (p = handle; *p; ++p)
507 if (!(ISALNUM (*p) || *p == '$' || *p == '.'))
510 fd = new_tmp_file (&oname);
515 for (search = (void *) input_file_chain.head;
517 search = search->next_real_file)
518 if (search->filename != NULL)
520 const char *infile = base_name (search->filename);
522 if (strncmp (infile, "crtbegin", 8) == 0)
524 if (infile[8] == 'S')
525 flags = concat (flags, " -fPIC", (const char *) NULL);
526 else if (infile[8] == 'T')
527 flags = concat (flags, " -fpie", (const char *) NULL);
535 cmd[3] = bfd_get_filename (entry->the_bfd);
540 info_msg (_("running: %s \"%s\" \"%s\" \"%s\" \"%s\"\n"),
541 cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]);
545 pex_return = pex_one (PEX_SEARCH | PEX_LAST, cmd[0], (char *const *) cmd,
546 cmd[0], NULL, NULL, &status, &errno);
547 if (NULL != pex_return) {
548 if (strcmp ("embedspu", EMBEDSPU) != 0)
551 pex_return = pex_one (PEX_SEARCH | PEX_LAST, cmd[0], (char *const *) cmd,
552 cmd[0], NULL, NULL, &status, &errno);
554 if (NULL != pex_return) {
563 old_stat_tail = stat_ptr->tail;
564 old_file_tail = input_file_chain.tail;
565 if (lang_add_input_file (oname, lang_input_file_is_file_enum, NULL) == NULL)
568 /* lang_add_input_file puts the new list entry at the end of the statement
569 and input file lists. Move it to just after the current entry. */
570 new_ent = *old_stat_tail;
571 *old_stat_tail = NULL;
572 stat_ptr->tail = old_stat_tail;
573 *old_file_tail = NULL;
574 input_file_chain.tail = old_file_tail;
575 new_ent->header.next = entry->header.next;
576 entry->header.next = new_ent;
577 new_ent->input_statement.next_real_file = entry->next_real_file;
578 entry->next_real_file = &new_ent->input_statement;
580 /* Ensure bfd sections are excluded from the output. */
581 bfd_section_list_clear (entry->the_bfd);
582 entry->flags.loaded = true;
589 # Define some shell vars to insert bits of code into the standard elf
590 # parse_args and list_options functions.
592 PARSE_AND_LIST_PROLOGUE='
593 #define OPTION_SPU_PLUGIN 301
594 #define OPTION_SPU_NO_OVERLAYS (OPTION_SPU_PLUGIN + 1)
595 #define OPTION_SPU_COMPACT_STUBS (OPTION_SPU_NO_OVERLAYS + 1)
596 #define OPTION_SPU_STUB_SYMS (OPTION_SPU_COMPACT_STUBS + 1)
597 #define OPTION_SPU_NON_OVERLAY_STUBS (OPTION_SPU_STUB_SYMS + 1)
598 #define OPTION_SPU_LOCAL_STORE (OPTION_SPU_NON_OVERLAY_STUBS + 1)
599 #define OPTION_SPU_STACK_ANALYSIS (OPTION_SPU_LOCAL_STORE + 1)
600 #define OPTION_SPU_STACK_SYMS (OPTION_SPU_STACK_ANALYSIS + 1)
601 #define OPTION_SPU_AUTO_OVERLAY (OPTION_SPU_STACK_SYMS + 1)
602 #define OPTION_SPU_AUTO_RELINK (OPTION_SPU_AUTO_OVERLAY + 1)
603 #define OPTION_SPU_OVERLAY_RODATA (OPTION_SPU_AUTO_RELINK + 1)
604 #define OPTION_SPU_SOFT_ICACHE (OPTION_SPU_OVERLAY_RODATA + 1)
605 #define OPTION_SPU_LINE_SIZE (OPTION_SPU_SOFT_ICACHE + 1)
606 #define OPTION_SPU_NUM_LINES (OPTION_SPU_LINE_SIZE + 1)
607 #define OPTION_SPU_LRLIVE (OPTION_SPU_NUM_LINES + 1)
608 #define OPTION_SPU_NON_IA_TEXT (OPTION_SPU_LRLIVE + 1)
609 #define OPTION_SPU_FIXED_SPACE (OPTION_SPU_NON_IA_TEXT + 1)
610 #define OPTION_SPU_RESERVED_SPACE (OPTION_SPU_FIXED_SPACE + 1)
611 #define OPTION_SPU_EXTRA_STACK (OPTION_SPU_RESERVED_SPACE + 1)
612 #define OPTION_SPU_NO_AUTO_OVERLAY (OPTION_SPU_EXTRA_STACK + 1)
613 #define OPTION_SPU_EMIT_FIXUPS (OPTION_SPU_NO_AUTO_OVERLAY + 1)
616 PARSE_AND_LIST_LONGOPTS='
617 { "plugin", no_argument, NULL, OPTION_SPU_PLUGIN },
618 { "soft-icache", no_argument, NULL, OPTION_SPU_SOFT_ICACHE },
619 { "lrlive-analysis", no_argument, NULL, OPTION_SPU_LRLIVE },
620 { "num-lines", required_argument, NULL, OPTION_SPU_NUM_LINES },
621 { "line-size", required_argument, NULL, OPTION_SPU_LINE_SIZE },
622 { "non-ia-text", no_argument, NULL, OPTION_SPU_NON_IA_TEXT },
623 { "no-overlays", no_argument, NULL, OPTION_SPU_NO_OVERLAYS },
624 { "compact-stubs", no_argument, NULL, OPTION_SPU_COMPACT_STUBS },
625 { "emit-stub-syms", no_argument, NULL, OPTION_SPU_STUB_SYMS },
626 { "extra-overlay-stubs", no_argument, NULL, OPTION_SPU_NON_OVERLAY_STUBS },
627 { "local-store", required_argument, NULL, OPTION_SPU_LOCAL_STORE },
628 { "stack-analysis", no_argument, NULL, OPTION_SPU_STACK_ANALYSIS },
629 { "emit-stack-syms", no_argument, NULL, OPTION_SPU_STACK_SYMS },
630 { "auto-overlay", optional_argument, NULL, OPTION_SPU_AUTO_OVERLAY },
631 { "auto-relink", no_argument, NULL, OPTION_SPU_AUTO_RELINK },
632 { "overlay-rodata", no_argument, NULL, OPTION_SPU_OVERLAY_RODATA },
633 { "num-regions", required_argument, NULL, OPTION_SPU_NUM_LINES },
634 { "region-size", required_argument, NULL, OPTION_SPU_LINE_SIZE },
635 { "fixed-space", required_argument, NULL, OPTION_SPU_FIXED_SPACE },
636 { "reserved-space", required_argument, NULL, OPTION_SPU_RESERVED_SPACE },
637 { "extra-stack-space", required_argument, NULL, OPTION_SPU_EXTRA_STACK },
638 { "no-auto-overlay", optional_argument, NULL, OPTION_SPU_NO_AUTO_OVERLAY },
639 { "emit-fixups", optional_argument, NULL, OPTION_SPU_EMIT_FIXUPS },
642 PARSE_AND_LIST_OPTIONS='
644 --plugin Make SPU plugin\n"));
646 --no-overlays No overlay handling\n"));
648 --compact-stubs Use smaller and possibly slower call stubs\n"));
650 --emit-stub-syms Add symbols on overlay call stubs\n"));
652 --extra-overlay-stubs Add stubs on all calls out of overlay regions\n"));
654 --local-store=lo:hi Valid address range\n"));
656 --stack-analysis Estimate maximum stack requirement\n"));
658 --emit-stack-syms Add sym giving stack needed for each func\n"));
660 --auto-overlay [=filename] Create an overlay script in filename if\n\
661 executable does not fit in local store\n"));
663 --auto-relink Rerun linker using auto-overlay script\n"));
665 --overlay-rodata Place read-only data with associated function\n\
666 code in overlays\n"));
668 --num-regions Number of overlay buffers (default 1)\n"));
670 --region-size Size of overlay buffers (default 0, auto)\n"));
672 --fixed-space=bytes Local store for non-overlay code and data\n"));
674 --reserved-space=bytes Local store for stack and heap. If not specified\n\
675 ld will estimate stack size and assume no heap\n"));
677 --extra-stack-space=bytes Space for negative sp access (default 2000) if\n\
678 --reserved-space not given\n"));
680 --soft-icache Generate software icache overlays\n"));
682 --num-lines Number of soft-icache lines (default 32)\n"));
684 --line-size Size of soft-icache lines (default 1k)\n"));
686 --non-ia-text Allow non-icache code in icache lines\n"));
688 --lrlive-analysis Scan function prologue for lr liveness\n"));
691 PARSE_AND_LIST_ARGS_CASES='
692 case OPTION_SPU_PLUGIN:
696 case OPTION_SPU_NO_OVERLAYS:
700 case OPTION_SPU_COMPACT_STUBS:
701 params.compact_stub = 1;
704 case OPTION_SPU_STUB_SYMS:
705 params.emit_stub_syms = 1;
708 case OPTION_SPU_NON_OVERLAY_STUBS:
709 params.non_overlay_stubs = 1;
712 case OPTION_SPU_LOCAL_STORE:
715 params.local_store_lo = strtoul (optarg, &end, 0);
716 if (*end == '\'':'\'')
718 params.local_store_hi = strtoul (end + 1, &end, 0);
722 einfo (_("%F%P: invalid --local-store address range `%s'\''\n"), optarg);
726 case OPTION_SPU_STACK_ANALYSIS:
727 params.stack_analysis = 1;
730 case OPTION_SPU_STACK_SYMS:
731 params.emit_stack_syms = 1;
734 case OPTION_SPU_AUTO_OVERLAY:
735 params.auto_overlay |= 1;
738 auto_overlay_file = optarg;
743 case OPTION_SPU_AUTO_RELINK:
744 params.auto_overlay |= 2;
747 case OPTION_SPU_OVERLAY_RODATA:
748 params.auto_overlay |= 4;
751 case OPTION_SPU_SOFT_ICACHE:
752 params.ovly_flavour = ovly_soft_icache;
753 /* Software i-cache stubs are always "compact". */
754 params.compact_stub = 1;
756 params.num_lines = 32;
757 else if ((params.num_lines & -params.num_lines) != params.num_lines)
758 einfo (_("%F%P: invalid --num-lines/--num-regions `%u'\''\n"),
761 params.line_size = 1024;
762 else if ((params.line_size & -params.line_size) != params.line_size)
763 einfo (_("%F%P: invalid --line-size/--region-size `%u'\''\n"),
767 case OPTION_SPU_LRLIVE:
768 params.lrlive_analysis = 1;
771 case OPTION_SPU_NON_IA_TEXT:
772 params.non_ia_text = 1;
775 case OPTION_SPU_NUM_LINES:
778 params.num_lines = strtoul (optarg, &end, 0);
781 && (params.ovly_flavour != ovly_soft_icache
782 || (params.num_lines & -params.num_lines) == params.num_lines))
784 einfo (_("%F%P: invalid --num-lines/--num-regions `%s'\''\n"), optarg);
788 case OPTION_SPU_LINE_SIZE:
791 params.line_size = strtoul (optarg, &end, 0);
794 && (params.ovly_flavour != ovly_soft_icache
795 || (params.line_size & -params.line_size) == params.line_size))
797 einfo (_("%F%P: invalid --line-size/--region-size `%s'\''\n"), optarg);
801 case OPTION_SPU_FIXED_SPACE:
804 params.auto_overlay_fixed = strtoul (optarg, &end, 0);
806 einfo (_("%F%P: invalid --fixed-space value `%s'\''\n"), optarg);
810 case OPTION_SPU_RESERVED_SPACE:
813 params.auto_overlay_reserved = strtoul (optarg, &end, 0);
815 einfo (_("%F%P: invalid --reserved-space value `%s'\''\n"), optarg);
819 case OPTION_SPU_EXTRA_STACK:
822 params.extra_stack_space = strtol (optarg, &end, 0);
824 einfo (_("%F%P: invalid --extra-stack-space value `%s'\''\n"), optarg);
828 case OPTION_SPU_NO_AUTO_OVERLAY:
829 params.auto_overlay = 0;
835 if (tmp_file_list == NULL)
838 len = strlen (optarg) + 1;
839 tf = xmalloc (sizeof (*tf) - sizeof (tf->name) + len);
840 memcpy (tf->name, optarg, len);
841 tf->next = tmp_file_list;
847 case OPTION_SPU_EMIT_FIXUPS:
848 params.emit_fixups = 1;
852 LDEMUL_AFTER_OPEN=spu_after_open
853 LDEMUL_BEFORE_ALLOCATION=spu_before_allocation
854 LDEMUL_FINISH=gld${EMULATION_NAME}_finish
855 LDEMUL_CHOOSE_TARGET=gld${EMULATION_NAME}_choose_target