1 /* This file is is generated by a shell script. DO NOT EDIT! */
3 /* AIX emulation code for ppcmacos
4 Copyright (C) 1991, 1993, 1995, 1998 Free Software Foundation, Inc.
5 Written by Steve Chamberlain <sac@cygnus.com>
6 AIX support by Ian Lance Taylor <ian@cygnus.com>
8 This file is part of GLD, the Gnu Linker.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
24 #define TARGET_IS_ppcmacos
28 #include "libiberty.h"
44 static void gldppcmacos_before_parse
PARAMS ((void));
45 static int gldppcmacos_parse_args
PARAMS ((int, char **));
46 static void gldppcmacos_after_open
PARAMS ((void));
47 static void gldppcmacos_before_allocation
PARAMS ((void));
48 static void gldppcmacos_read_file
PARAMS ((const char *, boolean
));
49 static void gldppcmacos_free
PARAMS ((PTR
));
50 static void gldppcmacos_find_relocs
51 PARAMS ((lang_statement_union_type
*));
52 static void gldppcmacos_find_exp_assignment
PARAMS ((etree_type
*));
53 static char *gldppcmacos_get_script
PARAMS ((int *isfile
));
55 /* The file alignment required for each section. */
56 static unsigned long file_align
;
58 /* The maximum size the stack is permitted to grow. This is stored in
60 static unsigned long maxstack
;
62 /* The maximum data size. This is stored in the a.out header. */
63 static unsigned long maxdata
;
65 /* Whether to perform garbage collection. */
68 /* The module type to use. */
69 static unsigned short modtype
= ('1' << 8) | 'L';
71 /* Whether the .text section must be read-only (i.e., no relocs
75 /* Whether to implement Unix like linker semantics. */
78 /* Structure used to hold import file list. */
82 struct filelist
*next
;
86 /* List of import files. */
87 static struct filelist
*import_files
;
89 /* List of export symbols read from the export files. */
91 struct export_symbol_list
93 struct export_symbol_list
*next
;
98 static struct export_symbol_list
*export_symbols
;
100 /* This routine is called before anything else is done. */
103 gldppcmacos_before_parse()
105 #ifndef TARGET_ /* I.e., if not generic. */
106 ldfile_output_architecture
= bfd_arch_powerpc
;
107 #endif /* not TARGET_ */
110 /* Handle AIX specific options. */
113 gldppcmacos_parse_args (argc
, argv
)
117 int prevoptind
= optind
;
118 int prevopterr
= opterr
;
125 #define OPTION_IGNORE (300)
126 #define OPTION_AUTOIMP (OPTION_IGNORE + 1)
127 #define OPTION_ERNOTOK (OPTION_AUTOIMP + 1)
128 #define OPTION_EROK (OPTION_ERNOTOK + 1)
129 #define OPTION_EXPORT (OPTION_EROK + 1)
130 #define OPTION_IMPORT (OPTION_EXPORT + 1)
131 #define OPTION_LOADMAP (OPTION_IMPORT + 1)
132 #define OPTION_MAXDATA (OPTION_LOADMAP + 1)
133 #define OPTION_MAXSTACK (OPTION_MAXDATA + 1)
134 #define OPTION_MODTYPE (OPTION_MAXSTACK + 1)
135 #define OPTION_NOAUTOIMP (OPTION_MODTYPE + 1)
136 #define OPTION_NOSTRCMPCT (OPTION_NOAUTOIMP + 1)
137 #define OPTION_PD (OPTION_NOSTRCMPCT + 1)
138 #define OPTION_PT (OPTION_PD + 1)
139 #define OPTION_STRCMPCT (OPTION_PT + 1)
140 #define OPTION_UNIX (OPTION_STRCMPCT + 1)
142 static struct option longopts
[] = {
143 {"basis", no_argument
, NULL
, OPTION_IGNORE
},
144 {"bautoimp", no_argument
, NULL
, OPTION_AUTOIMP
},
145 {"bcomprld", no_argument
, NULL
, OPTION_IGNORE
},
146 {"bcrld", no_argument
, NULL
, OPTION_IGNORE
},
147 {"bcror31", no_argument
, NULL
, OPTION_IGNORE
},
148 {"bD", required_argument
, NULL
, OPTION_MAXDATA
},
149 {"bE", required_argument
, NULL
, OPTION_EXPORT
},
150 {"bernotok", no_argument
, NULL
, OPTION_ERNOTOK
},
151 {"berok", no_argument
, NULL
, OPTION_EROK
},
152 {"berrmsg", no_argument
, NULL
, OPTION_IGNORE
},
153 {"bexport", required_argument
, NULL
, OPTION_EXPORT
},
154 {"bf", no_argument
, NULL
, OPTION_ERNOTOK
},
155 {"bgc", no_argument
, &gc
, 1},
156 {"bh", required_argument
, NULL
, OPTION_IGNORE
},
157 {"bhalt", required_argument
, NULL
, OPTION_IGNORE
},
158 {"bI", required_argument
, NULL
, OPTION_IMPORT
},
159 {"bimport", required_argument
, NULL
, OPTION_IMPORT
},
160 {"bl", required_argument
, NULL
, OPTION_LOADMAP
},
161 {"bloadmap", required_argument
, NULL
, OPTION_LOADMAP
},
162 {"bmaxdata", required_argument
, NULL
, OPTION_MAXDATA
},
163 {"bmaxstack", required_argument
, NULL
, OPTION_MAXSTACK
},
164 {"bM", required_argument
, NULL
, OPTION_MODTYPE
},
165 {"bmodtype", required_argument
, NULL
, OPTION_MODTYPE
},
166 {"bnoautoimp", no_argument
, NULL
, OPTION_NOAUTOIMP
},
167 {"bnodelcsect", no_argument
, NULL
, OPTION_IGNORE
},
168 {"bnoentry", no_argument
, NULL
, OPTION_IGNORE
},
169 {"bnogc", no_argument
, &gc
, 0},
170 {"bnso", no_argument
, NULL
, OPTION_NOAUTOIMP
},
171 {"bnostrcmpct", no_argument
, NULL
, OPTION_NOSTRCMPCT
},
172 {"bnotextro", no_argument
, &textro
, 0},
173 {"bnro", no_argument
, &textro
, 0},
174 {"bpD", required_argument
, NULL
, OPTION_PD
},
175 {"bpT", required_argument
, NULL
, OPTION_PT
},
176 {"bro", no_argument
, &textro
, 1},
177 {"bS", required_argument
, NULL
, OPTION_MAXSTACK
},
178 {"bso", no_argument
, NULL
, OPTION_AUTOIMP
},
179 {"bstrcmpct", no_argument
, NULL
, OPTION_STRCMPCT
},
180 {"btextro", no_argument
, &textro
, 1},
181 {"static", no_argument
, NULL
, OPTION_NOAUTOIMP
},
182 {"unix", no_argument
, NULL
, OPTION_UNIX
},
183 {NULL
, no_argument
, NULL
, 0}
186 /* Options supported by the AIX linker which we do not support: -f,
187 -S, -v, -Z, -bbindcmds, -bbinder, -bbindopts, -bcalls, -bcaps,
188 -bcror15, -bdebugopt, -bdbg, -bdelcsect, -bex?, -bfilelist, -bfl,
189 -bgcbypass, -bglink, -binsert, -bi, -bloadmap, -bl, -bmap, -bnl,
190 -bnobind, -bnocomprld, -bnocrld, -bnoerrmsg, -bnoglink,
191 -bnoloadmap, -bnl, -bnoobjreorder, -bnoquiet, -bnoreorder,
192 -bnotypchk, -bnox, -bquiet, -bR, -brename, -breorder, -btypchk,
195 /* If the current option starts with -b, change the first : to an =.
196 The AIX linker uses : to separate the option from the argument;
197 changing it to = lets us treat it as a getopt option. */
201 if (indx
< argc
&& strncmp (argv
[indx
], "-b", 2) == 0)
205 for (s
= argv
[indx
]; *s
!= '\0'; s
++)
216 optc
= getopt_long_only (argc
, argv
, "-D:H:KT:z", longopts
, &longind
);
226 /* Long option which just sets a flag. */
230 val
= strtol (optarg
, &end
, 0);
232 einfo (_("%P: warning: ignoring invalid -D number %s\n"), optarg
);
234 lang_section_start (".data", exp_intop (val
));
238 val
= strtoul (optarg
, &end
, 0);
240 || (val
& (val
- 1)) != 0)
241 einfo (_("%P: warning: ignoring invalid -H number %s\n"), optarg
);
248 /* FIXME: This should use the page size for the target system. */
253 /* On AIX this is the same as GNU ld -Ttext. When we see -T
254 number, we assume the AIX option is intended. Otherwise, we
255 assume the usual GNU ld -T option is intended. We can't just
256 ignore the AIX option, because gcc passes it to the linker. */
257 val
= strtoul (optarg
, &end
, 0);
263 lang_section_start (".text", exp_intop (val
));
270 link_info
.static_link
= false;
274 force_make_executable
= false;
278 force_make_executable
= true;
282 gldppcmacos_read_file (optarg
, false);
288 struct filelist
**flpp
;
290 n
= (struct filelist
*) xmalloc (sizeof (struct filelist
));
293 flpp
= &import_files
;
294 while (*flpp
!= NULL
)
295 flpp
= &(*flpp
)->next
;
301 config
.map_filename
= optarg
;
305 val
= strtoul (optarg
, &end
, 0);
307 einfo (_("%P: warning: ignoring invalid -bmaxdata number %s\n"),
313 case OPTION_MAXSTACK
:
314 val
= strtoul (optarg
, &end
, 0);
316 einfo (_("%P: warning: ignoring invalid -bmaxstack number %s\n"),
325 link_info
.shared
= true;
328 if (*optarg
== '\0' || optarg
[1] == '\0')
329 einfo (_("%P: warning: ignoring invalid module type %s\n"), optarg
);
331 modtype
= (*optarg
<< 8) | optarg
[1];
334 case OPTION_NOAUTOIMP
:
335 link_info
.static_link
= true;
338 case OPTION_NOSTRCMPCT
:
339 link_info
.traditional_format
= true;
343 /* This sets the page that the .data section is supposed to
344 start on. The offset within the page should still be the
345 offset within the file, so we need to build an appropriate
347 val
= strtoul (optarg
, &end
, 0);
349 einfo (_("%P: warning: ignoring invalid -pD number %s\n"), optarg
);
357 exp_nameop (NAME
, "."),
360 exp_binop ('+', t
, exp_intop (7)),
361 exp_intop (~ (bfd_vma
) 7));
362 lang_section_start (".data", t
);
367 /* This set the page that the .text section is supposed to start
368 on. The offset within the page should still be the offset
370 val
= strtoul (optarg
, &end
, 0);
372 einfo (_("%P: warning: ignoring invalid -pT number %s\n"), optarg
);
379 exp_nameop (SIZEOF_HEADERS
, NULL
));
381 exp_binop ('+', t
, exp_intop (7)),
382 exp_intop (~ (bfd_vma
) 7));
383 lang_section_start (".text", t
);
387 case OPTION_STRCMPCT
:
388 link_info
.traditional_format
= false;
399 /* This is called when an input file can not be recognized as a BFD
400 object or an archive. If the file starts with #!, we must treat it
401 as an import file. This is for AIX compatibility. */
404 gldppcmacos_unrecognized_file (entry
)
405 lang_input_statement_type
*entry
;
410 e
= fopen (entry
->filename
, FOPEN_RT
);
416 if (getc (e
) == '#' && getc (e
) == '!')
419 struct filelist
**flpp
;
421 n
= (struct filelist
*) xmalloc (sizeof (struct filelist
));
423 n
->name
= entry
->filename
;
424 flpp
= &import_files
;
425 while (*flpp
!= NULL
)
426 flpp
= &(*flpp
)->next
;
430 entry
->loaded
= true;
438 /* This is called after the input files have been opened. */
441 gldppcmacos_after_open ()
446 /* Call ldctor_build_sets, after pretending that this is a
447 relocateable link. We do this because AIX requires relocation
448 entries for all references to symbols, even in a final
449 executable. Of course, we only want to do this if we are
450 producing an XCOFF output file. */
451 r
= link_info
.relocateable
;
452 if (strstr (bfd_get_target (output_bfd
), "xcoff") != NULL
)
453 link_info
.relocateable
= true;
454 ldctor_build_sets ();
455 link_info
.relocateable
= r
;
457 /* For each set, record the size, so that the XCOFF backend can
458 output the correct csect length. */
459 for (p
= sets
; p
!= (struct set_info
*) NULL
; p
= p
->next
)
463 /* If the symbol is defined, we may have been invoked from
464 collect, and the sets may already have been built, so we do
466 if (p
->h
->type
== bfd_link_hash_defined
467 || p
->h
->type
== bfd_link_hash_defweak
)
470 if (p
->reloc
!= BFD_RELOC_CTOR
)
472 /* Handle this if we need to. */
476 size
= (p
->count
+ 2) * 4;
477 if (! bfd_xcoff_link_record_set (output_bfd
, &link_info
, p
->h
, size
))
478 einfo (_("%F%P: bfd_xcoff_link_record_set failed: %E\n"));
482 /* This is called after the sections have been attached to output
483 sections, but before any sizes or addresses have been set. */
486 gldppcmacos_before_allocation ()
489 struct export_symbol_list
*el
;
491 asection
*special_sections
[6];
494 /* Handle the import and export files, if any. */
495 for (fl
= import_files
; fl
!= NULL
; fl
= fl
->next
)
496 gldppcmacos_read_file (fl
->name
, true);
497 for (el
= export_symbols
; el
!= NULL
; el
= el
->next
)
499 struct bfd_link_hash_entry
*h
;
501 h
= bfd_link_hash_lookup (link_info
.hash
, el
->name
, false, false, false);
503 einfo (_("%P%F: bfd_link_hash_lookup of export symbol failed: %E\n"));
504 if (! bfd_xcoff_export_symbol (output_bfd
, &link_info
, h
, el
->syscall
))
505 einfo (_("%P%F: bfd_xcoff_export_symbol failed: %E\n"));
508 /* Track down all relocations called for by the linker script (these
509 are typically constructor/destructor entries created by
510 CONSTRUCTORS) and let the backend know it will need to create
511 .loader relocs for them. */
512 lang_for_each_statement (gldppcmacos_find_relocs
);
514 /* We need to build LIBPATH from the -L arguments. If any -rpath
515 arguments were used, though, we use -rpath instead, as a GNU
517 if (command_line
.rpath
!= NULL
)
518 libpath
= command_line
.rpath
;
519 else if (search_head
== NULL
)
520 libpath
= (char *) "";
524 search_dirs_type
*search
;
526 len
= strlen (search_head
->name
);
527 libpath
= xmalloc (len
+ 1);
528 strcpy (libpath
, search_head
->name
);
529 for (search
= search_head
->next
; search
!= NULL
; search
= search
->next
)
533 nlen
= strlen (search
->name
);
534 libpath
= xrealloc (libpath
, len
+ nlen
+ 2);
536 strcpy (libpath
+ len
+ 1, search
->name
);
541 /* Let the XCOFF backend set up the .loader section. */
542 if (! bfd_xcoff_size_dynamic_sections (output_bfd
, &link_info
, libpath
,
543 entry_symbol
, file_align
,
545 gc
&& ! unix_ld
? true : false,
547 textro
? true : false,
550 einfo (_("%P%F: failed to set dynamic section sizes: %E\n"));
552 /* Look through the special sections, and put them in the right
553 place in the link ordering. This is especially magic. */
554 for (i
= 0; i
< 6; i
++)
557 lang_output_section_statement_type
*os
;
558 lang_statement_union_type
**pls
;
559 lang_input_section_type
*is
;
563 sec
= special_sections
[i
];
567 /* Remove this section from the list of the output section.
568 This assumes we know what the script looks like. */
570 os
= lang_output_section_find (sec
->output_section
->name
);
572 einfo (_("%P%F: can't find output section %s\n"),
573 sec
->output_section
->name
);
574 for (pls
= &os
->children
.head
; *pls
!= NULL
; pls
= &(*pls
)->next
)
576 if ((*pls
)->header
.type
== lang_input_section_enum
577 && (*pls
)->input_section
.section
== sec
)
579 is
= (lang_input_section_type
*) *pls
;
583 if ((*pls
)->header
.type
== lang_wild_statement_enum
)
585 lang_statement_union_type
**pwls
;
587 for (pwls
= &(*pls
)->wild_statement
.children
.head
;
589 pwls
= &(*pwls
)->next
)
591 if ((*pwls
)->header
.type
== lang_input_section_enum
592 && (*pwls
)->input_section
.section
== sec
)
594 is
= (lang_input_section_type
*) *pwls
;
595 *pwls
= (*pwls
)->next
;
605 einfo (_("%P%F: can't find %s in output section\n"),
606 bfd_get_section_name (sec
->owner
, sec
));
608 /* Now figure out where the section should go. */
611 default: /* to avoid warnings */
640 os
= lang_output_section_find (oname
);
644 is
->header
.next
= os
->children
.head
;
645 os
->children
.head
= (lang_statement_union_type
*) is
;
649 is
->header
.next
= NULL
;
650 lang_statement_append (&os
->children
,
651 (lang_statement_union_type
*) is
,
657 /* Read an import or export file. For an import file, this is called
658 by the before_allocation emulation routine. For an export file,
659 this is called by the parse_args emulation routine. */
662 gldppcmacos_read_file (filename
, import
)
663 const char *filename
;
673 const char *impmember
;
675 o
= (struct obstack
*) xmalloc (sizeof (struct obstack
));
676 obstack_specify_allocation (o
, 0, 0, xmalloc
, gldppcmacos_free
);
678 f
= fopen (filename
, FOPEN_RT
);
681 bfd_set_error (bfd_error_system_call
);
682 einfo ("%F%s: %E\n", filename
);
692 while ((c
= getc (f
)) != EOF
)
698 struct bfd_link_hash_entry
*h
;
702 obstack_1grow (o
, c
);
706 obstack_1grow (o
, '\0');
709 s
= (char *) obstack_base (o
);
710 while (isspace ((unsigned char) *s
))
714 || (*s
== '#' && s
[1] == ' ')
715 || (! import
&& *s
== '#' && s
[1] == '!'))
717 obstack_free (o
, obstack_base (o
));
721 if (*s
== '#' && s
[1] == '!')
724 while (isspace ((unsigned char) *s
))
731 obstack_free (o
, obstack_base (o
));
734 einfo (_("%F%s%d: #! ([member]) is not supported in import files\n"),
741 (void) obstack_finish (o
);
745 while (! isspace ((unsigned char) *s
) && *s
!= '(' && *s
!= '\0')
755 if (imppath
== file
- 1)
765 while (isspace ((unsigned char) cs
))
774 einfo (_("%s:%d: warning: syntax error in import file\n"),
781 while (*s
!= ')' && *s
!= '\0')
786 einfo (_("%s:%d: warning: syntax error in import file\n"),
794 /* This is a symbol to be imported or exported. */
797 address
= (bfd_vma
) -1;
799 while (! isspace ((unsigned char) *s
) && *s
!= '\0')
807 while (isspace ((unsigned char) *s
))
811 while (! isspace ((unsigned char) *se
) && *se
!= '\0')
816 while (isspace ((unsigned char) *se
))
819 einfo (_("%s%d: warning: syntax error in import/export file\n"),
823 if (strcasecmp (s
, "svc") == 0
824 || strcasecmp (s
, "syscall") == 0)
830 address
= strtoul (s
, &end
, 0);
832 einfo (_("%s:%d: warning: syntax error in import/export file\n"),
839 struct export_symbol_list
*n
;
841 ldlang_add_undef (symname
);
842 n
= ((struct export_symbol_list
*)
843 xmalloc (sizeof (struct export_symbol_list
)));
844 n
->next
= export_symbols
;
845 n
->name
= buystring (symname
);
846 n
->syscall
= syscall
;
851 h
= bfd_link_hash_lookup (link_info
.hash
, symname
, false, false,
853 if (h
== NULL
|| h
->type
== bfd_link_hash_new
)
855 /* We can just ignore attempts to import an unreferenced
860 if (! bfd_xcoff_import_symbol (output_bfd
, &link_info
, h
,
861 address
, imppath
, impfile
,
863 einfo (_("%X%s:%d: failed to import symbol %s: %E\n"),
864 filename
, lineno
, symname
);
868 obstack_free (o
, obstack_base (o
));
871 if (obstack_object_size (o
) > 0)
873 einfo (_("%s:%d: warning: ignoring unterminated last line\n"),
875 obstack_free (o
, obstack_base (o
));
880 obstack_free (o
, NULL
);
885 /* This routine saves us from worrying about declaring free. */
894 /* This is called by the before_allocation routine via
895 lang_for_each_statement. It looks for relocations and assignments
899 gldppcmacos_find_relocs (s
)
900 lang_statement_union_type
*s
;
902 if (s
->header
.type
== lang_reloc_statement_enum
)
904 lang_reloc_statement_type
*rs
;
906 rs
= &s
->reloc_statement
;
907 if (rs
->name
== NULL
)
908 einfo (_("%F%P: only relocations against symbols are permitted\n"));
909 if (! bfd_xcoff_link_count_reloc (output_bfd
, &link_info
, rs
->name
))
910 einfo (_("%F%P: bfd_xcoff_link_count_reloc failed: %E\n"));
913 if (s
->header
.type
== lang_assignment_statement_enum
)
914 gldppcmacos_find_exp_assignment (s
->assignment_statement
.exp
);
917 /* Look through an expression for an assignment statement. */
920 gldppcmacos_find_exp_assignment (exp
)
923 struct bfd_link_hash_entry
*h
;
925 switch (exp
->type
.node_class
)
928 h
= bfd_link_hash_lookup (link_info
.hash
, exp
->assign
.dst
,
929 false, false, false);
934 if (strcmp (exp
->assign
.dst
, ".") != 0)
936 if (! bfd_xcoff_record_link_assignment (output_bfd
, &link_info
,
938 einfo (_("%P%F: failed to record assignment to %s: %E\n"),
941 gldppcmacos_find_exp_assignment (exp
->assign
.src
);
945 gldppcmacos_find_exp_assignment (exp
->binary
.lhs
);
946 gldppcmacos_find_exp_assignment (exp
->binary
.rhs
);
950 gldppcmacos_find_exp_assignment (exp
->trinary
.cond
);
951 gldppcmacos_find_exp_assignment (exp
->trinary
.lhs
);
952 gldppcmacos_find_exp_assignment (exp
->trinary
.rhs
);
956 gldppcmacos_find_exp_assignment (exp
->unary
.child
);
965 gldppcmacos_get_script(isfile
)
970 if (link_info
.relocateable
== true && config
.build_constructors
== true)
972 "OUTPUT_FORMAT(\"xcoff-powermac\")\n\
973 OUTPUT_ARCH(powerpc)\n\
977 .pad 0 : { *(.pad) }\n\
1013 ; else if (link_info
.relocateable
== true) return
1014 "OUTPUT_FORMAT(\"xcoff-powermac\")\n\
1015 OUTPUT_ARCH(powerpc)\n\
1019 .pad 0 : { *(.pad) }\n\
1054 ; else if (!config
.text_read_only
) return
1055 "OUTPUT_FORMAT(\"xcoff-powermac\")\n\
1056 OUTPUT_ARCH(powerpc)\n\
1057 SEARCH_DIR(/usr/local/powerpc-apple-macos/lib);\n\
1061 .pad 0 : { *(.pad) }\n\
1063 PROVIDE (_text = .);\n\
1072 PROVIDE (_etext = .);\n\
1075 PROVIDE (_data = .);\n\
1086 PROVIDE (_edata = .);\n\
1093 PROVIDE (_end = .);\n\
1094 PROVIDE (end = .);\n\
1103 ; else if (!config
.magic_demand_paged
) return
1104 "OUTPUT_FORMAT(\"xcoff-powermac\")\n\
1105 OUTPUT_ARCH(powerpc)\n\
1106 SEARCH_DIR(/usr/local/powerpc-apple-macos/lib);\n\
1110 .pad 0 : { *(.pad) }\n\
1112 PROVIDE (_text = .);\n\
1121 PROVIDE (_etext = .);\n\
1124 PROVIDE (_data = .);\n\
1135 PROVIDE (_edata = .);\n\
1142 PROVIDE (_end = .);\n\
1143 PROVIDE (end = .);\n\
1153 "OUTPUT_FORMAT(\"xcoff-powermac\")\n\
1154 OUTPUT_ARCH(powerpc)\n\
1155 SEARCH_DIR(/usr/local/powerpc-apple-macos/lib);\n\
1159 .pad 0 : { *(.pad) }\n\
1161 PROVIDE (_text = .);\n\
1170 PROVIDE (_etext = .);\n\
1173 PROVIDE (_data = .);\n\
1184 PROVIDE (_edata = .);\n\
1191 PROVIDE (_end = .);\n\
1192 PROVIDE (end = .);\n\
1203 struct ld_emulation_xfer_struct ld_ppcmacos_emulation
=
1205 gldppcmacos_before_parse
,
1208 after_parse_default
,
1209 gldppcmacos_after_open
,
1210 after_allocation_default
,
1211 set_output_arch_default
,
1212 ldemul_default_target
,
1213 gldppcmacos_before_allocation
,
1214 gldppcmacos_get_script
,
1218 0, /* create_output_section_statements */
1219 0, /* open_dynamic_archive */
1220 0, /* place_orphan */
1221 0, /* set_symbols */
1222 gldppcmacos_parse_args
,
1223 gldppcmacos_unrecognized_file