1 /* This file is is generated by a shell script. DO NOT EDIT! */
3 /* AIX emulation code for ppcmacos
4 Copyright 1991, 1993, 1995, 1996, 1997, 2000
5 Free Software Foundation, Inc.
6 Written by Steve Chamberlain <sac@cygnus.com>
7 AIX support by Ian Lance Taylor <ian@cygnus.com>
9 This file is part of GLD, the Gnu Linker.
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
25 #define TARGET_IS_ppcmacos
29 #include "libiberty.h"
45 static void gldppcmacos_before_parse
PARAMS ((void));
46 static int gldppcmacos_parse_args
PARAMS ((int, char **));
47 static void gldppcmacos_after_open
PARAMS ((void));
48 static void gldppcmacos_before_allocation
PARAMS ((void));
49 static void gldppcmacos_read_file
PARAMS ((const char *, boolean
));
50 static void gldppcmacos_free
PARAMS ((PTR
));
51 static void gldppcmacos_find_relocs
52 PARAMS ((lang_statement_union_type
*));
53 static void gldppcmacos_find_exp_assignment
PARAMS ((etree_type
*));
54 static char *gldppcmacos_get_script
PARAMS ((int *isfile
));
56 /* The file alignment required for each section. */
57 static unsigned long file_align
;
59 /* The maximum size the stack is permitted to grow. This is stored in
61 static unsigned long maxstack
;
63 /* The maximum data size. This is stored in the a.out header. */
64 static unsigned long maxdata
;
66 /* Whether to perform garbage collection. */
69 /* The module type to use. */
70 static unsigned short modtype
= ('1' << 8) | 'L';
72 /* Whether the .text section must be read-only (i.e., no relocs
76 /* Whether to implement Unix like linker semantics. */
79 /* Structure used to hold import file list. */
83 struct filelist
*next
;
87 /* List of import files. */
88 static struct filelist
*import_files
;
90 /* List of export symbols read from the export files. */
92 struct export_symbol_list
94 struct export_symbol_list
*next
;
99 static struct export_symbol_list
*export_symbols
;
101 /* This routine is called before anything else is done. */
104 gldppcmacos_before_parse()
106 #ifndef TARGET_ /* I.e., if not generic. */
107 ldfile_output_architecture
= bfd_arch_powerpc
;
108 #endif /* not TARGET_ */
111 /* Handle AIX specific options. */
114 gldppcmacos_parse_args (argc
, argv
)
118 int prevoptind
= optind
;
119 int prevopterr
= opterr
;
126 #define OPTION_IGNORE (300)
127 #define OPTION_AUTOIMP (OPTION_IGNORE + 1)
128 #define OPTION_ERNOTOK (OPTION_AUTOIMP + 1)
129 #define OPTION_EROK (OPTION_ERNOTOK + 1)
130 #define OPTION_EXPORT (OPTION_EROK + 1)
131 #define OPTION_IMPORT (OPTION_EXPORT + 1)
132 #define OPTION_LOADMAP (OPTION_IMPORT + 1)
133 #define OPTION_MAXDATA (OPTION_LOADMAP + 1)
134 #define OPTION_MAXSTACK (OPTION_MAXDATA + 1)
135 #define OPTION_MODTYPE (OPTION_MAXSTACK + 1)
136 #define OPTION_NOAUTOIMP (OPTION_MODTYPE + 1)
137 #define OPTION_NOSTRCMPCT (OPTION_NOAUTOIMP + 1)
138 #define OPTION_PD (OPTION_NOSTRCMPCT + 1)
139 #define OPTION_PT (OPTION_PD + 1)
140 #define OPTION_STRCMPCT (OPTION_PT + 1)
141 #define OPTION_UNIX (OPTION_STRCMPCT + 1)
143 static struct option longopts
[] = {
144 {"basis", no_argument
, NULL
, OPTION_IGNORE
},
145 {"bautoimp", no_argument
, NULL
, OPTION_AUTOIMP
},
146 {"bcomprld", no_argument
, NULL
, OPTION_IGNORE
},
147 {"bcrld", no_argument
, NULL
, OPTION_IGNORE
},
148 {"bcror31", no_argument
, NULL
, OPTION_IGNORE
},
149 {"bD", required_argument
, NULL
, OPTION_MAXDATA
},
150 {"bE", required_argument
, NULL
, OPTION_EXPORT
},
151 {"bernotok", no_argument
, NULL
, OPTION_ERNOTOK
},
152 {"berok", no_argument
, NULL
, OPTION_EROK
},
153 {"berrmsg", no_argument
, NULL
, OPTION_IGNORE
},
154 {"bexport", required_argument
, NULL
, OPTION_EXPORT
},
155 {"bf", no_argument
, NULL
, OPTION_ERNOTOK
},
156 {"bgc", no_argument
, &gc
, 1},
157 {"bh", required_argument
, NULL
, OPTION_IGNORE
},
158 {"bhalt", required_argument
, NULL
, OPTION_IGNORE
},
159 {"bI", required_argument
, NULL
, OPTION_IMPORT
},
160 {"bimport", required_argument
, NULL
, OPTION_IMPORT
},
161 {"bl", required_argument
, NULL
, OPTION_LOADMAP
},
162 {"bloadmap", required_argument
, NULL
, OPTION_LOADMAP
},
163 {"bmaxdata", required_argument
, NULL
, OPTION_MAXDATA
},
164 {"bmaxstack", required_argument
, NULL
, OPTION_MAXSTACK
},
165 {"bM", required_argument
, NULL
, OPTION_MODTYPE
},
166 {"bmodtype", required_argument
, NULL
, OPTION_MODTYPE
},
167 {"bnoautoimp", no_argument
, NULL
, OPTION_NOAUTOIMP
},
168 {"bnodelcsect", no_argument
, NULL
, OPTION_IGNORE
},
169 {"bnoentry", no_argument
, NULL
, OPTION_IGNORE
},
170 {"bnogc", no_argument
, &gc
, 0},
171 {"bnso", no_argument
, NULL
, OPTION_NOAUTOIMP
},
172 {"bnostrcmpct", no_argument
, NULL
, OPTION_NOSTRCMPCT
},
173 {"bnotextro", no_argument
, &textro
, 0},
174 {"bnro", no_argument
, &textro
, 0},
175 {"bpD", required_argument
, NULL
, OPTION_PD
},
176 {"bpT", required_argument
, NULL
, OPTION_PT
},
177 {"bro", no_argument
, &textro
, 1},
178 {"bS", required_argument
, NULL
, OPTION_MAXSTACK
},
179 {"bso", no_argument
, NULL
, OPTION_AUTOIMP
},
180 {"bstrcmpct", no_argument
, NULL
, OPTION_STRCMPCT
},
181 {"btextro", no_argument
, &textro
, 1},
182 {"static", no_argument
, NULL
, OPTION_NOAUTOIMP
},
183 {"unix", no_argument
, NULL
, OPTION_UNIX
},
184 {NULL
, no_argument
, NULL
, 0}
187 /* Options supported by the AIX linker which we do not support: -f,
188 -S, -v, -Z, -bbindcmds, -bbinder, -bbindopts, -bcalls, -bcaps,
189 -bcror15, -bdebugopt, -bdbg, -bdelcsect, -bex?, -bfilelist, -bfl,
190 -bgcbypass, -bglink, -binsert, -bi, -bloadmap, -bl, -bmap, -bnl,
191 -bnobind, -bnocomprld, -bnocrld, -bnoerrmsg, -bnoglink,
192 -bnoloadmap, -bnl, -bnoobjreorder, -bnoquiet, -bnoreorder,
193 -bnotypchk, -bnox, -bquiet, -bR, -brename, -breorder, -btypchk,
196 /* If the current option starts with -b, change the first : to an =.
197 The AIX linker uses : to separate the option from the argument;
198 changing it to = lets us treat it as a getopt option. */
202 if (indx
< argc
&& strncmp (argv
[indx
], "-b", 2) == 0)
206 for (s
= argv
[indx
]; *s
!= '\0'; s
++)
217 optc
= getopt_long_only (argc
, argv
, "-D:H:KT:z", longopts
, &longind
);
227 /* Long option which just sets a flag. */
231 val
= strtol (optarg
, &end
, 0);
233 einfo (_("%P: warning: ignoring invalid -D number %s\n"), optarg
);
235 lang_section_start (".data", exp_intop (val
));
239 val
= strtoul (optarg
, &end
, 0);
241 || (val
& (val
- 1)) != 0)
242 einfo (_("%P: warning: ignoring invalid -H number %s\n"), optarg
);
249 /* FIXME: This should use the page size for the target system. */
254 /* On AIX this is the same as GNU ld -Ttext. When we see -T
255 number, we assume the AIX option is intended. Otherwise, we
256 assume the usual GNU ld -T option is intended. We can't just
257 ignore the AIX option, because gcc passes it to the linker. */
258 val
= strtoul (optarg
, &end
, 0);
264 lang_section_start (".text", exp_intop (val
));
271 link_info
.static_link
= false;
275 force_make_executable
= false;
279 force_make_executable
= true;
283 gldppcmacos_read_file (optarg
, false);
289 struct filelist
**flpp
;
291 n
= (struct filelist
*) xmalloc (sizeof (struct filelist
));
294 flpp
= &import_files
;
295 while (*flpp
!= NULL
)
296 flpp
= &(*flpp
)->next
;
302 config
.map_filename
= optarg
;
306 val
= strtoul (optarg
, &end
, 0);
308 einfo (_("%P: warning: ignoring invalid -bmaxdata number %s\n"),
314 case OPTION_MAXSTACK
:
315 val
= strtoul (optarg
, &end
, 0);
317 einfo (_("%P: warning: ignoring invalid -bmaxstack number %s\n"),
326 link_info
.shared
= true;
329 if (*optarg
== '\0' || optarg
[1] == '\0')
330 einfo (_("%P: warning: ignoring invalid module type %s\n"), optarg
);
332 modtype
= (*optarg
<< 8) | optarg
[1];
335 case OPTION_NOAUTOIMP
:
336 link_info
.static_link
= true;
339 case OPTION_NOSTRCMPCT
:
340 link_info
.traditional_format
= true;
344 /* This sets the page that the .data section is supposed to
345 start on. The offset within the page should still be the
346 offset within the file, so we need to build an appropriate
348 val
= strtoul (optarg
, &end
, 0);
350 einfo (_("%P: warning: ignoring invalid -pD number %s\n"), optarg
);
358 exp_nameop (NAME
, "."),
361 exp_binop ('+', t
, exp_intop (7)),
362 exp_intop (~ (bfd_vma
) 7));
363 lang_section_start (".data", t
);
368 /* This set the page that the .text section is supposed to start
369 on. The offset within the page should still be the offset
371 val
= strtoul (optarg
, &end
, 0);
373 einfo (_("%P: warning: ignoring invalid -pT number %s\n"), optarg
);
380 exp_nameop (SIZEOF_HEADERS
, NULL
));
382 exp_binop ('+', t
, exp_intop (7)),
383 exp_intop (~ (bfd_vma
) 7));
384 lang_section_start (".text", t
);
388 case OPTION_STRCMPCT
:
389 link_info
.traditional_format
= false;
400 /* This is called when an input file can not be recognized as a BFD
401 object or an archive. If the file starts with #!, we must treat it
402 as an import file. This is for AIX compatibility. */
405 gldppcmacos_unrecognized_file (entry
)
406 lang_input_statement_type
*entry
;
411 e
= fopen (entry
->filename
, FOPEN_RT
);
417 if (getc (e
) == '#' && getc (e
) == '!')
420 struct filelist
**flpp
;
422 n
= (struct filelist
*) xmalloc (sizeof (struct filelist
));
424 n
->name
= entry
->filename
;
425 flpp
= &import_files
;
426 while (*flpp
!= NULL
)
427 flpp
= &(*flpp
)->next
;
431 entry
->loaded
= true;
439 /* This is called after the input files have been opened. */
442 gldppcmacos_after_open ()
447 /* Call ldctor_build_sets, after pretending that this is a
448 relocateable link. We do this because AIX requires relocation
449 entries for all references to symbols, even in a final
450 executable. Of course, we only want to do this if we are
451 producing an XCOFF output file. */
452 r
= link_info
.relocateable
;
453 if (strstr (bfd_get_target (output_bfd
), "xcoff") != NULL
)
454 link_info
.relocateable
= true;
455 ldctor_build_sets ();
456 link_info
.relocateable
= r
;
458 /* For each set, record the size, so that the XCOFF backend can
459 output the correct csect length. */
460 for (p
= sets
; p
!= (struct set_info
*) NULL
; p
= p
->next
)
464 /* If the symbol is defined, we may have been invoked from
465 collect, and the sets may already have been built, so we do
467 if (p
->h
->type
== bfd_link_hash_defined
468 || p
->h
->type
== bfd_link_hash_defweak
)
471 if (p
->reloc
!= BFD_RELOC_CTOR
)
473 /* Handle this if we need to. */
477 size
= (p
->count
+ 2) * 4;
478 if (! bfd_xcoff_link_record_set (output_bfd
, &link_info
, p
->h
, size
))
479 einfo (_("%F%P: bfd_xcoff_link_record_set failed: %E\n"));
483 /* This is called after the sections have been attached to output
484 sections, but before any sizes or addresses have been set. */
487 gldppcmacos_before_allocation ()
490 struct export_symbol_list
*el
;
492 asection
*special_sections
[6];
495 /* Handle the import and export files, if any. */
496 for (fl
= import_files
; fl
!= NULL
; fl
= fl
->next
)
497 gldppcmacos_read_file (fl
->name
, true);
498 for (el
= export_symbols
; el
!= NULL
; el
= el
->next
)
500 struct bfd_link_hash_entry
*h
;
502 h
= bfd_link_hash_lookup (link_info
.hash
, el
->name
, false, false, false);
504 einfo (_("%P%F: bfd_link_hash_lookup of export symbol failed: %E\n"));
505 if (! bfd_xcoff_export_symbol (output_bfd
, &link_info
, h
, el
->syscall
))
506 einfo (_("%P%F: bfd_xcoff_export_symbol failed: %E\n"));
509 /* Track down all relocations called for by the linker script (these
510 are typically constructor/destructor entries created by
511 CONSTRUCTORS) and let the backend know it will need to create
512 .loader relocs for them. */
513 lang_for_each_statement (gldppcmacos_find_relocs
);
515 /* We need to build LIBPATH from the -L arguments. If any -rpath
516 arguments were used, though, we use -rpath instead, as a GNU
518 if (command_line
.rpath
!= NULL
)
519 libpath
= command_line
.rpath
;
520 else if (search_head
== NULL
)
521 libpath
= (char *) "";
525 search_dirs_type
*search
;
527 len
= strlen (search_head
->name
);
528 libpath
= xmalloc (len
+ 1);
529 strcpy (libpath
, search_head
->name
);
530 for (search
= search_head
->next
; search
!= NULL
; search
= search
->next
)
534 nlen
= strlen (search
->name
);
535 libpath
= xrealloc (libpath
, len
+ nlen
+ 2);
537 strcpy (libpath
+ len
+ 1, search
->name
);
542 /* Let the XCOFF backend set up the .loader section. */
543 if (! bfd_xcoff_size_dynamic_sections (output_bfd
, &link_info
, libpath
,
544 entry_symbol
, file_align
,
546 gc
&& ! unix_ld
? true : false,
548 textro
? true : false,
551 einfo (_("%P%F: failed to set dynamic section sizes: %E\n"));
553 /* Look through the special sections, and put them in the right
554 place in the link ordering. This is especially magic. */
555 for (i
= 0; i
< 6; i
++)
558 lang_output_section_statement_type
*os
;
559 lang_statement_union_type
**pls
;
560 lang_input_section_type
*is
;
564 sec
= special_sections
[i
];
568 /* Remove this section from the list of the output section.
569 This assumes we know what the script looks like. */
571 os
= lang_output_section_find (sec
->output_section
->name
);
573 einfo (_("%P%F: can't find output section %s\n"),
574 sec
->output_section
->name
);
575 for (pls
= &os
->children
.head
; *pls
!= NULL
; pls
= &(*pls
)->header
.next
)
577 if ((*pls
)->header
.type
== lang_input_section_enum
578 && (*pls
)->input_section
.section
== sec
)
580 is
= (lang_input_section_type
*) *pls
;
581 *pls
= (*pls
)->header
.next
;
584 if ((*pls
)->header
.type
== lang_wild_statement_enum
)
586 lang_statement_union_type
**pwls
;
588 for (pwls
= &(*pls
)->wild_statement
.children
.head
;
590 pwls
= &(*pwls
)->header
.next
)
592 if ((*pwls
)->header
.type
== lang_input_section_enum
593 && (*pwls
)->input_section
.section
== sec
)
595 is
= (lang_input_section_type
*) *pwls
;
596 *pwls
= (*pwls
)->header
.next
;
606 einfo (_("%P%F: can't find %s in output section\n"),
607 bfd_get_section_name (sec
->owner
, sec
));
609 /* Now figure out where the section should go. */
612 default: /* to avoid warnings */
641 os
= lang_output_section_find (oname
);
645 is
->header
.next
= os
->children
.head
;
646 os
->children
.head
= (lang_statement_union_type
*) is
;
650 is
->header
.next
= NULL
;
651 lang_statement_append (&os
->children
,
652 (lang_statement_union_type
*) is
,
658 /* Read an import or export file. For an import file, this is called
659 by the before_allocation emulation routine. For an export file,
660 this is called by the parse_args emulation routine. */
663 gldppcmacos_read_file (filename
, import
)
664 const char *filename
;
674 const char *impmember
;
676 o
= (struct obstack
*) xmalloc (sizeof (struct obstack
));
677 obstack_specify_allocation (o
, 0, 0, xmalloc
, gldppcmacos_free
);
679 f
= fopen (filename
, FOPEN_RT
);
682 bfd_set_error (bfd_error_system_call
);
683 einfo ("%F%s: %E\n", filename
);
693 while ((c
= getc (f
)) != EOF
)
699 struct bfd_link_hash_entry
*h
;
703 obstack_1grow (o
, c
);
707 obstack_1grow (o
, '\0');
710 s
= (char *) obstack_base (o
);
711 while (isspace ((unsigned char) *s
))
715 || (*s
== '#' && s
[1] == ' ')
716 || (! import
&& *s
== '#' && s
[1] == '!'))
718 obstack_free (o
, obstack_base (o
));
722 if (*s
== '#' && s
[1] == '!')
725 while (isspace ((unsigned char) *s
))
732 obstack_free (o
, obstack_base (o
));
735 einfo (_("%F%s%d: #! ([member]) is not supported in import files\n"),
742 (void) obstack_finish (o
);
746 while (! isspace ((unsigned char) *s
) && *s
!= '(' && *s
!= '\0')
756 if (imppath
== file
- 1)
766 while (isspace ((unsigned char) cs
))
775 einfo (_("%s:%d: warning: syntax error in import file\n"),
782 while (*s
!= ')' && *s
!= '\0')
787 einfo (_("%s:%d: warning: syntax error in import file\n"),
795 /* This is a symbol to be imported or exported. */
798 address
= (bfd_vma
) -1;
800 while (! isspace ((unsigned char) *s
) && *s
!= '\0')
808 while (isspace ((unsigned char) *s
))
812 while (! isspace ((unsigned char) *se
) && *se
!= '\0')
817 while (isspace ((unsigned char) *se
))
820 einfo (_("%s%d: warning: syntax error in import/export file\n"),
824 if (strcasecmp (s
, "svc") == 0
825 || strcasecmp (s
, "syscall") == 0)
831 address
= strtoul (s
, &end
, 0);
833 einfo (_("%s:%d: warning: syntax error in import/export file\n"),
840 struct export_symbol_list
*n
;
842 ldlang_add_undef (symname
);
843 n
= ((struct export_symbol_list
*)
844 xmalloc (sizeof (struct export_symbol_list
)));
845 n
->next
= export_symbols
;
846 n
->name
= xstrdup (symname
);
847 n
->syscall
= syscall
;
852 h
= bfd_link_hash_lookup (link_info
.hash
, symname
, false, false,
854 if (h
== NULL
|| h
->type
== bfd_link_hash_new
)
856 /* We can just ignore attempts to import an unreferenced
861 if (! bfd_xcoff_import_symbol (output_bfd
, &link_info
, h
,
862 address
, imppath
, impfile
,
864 einfo (_("%X%s:%d: failed to import symbol %s: %E\n"),
865 filename
, lineno
, symname
);
869 obstack_free (o
, obstack_base (o
));
872 if (obstack_object_size (o
) > 0)
874 einfo (_("%s:%d: warning: ignoring unterminated last line\n"),
876 obstack_free (o
, obstack_base (o
));
881 obstack_free (o
, NULL
);
886 /* This routine saves us from worrying about declaring free. */
895 /* This is called by the before_allocation routine via
896 lang_for_each_statement. It looks for relocations and assignments
900 gldppcmacos_find_relocs (s
)
901 lang_statement_union_type
*s
;
903 if (s
->header
.type
== lang_reloc_statement_enum
)
905 lang_reloc_statement_type
*rs
;
907 rs
= &s
->reloc_statement
;
908 if (rs
->name
== NULL
)
909 einfo (_("%F%P: only relocations against symbols are permitted\n"));
910 if (! bfd_xcoff_link_count_reloc (output_bfd
, &link_info
, rs
->name
))
911 einfo (_("%F%P: bfd_xcoff_link_count_reloc failed: %E\n"));
914 if (s
->header
.type
== lang_assignment_statement_enum
)
915 gldppcmacos_find_exp_assignment (s
->assignment_statement
.exp
);
918 /* Look through an expression for an assignment statement. */
921 gldppcmacos_find_exp_assignment (exp
)
924 struct bfd_link_hash_entry
*h
;
926 switch (exp
->type
.node_class
)
929 h
= bfd_link_hash_lookup (link_info
.hash
, exp
->assign
.dst
,
930 false, false, false);
935 if (strcmp (exp
->assign
.dst
, ".") != 0)
937 if (! bfd_xcoff_record_link_assignment (output_bfd
, &link_info
,
939 einfo (_("%P%F: failed to record assignment to %s: %E\n"),
942 gldppcmacos_find_exp_assignment (exp
->assign
.src
);
946 gldppcmacos_find_exp_assignment (exp
->binary
.lhs
);
947 gldppcmacos_find_exp_assignment (exp
->binary
.rhs
);
951 gldppcmacos_find_exp_assignment (exp
->trinary
.cond
);
952 gldppcmacos_find_exp_assignment (exp
->trinary
.lhs
);
953 gldppcmacos_find_exp_assignment (exp
->trinary
.rhs
);
957 gldppcmacos_find_exp_assignment (exp
->unary
.child
);
966 gldppcmacos_get_script(isfile
)
971 if (link_info
.relocateable
== true && config
.build_constructors
== true)
973 "OUTPUT_FORMAT(\"xcoff-powermac\")\n\
974 OUTPUT_ARCH(powerpc)\n\
978 .pad 0 : { *(.pad) }\n\
1014 ; else if (link_info
.relocateable
== true) return
1015 "OUTPUT_FORMAT(\"xcoff-powermac\")\n\
1016 OUTPUT_ARCH(powerpc)\n\
1020 .pad 0 : { *(.pad) }\n\
1055 ; else if (!config
.text_read_only
) return
1056 "OUTPUT_FORMAT(\"xcoff-powermac\")\n\
1057 OUTPUT_ARCH(powerpc)\n\
1058 SEARCH_DIR(/usr/local/powerpc-apple-macos/lib);\n\
1062 .pad 0 : { *(.pad) }\n\
1064 PROVIDE (_text = .);\n\
1073 PROVIDE (_etext = .);\n\
1076 PROVIDE (_data = .);\n\
1087 PROVIDE (_edata = .);\n\
1094 PROVIDE (_end = .);\n\
1095 PROVIDE (end = .);\n\
1104 ; else if (!config
.magic_demand_paged
) return
1105 "OUTPUT_FORMAT(\"xcoff-powermac\")\n\
1106 OUTPUT_ARCH(powerpc)\n\
1107 SEARCH_DIR(/usr/local/powerpc-apple-macos/lib);\n\
1111 .pad 0 : { *(.pad) }\n\
1113 PROVIDE (_text = .);\n\
1122 PROVIDE (_etext = .);\n\
1125 PROVIDE (_data = .);\n\
1136 PROVIDE (_edata = .);\n\
1143 PROVIDE (_end = .);\n\
1144 PROVIDE (end = .);\n\
1154 "OUTPUT_FORMAT(\"xcoff-powermac\")\n\
1155 OUTPUT_ARCH(powerpc)\n\
1156 SEARCH_DIR(/usr/local/powerpc-apple-macos/lib);\n\
1160 .pad 0 : { *(.pad) }\n\
1162 PROVIDE (_text = .);\n\
1171 PROVIDE (_etext = .);\n\
1174 PROVIDE (_data = .);\n\
1185 PROVIDE (_edata = .);\n\
1192 PROVIDE (_end = .);\n\
1193 PROVIDE (end = .);\n\
1204 struct ld_emulation_xfer_struct ld_ppcmacos_emulation
=
1206 gldppcmacos_before_parse
,
1209 after_parse_default
,
1210 gldppcmacos_after_open
,
1211 after_allocation_default
,
1212 set_output_arch_default
,
1213 ldemul_default_target
,
1214 gldppcmacos_before_allocation
,
1215 gldppcmacos_get_script
,
1219 0, /* create_output_section_statements */
1220 0, /* open_dynamic_archive */
1221 0, /* place_orphan */
1222 0, /* set_symbols */
1223 gldppcmacos_parse_args
,
1224 gldppcmacos_unrecognized_file