1 # This shell script emits a C file. -*- C -*-
2 # It does some substitutions.
3 cat >e${EMULATION_NAME}.c <<EOF
4 /* This file is part of GLD, the Gnu Linker.
5 Copyright 1995, 96, 97, 1998 Free Software Foundation, Inc.
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
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
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.
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
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
22 /* The original file generated returned different default scripts depending
23 on whether certain switches were set, but these switches pertain to the
24 Linux system and that particular version of coff. In the NT case, we
25 only determine if the subsystem is console or windows in order to select
26 the correct entry point by default. */
32 #include "libiberty.h"
43 #include "coff/internal.h"
44 #include "../bfd/libcoff.h"
46 #define TARGET_IS_${EMULATION_NAME}
48 static void gld_${EMULATION_NAME}_set_symbols PARAMS ((void));
49 static void gld_${EMULATION_NAME}_after_open PARAMS ((void));
50 static void gld_${EMULATION_NAME}_before_parse PARAMS ((void));
51 static void gld_${EMULATION_NAME}_after_parse PARAMS ((void));
52 static void gld_${EMULATION_NAME}_before_allocation PARAMS ((void));
53 static boolean gld_${EMULATION_NAME}_place_orphan
54 PARAMS ((lang_input_statement_type *, asection *));
55 static char *gld_${EMULATION_NAME}_get_script PARAMS ((int *));
56 static int gld_${EMULATION_NAME}_parse_args PARAMS ((int, char **));
58 #if 0 /* argument to qsort so don't prototype */
59 static int sort_by_file_name PARAMS ((void *, void *));
60 static int sort_by_section_name PARAMS ((void *, void *));
62 static lang_statement_union_type **sort_sections_1
63 PARAMS ((lang_statement_union_type **, lang_statement_union_type *, int,
65 static void sort_sections PARAMS ((lang_statement_union_type *));
67 static struct internal_extra_pe_aouthdr pe;
69 static int support_old_code = 0;
71 extern const char *output_filename;
74 gld_${EMULATION_NAME}_before_parse()
76 output_filename = "a.exe";
77 ldfile_output_architecture = bfd_arch_${ARCH};
80 /* PE format extra command line options. */
82 /* Used for setting flags in the PE header. */
83 #define OPTION_BASE_FILE (300 + 1)
84 #define OPTION_DLL (OPTION_BASE_FILE + 1)
85 #define OPTION_FILE_ALIGNMENT (OPTION_DLL + 1)
86 #define OPTION_IMAGE_BASE (OPTION_FILE_ALIGNMENT + 1)
87 #define OPTION_MAJOR_IMAGE_VERSION (OPTION_IMAGE_BASE + 1)
88 #define OPTION_MAJOR_OS_VERSION (OPTION_MAJOR_IMAGE_VERSION + 1)
89 #define OPTION_MAJOR_SUBSYSTEM_VERSION (OPTION_MAJOR_OS_VERSION + 1)
90 #define OPTION_MINOR_IMAGE_VERSION (OPTION_MAJOR_SUBSYSTEM_VERSION + 1)
91 #define OPTION_MINOR_OS_VERSION (OPTION_MINOR_IMAGE_VERSION + 1)
92 #define OPTION_MINOR_SUBSYSTEM_VERSION (OPTION_MINOR_OS_VERSION + 1)
93 #define OPTION_SECTION_ALIGNMENT (OPTION_MINOR_SUBSYSTEM_VERSION + 1)
94 #define OPTION_STACK (OPTION_SECTION_ALIGNMENT + 1)
95 #define OPTION_SUBSYSTEM (OPTION_STACK + 1)
96 #define OPTION_HEAP (OPTION_SUBSYSTEM + 1)
97 #define OPTION_SUPPORT_OLD_CODE (OPTION_HEAP + 1)
99 static struct option longopts[] =
102 {"base-file", required_argument, NULL, OPTION_BASE_FILE},
103 {"dll", no_argument, NULL, OPTION_DLL},
104 {"file-alignment", required_argument, NULL, OPTION_FILE_ALIGNMENT},
105 {"heap", required_argument, NULL, OPTION_HEAP},
106 {"image-base", required_argument, NULL, OPTION_IMAGE_BASE},
107 {"major-image-version", required_argument, NULL, OPTION_MAJOR_IMAGE_VERSION},
108 {"major-os-version", required_argument, NULL, OPTION_MAJOR_OS_VERSION},
109 {"major-subsystem-version", required_argument, NULL, OPTION_MAJOR_SUBSYSTEM_VERSION},
110 {"minor-image-version", required_argument, NULL, OPTION_MINOR_IMAGE_VERSION},
111 {"minor-os-version", required_argument, NULL, OPTION_MINOR_OS_VERSION},
112 {"minor-subsystem-version", required_argument, NULL, OPTION_MINOR_SUBSYSTEM_VERSION},
113 {"section-alignment", required_argument, NULL, OPTION_SECTION_ALIGNMENT},
114 {"stack", required_argument, NULL, OPTION_STACK},
115 {"subsystem", required_argument, NULL, OPTION_SUBSYSTEM},
116 {"support-old-code", no_argument, NULL, OPTION_SUPPORT_OLD_CODE},
117 {NULL, no_argument, NULL, 0}
121 /* PE/WIN32; added routines to get the subsystem type, heap and/or stack
122 parameters which may be input from the command line */
133 #define D(field,symbol,def) {&pe.field,sizeof(pe.field), def, symbol,0}
135 static definfo init[] =
137 /* imagebase must be first */
138 #define IMAGEBASEOFF 0
139 D(ImageBase,"__image_base__", NT_EXE_IMAGE_BASE),
141 {&dll, sizeof(dll), 0, "__dll__"},
142 D(SectionAlignment,"__section_alignment__", PE_DEF_SECTION_ALIGNMENT),
143 D(FileAlignment,"__file_alignment__", PE_DEF_FILE_ALIGNMENT),
144 D(MajorOperatingSystemVersion,"__major_os_version__", 4),
145 D(MinorOperatingSystemVersion,"__minor_os_version__", 0),
146 D(MajorImageVersion,"__major_image_version__", 1),
147 D(MinorImageVersion,"__minor_image_version__", 0),
148 D(MajorSubsystemVersion,"__major_subsystem_version__", 4),
149 D(MinorSubsystemVersion,"__minor_subsystem_version__", 0),
150 D(Subsystem,"__subsystem__", 3),
151 D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x2000000),
152 D(SizeOfStackCommit,"__size_of_stack_commit__", 0x1000),
153 D(SizeOfHeapReserve,"__size_of_heap_reserve__", 0x100000),
154 D(SizeOfHeapCommit,"__size_of_heap_commit__", 0x1000),
155 D(LoaderFlags,"__loader_flags__", 0x0),
156 { NULL, 0, 0, NULL, 0 }
160 gld_${EMULATION_NAME}_list_options (file)
163 fprintf (file, _(" --base_file <basefile> Generate a base file for relocatable DLLs\n"));
164 fprintf (file, _(" --dll Set image base to the default for DLLs\n"));
165 fprintf (file, _(" --file-alignment <size> Set file alignment\n"));
166 fprintf (file, _(" --heap <size> Set initial size of the heap\n"));
167 fprintf (file, _(" --image-base <address> Set start address of the executable\n"));
168 fprintf (file, _(" --major-image-version <number> Set version number of the executable\n"));
169 fprintf (file, _(" --major-os-version <number> Set minimum required OS version\n"));
170 fprintf (file, _(" --major-subsystem-version <number> Set minimum required OS subsystem version\n"));
171 fprintf (file, _(" --minor-image-version <number> Set revision number of the executable\n"));
172 fprintf (file, _(" --minor-os-version <number> Set minimum required OS revision\n"));
173 fprintf (file, _(" --minor-subsystem-version <number> Set minimum required OS subsystem revision\n"));
174 fprintf (file, _(" --section-alignment <size> Set section alignment\n"));
175 fprintf (file, _(" --stack <size> Set size of the initial stack\n"));
176 fprintf (file, _(" --subsystem <name>[:<version>] Set required OS subsystem [& version]\n"));
177 fprintf (file, _(" --support-old-code Support interworking with old code\n"));
181 set_pe_name (name, val)
186 /* Find the name and set it. */
187 for (i = 0; init[i].ptr; i++)
189 if (strcmp (name, init[i].symbol) == 0)
214 { "native", 1, "_NtProcessStartup" },
215 { "windows", 2, "_WinMainCRTStartup" },
216 { "console", 3, "_mainCRTStartup" },
218 /* The Microsoft linker does not recognize this. */
221 { "posix", 7, "___PosixProcessStartup"},
225 sver = strchr (optarg, ':');
227 len = strlen (optarg);
233 set_pe_name ("__major_subsystem_version__",
234 strtoul (sver + 1, &end, 0));
236 set_pe_name ("__minor_subsystem_version__",
237 strtoul (end + 1, &end, 0));
239 einfo (_("%P: warning: bad version number in -subsystem option\n"));
242 for (i = 0; v[i].name; i++)
244 if (strncmp (optarg, v[i].name, len) == 0
245 && v[i].name[len] == '\0')
247 set_pe_name ("__subsystem__", v[i].value);
249 lang_add_entry (v[i].entry, 1);
255 einfo (_("%P%F: invalid subsystem type %s\n"), optarg);
267 set_pe_name (name, strtoul (optarg, &end, 0));
270 einfo (_("%P%F: invalid hex number for PE parameter '%s'\n"), optarg);
276 set_pe_stack_heap (resname, comname)
280 set_pe_value (resname);
285 set_pe_value (comname);
288 einfo (_("%P%F: strange hex info for PE parameter '%s'\n"), optarg);
294 gld_${EMULATION_NAME}_parse_args(argc, argv)
300 int prevoptind = optind;
301 int prevopterr = opterr;
303 static int lastoptind = -1;
305 if (lastoptind != optind)
311 optc = getopt_long_only (argc, argv, "-", longopts, &longind);
322 case OPTION_BASE_FILE:
323 link_info.base_file = (PTR) fopen (optarg, FOPEN_WB);
324 if (link_info.base_file == NULL)
326 /* xgettext:c-format */
327 fprintf (stderr, _("%s: Can't open base file %s\n"),
328 program_name, optarg);
335 set_pe_stack_heap ("__size_of_heap_reserve__", "__size_of_heap_commit__");
338 set_pe_stack_heap ("__size_of_stack_reserve__", "__size_of_stack_commit__");
340 case OPTION_SUBSYSTEM:
343 case OPTION_MAJOR_OS_VERSION:
344 set_pe_value ("__major_os_version__");
346 case OPTION_MINOR_OS_VERSION:
347 set_pe_value ("__minor_os_version__");
349 case OPTION_MAJOR_SUBSYSTEM_VERSION:
350 set_pe_value ("__major_subsystem_version__");
352 case OPTION_MINOR_SUBSYSTEM_VERSION:
353 set_pe_value ("__minor_subsystem_version__");
355 case OPTION_MAJOR_IMAGE_VERSION:
356 set_pe_value ("__major_image_version__");
358 case OPTION_MINOR_IMAGE_VERSION:
359 set_pe_value ("__minor_image_version__");
361 case OPTION_FILE_ALIGNMENT:
362 set_pe_value ("__file_alignment__");
364 case OPTION_SECTION_ALIGNMENT:
365 set_pe_value ("__section_alignment__");
368 set_pe_name ("__dll__", 1);
370 case OPTION_IMAGE_BASE:
371 set_pe_value ("__image_base__");
373 case OPTION_SUPPORT_OLD_CODE:
374 support_old_code = 1;
380 /* Assign values to the special symbols before the linker script is
384 gld_${EMULATION_NAME}_set_symbols ()
386 /* Run through and invent symbols for all the
387 names and insert the defaults. */
389 lang_statement_list_type *save;
391 if (!init[IMAGEBASEOFF].inited)
393 if (link_info.relocateable)
394 init[IMAGEBASEOFF].value = 0;
395 else if (init[DLLOFF].value)
396 init[IMAGEBASEOFF].value = NT_DLL_IMAGE_BASE;
398 init[IMAGEBASEOFF].value = NT_EXE_IMAGE_BASE;
401 /* Don't do any symbol assignments if this is a relocateable link. */
402 if (link_info.relocateable)
405 /* Glue the assignments into the abs section */
408 stat_ptr = &(abs_output_section->children);
410 for (j = 0; init[j].ptr; j++)
412 long val = init[j].value;
413 lang_add_assignment (exp_assop ('=' ,init[j].symbol, exp_intop (val)));
414 if (init[j].size == sizeof(short))
415 *(short *)init[j].ptr = val;
416 else if (init[j].size == sizeof(int))
417 *(int *)init[j].ptr = val;
418 else if (init[j].size == sizeof(long))
419 *(long *)init[j].ptr = val;
420 /* This might be a long long or other special type. */
421 else if (init[j].size == sizeof(bfd_vma))
422 *(bfd_vma *)init[j].ptr = val;
425 /* Restore the pointer. */
428 if (pe.FileAlignment >
431 einfo (_("%P: warning, file alignment > section alignment.\n"));
435 /* This is called after the linker script and the command line options
439 gld_${EMULATION_NAME}_after_parse ()
441 /* The Windows libraries are designed for the linker to treat the
442 entry point as an undefined symbol. Otherwise, the .obj that
443 defines mainCRTStartup is brought in because it is the first
444 encountered in libc.lib and it has other symbols in it which will
445 be pulled in by the link process. To avoid this, we act as
446 though the user specified -u with the entry point symbol.
448 This function is called after the linker script and command line
449 options have been read, so at this point we know the right entry
450 point. This function is called before the input files are
451 opened, so registering the symbol as undefined will make a
454 ldlang_add_undef (entry_symbol);
458 gld_${EMULATION_NAME}_after_open ()
460 /* Pass the wacky PE command line options into the output bfd.
461 FIXME: This should be done via a function, rather than by
462 including an internal BFD header. */
464 if (!coff_data (output_bfd)->pe)
465 einfo (_("%F%P: PE operations on non PE file.\n"));
467 pe_data (output_bfd)->pe_opthdr = pe;
468 pe_data (output_bfd)->dll = init[DLLOFF].value;
470 #ifdef TARGET_IS_armpe
472 /* Find a BFD that can hold the interworking stubs. */
473 LANG_FOR_EACH_INPUT_STATEMENT (is)
475 if (bfd_arm_get_bfd_for_interworking (is->the_bfd, & link_info))
482 /* Callback functions for qsort in sort_sections. */
485 sort_by_file_name (a, b)
489 lang_statement_union_type **ra = a;
490 lang_statement_union_type **rb = b;
493 i = strcmp ((*ra)->input_section.ifile->the_bfd->my_archive->filename,
494 (*rb)->input_section.ifile->the_bfd->my_archive->filename);
498 return strcmp ((*ra)->input_section.ifile->filename,
499 (*rb)->input_section.ifile->filename);
503 sort_by_section_name (a, b)
507 lang_statement_union_type **ra = a;
508 lang_statement_union_type **rb = b;
509 return strcmp ((*ra)->input_section.section->name,
510 (*rb)->input_section.section->name);
513 /* Subroutine of sort_sections to a contiguous subset of a list of sections.
514 NEXT_AFTER is the element after the last one to sort.
515 The result is a pointer to the last element's "next" pointer. */
517 static lang_statement_union_type **
518 sort_sections_1 (startptr, next_after, count, sort_func)
519 lang_statement_union_type **startptr,*next_after;
523 lang_statement_union_type **vec;
524 lang_statement_union_type *p;
526 lang_statement_union_type **ret;
531 vec = ((lang_statement_union_type **)
532 xmalloc (count * sizeof (lang_statement_union_type *)));
534 for (p = *startptr, i = 0; i < count; i++, p = p->next)
537 qsort (vec, count, sizeof (vec[0]), sort_func);
539 /* Fill in the next pointers again. */
541 for (i = 0; i < count - 1; i++)
542 vec[i]->header.next = vec[i + 1];
543 vec[i]->header.next = next_after;
544 ret = &vec[i]->header.next;
549 /* Sort the .idata\$foo input sections of archives into filename order.
550 The reason is so dlltool can arrange to have the pe dll import information
551 generated correctly - the head of the list goes into dh.o, the tail into
552 dt.o, and the guts into ds[nnnn].o. Note that this is only needed for the
554 FIXME: This may no longer be necessary with grouped sections. Instead of
555 sorting on dh.o, ds[nnnn].o, dt.o, one could, for example, have dh.o use
556 .idata\$4h, have ds[nnnn].o use .idata\$4s[nnnn], and have dt.o use .idata\$4t.
557 This would have to be elaborated upon to handle multiple dll's
558 [assuming such an eloboration is possible of course].
560 We also sort sections in '\$' wild statements. These are created by the
561 place_orphans routine to implement grouped sections. */
565 lang_statement_union_type *s;
567 for (; s ; s = s->next)
568 switch (s->header.type)
570 case lang_output_section_statement_enum:
571 sort_sections (s->output_section_statement.children.head);
573 case lang_wild_statement_enum:
575 lang_statement_union_type **p = &s->wild_statement.children.head;
577 /* Is this the .idata section? */
578 if (s->wild_statement.section_name != NULL
579 && strncmp (s->wild_statement.section_name, ".idata", 6) == 0)
581 /* Sort the children. We want to sort any objects in
582 the same archive. In order to handle the case of
583 including a single archive multiple times, we sort
584 all the children by archive name and then by object
585 name. After sorting them, we re-thread the pointer
590 lang_statement_union_type *start = *p;
591 if (start->header.type != lang_input_section_enum
592 || !start->input_section.ifile->the_bfd->my_archive)
593 p = &(start->header.next);
596 lang_statement_union_type *end;
599 for (end = start, count = 0;
600 end && end->header.type == lang_input_section_enum;
604 p = sort_sections_1 (p, end, count, sort_by_file_name);
610 /* If this is a collection of grouped sections, sort them.
611 The linker script must explicitly mention "*(.foo\$)" or
612 "*(.foo\$*)". Don't sort them if \$ is not the last
613 character (not sure if this is really useful, but it
614 allows explicitly mentioning some \$ sections and letting
615 the linker handle the rest). */
616 if (s->wild_statement.section_name != NULL)
618 char *q = strchr (s->wild_statement.section_name, '\$');
622 || (q[1] == '*' && q[2] == '\0')))
624 lang_statement_union_type *end;
627 for (end = *p, count = 0; end; end = end->next)
629 if (end->header.type != lang_input_section_enum)
633 (void) sort_sections_1 (p, end, count, sort_by_section_name);
645 gld_${EMULATION_NAME}_before_allocation()
647 extern lang_statement_list_type *stat_ptr;
649 #ifdef TARGET_IS_ppcpe
650 /* Here we rummage through the found bfds to collect toc information */
652 LANG_FOR_EACH_INPUT_STATEMENT (is)
654 if (!ppc_process_before_allocation (is->the_bfd, &link_info))
656 /* xgettext:c-format */
657 einfo (_("Errors encountered processing file %s\n"), is->filename);
662 /* We have seen it all. Allocate it, and carry on */
663 ppc_allocate_toc_section (&link_info);
664 #endif /* TARGET_IS_ppcpe */
666 #ifdef TARGET_IS_armpe
667 /* FIXME: we should be able to set the size of the interworking stub
670 Here we rummage through the found bfds to collect glue
671 information. FIXME: should this be based on a command line
672 option? krk@cygnus.com */
674 LANG_FOR_EACH_INPUT_STATEMENT (is)
676 if (! bfd_arm_process_before_allocation
677 (is->the_bfd, & link_info, support_old_code))
679 /* xgettext:c-format */
680 einfo (_("Errors encountered processing file %s for interworking"),
686 /* We have seen it all. Allocate it, and carry on */
687 bfd_arm_allocate_interworking_sections (& link_info);
688 #endif /* TARGET_IS_armpe */
690 sort_sections (stat_ptr->head);
693 /* Place an orphan section. We use this to put sections with a '\$' in them
694 into the right place. Any section with a '\$' in them (e.g. .text\$foo)
695 gets mapped to the output section with everything from the '\$' on stripped
697 See the Microsoft Portable Executable and Common Object File Format
698 Specification 4.1, section 4.2, Grouped Sections.
700 FIXME: This is now handled by the linker script using wildcards,
701 but I'm leaving this here in case we want to enable it for sections
702 which are not mentioned in the linker script. */
706 gld_${EMULATION_NAME}_place_orphan (file, s)
707 lang_input_statement_type *file;
711 char *output_secname, *ps;
712 lang_output_section_statement_type *os;
713 lang_statement_union_type *l;
715 if ((s->flags & SEC_ALLOC) == 0)
718 /* Don't process grouped sections unless doing a final link.
719 If they're marked as COMDAT sections, we don't want .text\$foo to
720 end up in .text and then have .text disappear because it's marked
721 link-once-discard. */
722 if (link_info.relocateable)
725 secname = bfd_get_section_name (s->owner, s);
727 /* Everything from the '\$' on gets deleted so don't allow '\$' as the
729 if (*secname == '\$')
730 einfo ("%P%F: section %s has '\$' as first character\n", secname);
731 if (strchr (secname + 1, '\$') == NULL)
734 /* Look up the output section. The Microsoft specs say sections names in
735 image files never contain a '\$'. Fortunately, lang_..._lookup creates
736 the section if it doesn't exist. */
737 output_secname = buystring (secname);
738 ps = strchr (output_secname + 1, '\$');
740 os = lang_output_section_statement_lookup (output_secname);
742 /* Find the '\$' wild statement for this section. We currently require the
743 linker script to explicitly mention "*(.foo\$)".
744 FIXME: ppcpe.sc has .CRT\$foo in the .rdata section. According to the
745 Microsoft docs this isn't correct so it's not (currently) handled. */
749 for (l = os->children.head; l; l = l->next)
751 if (l->header.type == lang_wild_statement_enum
752 && strcmp (l->wild_statement.section_name, output_secname) == 0)
758 einfo ("%P%F: *(%s\$) missing from linker script\n", output_secname);
759 #else /* FIXME: This block is untried. It exists to convey the intent,
760 should one decide to not require *(.foo\$) to appear in the linker
763 lang_wild_statement_type *new = new_stat (lang_wild_statement,
765 new->section_name = xmalloc (strlen (output_secname) + 2);
766 sprintf (new->section_name, "%s\$", output_secname);
767 new->filename = NULL;
768 lang_list_init (&new->children);
773 /* Link the input section in and we're done for now.
774 The sections still have to be sorted, but that has to wait until
775 all such sections have been processed by us. The sorting is done by
777 wild_doit (&l->wild_statement.children, s, os, file);
783 gld_${EMULATION_NAME}_get_script(isfile)
786 # Scripts compiled in.
787 # sed commands to quote an ld script as a C string.
788 sc="-f ${srcdir}/emultempl/stringify.sed"
790 cat >>e${EMULATION_NAME}.c <<EOF
794 if (link_info.relocateable == true && config.build_constructors == true)
797 sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
798 echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c
799 sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
800 echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
801 sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
802 echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
803 sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
804 echo ' ; else return' >> e${EMULATION_NAME}.c
805 sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
806 echo '; }' >> e${EMULATION_NAME}.c
808 cat >>e${EMULATION_NAME}.c <<EOF
811 struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
813 gld_${EMULATION_NAME}_before_parse,
816 gld_${EMULATION_NAME}_after_parse,
817 gld_${EMULATION_NAME}_after_open,
818 after_allocation_default,
819 set_output_arch_default,
820 ldemul_default_target,
821 gld_${EMULATION_NAME}_before_allocation,
822 gld_${EMULATION_NAME}_get_script,
826 NULL, /* create output section statements */
827 NULL, /* open dynamic archive */
828 gld_${EMULATION_NAME}_place_orphan,
829 gld_${EMULATION_NAME}_set_symbols,
830 gld_${EMULATION_NAME}_parse_args,
831 NULL, /* unrecognised file */
832 gld_${EMULATION_NAME}_list_options