3 * emultempl/linux.em: New file providing support for linking
4 against Linux shared libraries.
5 * config/i386-linux.mt (ei386linux.c): Depend upon linux.em.
6 * emulparams/i386linux.sh (TEMPLATE_NAME): Define as linux.
10 * configure.in: If EMUL_EXTRA* is defined in a config file, treat
11 it as naming an emulation to be added to EMULATION_OFILES.
12 * config/i386-linux.mt (EMUL_EXTRA1): Define as elf_i386.
14 * Makefile.in: Rebuilt dependencies.
15 (ALL_EMULATIONS): Add ei386linux.o, eelf32_sparc.o,
16 eelf64_sparc.o. Remove $(OTHER_EMULATIONS).
17 (ei386linux.c, eelf32_sparc.c, eelf64_sparc.c): New targets.
18 * config/i386-linux.mt (OTHER_EMULATIONS): Don't define.
19 (ei386linux.c): Remove; now in Makefile.in.
20 * config/i386-lynx.mt (OTHER_EMULATIONS): Don't define.
21 * config/m68k-lynx.mt (OTHER_EMULATIONS): Don't define.
22 * config/sparc-lynx.mt (OTHER_EMULATIONS): Don't define.
23 * config/sparc64-elf.mt (OTHER_EMULATIONS): Don't define.
24 (eelf64_sparc.c): Remove; now in Makefile.in.
25 * config/sun4sol2.mt (OTHER_EMULATIONS): Don't define.
26 (eelf32_sparc.c): Remove; now in Makefile.in.
28 * ldexp.c (exp_print_tree): Don't crash if etree_rel section has
29 no owner--it might be bfd_abs_section. From Eric Youngdale
32 * scripttempl/aout.sc: Let sections align to their natural
37 * ldemul.h (ldemul_open_dynamic_archive): Declare.
38 (ld_emulation_xfer_type): Add new field open_dynamic_archive.
39 * ldemul.c: Include ldexp.h and ldlang.h.
40 (ldemul_open_dynamic_archive): New function.
41 * ldfile.h (ldfile_open_file_search): Declare.
42 * ldfile.c: Include ldemul.h.
43 (try_open_bfd): Rename from cache_bfd_openr. Return boolean
44 argument, not bfd *. Change all callers.
45 (ldfile_open_file_search): Rename from open_a. Return boolean
46 argument, not bfd *. Clean up. Change all callers.
47 (ldfile_open_file): If doing a dynamic link, call
48 ldemul_open_dynamic_archive rather than assuming the extension of
49 a dynamic object is ".so".
50 * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
52 (ld_${EMULATION_NAME}_emulation): Initialize open_dynamic_archive
54 * emultempl/sunos.em (ld_${EMULATION_NAME}_emulation): Likewise.
56 * ldmain.c (get_emulation): Ignore -m486 for Linux compatibility.
57 * lexsup.c (parse_args): Ignore -qmagic for Linux compatibility.
58 Accept -static as a synonym for -non_shared.
60 Let the user change the dynamic linker used by ELF code.
61 * ld.h (args_type): Add new field interpreter.
62 * lexsup.c (parse_args): Add dynamic-linker to longopts, and
64 * ldmain.c (main): Initialize command_line.interpreter to NULL.
65 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Get
66 the ELF backend to return the .interp section. If
67 command_line.interpreter is not NULL, set the contents of .interp
69 * ld.texinfo: Mention -dynamic-linker.
71 * config/sun4sol2.mt (eelf32_sparc.c): Depend upon elf32.em, not
74 * lexsup.c (parse_args): Sort out the option macros and change the
75 definitions to make it easier to add a new option.
77 * scripttempl/aout.sc: Define __etext and __edata to go along with
80 * ld.h (ld_config_type): Add new field traditional_format.
81 * lexsup.c (parse_args): Add traditional-format to longopts, and
83 * ldmain.c (main): Initialize config.traditional_format to false.
84 * ldlang.c (ldlang_open_output): Set BFD_TRADITIONAL_FORMAT in BFD
85 flags of output_bfd according to config.traditional_format.
86 * ldver.c (help): Mention -traditional-format.
87 * ld.texinfo: Document -traditional-format.
91 * ldctor.c (ldctor_add_entry): Add entries to a set in the order
96 * emulparams/i386linux.sh (TEXT_START_ADDR): Define as 0x1000.
97 (NONPAGED_TEXT_START_ADDR): Define as 0x20.
101 * scripttempl/alpha.sc: Define _ftext, _etext and _fdata insted of
102 _FTEXT, _ETEXT and _FDATA. Dont define _END.
104 * ldfile.c (open_a): If this is not an archive, try to open it in
105 the current directory before searching for it.
107 * lexsup.c (parse_args): Treat -i as a synonym for -r.
109 * ldgram.y (exp): Treat BLOCK as a synonym for ALIGN, so that
110 BLOCK works in a section address as documented.
112 * ldgram.y (YYDEBUG): Don't define.
116 * emultempl/gld960.em: Pass false for new argument to
117 ldfile_add_library_path.
118 * emultempl/gld960c.em, emultempl/lnk960.em: Likewise.
120 * emultempl/sunos.em: Only look for .so files if doing a dynamic
125 * scripttempl/i960.sc: Add CONSTRUCTORS to .data.
129 * Makefile.in (check): Delete ld.new dependency so that a regression
130 test doesn't trigger a rebuild of the linker.
134 * ldlang.c (map_input_to_output_sections): For lang_address, call
135 init_os if it hasn't already been called.
139 Add support for SunOS shared libraries.
140 * aout.sc: Don't define __DYNAMIC here. Add new sections used by
141 shared library support code.
142 * emultempl/sunos.em: New file.
143 * emulparams/sun4.sh (TEMPLATE_NAME): Define as sunos.
144 * emulparams/sun3.sh (TEMPLATE_NAME): Likewise.
145 * Makefile.in (esun4.c): Depend upon sunos.em, not generic.em.
148 * ldlang.c: Minor formatting cleanups.
149 (lang_for_each_input_file): New function.
150 * ldlang.h (lang_for_each_input_file): Declare.
152 * ldfile.h (search_dirs_type): Move from ldfile.c, and add cmdline
154 (search_head): Declare.
155 (ldfile_add_library_path): Add new cmdline argument in prototype.
156 * ldfile.c (search_head): Make non-static.
157 (search_dirs_type): Move to ldfile.h.
158 (ldfile_add_library_path): Accept cmdline argument, and save it.
159 * lexsup.c (parse_args): Pass true for new cmdline argument of
160 ldfile_add_library_path.
161 (set_default_dirlist): Likewise.
162 * ldmain.c (check_for_scripts_dir): Pass false for new cmdline
163 argument of ldfile_add_library_path.
164 * ldgram.y (ifile_p1): Likewise.
168 * ldlang.h (lang_input_statement_type): Remove fields subfiles,
169 total_size, superfile and chain.
170 * ldfile.c (open_a): Don't clear search_dirs_flag.
171 (ldfile_open_file): Don't try to open superfile. Assert that file
172 has not already been opened.
173 * ldlang.c (new_afile): Don't initialize superfile.
174 * ldmain.c (add_archive_element): Don't initialize subfiles or
175 chain or superfile. Initialize search_dirs_flag to false.
179 * ldver.c (ldversion): Changed version to "cygnus-2.4.1".
181 Changes from binutils-2.4 release:
183 * genscripts.sh (RELOCATING, CONSTRUCTING): When setting
184 variables, use whitespace, so scripts don't break.
186 * config/alphaosf.mh (HDEFINES, CFLAGS): Deleted.
188 * emultempl/generic.em: Find emultempl/stringify.sed in ${srcdir}.
190 * cdtest-bar.cc: Renamed from cdtest-func.cc.
191 * Makefile.in: Noted change.
193 * scripttempl/a29k.sc: Don't include /lab3/u3/..../segments.o; I
194 don't know where that's supposed to come from, or why it's
199 * configure.bat: update to latest makefile.in
200 * emulpara/go32.sh: set to coff-go32 not aout
201 * emultemp/generic.em: strength-reduce the structure of
202 this shell script, since the only available shell for
203 DOS can't handle complex syntax.
204 * emultemp/stringify.sed: for "sed -f" instead of inline.
205 * makefile.in: depend on stringify.sed as well as genscripts.sh
206 * scripttemp/go32coff.sc: correct for djgpp 1.11's COFF format
207 * genscripts.sh: empty variables aren't always considered "set",
208 so set them to "y" instead.
212 * ldlang.c (entry_symbol): Make static.
213 (lang_add_entry): Add cmdline argument.
214 * ldlang.h (lang_add_entry): Change prototype.
215 * ldgram.y (statement_anywhere): Change lang_add_entry call.
216 * lexsup.c (parse_args): Likewise.
220 * emulparams/elf32mipb.sh (OTHER_READONLY_SECTIONS): Don't give
222 (OTHER_READWRITE_SECTIONS): Don't give .lit4 or .lit8 an address.
223 (OTHER_SECTIONS): Define for .gptab.sdata and .gptab.sbss.
224 * scripttempl/elf.sc: Use OTHER_SECTIONS at end of script.
228 Add support for ELF shared libraries.
229 * ld.h (ld_config_type): Add field dynamic_link.
230 * ldmain.c (main): Initialize config.dynamic_link to false. Warn
231 on attempts to use -r with -relax, -call_shared or -s.
232 * lexsup.c (longopts): Separate OPTION_CALL_SHARED from
233 OPTION_NON_SHARED. Add OPTION_IGNORE. Adjust macro values
234 accordingly. Add "dy" and "non_shared" options. Change "Qy" to
235 OPTION_IGNORE for now. Handle OPTION_CALL_SHARED and
236 OPTION_NON_SHARED by setting dynamic_link field accordingly.
237 Handle OPTION_IGNORE by ignoring it. Clear dynamic_link field for
239 * ldfile.c (ldfile_open_file): If config.dynamic_link is true, try
240 opening a file with a .so extension first.
241 * emultempl/elf32.em: New file.
242 * emulparams/elf32_sparc.sh (TEXT_START_ADDR): Change to 0x10000.
243 (NONPAGED_TEXT_START_ADDR): Likewise.
244 (TEMPLATE_NAME): Define as elf32.
246 * emulparams/elf_i386.sh (TEMPLATE_NAME): Define as elf32.
247 * scripttempl/elf.sc: Add placement for new dynamic sections.
248 Don't use CREATE_OBJECT_SYMBOLS. Define _etext, _edata and _end
249 outside of any section. Don't use ALIGN(8); just let one section
250 VMA follow another. Put .dynbss in .bss. Don't mention debugging
251 sections; they'll be handled correctly anyhow.
252 * Makefile.in (eelf_i386.c): Depend upon elf32.em, not generic.em.
256 * Makefile.in (install): Redirect output of ln to /dev/null.
260 * emultempl/hppaelf.em: Change all references of
261 .hppa_linker_stubs to .PARISC.stubs.
262 * scripttempl/hppaelf.sc: Likewise.
266 * ldlang.c (print_output_section_statement): Change ``no attached
267 output section'' message slightly.
268 (lang_do_assignments): Don't recurse down if there is no real
271 * config/i386-linux.mt (OTHER_EMULATIONS): Change em_ to e to
272 match corresponding change in emulation templates.
273 * config/i386-lynx.mt, config/m68k-lynx.mt: Likewise.
274 * config/sparc-lynx.mt, config/sun4sol2.mt: Likewise.
278 * ldver.c (ldversion): Updated version number.
280 * cdtest-foo.cc: Use explicit "#pragma implementation".
281 * cdtest-bar.cc: Renamed from cdtest-func.cc.
282 * Makefile.in: References to cdtest-func.o changed to
287 Don't create unnecessary output sections.
288 * ldlang.c (out_bfd_get_section_by_name): Remove.
289 (wild_section): Call bfd_get_section_by_name rather than
290 our_bfd_get_section_by_name. Don't call wild_doit if there is no
292 (lang_create_output_section_statements): Remove.
293 (map_input_to_output_sections): For several cases, call init_os if
294 it has not already been called.
295 (lang_size_sections): If output section was not created, skip it.
296 (lang_process): Don't call lan_create_output_section_statements.
297 (lang_place_orphans): Skip files with just_syms_flags set to true.
298 * ld.texinfo: Document change.
302 * ldlang.c (wild_doit): Don't bother initializing the vma and
303 section size. Don't special case SEC_SHARED_LIBRARY.
304 (lang_size_sections): Handle SEC_COFF_SHARED_LIBRARY sections
309 * config/go32.mh : New file for Xgo32X.
313 * ldfile.c (ldfile_open_command_file): Set bfd_error_system_call
314 before calling einfo, since we are reporting an fopen failure.
317 * configure.in: Use "e" rather than "em_" as prefix for
322 * emultempl/generic.em: Use "e" rather than "em_" as prefix for
324 * emultempl/gld960.em, emultempl/gld960c.em, emultempl/lnk960.em,
325 emultempl/hppaelf.em, emultempl/m88kbcs.em, emultempl/vanilla.em:
327 * Makefile.in: Changed all generated file names.
328 (ldemul-list.h): Depend on Makefile, not config.status. Changed
329 sed patterns to handle new filenames.
331 * config/mipsl-idt.mt: Renamed from mips-idtl.mt.
332 * configure.in: Adjusted.
336 * Makefile.in (install-info): Don't use "$<*", it doesn't always
337 work. Instead, check build dir and $srcdir explicitly, and use
338 `echo' to get all the filenames.
340 * configure.in (h8300h-*-hms): Changed ld_target name to
342 * config/cf-h8300h.mt: Renamed from coff-h8300h.mt, to make it
345 * config/i960coff.mt: New file.
346 * emulparams/gld960coff.sh: New file.
347 * emultempl/gld960c.em: New file.
348 * configure.in (i960-*-vxworks5* except -vxworks5.0*): Use
349 i960coff configuration.
350 * Makefile.in (em_gld960coff.c): Added dependencies, build rule.
352 * Makefile.in (ALL_EMULATIONS): Remove em_delta68.o, since the
353 code isn't included in FSF releases, and it can still be
355 (distclean): Remove site.bak and tmpdir.
356 (STAGESTUFF): Removed $(GENERATED_CFILES) $(GENERATED_HFILES).
357 (mostlyclean): Delete them explicitly here. Also remove tmpdir.
359 Patches from Ralph Campbell:
360 * config/mipsbsd.mh: New file.
361 * Makefile.in (em_mipsbsd.c): Use mipsbsd.sc, not aout.sc.
362 * scripttempl/mipsbsd.sc: Don't define __DYNAMIC.
363 * emulparams/mipsbsd.sh (OUTPUT_FORMAT): Fix name to have `a.out'
366 * configure.in (i386-*-gnu*): Treat like i386-*-mach*.
370 * config/m68k.mt (EMUL): Set to m68kaout.
371 * emulparams/m68kaout.sh: New file.
372 * Makefile.in (ALL_EMULATIONS): Add em_m68kaout.o.
373 (em_m68kaout.c): New target.
375 * ldlang.c (lang_size_sections): If dot moves because of an
376 assignment, don't try to insert a pad into the absolute output
377 section, just change the address of the default memory region
380 * Makefile.in (mostlyclean): Remove cdtest.tmp, cdtest-ur,
381 cdtest-ur.out, and cdtest-ur.tmp.
385 * scripttempl/sa29200.sc: Align all sections to four byte
390 * Makefile.in, configure.in: Support for go32 coff.
391 * config/i386-go32.mt: New file
392 * emulparams/i386go32.sh: New file
393 * scripttempl/i386go32.sc: New file
397 * Makefile.in (em_m68klynx.c, em_i386lynx.c, em_sparclynx.c): Use
398 Lynx-specific script templates.
399 * configure.in (sparclite*-*-coff): Use coff-sparc.
400 * emulparams/i386lynx.sh (SCRIPT_NAME): Set to i386lynx.
401 * emulparams/sparclynx.sh (SCRIPT_NAME): Set to sparclynx.
402 (ENTRY): Set to __main.
403 * scripttempl/i386lynx.sc: New file, script for I386 Lynx.
404 * scripttempl/m68klynx.sc: Add insertion of ctor/dtor sections.
405 * scripttempl/sparclynx.sc: New file, script for uSparc Lynx.
409 * scripttempl/mips.sc: Force _gp and .lit8 to be aligned to a 16
410 byte boundary, in case the global constructors do not take up an
413 * config/i386v4.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not
414 exist, get crtbegin based on gcc -print-libgcc-file-name.
415 (HOSTING_LIBS): Similar change for ../gcc/crtend.o.
419 * ldlang.c (lang_size_sections): When no address is given for a
420 section, align it according to its requirements.
424 * Makefile.in (clean, distclean): Remove configdoc.texi.
428 * configure.in: Add i[34]86-*-bsd386 to the patterns recognized.
432 * ldlang.c (lang_size_sections): When relaxing, adjust the
433 position of a padding statement, and adjust dot accordingly.
437 * Makefile.in (EXPECT, RUNTEST): Set these for the check goal.
441 * scripttempl/i386coff.sc: If relocating, don't put .init and
442 .fini sections into .text; keep them separate.
443 * config/i386sco.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not
444 exist, get crtbegin based on gcc -print-libgcc-file-name.
445 (HOSTING_LIBS): Similar change for ../gcc/crtend.o.
449 * Makefile.in (check): Set TCL_LIBRARY for runtest.
453 * configure.in (hppa*-*-*elf*): Don't require "-hp-" for the
456 * emultempl/hppaelf.em (hppaelf_finish): Only resize sections
457 if building a final executable.
461 * ldmain.c (main): Check the return value of bfd_close.
465 * scripttempl/alpha.sc: Clean up section alignment to ensure that
466 sections never overlap when using -r.
470 * ldmisc.c (vfinfo): Change symbol reading slightly for recent BFD
471 changes: get_symtab_upper_bound renamed and returns long,
472 bfd_canonicalize_symtab returns long, check for error indications.
476 * ldlang.c (print_input_section): For section size, use
477 _cooked_size if it is non-zero, size otherwise.
478 (size_input_section): Likewise.
479 (lang_do_assignments): Likewise (case lang_input_section_enum).
483 * ldlang.c (new_afile): Add new argument add_to_list. Don't set
484 real to true for lang_input_file_is_marker_enum. Clear the_bfd.
485 (lang_add_input_file): Pass true to new_afile for add_to_list.
486 (lookup_name): Remove force_load argument. Changed all callers.
487 Pass false to new_afile for add_to_list. Split loading of symbols
488 out into separate function.
489 (load_symbols): New function split out of lookup_name. Don't load
490 the symbols if they are already loaded.
491 (open_input_bfds): For lang_input_statement_enum call load_symbols
492 rather than lookup_name.
493 (lang_process): Pass abs_output_section rather than NULL to
495 (lang_startup): Set real field of first_file to true.
499 * ldlang.c (had_relax): Removed.
500 (relax_again): New static variable.
501 (lang_size_sections): Change call to bfd_relax_section to
502 correspond to BFD changes. Set relax_again appropriately.
503 (lang_process): Remove #if 0 code. When relaxing, keep calling
504 lang_do_assignments and lang_size_sections until relax_again
507 * emultemp/gld960.em: Include libiberty.h
508 (gld960_before_parse): Pass NULL as final argument to concat.
512 * scripttempl/aout.sc: Force _end and __end to be aligned to a
515 * ldwrite.c (build_link_order): Handle lang_data_statement_enum by
516 building a bfd_data_link_order, rather than by setting the section
517 contents immediately.
521 Changes to make -Ur work again.
522 * ldmain.c (add_to_set): Now takes reloc argument rather than
523 bitsize. Check config.build_constructors here. If an new hash
524 table entry is created, mark it as undefined.
525 (constructor_callback): No longer takes bitsize argument. Pass
526 BFD_RELOC_CTOR to ldctor_add_set_entry, but first make sure the
527 BFD backend supports it.
528 (reloc_overflow): Handle a NULL abfd argument.
529 (reloc_dangerous, unattached_reloc): Likewise.
530 * ldctor.c: Include ldmain.h.
531 (struct set_info): Change bitsize field to reloc.
532 (ldctor_add_set_entry): Now takes reloc argument rather than
533 bitsize. Don't bother to check config.build_constructors here.
534 (ldctor_build_sets): Get the size from the reloc howto. If
535 generating relocateable output, call lang_add_reloc rather than
537 * ldctor.h (ldctor_add_set_entry): Change declaration to use reloc
539 * ldlang.h (statement_enum): Add lang_reloc_statement_enum.
540 (lang_reloc_statement_type): New structure.
541 (lang_statement_union_type): Add reloc_statement field.
542 (lang_add_reloc): Declare new function.
543 * ldlang.c (lang_for_each_statement_worker): Handle
544 lang_reloc_statement_enum.
545 (map_input_to_output_sections, print_statement): Likewise.
546 (lang_size_sections, lang_do_assignments): Likewise.
547 (print_reloc_statement): New function.
548 (lang_add_reloc): New function.
549 * ldwrite.c (build_link_order): Handle lang_reloc_statement_enum.
551 * Makefile.in (cdtest.out, cdtest-ur.o): New targets.
552 (cdtest-ur, cdtest-ur.out): New targets.
553 (check-cdtest): Now also check that -Ur works correctly.
555 * scripttemp/alpha.sc: Align all sections to 16 byte boundaries.
559 * ldlang.c (lang_process): Move lang_common call before
560 map_input_to_output_sections, to ensure that any alignment
561 constraints set by common symbols are copied over to the output
566 * emulparams/elf32ppc.sh (TEMPLATE_NAME): Don't define.
567 (OTHER_READWRITE_SECTIONS): Rename .toc to .got.
568 * Makefile.in (em_elf32ppc.c): Depend upon generic.em, not ppc.em.
569 * emultempl/ppc.em: Remove ugly stub code; turns out not to be
574 * config/i386bsd.mh: New file.
578 * elf.sc: Permit TEXT_START_SYMBOLS and DATA_START_SYMBOLS to be
580 * emulparams/elf32mipb.s (TEXT_START_SYMBOLS): Define _ftext.
581 (DATA_START_SYMBOLS): Define _fdata.
585 * ldlang.c (cat): Define using ANSI style if ALMOST_STDC defined.
589 * emultempl/hppaelf.em (hppaelf_finish): Update comments. This
590 works again. Attach some output symbols to the stub file bfd.
592 * emultempl/hppaelf.em: Include elf32-hppa.h.
593 (file_chain): Add decl.
594 (hppa_look_for_stubs_in_section): Delete decl.
595 (hppaelf_finish): Reenable code. Do not pass symbols
596 down to hppa_look_for_stubs_in_section.
600 * ldmain.c (write_map): Don't define. Removed all references.
601 Just use map_file or map_filename instead.
602 (add_archive_element): Use minfo to write map information, not
604 (constructor_callback): Use fprintf to write map information, not
606 * ldmain.h (write_map): Don't declare.
607 * ldgram.y (mri_script_command): Removed reference to write_map.
608 * ldlang.c (lang_one_common): Likewise.
609 * lexsup.c (parse_args): Likewise.
613 * scripttempl/elf.sc: Force all sections to be aligned.
615 * ldgram.y (section): Reverse the order of memspec_opt and
616 fill_opt to avoid an ambiguity when both are used.
617 * ld.texinfo: Changed accordingly.
619 * ldgram.y: Move include of ldlex.h back with other includes.
620 * ldlex.h (input_type): Don't initialize enum constants to
622 * ldlex.l: Use a switch to return the right token based on
623 input_type, rather than knowing that input_type has a value based
626 * ldgram.y (dirlist_ptr): Removed; not used.
627 * lexsup.c: Include ldver.h.
628 * Makefile.in: Rebuilt dependencies.
632 * ldlang.c (lookup_name): don't call bfd_set_gp_size.
633 (ldlang_add_file): call it here instead.
637 * ldgram.y: Include ldlex.h after %token decls, for byacc.
641 * emultempl/hppaelf.em: First attempt to clean this file up.
642 Add comments in several functions as to their purpose and
643 how they function (or my current best guess). Clean up horrible
644 spacing and indention that never should have been accepted in the
645 first place. Add FIXMEs for issues which need to be resolved.
646 Disable linker-stub generation until it gets fixed. This allows
647 the linker to at least work on simple code for testing purposes.
649 * ldlang.c (lang_size_sections): No longer static (PA ELF calls
650 it via hppaelf_finish). Prototype moved into ldlang.h.
651 (lang_process): Move problematic extra call to lang_size_sections
652 into the PA ELF specific code.
653 * emultempl/hppaelf.em (hppaelf_finish): Extra call to
654 lang_size_sections moved here.
658 * configure.in (powerpc-*-elf*): New target; use ppc-elf32.
659 * config/ppc-elf32.mt: New file.
660 * emulparams/elf32ppc.sh: New file.
661 * emultempl/ppc.em: New file.
662 * Makefile.in (ALL_EMULATIONS): Added em_elf32ppc.o.
663 (em_elf32ppc.c): New target; uses elf32ppc.sh, ppc.em and elf.sc.
664 (EMULATION_OFILES): Added dependencies on ldexp.h and ldlang.h.
668 * lexsup.c (parse_args): Use symbolic numbers for long options.
669 Fix misunderstanding in -Y and -call_shared et al.
671 Use getopt instead of lex and yacc to parse the command line.
673 * ld.texinfo (Options): Document changes to option syntax.
674 * Makefile.in: Update dependencies.
675 * ldver.c (help): Tweak dashes in usage message.
676 * ldgram.y (%union): Remove unused members.
677 Remove %tokens for command line options; add ones for input types.
678 (command_line): Rules removed.
679 (file): Instead of command line, recognize an
680 input type indicator, then use the nonterminal for that type.
681 (defsym_expr): New nonterminal from code formerly in command_line.
682 * ldlex.h: Declare parser input type enum and variable.
683 Don't declare parse_line.
684 * ldlex.l: Remove unused variables. Make some used ones static
686 (COMMAND): Start state and its rules removed.
687 At start of yylex, return input state token if at start of input.
688 (lex_redirect): Don't need to set yyout.
689 (ldlex_command): Function removed.
690 * ldmain.c (main): Instead of calling parse_line, set up the
691 redirections and call yyparse directly.
692 * ldmisc.c (vfinfo): If there's no input filename, print nothing, not
694 * lexsup.c: Remove #if 0'd code.
695 (parse_line): Function removed.
696 (parse_args): Rewrite to use getopt_long_only.
697 (set_default_dirlist): New function from code formerly in
698 ldgram.y:command_line.
699 (set_section_start): New function.
700 * emultempl/generic.em, emultempl/gld960.em, emultempl/hppaelf.em,
701 emultempl/lnk960.em, emultempl/m88kbcs.em: Don't enclose
702 compiled-in link scripts in "{" and "}", as the grammar no longer
707 * Makefile.in (ld.dvi): Depend on configdoc.texi, but don't
708 require that it be in $(srcdir).
712 * ldlang.c (lang_size_sections): Only align section to alignment
713 required by linker script, not to maximum alignment of input
716 * ldlang.h (largest_section): Don't declare.
717 * ldlang.c (largest_section): Don't define.
718 (size_input_section): Don't set largest_section; not used.
722 * ldlang.c (new_afile): Pass NULL as last argument to concat.
726 * ldlang.c, ldmain.c: Include libiberty.h.
728 * ldmisc.h (concat): Don't declare.
729 * ldmisc.c (concat): Don't define; just use the one in libiberty.
731 * ld.h (as_output_section_statement): Removed; not used.
735 * ldlang.c, ldmain.c, ldmisc.c: Use bfd_get_error and
736 bfd_set_error and new error names.
740 * ldwrite.c (build_link_order): If the cooked size of the section
741 has been set, use it, for determining link_order size.
742 (ldwrite): In the error message displayed if bfd_final_link fails,
743 indicate that it was in fact the final link step that failed.
745 * ldlang.c (lang_size_sections): Clear bfd_error before calling
746 bfd_relax_section, in case it returns false but doesn't flag an
747 error. If an error is returned, indicate which one it is in the
750 * Makefile.in (install-info): Depend on ld.info, and use "$<*" so
751 it'll get picked up from $(srcdir) if appropriate.
755 * scripttempl/aout.sc: Only pad .text if PAD_TEXT is set.
756 * emulparams/i386mach.sh (PAD_TEXT): Set PAD_TEXT.
760 * ldlex.l (comment): Increment line number when newline is read.
764 * ldlang.c (lookup_name): Take new argument, force_load. If true,
765 reload the file even if it is already loaded.
766 (wild): Call lookup_name with force_load argument of 0.
767 (open_input_bfds): Call lookup_name with force_load argument of 1.
768 (print_symbol): Remove declaration of non-existent function.
769 (print_one_symbol): Return true rather than falling off end.
773 * ldmain.c (main): Use %ld when printing long values.
775 * scripttempl/elf.sc: Move _edata after the .sdata section.
776 Permit OTHER_BSS_SYMBOLS to be defined.
777 * emulparams/elf32mipb.s (OTHER_BSS_SYMBOLS): Define _fbss.
781 * Rename all "hppaosf" files to "hppaelf".
782 * Change all "osf" references to "elf" in hppaelf files.
783 * Makefile.in: Likewise.
784 * configure.in: Likewise.
788 * ldmain.c (main): Call xatexit, not atexit.
789 Call xmalloc_set_program_name.
791 * ldlang.c (lang_size_sections): Check if bfd_relax_section set
796 * emultempl/lnk960.em (append), emultempl/hppaosf.em
797 (hppaosf_finish): Call xmalloc, not ldmalloc.
798 * ldmain.c (preserve_output): Function removed.
799 (main): Do it here instead.
803 * ldlang.h (LANG_FOR_EACH_{INPUT,OUTPUT}_SECTION): Delete (unused)
804 GNU C specific macros.
806 * emultempl/hppaosf.em (hppaosf_finish): Expand the only remaining
807 call to LANG_FOR_EACH_INPUT_SECTION.
811 * ldmisc.c (ldmalloc, xmalloc, ldrealloc, xrealloc): Functions
812 deleted; will use libiberty versions instead.
813 * ldctor.c ldfile.c ldlang.c ldmain.c ldmisc.c ldmisc.h lexsup.c
814 mri.c Makefile.in: Change callers.
816 * ldmisc.c (vfinfo): Remove cleanup code.
817 * ldmain.c (remove_output): Put it here (new function).
818 (preserve_output): New function.
819 (main): Register remove_output and preserve_output with atexit.
820 * ldmain.c ldgram.y: Call xexit instead of exit.
821 * ldmisc.h: Declare xexit.
825 * Makefile.in: Lots of new H8/500 memory models.
829 * ldlex.l: Removed duplicate rules.
830 (yywrap): Provide default definition, needed with some versions of
835 * ldmisc.c (vfinfo): For `%I', if the file is in an archive, print
836 the archive filename too.
838 * ldlex.l: Add rule to catch invalid input characters instead of
839 printing them. Include "ldmain.h" for program_name decl.
840 (lex_warn_invalid): New function.
841 * Makefile.in: Add dependency.
845 * Makefile.in (check): Don't bother running any tests of
846 cross-linker until the test suite no longer assumes native mode.
850 * ldlang.c (print_one_symbol, print_input_section): Print
851 global symbols in symbol table again.
855 * ldmain.c ldmain.h ldgram.y: If -v -V or --version was given,
856 exit successfully instead of complaining if no input files are
861 * Makefile.in: Format variable definitions consistently.
862 (LD_PROG): Remove unnecessary variables from link command,
863 change variable LOADLIBES to EXTRALIBS.
865 * ldmain.c (main): Compute and display total execution time.
866 * ld.texinfo (-stats): Document the option.
870 * ldmain.c (reloc_overflow): Added name, reloc_name and addend
873 * ldlang.c (lookup_name): Set BFD GP size to -G argument value
876 * ldlang.c (relaxing): Removed global variable.
877 (lang_size_sections): If the canonical symbols have not already
878 been read in, read them in before relaxing.
879 * ldlang.h (relaxing): Removed declaration.
883 * ldlang.c (new_afile): Initialize loaded field to false.
884 (lookup_name): If file was already loaded, don't call the
885 add_symbols entry point again.
889 * ld.texinfo: Clarify what -T option does.
893 * scripttempl/m88kbcs.sc: Don't use CREATE_OBJECT_SYMBOLS, that's
898 * ldmain.c (add_archive_element): If trace_files or
899 trace_file_tries, print file name.
900 * ldlang.c (lookup_name): Likewise.
901 (ldlang_add_file): Don't put files on input_bfds list in reverse
904 * scripttempl/elf.sc: Correct typo.
908 * ldgram.y, ldlex.l: Make the space between -e, -u, and -y and
909 their arguments optional, for compatibility with the old GNU ld.
913 * scripttempl/elf.c: Define __bss_start before the .sbss section.
917 * ldmain.c (add_to_set): Add bitsize argument.
918 (constructor_callback): New function.
919 (link_callbacks): Add constructor_callback.
920 * ldctor.c (struct set_info): Add bitsize field.
921 (ldctor_add_set_entry): Add bitsize argument.
922 (ldctor_build_sets): Base the size of the elements of the set on
923 the bitsize, rather than always using LONG.
924 * ldctor.h (ldctor_add_set_entry): Add bitsize to declaration.
926 * ld.h (QUAD_SIZE): Define.
927 * ldgram.y (QUAD): New token.
929 * ldlex.l: Return QUAD.
930 * lexsup.c (keywords): Add QUAD.
931 * ldwrite.c (build_link_order): Handle QUAD.
932 * ldlang.c (print_data_statement): Handle QUAD.
933 (lang_size_sections): Likewise.
934 (lang_do_assignments): Likewise.
935 * ldexp.c (exp_print_token): Add QUAD to table.
936 * ld.texinfo: Describe QUAD.
938 * scripttempl/alpha.sc: Don't create .lit4 or .sdata sections,
939 since the Alpha doesn't use them.
943 * ldemul.h (ld_emulation_xfer_struct): Comment the members.
947 * Makefile.in, configure.in: Add support for VSTa micro-kernel.
948 * config/vsta.mt, emulparams/vsta.sh: New files for VSTa.
952 * scripttempl/aout.sc: Pad .text to DATA_ALIGNMENT if relocating;
953 needed for i386mach. (Should be a no-op on other systems.)
955 * emulparams/i386mach.sh (SEGMENT_SIZE): Fix again.
956 (PAGE_SIZE): Don't define; not used.
960 * ldgram.y (yyerror): Make argument const char *, and actually
961 print it out rather than assuming it is a syntax error.
962 * ldmisc.h: Change declaration of yyerror.
963 * ldemul.c, ldwrite.c: Add /*ARGSUSED*/ as appropriate.
967 * emulparams/i386mach.sh (NONPAGED_TEXT_START_ADDR): Don't include
968 exec header offset, since the exec header isn't loaded.
969 (PAGE_SIZE, SEGMENT_SIZE): Agree with bfd/i386mach3.c.
973 A major rewrite to move the bulk of the linker into BFD so that
974 more efficient backend code can be written for specific object
976 * lderror.c, lderror.h, ldindr.c, ldindr.h, ldsym.c, ldsym.h,
977 ldwarn.c, ldwarn.h, relax.c, relax.h: Removed.
978 * ldctor.c, ldctor.h: Complete rewrite.
979 * ldwrite.c, ldwrite.h: Complete rewrite.
980 * ld.h (strip_symbols_type, strip_symbols): Removed. Use
981 link_info.strip instead. Changed all uses.
982 (discard_locals_type, discard_locals): Removed. Use
983 link_info.discard instead. Changed all uses.
984 (ld_config_type): Removed relocateable_output field; use
985 link_info.relocateable instead; changed all uses. Added stats
987 (set_asymbol_chain, get_asymbol_chain, get_loader_symbol,
988 set_loader_symbol): Removed.
989 * ldexp.h (node_class): Added etree_rel.
990 (etree_type): Added rel field.
991 * ldexp.c (exp_print_token): Bracketed table initialization.
992 (exp_relop): New function.
993 (fold_name): Use linker hash table rather than ldsym functions.
994 (exp_fold_tree): Likewise. Also, handle etree_rel case.
995 (exp_print_tree): Handle etree_rel.
996 * ldgram.y (strip_symbols, discard_locals): Removed.
997 (OPTION_stats, OPTION_no_keep_memory): New tokens. Handle them.
998 (REL): New token. Does not appear in grammar, but needed for
1000 (file): Don't call lang_final; it's called by main anyhow.
1001 * ldlex.l: Accept -stats and -no-keep-memory options.
1002 * ldlang.h (fill_type): Make unsigned int, not unsigned short.
1003 * ldlang.c: Consistently use fill_type for fill argument.
1004 (lang_init_script_file, script_file): Removed.
1005 (create_object_symbols): Removed. Use
1006 link_info.create_object_symbols_section instead. Changed all
1008 (lang_add_keepsyms_file): Removed.
1009 (lookup_name): Call bfd_link_add_symbols instead of
1010 ldmain_open_file_read_symbol.
1011 (wild): Don't iterate over script_file.
1012 (open_output): Create link hash table.
1013 (lang_place_undefineds): Rewrote.
1014 (lang_size_sections): Handle relaxing (doesn't work yet).
1015 (lang_relocate_globals): Removed.
1016 (lang_finish): Use link hash table rather than ldsym functions.
1017 (lang_common): Rewrote.
1018 (lang_one_common): New function.
1019 (ldlang_add_file): Add file to link_info.input_bfds list. Set
1021 (create_symbol): Removed.
1022 (lang_process): Don't call lang_init_script_file. Call
1023 ldctor_build_sets rather than find_constructors. Don't call
1024 lang_relocate_globals.
1025 (lang_abs_symbol_at_beginning_of): Rewrote.
1026 (lang_abs_symbol_at_end_of): Rewrote.
1027 * ldmain.c (had_y): Removed.
1028 (lprefix, lprefix_len): Removed; use link_info fields instead.
1030 (multiple_def_count, commons_pending, undefined_global_sym_count,
1031 total_symbols_seen, total_files_seen): Removed.
1032 (link_callbacks, link_info): New variables.
1033 (main): Initialize link_info. Don't call init_bfd_error_vector or
1034 ldsym_init. Don't set now unused variables. Handle -stats.
1035 (get_emulation): Removed obsolete and nonfunctional GNU960 code.
1036 (add_ysym): Rewrote.
1037 (read_entry_symbols, refize, enter_global_ref, enter_file_symbols,
1038 search_library, gnu960_check_format, decode_library_subfile,
1039 linear_library, symdef_library, clear_syms, subfile_wanted_p):
1041 (add_keepsyms_file, add_archive_element, multiple_definition,
1042 multiple_common, add_to_set, warning_callback, undefined_symbol,
1043 reloc_overflow, reloc_dangerous, unattached_reloc, notice_ysym):
1045 * ldmisc.c (vfinfo): Accept a string for %T, not a symbol. Don't
1046 require symbols for %C; look them up instead.
1047 * emultempl/hppaosf.em: Pass link_info to
1048 hppa_look_for_stubs_in_section.
1049 * Makefile.in: Rebuilt dependencies.
1050 (CFILES): Removed lderror.c, ldindr.c, ldsym.c, ldwarn.c, and
1052 (HFILES): Removed lderror.h, ldindr.h, ldsym.h, ldwarn.h, and
1054 (EMULATION_OFILES): Depend on bfdlink.h, ldmain.h, ldexp.h,
1055 ldlang.h and ldctor.h.
1057 * Makefile.in (ldlex.c): Don't depend on ldgram.h. Remove
1058 declarations of free and malloc from flex output. Change malloc
1059 to ldmalloc in flex output.
1063 * ldmain.c (lprefix): Change default from a char to a string
1064 with only one character.
1065 (lprefix_len): Set default to one.
1067 * ldmain.h (lprefix_len): Declare.
1069 * ldsym.c (write_file_locals): Use strncmp rather than a character
1070 comparison for lprefix.
1072 * emultmpl/m88kbcs.em (before_parse): Set lprefix and lprefix_len
1075 * emultmpl/hppaosf.em: Include ldexp.h.
1076 (before_parse): Set lprefix and lprefix_len correctly.
1080 * ldlex.h: Don't declare yywrap if it is a macro.
1081 * ldlex.l: Include sysdep.h.
1082 * ldlang.c (lang_for_each_statement_worker,
1083 lang_for_each_statement): Forgot to use PARAMS.
1087 * Makefile.in: Added .PHONY targets where appropriate. Added some
1089 (gcclibdir, version): Removed unused variables.
1090 (DEP): New variable, set to mkdep.
1091 (ALL_CFLAGS): New variable. Used in .c.o target.
1092 (CFILES, HFILES, GENERATED_CFILES, GENERATED_HFILES): New
1094 (HEADERS, MANSOURCES, LDCSOURCES, GENERATED_SOURCES,
1095 GENERATED_HEADERS, LDSOURCES, BFD_SOURCES, SOURCES): Removed
1096 mostly obsolete variables. Adjusted remaining uses.
1097 (DEF_EMUL): Removed variable.
1098 (ldmain.o): Handle undefined EMUL error correctly.
1099 (ldemul-list.h): Depend on config.status rather than Makefile.
1100 Create via temporary file.
1101 (ver960.c, roll, make): Removed obsolete targets.
1102 (.dep, .dep1, dep.sed, dep, dep-in): New targets. Used to rebuild
1104 * dep-in.sed: New file, used when rebuilding dependencies.
1108 Made many changes to eliminate gcc warnings. Made various
1109 cosmetic changes, declared various things in header files, removed
1110 various extern declarations from .c files. No substantive
1113 * ldlang.c (lang_process): Ifdef out final call to
1114 lang_size_sections again (reverting change of Nove 2), since it
1115 breaks the Sun4 linker.
1119 * configure.in (alpha-*-netware*): New target; use alpha.
1123 * configure.in: Group targets by CPU. Merge some m68k target
1124 entries with different CPU specs that use the same ld_target
1127 * configure.in: Add sparc*-*-coff.
1128 * config/coff-sparc.mt, emulparams/coff_sparc.sh: New files.
1129 * Makefile.in (ALL_EMULATIONS): Add em_coff_sparc.o.
1130 (em_coff_sparc.c): Add dependencies and build rules.
1132 * ldmisc.c (errno, sys_nerr, sys_errlist): Don't declare.
1136 * ldgram.y (OPTION_call_shared, OPTION_non_shared, OPTION_Oval):
1138 (command_line_option): Accept and ignore them (for now).
1139 * ldlex.l (<COMMAND>): Handle -non_shared, -call_shared, and -On
1140 where n is a number.
1144 * ldmain.c (subfile_wanted_p): If merging a common symbol which is
1145 not in bfd_com_section, create the section in the BFD so that it
1146 can be placed in the right output section.
1150 * configure.in (mips*-sgi-irix5*): New target. Use mipsb-elf32.
1151 * emulparams/elf32mipsb.sh (DATA_ADDR): Define.
1152 (OTHER_READONLY_SECTIONS): Define for .reginfo.
1153 (EXECUTABLE_SYMBOLS): Define for _DYNAMIC_LINK.
1154 * scripttempl/elf.sc: Use EXECUTABLE_SYMBOLS when not relocating.
1155 Move OTHER_READONLY_SECTIONS after all the other readonly
1156 sections. Don't use DATA_ADDR twice.
1158 * ldmain.c (enter_file_symbols): Removed duplicate tests of p. If
1159 p is in a common section, make sure the BFD has a section of that
1162 * ldlang.c (lang_common): Add newline to error message.
1166 * emulparams/m68klynx.sh (SCRIPT_NAME): Define to use a
1167 Lynx-specific script instead of m68kcoff.
1168 (OUTPUT_FORMAT): Define as "coff-m68k-lynx".
1169 (ENTRY): Define as __main.
1170 (TEXT_START_ADDR): Define as 0.
1171 (PAGE_SIZE): Define as 0x1000.
1172 * emulparams/i386lynx.sh, emulparams/sparclynx.sh: Fix comment.
1173 * scripttempl/m68klynx.sc: New file.
1177 * ldmain.c (get_emulation): Ignore -mips1, -mips2 and -mips3
1178 arguments rather than treating them as emulation names.
1182 * configure.in: Support x86 unixware and netware plus generic netware.
1186 * emulparams/i386mach.sh (TEXT_START_ADDR, NONPAGED_TEXT_START_ADDR):
1191 * Makefile.in (distclean): Don't delete dvi or info files.
1192 (ld.info): Update dependency list.
1193 (ld.dvi): Ditto. Extend TEXINPUTS to get bfdsumm.texi.
1197 * ldlang.c (lang_add_output): Take new arg, FROM_SCRIPT.
1198 Set output_filename instead of creating a new node.
1199 (open_output): Don't set output_filename.
1200 (lang_final): Create the new node here.
1201 * ldlang.c, ldlang.h, ldgram.y, mri.c: pass FROM_SCRIPT.
1207 * scripttempl/hppaosf.sc: (___stack_zero, etext, _etext,
1208 edata, _edata, end): Add definitions of these symbols.
1209 (__end): Remove definition of this symbol.
1210 (__data_start): Move definition of this symbol.
1212 * emultempl/hppaosf.em: Various fixes and support for linker stub
1214 (hppaosf_finish, hppaosf_search_for_padding_statements,
1215 hppaosf_create_output_section_statements): New functions in
1216 support of linker stub generation.
1217 (ld_hppaosf_emulation): Redefine to include new
1218 emulation-specific routines.
1220 * ldlang.c (lang_process): Re-enable last call lang_size_sections.
1221 Pass abs_output_section rather than NULL to avoid invalidating
1226 * Makefile.in (ALL_EMULATIONS): Add em_i386mach.o.
1227 (em_i386mach.c): New rule.
1228 * configure.in (i[34]86-*-mach*): New case.
1229 * config/i386-mach.mt: New file.
1230 * emulparams/i386mach.sh: New file.
1234 * ld.h (flag_is_*): Removed macros.
1235 * ldmain.c (enter_global_ref), ldsym.c (write_file_locals):
1236 Consistently check the BFD symbol flags directly, rather than
1237 using file_is_* macros.
1241 * configure.in (sparc*-*-lynxos*): New target.
1242 * Makefile.in: Add rule for em_sparclynx.c.
1243 (ALL_EMULATIONS): Add Lynx emulations.
1244 * config/sparc-lynx.mt: New file.
1245 * emulparams/sparclynx.sh: New file.
1246 * scripttempl/sparccoff.sc: New file.
1250 * Makefile.in: Add dependency for $(EMULATION_OFILES).
1254 * relax.c (write_relax): Check return value of bfd_seclet_link.
1258 * ldlang.c (delete_output_file_on_failure): New variable.
1259 (open_output): Set it after bfd open succeeds.
1260 * ldmisc.c (vfinfo): Test it.
1264 * ldsym.c (write_file_locals): Set the BSF_FILE flag for object
1267 * ldemul.c: Support was added to allow emulation-specific
1268 processing to occur. This support was added primarily for linker
1269 stub generation in the elf32-hppa gld.
1270 (ldemul_finish, ldemul_create_output_section_statements): New
1272 * ldemul.h: Support was added to allow emulation-specific
1273 processing to occur. (As described above.) Added finish and
1274 create_output_section_statements fields to
1275 ld_emulation_xfer_struct structure.
1276 * ldlang.c: Add calls to emulation-specific routines.
1277 (lang_process): Add call to
1278 ldemul_create_output_section_statements function.
1279 (lang_process): Add call to a emulation-specific routine (and
1280 some processing after the call).
1284 * configure.in: mips*- instead of mips-, mips*el changes
1288 * configure.in (alpha-*-osf*): New target; use alpha.mt.
1289 * Makefile.in (ALL_EMULATIONS): Added em_alpha.o.
1290 (em_alpha.c): New target; use alpha.sh and alpha.sc.
1291 * config/alphaosf.mh (NATIVE_LIB_DIRS, HOSTING_CRT0): Define.
1292 * config/alpha.mt: New file.
1293 * emulparams/alpha.sh: New file.
1294 * scripttempl/alpha.sc: New file.
1298 * ldlang.c (lang_size_sections, lang_common): ALIGN_N can't handle
1299 types of different sizes (eg: 64 and 32 bits), so coerce.
1300 * ld.h (ALIGN_N): Add warning about usage.
1304 * ldmain.c (enter_global_ref): Just ignore any weak symbol for
1305 which we already have a definition, rather than checking in
1306 several different places whether the symbol is weak.
1310 * configure.in (mips-*-elf*): New target; use mipsb-elf32.
1311 * scripttempl/elf.sc: Only use OTHER_READONLY_SECTIONS and
1312 OTHER_READWRITE_SECTIONS if relocating. Shell variables are not
1313 expanded within them.
1314 * config/mipsb-elf32.mt: New file.
1315 * emulparams/elf32mipb.sh: New file.
1316 * Makefile.in (em_elf32mipb.c): New target.
1320 * ldgram.y: In input_list, change lang_input_file_is_file_enum to
1321 lang_input_file_is_search_file_enum so objects brought in using
1322 INPUT() do a path lookup.
1326 * configure.in: Change Lynx ld_target to be {i386,m68k}-lynx
1327 instead of {i386,m68k}-coff.
1328 * Makefile.in (em_i386lynx.c, em_m68klynx.c): New targets.
1329 * config/i386-lynx.mt: New file.
1330 * config/m68k-lynx.mt: New file.
1331 * emulparams/i386lynx.sh: New file.
1332 * emulparams/m68klynx.sh: New file.
1334 * scripttempl/i386coff.sc: Make ENTRY get its value from ${ENTRY},
1335 but defaulting to _start.
1337 * ldemul.c, ldfile.c, ldlang.c, ldmain.c, ldmisc.c, ldmisc.h,
1338 ldsym.c, ldwarn.c: Rename info to info_msg, to avoid conflict with
1343 * config/solaris2.mh: New file. Define HOSTING_CRT0 and
1344 HOSTING_LIBS for testing.
1348 Finish up support for i386-sysv4 (without shared libraries):
1349 * ld.h (flag_is_weak): Define.
1350 * ldlang.c (print_symbol): Mention whether symbol is weak.
1351 (print_input_section): Print weak symbols as globals.
1352 * ldmain.c (refize): Do not zero out BSF_WEAK flag.
1353 (enter_global_ref): Do not warn if a weak symbol redefines a
1354 global symbol. Do not let a weak symbol redefine a common symbol.
1355 (enter_file_symbols): Treat weak symbols as global symbols.
1356 (subfile_wanted_p): Do not pull in an object file from a archive
1357 just to resolve an undefined weak symbol.
1358 * ldmisc.c (vfinfo): Don't needlessly malloc space after a fatal
1359 error; the error might be that malloc has run out of space.
1360 * ldsym.c (write_file_locals): Treat weak symbols as global.
1361 * configure.in (i[34]86-*-sysv4*, i[34]86-*-elf*): New targets;
1363 * config/i386v4.mh: New file; set NATIVE_LIB_DIRS to /usr/ccs/lib.
1364 * config/i386-elf.mt: New file; set EMUL to elf_i386.
1365 * emulparams/elf_i386.sh: New file.
1366 * scripttempl/elf.sc: Use ${NOP} as filler (defaults to 0).
1367 * Makefile.in (NATIVE_LIB_DIRS): Define to be empty.
1368 (ALL_EMULATIONS): Add em_elf_i386.o.
1369 (GENSCRIPTS): Pass NATIVE_LIB_DIRS as sixth argument.
1370 (em_elf_i386.c): New target, like other em_*.c targets.
1371 ($(LD_PROG)): Pass $(CFLAGS) to $(CC).
1372 * genscripts.sh: Accept NATIVE_LIB_DIRS as sixth argument. If
1373 nonempty, and configured for native, add it to LIB_PATH.
1377 * scripttempl/{h8300.sc,h8500.sc,i386coff.sc,m68kcoff.sc,sh.sc}:
1378 Added statements to pass stab and stabstr sections through and
1379 mark them as NOLOAD, which makes GDB happier.
1383 * configure.in: Accept m68k-lynx-lynxos config.
1385 * Makefile.in: Use $(SHELL) to run genscripts.sh.
1389 * config/coff-h8300.mt: Add EMUL=h8300h.
1391 * ldmain.c (main): Call set_scripts_dir after argv has been processed.
1395 * Makefile.in: Changed CXX back to g++.
1399 * Makefile.in: Fixed RUNTEST* CXX CXXFLAGS macros and check rule.
1403 * Makefile.in (TAGS): Use shell wildcards.
1407 * Makefile.in: add TEXINPUTS variable and use it in ld.dvi target
1411 * ld.texinfo: re-enable included config file; conditionalize doc
1412 for -oformat to interact properly with SingleFormat doc config
1413 var; rename @up/@down to @raisesections/@lowersections.
1417 * configure.in: recognize m88110.
1422 * emultempl/hppaosf.em (ld_hppaosf_emulation): Correct name for PA
1423 ELF emulation is "elf32-hppa" not "elf-big".
1424 (hppaosf_before_parse): Remove unneeded processing of environment
1426 * scripttempl/hppaosf.sc: Include .hppa_linker_stubs sections in
1427 .text segment of output file.
1428 * emulparams/hppaosf.sh (OUTPUT_FORMAT): Use elf32-hppa.
1432 * ld.h: define BYTE_SIZE, SHORT_SIZE, and LONG_SIZE which are no
1435 * ldlang.c, ld.h: updated copyright.
1439 * ldlang.c (open_output, lang_check): Check return value of
1444 * scripttempl/h8500.sc: Start all sections in a different segment.
1445 * scripttempl/z8ksim.sc: Handle constructors
1449 * Makefile.in: revert earlier changes back to execute runtest
1450 with make check. cdtest and bootstrap now function as they
1451 did within the Makefile.
1455 * Makefile.in: Update dependencies.
1457 * configure.in: Set EMULATION_OFILES in Makefile based on
1458 --with-targets option.
1462 * Makefile.in: check targets reimplemented to old way.
1466 * config/i386v.mh, config/irix4.mh: Use gcc
1467 -print-libgcc-file-name rather than $(libdir)/libgcc.a.
1468 * config/i386sco.mh: New file; copy of i386v.mh to correspond to
1469 bfd/configure.host change.
1473 * scripttempl/elf.sc: Handle .line and .debug* sections.
1475 * ldlex.l: Use bfd_scan_vma, not strtoul.
1479 * ldexp.c, ldfile.c, ldlang.c, lexsup.c, ldmain.c, ldemul.c:
1480 Remove inital caps in some error messages, change "can't" to
1481 "cannot", add missing colons.
1482 * ldmisc.c (vfinfo): Print "%%" as a single %.
1483 For '%' followed by unrecognized character, print them both
1484 verbatim instead of expecting a char * arg.
1485 For '%C', don't put the function name in parens.
1487 * ldexp.c (invalid): Pass "%%", not "% ".
1491 * scripttempl/mips.sc: Always define _ftext, _fdata, _fbss.
1492 (BSS_VAR): Removed; now always define _fbss.
1493 * emulparams/mipsidt.sh, emulparams/mipsidtl.sh (BSS_VAR):
1498 * configure.in: z8k-coff is the same as z8k-sim
1502 * testsuite/lib/ld.exp: new file
1503 * testsuite/config/unix-ld.exp: new file
1504 * testsuite/ld.bootstrap/bootstrap.exp: new file
1505 * Makefile.in: add dejagnu support for make check
1509 * ldlex.l (comment): Add missing newline in message.
1510 * ldindr.c (add_indirect): Ditto.
1511 * ldexp.c (exp_fold_tree): Ditto.
1515 * ldgram.y, ldlex.l, mri.c, ldwrite.c: Change multiple commons
1518 * ldmisc.c (multiple_warn): New function.
1519 * ldmisc.h: Declare it.
1520 * ldmain.c (enter_global_ref): Call it.
1521 * ld.h (ld_config_type): Add warn_common.
1522 * ldlex.l, ldgram.y: Set it with -warn-common option.
1523 * ldver.c (help): Document it.
1527 * scripttempl/elf.sc: Add hooks for .sdata, .sbss, and
1528 target-specific sections, and for changing data section vma.
1532 * ldgram.y (OPTION_Qy, OPTION_Y, OPTION_dn, OPTION_YP): New
1533 terminals, for Solaris.
1534 (dirlist_ptr): New static variable.
1535 (command_line_option): Accept new options.
1537 * ldlex.l: Accept command-line options "-Qy", "-dn", "-Y", and
1540 * config/sun4sol2.mt: Pass emulation name without ".sh".
1542 * emulparams/elf32_sparc.c: Renamed from elf32-sparc.c.
1543 * config/sun4sol2.mt (em_elf32_sparc.c): Adjusted accordingly.
1547 * scripttempl/elf.sc: Add support for .init, .fini, .ctors,
1548 .dtors, .data1, .rodata1 sections, instead of combining them into
1549 other sections. For `-r', set all section start addresses to
1552 * emulparams/elf32-sparc.sh (TEXT_START_ADDR,
1553 NONPAGED_TEXT_START_ADDR): Value should be 0x10100.
1554 (MAXPAGESIZE): Renamed from PAGE_SIZE.
1558 * genscripts.sh: If this is the default emulation, set
1560 * emultempl/*.em: Use it to determine whether to compile in the
1563 * Makefile.in (GENSCRIPTS): Pass the default emulation name to
1564 genscripts.sh. Pass the current emulation name without ".sh" on
1566 * genscripts.sh: Take an default emulation arg.
1567 Use the current emulation name as EMULATION_NAME.
1568 Make default lib path for cross-compiling ':', not null.
1569 * emulparams/*.sh: Don't set EMULATION_NAME.
1570 * ldemul.c (ldemul_get_script): Take isfile arg.
1571 Pass it to emulation's get_script function.
1572 * ldemul.h: Adjust get_script prototypes.
1573 * ldfile.c (ldfile_find_command_file): Renamed from find_a_name.
1575 * ldfile.h: Declare it.
1576 * ldgram.y: Accept a script on the command line again,
1577 for parsing compiled-in scripts.
1578 * ldmain.c (main): If ld script is a file, parse it as a -T
1579 option, otherwise parse it directly.
1580 * emultempl/*.em (*get_script): Return the scripts themselves if
1581 this is the default emulation; otherwise return their file names.
1582 * emultempl/m88kbcs.em: New file, to take m88kbcs #ifdef out of
1584 * emulparams/m88kbcs.sh: Use it.
1586 * ld.h (ld_config_type::unix_relocate): Remove unused element.
1590 * Makefile.in (ALL_EMULATIONS): Delete em_i386linux.o (for which
1591 there's no change log entry yet, tsk tsk) from the list of
1592 emulations compiled in until Mark gets around to checking in
1593 emulparams/i386linux.sh.
1594 (ldemul-list.h): Depend on Makefile, so if EMULATION_OFILES is
1595 changed, this file gets updated.
1599 * ldgram.y (OPTION_Lfile): New token.
1600 (command_line_option): Accept OPTION_L NAME (whitespace after -L).
1601 * ldlex.l (<COMMAND>): Accept -L without FILENAME.
1605 * configure.in: h8/300h support needs own .mt file.
1606 config/coff-h8300h.mt: New file.
1610 * ldmain.c: Don't include sys/stat.h; it already got included
1611 somewhere along the way.
1615 * Makefile.in: Add h8300h support.
1616 emulparams/h8300h.sh: New file.
1617 scripttempl/h8300h.sc: New file.
1621 * ldfile.c (ldfile_open_file): In error message, use the name the
1622 user gave (e.g., "-lc"), rather than the base file name.
1624 * ldexp.c (exp_fold_tree): Don't assign an int to an enum.
1626 * ldmain.[ch]: Remove initial Q_ from function names.
1627 * ldexp.c, ldindr.c, ldlang.c: Change callers.
1629 * ldfile.c, ldmain.c, ldgram.y: Rename option_v to trace_file_tries.
1631 * ldlang.c (lang_process): Move loading of default script from
1632 here to main. Add a "/" to start of script name to prevent
1633 finding it in "." first.
1635 * ldmain.c (set_scripts_dir): Don't look in "." first.
1637 * ldgram.y, ldlang.c, ldsym.c: Remove traces of unused var
1642 * Makefile.in (em_m88kbcs.c): Correct dependency.
1643 * scripttempl/m88kbcs.sc: It's ARCH, not arch. Removed TARGET
1644 statement. Changed OUTPUT_FORMAT to use ${OUTPUT_FORMAT}.
1645 * emulparams/m88kbcs.sh: It's coff-m88kbcs, not m88kbcs.
1649 * ldfile.c (ldlang_open_file, ldfile_open_command_file),
1650 main.c (main): Print the errno string in the error message.
1654 * configure.in: Accept h8300h for target cpu.
1656 * ldmisc.c (vfinfo): Have demangle remove leading underscore if
1657 present (demangle is smart enough to know whether to do it or not).
1661 * ldmain.c (set_scripts_dir): Check . and <ld bin dir>/../lib for
1662 ldscripts, as well as <ld bin dir> and SCRIPTDIR.
1664 * ldlang.c (lang_process): Use sizeof instead of magic constant.
1666 * ldmain.c (get_emulation, check_for_scripts_dir,
1667 set_scripts_dir): New functions.
1672 * scripttempl/elf.sc: Include .init, .fini, .rodata sections.
1673 Create symbol "end" instead of "__end". Comment out some parts
1674 that may not be needed (yet) for elf.
1676 * configure.in: Accept sparc-elf and sparc-solaris2 configs.
1680 * Makefile.in (ALL_EMULATIONS): Include $(OTHER_EMULATIONS).
1682 * ldmisc.h (einfo, minfo, info): Don't bother with PARAMS macro
1683 when no prototype is being supplied.
1684 (ldmalloc, ldrealloc): Size argument is now size_t.
1686 * ldmisc.c (finfo): New function, accepts FILE* argument.
1687 (vfinfo, case 'v'): New format character; displays bfd_vma in hex
1688 without leading zeros.
1689 (vfinfo, cases 'R' and 'C'): Use finfo(%v) when displaying a
1690 bfd_vma value, instead of fprintf(%x) which won't hold a long long
1692 (concat, buystring): String lengths are size_t.
1693 (ldmalloc, ldrealloc, xrealloc): Size argument is now size_t.
1695 * ldlang.c (new_statement): Size argument is now size_t. Added
1696 forward declaration with prototype.
1700 * ldgram.y (OPTION_v): Don't turn on verbose output.
1704 * ldlex.l: Get rid of local typedef for bfd_vma! Get it from
1709 * Makefile.in (install): Don't install as $(tooldir)/bin/gld;
1710 collect2 doesn't look for gld any more anyhow.
1714 * ldlang.c (lang_relocate_globals): Skip indirect symbols, which
1715 now have a non NULL srefs_chain.
1717 * config/hp300hpux.mt: Use emulation hp3hpux rather than
1718 hp300hpux, since the latter does not exist.
1722 * genscripts.sh: Put the scripts in the ldscripts directory, not
1724 * configure.in (ldscripts): Make, instead of emulations.
1725 * Makefile.in (scriptdir): Take off the "ld" part.
1726 (install, clean, distclean): Use ldscripts, not emulations.
1727 In tests, don't pass -Lemulations.
1728 Don't pass tooldir/lib to genscripts.sh.
1729 * genscripts.sh: Don't take tooldir/lib arg.
1730 * ldlang.c (lang_process): Add "ldscripts/" to the name of the
1731 default script file.
1735 * scripttempl/h8300.sc: Add .tors section for constructor/destructors.
1739 * config/coff-h8300.mt: EMUL=h8300hms -> h8300.
1743 * Makefile.in (.y.c): skip default .y.c rules. gnu make can now
1744 run in parallel without colliding on yacc's static file names.
1745 Without the stub rule, make will try to start two yacc's
1746 concurrently which fails because of yacc's static file names.
1750 * ldmain.c (subfile_wanted_p): Don't dump core if there are no
1755 * genscripts.sh (LIB_PATH): Only add /usr/local/lib if it's
1756 different from libdir.
1758 * Makefile.in (scriptdir): Base on tooldir, not datadir.
1762 * ldver.c (help): New function.
1763 * ldver.h: Declare it.
1764 * ldlex.l, ldgram.y: Recognize new options --help and --version.
1768 * Makefile.in (INCLUDES): Don't need ../include any more.
1772 * ldlex.l, ldgram.y: Support new -oformat option.
1773 Remove attempt at supporting script fragments on the command line.
1774 * ldlang.c (lang_add_output_format): Take new arg, FROM_SCRIPT.
1775 * mri.c (mri_format), ldgram.y: Change callers.
1776 * ldlang.h: Change prototype.
1780 * Makefile.in: canonicalize install.sh; for use within
1781 this directory (and subdirs)
1785 * ldgram.y: Tweak grammar to make reporting of invalid options work.
1787 * Makefile.in (.cc.o): Restore .SUFFIXES entry for .cc
1792 * ldfile.c (ldfile_open_command): Don't try .ld extension.
1793 It wasn't documented (or likely used) and wastes time.
1794 (try_open): If EXTEN is empty, don't try it.
1796 * ldctor.c, lderror.c, ldexp.c, ldfile.c, ldindr.c, ldlang.c,
1797 ldlex.l, ldmain.c, ldmisc.c, ldsym.c, ldver.c, ldwarn.c,
1798 ldwrite.c, lexsup.c, mri.c, relax.c: Replace DEFUN macro calls
1799 with normal function declarations.
1801 * Move *.em to emultempl/*.em. Move *.sh to emulparams/*.sh.
1802 Move *.sc-sh to scripttempl/*.sc.
1803 * {emultempl,emulparams,scripttempl}/README: New files.
1804 * sh.em, st2000.em, z8ksim.em, h8300hms.em, h8500hms.em: Files
1805 removed, replaced with generic.em.
1806 * h8300.sh, h8500.sh, h8300.sc, h8500.sc: Renamed from
1807 h8[35]00hms.s[ch]. Change their contents to omit the "hms".
1809 * *.em (*_get_script): Return script name instead of script contents.
1810 * ldlang.c (lang_process): Change caller.
1812 * ldlex.l, ldgram.y: Recognize -m option.
1813 Check for input files after *all* options in grammar.
1814 * ldmain.c (main): Check for -m options. Add default directory
1817 * mkscript.c: File removed.
1818 * genscripts.sh: Take two more parameters, tooldirlib and libdir,
1819 to add to the default LIB_PATH.
1820 Look for input files in the new subdirectories.
1821 Create the scripts in emulations subdirectory and don't filter
1822 them through mkscript.
1823 * configure.in: Make the emulations subdirectory.
1825 * Makefile.in: Account for all of the above changes.
1826 Remove unused .SUFFIXES. Get libgcc.a path with gcc
1827 -print-libgcc-file-name instead of $(libdir)/libgcc.a.
1828 Put CFLAGS last in the compilation rules.
1829 Add -I../bfd to INCLUDES so sysdep.h is found.
1833 * Makefile.in (INCLUDES): Look in ../include, not ../bfd.
1835 * aout.sc-sh: Add SHLIB_PATH like STACKZERO. Make STACKZERO
1836 dependent on RELOCATING, not RELOCATION.
1837 * hp3hpux.sh (SHLIB_PATH): Define it.
1841 * ldfile.c (try_open): If opening without the extension fails,
1842 try with the extension even if -v or -V was given.
1843 had_script is imported (from ldgram.y), not exported.
1845 Mon Jun 14 16:26:10 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
1847 * Makefile.in: remove parentdir support, use INSTALL_XFORM
1851 * ldexp.c (exp_fold_tree): Don't lose the old flag bits.
1852 * ldgram.y (statement_list_opt): New nonterminal, either empty or
1854 (section): Use statement_list_opt, not statement_list.
1855 * m68kcoff.sc-sh: Gather constructors and destructors and define
1856 __CTOR_LIST__ and __DTOR_LIST__ appropriately.
1857 * sa29200.sc-sh: Gather constructors and destructors and define
1858 ___CTOR_LIST__ and ___DTOR_LIST__ appropriately.
1862 * Makefile.in (INCLUDES): Add -I../bfd for sysdep.h and bfd.h.
1863 * configure.in: No longer need to configure to get sysdep.h.
1865 Fri Jun 4 16:18:24 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
1867 * Makefile.in: remove install:all and install-info:info
1868 dependencies (these cause some spurious rebuilds at 'make install'
1873 * configure.in (mips-idt-ecoffl*): New target; use mips-idtl.
1874 (mips-idt-ecoff*): Added trailing '*'.
1875 * config/mips-idtl.mt: New file; use EMUL of mipsidtl.
1876 * mipsidtl.sh: New file; like mipsidt.sh, but little endian.
1877 * Makefile.in (ALL_EMULATIONS): Added em_mipsidtl.o.
1879 * config/sun3.mh (HOSTING_LIBS, HOSTING_EMU): Removed obsolete and
1880 incorrect definitions.
1884 * ldsym.c (write_file_locals): Write BSF_CONSTRUCTOR
1885 symbols, unless stripping.
1889 * Makefile.in: configure looks for ####, so remove lines with many
1891 * config/irix4.mh, config/i386v.mh: New files; set HOSTING_CRT0
1892 and HOSTING_LIBS correctly so that ``make check'' will work.
1896 * mips.sc-sh: Define _etext, _edata, and _end, in addition
1897 to etext, edata, and end. Needed for IRIX 4.0.5F.
1900 * Version 2.2.1 released.
1904 * mipsbsd.sc-sh: Renamed from aout-mipsbsd.sc-sh.
1905 * mipsbsd.sh (EMULATION_NAME): Use new file name.
1909 * Makefile.in (LDDISTSTUFF): Remove ld.mm since we can't build it
1912 * Version 2.2 released.
1916 * ldver.c (ldversion): Bump version number to 2.2.
1924 * mips.sc-sh: Don't define BSS_VAR unless relocating.
1928 * Makefile.in (mkscript.o, mkscript): Build mkscript via
1929 mkscript.o, rather than directly from mkscript.c.
1933 * configure.in: Look for ${target_makefile_frag} relative to
1934 ${srcdir}, not relative to build directory.
1936 * hppaosf.em, hppaosf.sc-sh, hppaosf.sh: New files.
1937 * configure.in: Recognize hppa*-hp-osf.
1938 * Makefile.in (ALL_EMULATIONS): Include hppaosf emulation.
1939 (em_hppaosf.c): Build it.
1940 * config/hppaosf.mh, hppaosf.mt: New files.
1942 * ld.h (ALIGN_N): Renamed from ALIGN, because that conflicted with
1943 some system header files. All uses changed.
1945 * configure.in: Recognize i386-aix configurations as i386-coff
1948 * configure.in: Recognize m68*-*-hpux.
1949 * aout.sc-sh: If STACKZERO and RELOCATING are both defined, output
1950 the value of STACKZERO.
1951 * Makefile.in (ALL_EMULATIONS): Include hp300-hpux emulation.
1952 (em_hp3hpux.c): Build it.
1953 * hp3hpux.sh, config/hp300hpux.mt: New files.
1957 * mips.sc-sh: Put constructors in the .data section.
1958 * Makefile.in (cdtest): Added dependency on ld.new.
1962 * Makefile.in: Change definition of $(tooldir) to match FSF.
1963 * vax.sh, config/vax.mt, configure.in, Makefile.in:
1964 Support VAX Ultrix and BSD.
1968 * sh.em, sh.sh, sh.sc-sh: New files supporting Hitachi SH.
1972 * ldlang.h (struct memory_region): Change `length' and
1973 `old_length' fields to bfd_size_type. Eliminate use of bfd_offset.
1974 * ldlang.c, mri.c: Corresponding changes, plus lint.
1978 * configure.in: For all i386 targets, accept i486 as well.
1982 * ldlang.c (wild_doit): Preserve all flags for a
1983 SEC_SHARED_LIBRARY section.
1984 (size_input_section): Consider any SEC_HAS_CONTENTS section when
1985 computing largest_section.
1989 * ldlang.c (lang_output_section_statement_lookup): Initialize all
1990 fields of newly created structure.
1994 * ldmain.c (g_switch_value): New variable.
1995 * ldgram.y (OPTION_G, OPTION_Gval): New tokens.
1996 (command_line_option): Accept -G and set g_switch_value.
1997 * ldlex.l (COMMAND): Accept -G.
1998 * ldlang.c (open_output): Call bfd_set_gp_size on new BFD.
2002 Support for linking and loading at different places:
2004 * ldlex.l: Add "AT" keyword.
2005 * ldgram.y: Cleanup, and parse AT.
2006 * ldlang.c (print_output_section_statement): Print output address
2007 of section in map. (lang_size_sections): Fill sections' lma with
2009 * ldlang.h (lang_output_section_statement_type): Add load_base
2012 * ldindr.c (add_indirect): Keep more information in the alias
2014 * ldlang.c (wild_doit): Don't inherit NEVER_LOAD section
2015 attribute from an input section.
2016 * ldmain.c (Q_enter_file_symbols): Common section is NEVER_LOAD by
2017 default. (Q_enter_file_symbos): Indirect symbols now are known by
2018 their section, not a special symbol flag.
2019 * ldsym.c (write_file_locals): Indirect symbols aren't local.
2020 (write_file_globals): Write the mapping for an indirect symbol.
2021 * relax.c (build_it): When forced to write a NEVER_LOAD section,
2026 * ld.texinfo: changes for q1
2028 Tue Mar 23 00:13:29 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2030 * Makefile.in: add dvi target, define & use TEXI2DVI, add installcheck
2032 Mon Mar 8 20:30:35 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2034 * Makefile.in: rename HOST_CC to CC_FOR_BUILD
2038 * mips.sc-sh: Added variables which may be overridden by a
2040 * mipsidt.sh: New file; emulation for IDT MIPS board.
2041 * Makefile.in (ALL_EMULATIONS): Added em_mipsidt.o.
2042 (em_mipsidt.c): New target. Uses mipsidt.sh and mips.sc-sh.
2043 * config/mips-idt.mt: New file; sets EMUL to mipsidt.
2044 * configure.in (mips-idt-ecoff): New target; uses mips-idt.
2048 * aout-mipsbsd.sc-sh, mipsbsd.sh: New files from Ralph Campbell,
2050 * i386bsd.sh, config/i386bsd.mt: New files.
2051 * configure.in, Makefile.in: Added support for mipsbsd and 386bsd.
2055 * mri.c: Add extern declaration of strdup.
2056 * ldsym.c (KEEP macro): Add spaces around '=' for the
2057 sake of old (e.g. PCC) compilers.
2061 * ldver.c: Bump to version 2.1.
2065 * ldgram.y: allow section types without address expressions.
2066 * ldlang.c (lang_relocate_globals): avoid possible hang with
2067 undefined but unreferenced symbols.
2068 * relax.c (relax_section): don't complain if the script file isn't
2069 relaxable but -relax is set
2071 Thu Feb 18 17:58:45 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2073 * configure.in: go32 is the 3rd part of the triple, not the 2nd
2077 * mipsbig.sh: New file. Big endian MIPS emulation.
2078 * config/mips-big.mt: New file. Use mipsbig emulation.
2079 * configure.in (mips-sgi-irix*): Use target mips-big.
2080 * Makefile.in (ALL_EMULATIONS): Added em_mipsbig.o.
2081 (em_mipsbig.c): New target. Uses mipsbig.sh.
2085 * mips.sc-sh: Put .scommon sections into .sbss section.
2087 * ldmain.c (subfile_wanted_p): Preserve section of common symbols,
2088 rather than always putting them in bfd_com_section.
2089 * ldlang.c (lang_common): If a common symbol is not in
2090 bfd_com_section, put in a section of the same name, rather than
2091 always putting it in section COMMON.
2095 * ldmain.c (subfile_wanted_p): If we already have a common
2096 definition of a symbol, don't necessarily pull in an object file
2097 that provides a non-common definition.
2099 * ldlex.l (COMMAND): Accept -EB and -EL command line arguments,
2100 returning OPTION_EB and OPTION_EL. gcc passes these to a MIPS
2102 * ldgram.y (OPTION_EB, OPTION_EL): New tokens.
2103 (command_line_option): Accept and ignore OPTION_EB and OPTION_EL.
2107 * Makefile.in (install): Remove $(tooldir)/bin/gld before creating
2112 * ldmain.c, ldsym.c: Use new bfd_is_com_section macro rather than
2113 checking for equality to bfd_com_section.
2117 * mips.sc-sh: New file. Ultrix, and hopefully other MIPS ECOFF
2118 targets, linker script.
2119 * mipslit.sh: New file. Little endian MIPS emulation.
2120 * config/mips-lit.mt: New file. Use mipslit emulation.
2121 * configure.in (mips-dec-ultrix*): Use target mips-lit.
2122 * Makefile.in (ALL_EMULATIONS): Added em_mipslit.o.
2123 (em_mipslit.c): New target. Uses mipslit.sh.
2127 * Makefile.in (install): Install ld as both $(tooldir)/bin/ld and
2128 $(tooldir)/bin/gld, so that gcc can find it with or without
2133 * ldwrite.c: Removed perform_relocation, copy_and_relocate, and
2134 write_norel. All linking is now done via write_relax. Call
2135 ldsym_write before calling write_relax.
2136 * relax.c: Added copyright.
2137 (write_relax): Renamed from write_relaxnorel. Added relocateable
2138 argument. seclet_dump renamed to bfd_seclet_link.
2139 * relax.h: Added copyright.
2143 * ldmain.c (decode_library_subfile): Patch from
2146 Fri Jan 8 18:04:33 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2148 * config/vxworks960.mt renamed to config/i960.mt
2150 * configure.in: sparc-aout emulates a sun4, as does
2151 sparc*-vxworks, i960-nindy uses gld960 emulation
2155 Fix support for NOLOAD, add INCLUDE
2156 * ldfile.c (ldfile_open_command_file): pass file name to
2158 * ldlex.l, ldgram.y: tidy up, parse INCLUDE and NOLOAD
2159 * ldlang.c (wild_doit): make output sections inherit NEVER_LOAD
2162 Thu Jan 7 10:22:19 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2164 * Makefile.in, config.h: no more default emulation. Make the lack
2165 of emulation a compile time error
2167 Wed Jan 6 01:08:37 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2169 * configure.in: recognise all sparclite variants, not just 'sparclite'
2173 * m68kcoff.sc-sh: define _end as well as end, for consistency with
2176 * configure.in: accept *-ericsson-ose for any m68k CPU.
2178 * ldwrite.c (write_rel): don't always set SEC_HAS_CONTENTS flag
2179 for each output section.
2183 * ldexp.c, ldlang.c, ldmain.c, ldsym.c, ldwarn.c: Use new
2184 macro bfd_asymbol_bfd as appropriate.
2185 * Makefile.in: Un-duplicate ldlex.c dependency.
2186 * condigure.in: Replace my_host case table by sourcing
2187 ../bfd/configure.host. Allow std-host as the default.
2188 * ldmisc.c: Change logic for C++ name demangling: There is
2189 no initial '_' to remove from stab-derived function names.
2193 * ldlang.c (lang_init_script_file): don't attach the output file
2194 sections to the script file.
2197 * ldlang.c (wild): run expansion loop over command line bfd too.
2198 (lang_ini_script_file): initialize more parts of the command line
2200 * ldlex.l: fix DEFINED start states.
2204 * ld.texinfo: new doc.
2205 * ldgram.y, ldlex.l: understand -y<symbol>
2206 * ldmain.c (Q_enter_file_symbols): if had -y, lookup symbol and
2207 print info. (add_ysym): new function.
2208 * ldsym.h: (ldsym_type): new define SYM_Y.
2212 * ldctor.h, lderror.h, ldexp.h, ldfile.h, ldindr.h, ldlang.c,
2213 ldlang.h, ldlex.h, ldmain.h, ldmisc.h, ldsym.h, ldver.h, ldwarn.h,
2214 ldwrite.h, relax.h: Replace all uses of EXFUN and PROTO ansi-glue
2215 macros with PARAMS. Recreational cleanup. Update copyrights.
2217 Tue Nov 10 00:23:37 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2219 * Makefile.in: pass down the bfd source directory for includes
2223 * ldlang.c (lang_size_sections): don't change size and address for
2224 SEC_SHARED_LIBRARY sections rather than for SEC_NEVER_LOAD
2229 * relax.c (build_it): re-enable the processing of data_statements
2230 in scripts, makes counted contructor lists work again.
2234 * ldemul.h: Remove uses of SDEF and PROTO macros (use PARAMS).
2238 * m68kcoff.sc-sh: don't use initial underscores for etext, edata
2243 * Support for i386-sysv.
2244 configure.in: check for i386-*-sysv* and i386-*-sco*.
2245 i386coff.sc-sh: rewrote to support SVR3 by default.
2246 ldctor.c (find_constructors): preserve stat_ptr.
2247 ldlang.c (wild_doit): initialize vma and size of new output
2248 section to corresponding input section. This is required for
2249 shared library support.
2250 (lang_size_sections): don't modify vma and size of sections which
2251 are never loaded (for shared libraries).
2252 ldwrite.c (copy_and_relocate): copy the contents of any section
2253 which has contents, not just sections which are loaded (for shared
2258 * ldlang.c (size_input_section): count the sizes of all sections
2263 * ldmisc.c (demangle,vfinfo): use the new underscore in bfd to
2264 to demangle symbols better
2268 * ldlang.c (lang_finish): don't warn if -e start symbol does not
2269 exist when linking with -r.
2273 * aout.sc-sh, m68kcoff.sc-sh: set __bss_start to the start of the
2278 * ldmain.c (linear_library): don't even think about processing
2279 an object file if it's already been done
2281 Thu Oct 1 23:14:59 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2283 * configure.in: the hp9000/300 config file is now hp300
2287 * config/z8ksim.mt: new file
2291 * Makefile.in (ldexp.o, ldctor.o, ldlang.o, ldmain.o, ldwrite.o,
2292 lexsup.o, mri.o, relax.o): Indicate dependence on ldgram.h.
2294 * ld.h (strip_symbols_type): Add value STRIP_SOME.
2295 * ldgram.y (OPTION_RETAIN_SYMBOLS_FILE): New terminal token.
2296 * ldlang.c (lang_add_keepsyms_file): New function.
2297 * ldlex.l: Handle "-retain-symbols-file".
2298 * ldsym.c (keepsyms_file, kept_syms): New vars.
2299 (process_keepsyms): New functihon; reads file, marks symbols for
2301 (write_file_locals): File symbols should always be kept.
2302 (ldsym_write): Warn about "-retain-symbols-file" overriding "-S"
2303 and "-s". Process retain-symbols file before setting symtab.
2304 * ldsym.h (SYM_KEEP): New flag for ldsym_type flags.
2305 (keepsyms_file, kept_syms): Declare them.
2307 * ldmain.c (main): Non-fatal errors should still cause non-zero
2308 exit status even with -r.
2312 Added initial support for the z8k
2313 * z8ksim.em, z8ksim.sc-sh, z8ksim.sh: new files
2314 * configure.in, Makefile.in: modified to reflect above
2316 * ldlang.c (lang_check): when linking conflicting architectures,
2317 make the output file reflect at least one of the bad inputs.
2321 * Makefile.in (install): if $(tooldir) exists, install ld in
2326 * Makefile.in, configure.in: modified to support i386-coff
2327 * i386coff.sh: new file
2331 * Makefile.in, m68kcoff.sh, m68kcoff.sc-sh, config/m68k-coff.mt:
2332 added m68k-coff emulation mode, stolen from a29k emulation.
2333 Almost certainly wrong, but perhaps better than sun3.
2337 * Makefile.in, Makefile.dos, generic.em, genscripts.sh,
2338 gld960.em, h8300hms.em, h8300xray.em, lnk960.em, st2000.em,
2339 vanilla.em: Rename all (generated) ld__*.c files to em_.c.
2340 This is one character shorter, and lets people build on
2341 SVR3 system. (ld__h8300xray.[co] was the killer there;
2342 h8300xray.sc-sh is also overlong, but seems harmless.)
2343 Based on a patch from Jonathan Ryshpan <hitachi!amito!jon>.
2344 * Makefile.in (clean): Fix typo mostclean -> mostlyclean.
2345 * configure.in: Add host isc.
2347 * ldver.c: Call it version 2.0.
2351 * ldver.c: Bump to version 0.98.
2354 * Makefile.in: Added mostlyclean, distclean, realclean rules.
2358 * ldmisc.c (xrealloc): New (needed by ../libiberty/cplus.dem.c).
2359 * ldlex.l: Moved comment() to end, since some compilers
2360 otherwise have problems with input() used before it is defined.
2362 Tue Sep 1 17:45:51 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2364 * configure.in: added Solaris 2 and Irix 4 host support.
2366 Mon Aug 31 19:27:11 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2368 * Makefile.in: remove -S flag from the FLEX definition
2370 * configure.in: rewrote, using new style case statement. use
2371 m68k.mt for m68k-aout systems
2375 * Makefile.in: map "ld" through program_transform_name when
2380 * cplus-dem.c: Removed. Use the version in libiberty now.
2381 * ldmisc.c: Use new libiberty version of cplus_demangle().
2385 * gld960.em (gld960_choose_target): default to little endian, not
2390 * ldlang.c (lang_process): don't pass null pointers when
2391 abs_output_section is what is required.
2392 * ldwrite.c (ldwrite): use malloc to allocate the largest space
2393 used, and pass that down.
2394 * relax.c,relax.h (write_relaxnorel): use the passed malloc area rather
2399 * configure.in, config/ose68.mt: renamed OSE to ose.
2403 * ldsym.c (write_file_locals): Reorder check for common or
2404 undefined symbols so that it works.
2408 * configure.in: accept all m68K family members.
2410 * Makefile.in: always create installation directories.
2414 * ldlex.l: now parses comment correctly, added ~ to acceptable
2417 * ldexp.c (exp_unop): pass down abs_output_section - now can have
2418 unary -ve constants.
2420 * ldlang.c (lang_finish): warn when an entry symbol supplied on
2421 the command line can't be found.
2425 * ldlang.h: add new field "loadable" to output_section_statement.
2426 * ldlang.c (lang_output_section_statement_lookup): initilize new
2427 field. (wild_doit): if new field is not set, then stop output
2428 section from being loadable.
2429 (lang_enter_output_section_statement): set the field from the
2431 * ldgram.y: new synax for NOLOAD. Removes a shift/reduce too.
2432 * h8300hms.sc-sh, h8300hms.em: get -r right.
2436 * ldint.texinfo: New internals manual (beginnings thereof).
2437 * PORTING: Removed, merged into ldint.texinfo.
2441 * cdtest-main.cc, cdtest-func.cc, cdtest-foo.h, cdtest-foo.cc,
2442 cdtest.exp: A test program (copied from libg++/test-install)
2443 that tests that constructor and destructors are handled
2446 Mon Aug 3 14:58:19 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2448 * Makefile.in (install): install from ld.new, renaming during the
2449 copy, or else the next 'make install' needs to re-link ld.
2453 * configure.in: generalise hp recognition (from sef).
2455 Sat Jul 18 14:46:04 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2457 * configure.in: recognize bsd and hpux hppa configurations.
2458 error messages echo to stderr, not stdout
2462 * Makefile.dos, gld.1, ld.texinfo, ldemul.c, ldfile.c, ldlang.c,
2463 ldmisc.c: removed rcsid's.
2467 * ldlang.c (lang_map): print changes in sizes due to relaxing
2468 (size_input_section): maintain the delta information.
2469 * ldlang.h: add new field to struct to contain delta info.
2470 * relax.c (relax_section): complain if input not relaxable.
2471 * ldlex.l : add '_', ',' and '$' to chars which can appear at the
2476 * ldmain.c(main): prevent -r and -relax from being on at the same
2481 * ldmain.c (Q_enter_global_ref), ldindr.c (add_indirect): fix for
2487 * h8300hms.em, h8300hms.sc-sh: do the right thing for -r
2489 * ldlang.c(open_output): set the target arch and machine as soon
2490 as we can. (lang_size_sections): use new macros for setting vma
2495 * configure.in (my_target): Accept m680?0 for wrs as vxworks68.
2496 Also deleted an unreachable path to wrs.
2500 * Makefile.in (install): use -d test for $tooldir before
2501 installing ld there so that $tooldir can be inherited from
2506 * ldlang.c: Two non-substantial changes for the sake of
2507 the old Portable C Compiler.
2511 * ldgram.y, ldlex.l: parse ABSOLUTE
2512 * ldexp.c: add support for ABSOLUTE
2516 * Makefile.in: Added default definitions for HOSTING_CRT0,
2517 HOSTING_LIBS, and HOSTING_EMU, based on those in config/*.mh.
2518 * config/*.mh: Miscellaneous clean-up: Removed definitions
2519 of YACC (since it is not longer used in the Makefile).
2520 Remove HOSTING_* definitions that are subsumed by the
2521 ones added to Makefile.in. Removed most definitions of CC.
2522 * config/{sparc,news,hp300bsd,decstation}.mh: Removed;
2523 These are no longer needed.
2527 * Makefile.in: Use srcdir instead of VPATH in ldgram/ldlex
2528 rules, since these are used when building a distribution.
2529 * Makefile.in (ldlex.c): Don't re-direct output, since that
2530 leaves a bogus output files if it fails.
2532 * config/sparc.mh: Fix HOSTING_LIBS so it has a chance of working.
2533 * ldlex.c: Fix some unnecessary flex-specific-isms.
2537 * ldgram.y: move spurious semicolon
2538 * ldexp.h: fix prototype
2542 * ld.texinfo: references to linker now say "ld" not "gld".
2546 changed calling convention for Q_enter_global_ref
2547 * ldexp.c, ldlang.c, ldmain.c: reflect this
2548 * ldver.c: bump version to 1.97.1
2549 * ldindr.c (add_indirect): when an edict declaring an indirect
2550 symbol is found, make sure that any ideas about the symbol being
2551 common are changed if it now known to be defined.
2552 * ldmain.c (linear_library): complain once if archive isn't
2554 * ldlang.h, ldlang.c: make room for and initialize the complain
2559 * Makefile.in: use flex & bison from ../ if they exist.
2563 * relax.c (build_it): don't allocate space in the output file for
2564 stuff if -R flag applys to it.
2565 * ldfile.c: merge in VMS filename support
2566 * ldmain.c (main): take out ./ from library path, and close file
2567 before unlinking. Make multiple defs of a symbol create an
2569 * ldmisc.c: fatal errosrs delete output file
2573 * ldver.c: Increase version number to 1.97, for consistency
2578 * Makefile.in: FLEX -> LEX.
2580 * ld.texinfo: {} -> @{@}.
2584 * ld.texinfo: describe alternate, MRI-compatible linker scripts
2585 (and associated change in -c option, now used for these scripts)
2589 * ldver.c: Bumped version to 1.96 - new release, resync with the
2591 * ldexp.c, ldlang.c: now build memory shape tree in obstacks
2592 rather than with raw malloc, makes it easier to track where memory
2594 * ldsym.h, ldsym.c: create obstack for all global symbols too.
2595 * ldwrite.c (ldwrite): moved malloc so only used when needed.
2596 * sa29200-sc.sh: added support for .lit, data1 and data2 sections.
2601 * config/sparc.mh: use ../gcc/libgcc.a on check if it exists.
2603 * Makefile.in: use bootstrap for check.
2607 * ldgram.y, ldlex.c, mri.c: added more compatible words; BASE, ALIAS and
2609 * Makefile.in: now use flex, not lex
2610 * ldlex.l, ldlang.c, ldctor.c: lint
2614 * ldlex.l: added CMDFILENAMECHAR state so that you can lex
2615 different sorts of filenames on the command line than in a script.
2619 * Makefile.in: rework CFLAGS so that they can be passed on the
2620 make command line. Remove MINUS_G. Default CFLAGS to -g.
2624 * relax.c: added handling for new "padding" seclet type, used to
2625 fill out gaps between section.
2626 * ldgram.y, ldlex.l: now -defsym on the command line is done
2631 * Makefile.in: the tooldir copy of ld goes directly in tooldir.
2635 * mri.c, ldgram.y, ldlex.l: added support for minimal strange link
2640 * Makefile.in (install): Install second copy in $(tooldir)/bin
2641 without $(program_prefix), since that's what gcc expects.
2645 * ldlex.l, ldgram.y, ldlex.h: Rewrote lexer. Now it's much nicer.
2646 * h8300*: fix bit rot and add support for h8300xray target
2647 * go32.sh: target emulation for go32.
2651 * gld960.em, i960.sc-sh. Fix i960 bit rot
2655 * Makefile.in: install man page.
2659 * config/mt-<foo> renamed to <foo>.mt
2660 * config/mh-<foo> renamed to <foo>.mt
2661 * configure.in changed to reflect this
2662 * genscripts.sh now make .xbn files rather than .xN files
2666 * ldver.h: fix decl of ldversion.
2670 * Makefile.in: added check target.
2674 * ldmain.c (Q_enter_file_symbols): now aliases work again
2678 * Makefile.in: added clean-info target.
2682 * ldexp.c (exp_print_tree): don't try and follow null pointers
2684 * ldgram.y: remove 11 shift reduce errors
2688 * Makefile.in: added tooldir and program_prefix.
2690 Fri Feb 28 08:17:45 1992 Steve Chamberlain (sac at thepub.cygnus.com)
2692 * ldlang.c (size_input_section): don't move absolute sections
2696 Thu Feb 27 09:20:41 1992 Steve Chamberlain (sac at thepub.cygnus.com)
2698 * cplus-dem.c: yet another copy of this - maybe it should go into
2700 * ldgram.y: now -V and -v have different actions
2701 * ldver.c: if -V, prints list of emulations compiled in
2702 * ldmisc.c: support for cplus demangling
2707 * Makefile.in, configure.in: removed traces of namesubdir,
2708 -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced
2709 copyrights to '92, changed some from Cygnus to FSF.
2711 Thu Feb 20 17:43:46 1992 Per Bothner (bothner at cygnus.com)
2713 * Makefile.in: Change mkscript rule into one for ./mkscript
2714 (for the sake of makes that don't realize they're the same).
2715 * PORTING: Add more details.
2716 * genscripts.sh: Add more tailorability of DATA_ALIGNMENT.
2718 Mon Feb 17 12:04:36 1992 Per Bothner (bothner at cygnus.com)
2720 * Makefile.in, and new files hp300bsd.sh, config/mh-hp300bsd,
2721 config/mt-hp300bsd: New port to hp300 running BSD.
2723 Sat Feb 15 13:59:54 1992 Per Bothner (bothner at cygnus.com)
2725 Major rewrite of how ld is configured. The major idea
2726 is to use shell scripts to generate everything.
2727 * generic.em replaces ldtemplate.
2728 * Other *.em files replace various *.c files.
2729 A *.em file is a shell script that generates the corresponding
2730 ld__*.c file that implements an emulation. This is usually
2731 a straight 'cat' of a here-document, possibly with substitutions.
2732 * Script files (*.sc) are places by *.sc-sh scripts.
2733 Again, these are simple shell scripts that 'cat'
2734 here-documents, usually with some substitutions.
2735 The output a *.sc-sh is a script file.
2736 * Each emulation is defined by a short shell script with
2737 extension *.sh that specifies the emulation-specific
2738 parameters (such as the name of the *.sh-sc and *.em
2740 * genscript.sh is the master shell script used to generate
2741 an emulation. It is passed various argument, including
2742 the name a the emulation-speciic *.sh file that it
2743 "sources" to set variables to emulation-specifc parameters.
2744 * config/mt-foo: Changed EMUL=GLDFOO_EMULATION_NAME
2745 to EMUL=foo. (The GLDFOO_EMULATION_NAMEs have bee removed.)
2746 * config/mh-foo: Rename LDEMULATION names as appropriate
2747 (usually 'gldfoo' -> plain 'foo').
2748 * ldwrite.c: Fixed a typo in a comment.
2749 * Makefile.in: Major changes. Removed some the sed
2750 magic to converts scripts, since that is now handled
2751 by genscripts.sh and the *.sc-sh scipt generators.
2752 * config.h: Remove a bunch of macros defining emulations
2753 and targets. This becomes one less file to edit when
2754 adding emulations or targets.
2755 * ldemul.h (struct ld_emulation_xfer_struct): Add
2756 emulation_name and target_name fields.
2757 * ldemul.c, ldemul.h: Define some default functions used
2758 by most emulations (and remove from the *.em scripts).
2759 * ldemul.c (ldemul_choose_target): Search the new
2760 ld_emulations array using a loop (instead of a hardwired
2761 nested if statement).
2762 Define the ld_emulation from the automatically-geenrated
2763 ldemul-list.h. This means you no longer have to edit ldemul.c
2764 to add a new emulation.
2765 * ldmain.c: Replace {GLD,LNK}960_EMULATION_NAME by
2766 their expansions, since the former no longer exist.
2767 * PORTING: A very rough first draft of a porting guide.
2769 * ldgram.y, ldlex.l, lexsup.c: Changes to allow an assignment
2770 to be terminated by a new-line (instead of requiring a semicolon).
2772 Mon Feb 10 16:21:02 1992 Steve Chamberlain (sac at rtl.cygnus.com)
2774 * ldexp.c, ldlang.c: added new idea "abs_output_section", removes
2775 tests for NULL pointers all over the place.
2776 * ldlang.c (lang_process): remember to relocate global symbols
2777 *after* relaxing has done it stuff.
2779 Thu Feb 6 11:40:15 1992 Steve Chamberlain (sac at rtl.cygnus.com)
2781 * config/mt-coff-h8300: use EMUL like everything else
2782 * ldlang.c: (print_padding_statement): print the right address.
2783 * Makefile.in, config.h, ldemul.c: renamed h8300hds to h8300hms
2786 Tue Feb 4 15:28:01 1992 Steve Chamberlain (sac at rtl.cygnus.com)
2788 * ldlex.l: Put pack -noinhibit-exec and -sort-common
2789 * ldlang.c (print_data_statement): print the right address.
2791 Thu Jan 30 17:51:53 1992 Per Bothner (bothner at cygnus.com)
2793 * Makefile.in: The rule for testing ld by re-linking itself
2794 via an intermediate -r link was moved to the ld1 rule
2795 instead of the ld2 rule. This allows ld2 and ld3 to be identical,
2796 which allows the bootstrap rule to work.
2797 * ldctor.c (find_constructors): Don't create a constructor
2798 list if it is already defined (as would happen if ld is
2799 invoked by collect).
2801 Wed Jan 29 08:35:39 1992 Steve Chamberlain (sac at rtl.cygnus.com)
2803 * config/mh-sparc.h: now uses libgcc.a
2804 * ldmain.c: quit using exit
2805 * *sc: use *(COMMON) rather than [COMMON]
2806 * ldlex.l, lexsup.c: much thinking moved from .l and put into .c,
2807 to allow preprocessing of .l file.
2808 * Makefile.in: New ldlex.l mangling
2809 * ldexp.c (fold_binary): perform expressions with % and / in
2811 * ldfile.c (open_a): open archives on VMS in a special way
2814 Tue Jan 28 10:18:16 1992 Steve Chamberlain (sac at rtl.cygnus.com)
2816 * ldgram.y: map -M behave in the same way as -Map (sets file name
2818 * ldsym.c, ldlang.c: remember that size of a section is dependent on
2819 whether or not relaxing has been done.
2820 * ldmain.c: don't open a map file if it doesn't have a name
2821 * relax.c: all the brains have moved into bfd.
2822 * ldwrite.c: ammend comment
2824 Fri Jan 24 14:23:46 1992 Steve Chamberlain (sac at rtl.cygnus.com)
2826 * Makefile.in: added relax, also made three stage go through a
2829 * config.h: if GNU960 defined, then default emulation mode is
2831 * ldexp.h, ldexp.c: map to file hooks
2832 * ldlang.c: map to file hooks
2833 * ldgram.y: added -Map -relax
2834 * ldlex.l: added -relax, -Map
2835 * ldmain.c: open map file
2836 * ldmisc.c: support for map file
2837 * ldwrite.c: new relax magic
2839 Thu Dec 19 18:49:51 1991 John Gilmore (gnu at cygnus.com)
2841 * Makefile.in, config/tm-*.h: Clean up make output, only
2842 pass DEFAULT_EMULATION to ldmain.c.
2844 Wed Dec 18 15:02:47 1991 Per Bothner (bothner at cygnus.com)
2846 * ldver.c: Bump to version 1.94.
2848 Tue Dec 10 04:07:23 1991 K. Richard Pixley (rich at rtl.cygnus.com)
2850 * Makefile.in: infodir belongs in datadir.
2852 Mon Dec 9 16:26:43 1991 Per Bothner (bothner at cygnus.com)
2854 * Makefile.in: Pass -y to bison. (Again;
2855 accidentally deleted by Rich.)
2856 * news.sc, ldgld68k.sc: Define __end as well as _end.
2858 Sat Dec 7 17:19:26 1991 Steve Chamberlain (sac at rtl.cygnus.com)
2860 * ldindr.h: added to contain prototypes of ldindr.c
2861 * ldfile.c: include ctype.h
2862 * ldmain.c: include the requried prototype headers
2863 * ldwrite.c: get_reloc_upper_bound has been renamed
2864 bfd_get_reloc_upper_bound
2866 Fri Dec 6 23:29:26 1991 K. Richard Pixley (rich at rtl.cygnus.com)
2868 * Makefile.in: punt "fundamental" mode because it breaks my emacs
2869 macros. install using INSTALL_PROGRAM and INSTALL_DATA. remove
2870 spaces following hyphens, bsd make can't cope. added
2871 standards.text support and made it look like all the other
2874 * configure.in: configure now runs entirely in objdir so make file
2875 existence checks against ${srcdir}. Mark this directory as
2878 Thu Dec 5 22:46:16 1991 K. Richard Pixley (rich at rtl.cygnus.com)
2880 * Makefile.in: idestdir and ddestdir go away. Added copyrights
2881 and shift gpl to v2. Added ChangeLog if it didn't exist. docdir
2882 and mandir now keyed off datadir by default.
2884 Wed Dec 4 23:36:55 1991 Per Bothner (bothner at cygnus.com)
2886 * ldver.c: Bumped version to 1.93.
2887 * Makefile.in: Pass -y to bison.
2889 Mon Nov 25 18:28:40 1991 Steve Chamberlain (sac at cygnus.com)
2891 * config.h: h8 is now coff, not ieee
2892 * h8300hds.sc: reflect the same
2894 Thu Nov 14 19:55:09 1991 Per Bothner (bothner at cygnus.com)
2896 * ldver.c (ldversion()): Update to 1.92.
2897 * ldctor.c: There are two places constructor sets
2898 can be defined. One of them checked for an existing
2899 duplicate, the other didn't. Unfortunately, the latter
2900 was called after the former ...
2901 So, factor out code for inserting a new element into
2902 constructor_name_list (after checking for a duplicate)
2903 into a new function add_constructor_name, and call
2904 it from both aforementioned places (ldlang_add_constructor
2905 and ldlang_check_for_constructors).
2907 Wed Nov 13 15:17:43 1991 Per Bothner (bothner at cygnus.com)
2909 * Makefile.in: Rename .c files generated from ldtemplate
2910 to have names starting with ld__. This helps 'make clean'.
2912 Tue Nov 12 18:36:50 1991 Steve Chamberlain (sac at cygnus.com)
2914 * Makefile.in: Take out the version number for install
2915 * m88kbcs.sc: put in contructor blocks.
2917 Mon Nov 11 18:47:33 1991 Per Bothner (bothner at cygnus.com)
2919 * ldmisc.c, ldmisc.h: Re-write info() to take a filename
2920 parameter, a format, and an arg pointer, and rename it to
2921 vfinfo(). Write info() in terms of new vfinfo().
2922 New einfo() is the same as info(), except it writes to stderr.
2923 * ldemul.c, ldexp.c, ldlang.c, ldlnk960.c, ldmain.c, ldwrite.c,
2924 ldmisc.c: Replace "error" calls to info() by new einfo().
2926 Mon Nov 11 09:57:32 1991 Steve Chamberlain (steve at cygnus.com)
2928 * ldlex.l ldgram.y: made -V option do same as -v
2929 * Makefile.in: Added $(MINUS_G) flag so debugging can be
2932 Sun Nov 3 16:37:37 1991 Steve Chamberlain (steve at cygnus.com)
2933 i386 aout changes from Bob Kukura
2934 * Makefile.in, config.h: added i386aout support
2935 * configure.in: fixed /h-{myhost} typo
2936 * ldgram.y: -MM now gives more boring map.
2937 * ldlang.c: now does D_PAGED flag the right way.
2938 * ldsym.c: -MM flags does the right thing.
2940 Sun Nov 3 15:00:03 1991 Per Bothner (bothner at cygnus.com)
2942 * configure.in: Fixed typo. Also, a fix for hp300bsd.
2943 * ldlang.c (init_os): Compensate for BFD change,
2944 where bfd_make_section now returns NULL for a duplicate
2945 section request, instead of the old section.
2947 Thu Oct 17 15:27:13 1991 Per Bothner (bothner at cygnus.com)
2949 * ldver.c: Bump to version 1.91 (consistent with binutils).
2951 Wed Oct 16 12:27:08 1991 Per Bothner (bothner at cygnus.com)
2953 * Makefile.in, config.h, ld.h, ldemul.c, ldexp.c, ldexp.h,
2954 ldgram.y, ldlex.l, ldlnk960.c, ldmain.c, ldmisc.c, ldmisc.h,
2955 ldsym.c, ldsym.h, ldtemplate, ldvanilla.c, ldver.c, ldver.h,
2956 ldwarn.c, ldwarn.h, ldwrite.c, ldwrite.h, mkscript.c:
2957 Add or update copyright notices.
2959 Mon Oct 14 23:55:27 1991 Per Bothner (bothner at cygnus.com)
2962 * Makefile.in: Changed installation directory name scheme
2963 to be consistent with gcc. Also changed 'install'.
2965 Mon Oct 14 17:30:02 1991 Roland H. Pesch (pesch at cygnus.com)
2967 * Makefile.in: new targets ld.mm, ld.me
2969 Mon Oct 14 17:27:24 1991 Per Bothner (bothner at cygnus.com)
2971 * Makefile.in, ldtemplate: Need to use separate scripts
2972 for -n and -N options. Yet more complication.
2974 Fri Oct 11 22:40:46 1991 John Gilmore (gnu at cygnus.com)
2976 * Makefile.in: Avoid using $< in explicit Make rules (it doesn't
2977 work). Add some lines to avoid Sun Make VPATH bugs.
2979 Fri Oct 11 16:42:22 1991 Per Bothner (bothner at cygnus.com)
2981 * news.sc: Add alignment for data segment.
2982 * ldtemplate: Add (yet another) script to get for -n or -N
2983 options. (These need different alignment than ZMAGIC files.)
2984 * Makefile.in: Add stuff for new foo.xn scripts.
2985 These are generated by replacing "ALIGN(0x...00)" by ".".
2987 Fri Oct 11 15:43:04 1991 Roland H. Pesch (pesch at cygnus.com)
2989 * Makefile.in: new targets ld.ms, ld-index.ms
2990 ld.texinfo: remove tabs, other cleanups for texi2roff
2992 Fri Oct 11 13:51:54 1991 Per Bothner (bothner at cygnus.com)
2994 * ldmain.c (main): Make config.magic_demand_paged be true
2995 by default. Don't the WP_TEXT and D_PAGED flags of
2996 output_bfd here; it's too late, so set it when output_bfd
2997 is created (in ldlang.c). Also fix setting of EXEC_P flag
2998 * ldlang.c (ldlang_open_output): Set output_bfd->flags here.
2999 * ldlang.c: Remove some duplicate extern declarations.
3000 * ldgram.y: Fixes to -N and -n options.
3001 * Makefile.in: Recognize upper case letters in sed script
3002 to remove assignments from script files.
3003 * ldtemplate: Don't assukme that -N or -n options
3004 imply use of -r script.
3005 * mkscript.c: Tweaking to correctly handle \n and \\ in input.
3007 Fri Oct 11 10:29:27 1991 Steve Chamberlain (steve at cygnus.com)
3009 * ldtemplate: include bfd.h before sysdep.h.
3011 Fri Oct 11 04:24:45 1991 John Gilmore (gnu at cygnus.com)
3013 Restructure configuration scheme for bfd, binutils, ld.
3015 * include/sys/h-*.h: Move to bfd/hosts/h-*.h.
3016 * configure.in: Revise to symlink sysdep.h to ../bfd/hosts/h-xxx.h.
3017 Change some config names to match other dirs.
3018 * *.c: Include bfd.h before sysdep.h, so ansidecl and PROTO()
3020 * config/: Rename some config files to match up h-*.h names.
3021 Remove all the HOST_SYS definitions from the config files.
3023 Tue Oct 8 16:00:57 1991 Per Bothner (bothner at cygnus.com)
3025 * ldexp.h, ldlang.h: Change enum boolean -> enum bfd_boolean.
3026 * ldtemplate: Remove ldfile_add_library_path calls;
3027 just use the SEARCH_DIR commands in the script files.
3028 * Makefile.in: Add LIB_PATH macro, which if set is used to replace
3029 the SEARCH_DIR commands in the scripts (using ugly sed magic).
3030 This is primarily intended for cross-linking, where you would
3031 place libaries in a different place than native libraries.
3032 Also, emulations made from ldtemplate now use $(srcdir).
3033 * ldglda29k.sc: Change SEARCH_DIR commands to a conventional
3034 form; people can use the Makefile's LIB_PATH to override.
3036 Tue Oct 8 14:51:21 1991 Roland H. Pesch (pesch at cygnus.com)
3038 * Makefile.in: fix target ld.dvi, add target ld.info
3039 ld.texinfo: make info filename ld.info
3041 Fri Oct 4 21:51:58 1991 John Gilmore (gnu at cygnus.com)
3043 * Makefile.in: Avoid using $< in non-suffix rules (breaks on Sun
3045 * ldfile.c, ldlang.c, ldmain.c, ldwrite.c: Cope with renames of a
3046 few BFD types & enums.
3053 version-control: never