3 * Makefile.in (emn10200.c): Add dependencies.
4 * configure.tgt: Handle mn10200.
5 * emulparms/mn10200.sh: New file.
9 * emultempl/gld960c.em: Include <ctype.h>.
10 (gld960_set_output_arch): Get the machine type from the -A option
11 if there is one, rather than always using core.
15 * emulparms/mn10300.sh: Handle leading underscores.
19 * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Only
20 set hold_rel if SEC_ALLOC is set.
24 * ldlang.c (section_already_linked): Set the output_offset as well
25 as the output_section when only reading symbols from a file.
29 * emulparams/*.sh: Make sure that each set of parameters which
30 uses the elf.sc script sets MACHINE.
34 * scripttempl/elf.sc: Add the remaining DWARF sections.
35 * scripttempl/{elfd10v.sc,elfmips.sc,elfppc.sc,v850.sc}: Likewise.
39 * configure: Rebuild with autoconf 2.12.
43 * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Add case
44 for bfd_vma to init loop.
48 * emulparms/mn10300.sh: Remove bogus '_' prefix for
49 entry symbol and ctor/dtor stuff.
53 * Makefile.in (emn10300.c): Add dependencies.
54 * configure.tgt: Handle mn10300.
55 * emulparms/mn10300.sh: New file.
60 * emulparams/d10velf.sh (READONLY_START_ADDR): Changed to 0x2000004.
66 * ld.texinfo: Add section on reporting bugs.
68 * scripttempl/m68kcoff.sc: Make sure the etext and __CTOR_LIST__
69 symbols are correctly aligned.
74 * scriptempl/v850.sc (zdata): Handle reszdata, romzdata and
81 * emulparams/d10velf.sh: Changes needed for D10V-EVA board.
82 Set TEXT_START_ADDR to 0x1000000. Set READONLY_START_ADDR to
85 * scripttempl/elfd10v.sc: Fix calculation of .text. Change
86 .stack to start at 0x2007ffe.
91 * configure.tgt (sparclet*-*-aout*): Delete, use sparc*-*-aout*.
96 * scriptempl/v850.sc (zdata): Fix typo "zrodata" -> "rozdata".
98 * scriptempl/v850.sc (zdata): Make sure this stays
103 * scripttempl/v850.sc (__ep): Put it at the start
106 * scriptempl/v850.sc: Move all "normal" sections into
107 the external memory region (0x100000 - 0x200000).
113 * scripttempl/elfd10v.sc: Clone from elf.sc, move .text to
114 0x10000, so that is more room for data.
116 * emulparams/d10velf.sh (TEXT_START_ADDR): Now 0x100000.
117 (READONLY_START_ADDR): Now 0x0.
118 (SCRIPT_NAME): Now elfd10v.
120 * Makefile.in (ed10velf.c): Depend on elfd10v.sc, not elf.sc.
126 * emulparams/m32relf.sh (TEXT_START_ADDR): Change from 0 to 0x100.
131 * Makefile.in (ALL_EMULATIONS): Remove eelf64alpha.o.
132 (ALL_64_EMULATIONS): New variable.
133 * configure.in: Accept --enable-64-bit-bfd option. If it is set
134 with --enable-targets=all, include ALL_64_EMULATIONS in
136 * configure: Rebuild.
141 * scripttempl/v850.sc (__gp, __ep): Define.
146 * ld.texinfo: Try to consistently use a single or a double dash
152 * emulparams/m32relf.sh (EMBEDDED): Define.
158 * scripttempl/v850.sc (.zdata): Add this before .text.
159 (.sdata): Also include .rosdata as part of the .sdata.
160 (.tdata): Include this just before .sdata.
162 * emulparms/v850.sh (SCRIPT_NAME): Use "v850" not "elf".
163 * scripttempl/v850.sc: Wrap script with a "cat << EOF".
167 * scripttempl/v850.sc: New linker script for the V850.
168 * Makefile.in: Use it.
173 * emulparams/elf32b4300.sh: Define _gp in OTHER_GOT_SYMBOLS, not
174 OTHER_READWRITE_SECTIONS.
175 * emulparams/elf32l4300.sh: Likewise.
179 * ld.h (ld_config_type): Add warn_section_align field.
180 * lexsup.c (OPTION_WARN_SECTION_ALIGN): Define.
181 (ld_options): Add --warn-section-align.
182 (parse_args): Handle --warn-section-align.
183 * ldlang.c (lang_size_sections): If warn_section_align, warn if
184 the start of a section changes due to alignment.
185 * ld.texinfo, ld.1: Document --warn-section-align.
186 * ld.texinfo: Change some single dashes to double dashes.
188 * emultempl/pe.em (set_pe_subsystem): Record entry symbol for each
189 subsystem type. Ifdef out os2 type. Recognize a version number.
193 * emultempl/pe.em (set_pe_subsystem): When setting the subsystem
194 to windows, set the entry point.
196 * Makefile.in (ldlex.c): Don't pass any options to $(LEX).
200 * ld.texinfo (Options): Mention .so extensions for shared
205 * scripttempl/elf{,mips,ppc}.sc: Add DWARF 2 sections.
209 * scripttempl/m68kcoff.sc: Only set the address of .text if
214 * emulparams/sparcaout.sh ({BIG,LITTLE}_OUTPUT_FORMAT): Define.
215 * scripttempl/aout.sc ({BIG,LITTLE}_OUTPUT_FORMAT): Provide default.
216 (OUTPUT_FORMAT): Support bi-endian targets.
220 * fnmatch.h, fnmatch.c: Remove (now in libiberty).
221 * Makefile.in: Rebuild dependencies.
222 (CFILES): Remove fnmatch.c.
223 (HFILES): Remove fnmatch.h.
224 (OFILES): Remove fnmatch.o.
228 * Makefile.in (mostlyclean): Move config.log to distclean.
232 * emultmpl/pe.em: increase size of stack reserve to 0x2000000
233 (necessary in order to compile parse.c in gcc sources under NT)
237 * lexsup.c (ld_options): Fix typo in --rpath-link description.
238 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Suggest
239 --rpath if a needed library is not found.
243 * configure.tgt (mips*-*-rtems*): New target, like mips*-*-elf*.
247 * ld.texinfo (Options): Give more detail on -l option.
249 * scripttempl/elfmips.sc: Handle CREATE_SHLIB the same way that
250 elf.sc does, so that glibc works better.
252 * ldver.c (ld_program_version): New variable.
254 * ldver.h (ld_program_version): Declare.
255 * lexsup.c (ld_options): Handle --dll-verbose like --verbose, not
256 --version. Change --version handling to match current GNU
258 (help): Print bug report address.
263 * Makefile.in (em32relf.c): Add rule for.
264 * configure.tgt (m32r-*-*): Recognize.
265 * emulparams/m32relf.sh: New file.
270 * mpw-make.sed: Add symbolic doublequoting to ldmain compile edit.
271 * mpw-config.in: Add mips-*-* case as mips-elf, and use more
272 wildcards in matching.
273 * mpw-emipself.c: New file, pregenerated mips elf emulation.
277 * ldint.texinfo: Rewrote.
279 * configure.tgt: Add cases for MIPS 5000 like MIPS 4300.
283 * scripttempl/armcoff.sc: Only define symbols if RELOCATING. Fix
284 syntax error on __end__ line.
286 * scripttempl/armcoff.sc: For -N or -n, don't align .data. From
292 * emulparms/v850.sh: Fix OTHER_RELOCATING_SECTIONS.
298 * emulparms/d10v.sh: Set OTHER_RELOCATING_SECTIONS to put
299 stack at top of simulator memory.
304 * ldlex.l (SYMBOLCHARN): Add $, _, and ~.
308 * ldmain.c (get_emulation): Check for -mips4 like -mips1, et. al.
312 * ldlang.c (section_already_linked): Accept a lang_input_statement
313 as the PTR argument. If the file is symbols only, discard all
315 (ldlang_add_file): Pass entry to bfd_map_over_sections.
319 * configure.tgt (alpha-*-gnu*): New target. From Fila Kolodny
325 * emulparms/v850.sh: Set OTHER_RELOCATING_SECTIONS
329 * emulparms/v850.sh: Set EMBEDDED.
333 * emulparms/v850.sh: Entry symbol is "_start", tweak
339 * configure.tgt (sh-*-elf*): New target.
340 * emulparams/shelf.sh: New file.
341 * emulparams/shlelf.sh: New file.
342 * Makefile.in (ALL_EMULATIONS): Add eshelf.o and eshlelf.o.
343 (eshelf.c, eshlelf.c): New targets.
344 * scripttempl/elf.sc: If EMBEDDED is defined, then don't add
345 SIZEOF_HEADERS to TEXT_START_ADDR. Expand CTOR_START and CTOR_END
346 around .ctors, and DTOR_START and DTOR_END around .dtors. Expand
347 OTHER_RELOCATING_SECTIONS if RELOCATING.
351 * configure.{host,tgt} (i[345]86-*-*): Recognize i686 for pentium
356 * ldgram.y (section): Add opt_nocrossrefs; pass value to
358 (opt_nocrossrefs): New nonterminal.
359 * ldlex.l: Recognize NOCROSSREFS keyword in EXPRESSION mode.
360 * ldlang.c (overlay_nocrossrefs): New static variable.
361 (lang_enter_overlay): Add nocrossrefs parameter.
362 (lang_leave_overlay): Only add nocrossrefs if overlay_nocrossrefs
363 is set. Initialize overlay_nocrossrefs.
364 * ldlang.h (lang_enter_overlay): Update declaration.
365 * ld.texinfo (Overlays): Update documentation.
367 * ldver.c (ldversion): Print GNU ld in the version message.
371 * configure.host: Set HLDENV.
372 * configure.in: Substitute HLDENV.
373 * configure: Rebuild.
374 * Makefile.in (HLDENV): New variable.
375 ($(LD_PROG)): Use $(HLDENV).
380 * Makefile.in (ev850.c): New target.
381 * configure.tgt (v850-*-*): New target.
382 * emulparams/v850.sh: New file.
387 * mpw-make.sed: Add @DASH_C_FLAG@ to compiler edit.
391 * scripttempl/elf.sc: Put .gnu.linkonce* sections in appropriate
396 * fnmatch.c: Include sysdep.h.
400 * genscripts.sh: Undo 8/16 change.
403 * emulparams/d10velf.sh (MACHINE): Explicitly set to nothing.
408 * genscripts.sh: Explicitly reset any shell variables set or used
409 by the various .sc scripts to allow inadvertant use of these
410 names as normal environment variables by the person running
414 * Makefile.in (ed10velf.c): Use tdir_d10v, not tdir_arcelf.
419 * scripttempl/armcoff.sc (__bss_start__, __bss_end__,
420 __data_start__, __data_end__): Added to keep in sync. with the
421 default ARM crt0.s. Added __CTOR_LIST__ and __DTOR_LIST__ support.
425 * ldcref.c (check_reloc_refs): If info->same, look for any symbol
426 defined in info->defsec, not just the section symbol.
430 * configure.in: Call BFD_NEED_DECLARATION on strstr and sbrk.
431 * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
432 (NEED_DECLARATION_SBRK): New macro.
433 * configure, config.in: Rebuild.
434 * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
435 * ldmain.c (sbrk): Declare if HAVE_SBRK and
436 NEED_DECLARATION_SBRK.
438 * ldlang.c (lang_record_phdrs): Cast xmalloc and xrealloc return.
442 * ldlex.l: Recognize OVERLAY.
443 * ldgram.y: Add section_phdr field to %union.
444 (section): Handle phdr_opt result. Add OVERLAY case.
445 (opt_exp_without_type): New nonterminal.
446 (phdr_opt): Return list of phdrs.
447 (overlay_section): New nonterminal.
448 * ldlang.c: Include <ctype.h>.
449 (lang_leave_output_section_statement): Add phdrs parameter.
451 (lang_section_in_phdr): Remove.
452 (overlay_vma, overlay_lmn, overlay_max): New static variables.
453 (struct overlay_list): Define.
454 (overlay_list): New static variable.
455 (lang_enter_overlay, lang_enter_overlay_section): New functions.
456 (lang_leave_overlay_section, lang_leave_overlay): New functions.
457 * ldlang.h (lang_leave_output_section_statement): Update
458 declaration for new parameter.
459 (lang_section_in_phdr): Don't declare.
460 (lang_enter_overlay, lang_enter_overlay_section): Declare.
461 (lang_leave_overlay_section, lang_leave_overlay): Declare.
462 * ld.texinfo (Overlays): New node under SECTIONS, documenting
465 * ldlex.l: Recognize MAX and MIN.
466 * ldgram.y (MAX, MIN): New terminals.
467 (exp): Recognize MAX and MIN.
468 * ldexp.c (fold_binary): Handle MAX and MIN.
469 * ld.texinfo (Arithmetic Functions): Document MAX and MIN.
471 * ld.texinfo (PHDRS): Use @cindex, not @kindex, for program header
474 * ldgram.y (SIZEOF, ADDR): Do not specify type.
476 * ldcref.c (check_nocrossref): Skip symbols with no output
481 * ldgram.y (LOADADDR): New terminal.
482 (exp): Handle LOADADDR.
483 * ldlex.l: Recognize LOADADDR.
484 * ldexp.c (exp_print_token): Add LOADADDR.
485 (fold_name): Implement LOADADDR.
486 * ldlang.c (exp_init_os): Treat LOADADDR like ADDR.
487 * ld.texinfo (Arithmetic Functions): Document LOADADDR.
491 * ld.h (check_nocrossrefs): Declare.
492 * ldlang.h (struct lang_nocrossref): Define.
493 (struct lang_nocrossrefs): Define.
494 (nocrossref_list): Declare.
495 (lang_add_nocrossref): Declare.
496 * ldlex.l: Recognize NOCROSSREFS keyword.
497 * ldgram.y (%union): Add nocrossref field.
498 (NOCROSSREFS): New terminal.
499 (ifile_p1): Recognize NOCROSSREFS.
500 (nocrossref_list): New nonterminal.
501 * ldlang.c (nocrossref_list): Define.
502 (lang_add_nocrossref): New function.
503 * ldmain.c (main): If nocrossref_list is not NULL, call
505 (warning_callback): Free symbols if there is no place to store
507 (notice): Call add_cref if nocrossref_list is not NULL.
508 * ldcref.c: Include "ldexp.h" and "ldlang.h".
509 (check_nocrossrefs): New function.
510 (check_nocrossref): New static function.
511 (struct check_refs_info): Define.
512 (check_refs, check_reloc_refs): New static functions.
513 * Makefile.in: Rebuild dependencies.
514 * ld.texinfo (Option Commands): Document NOCROSSREFS.
516 * ld.texinfo (Section Placement): Improve the wording of the
517 wildcard documentation. Mention that wildcards are only searched
518 for on the command line, not in the file system.
520 * emultempl/sunos.em (gld${EMULATION_NAME}_after_open): Move
521 definition of lib_path inside condition where it is used.
526 * emulparams/d10velf.sh: Now works with elf.sc.
530 * emulparams/d10velf.sh (SCRIPT_NAME): Change to vanilla.
535 * ldlang.c (lang_size_sections): Add the section VMA to the result
536 value when computing the address of a section.
538 * ld.h (args_type): Add cref field.
539 * lexsup.c (parse_args): Set command_line.cref.
540 * ldmain.c (main): Check command_line.cref rather than
541 link_info.notice_all.
544 * ldcref.c (output_one_cref): Don't crash if a symbol is defined
545 in a section without an owner.
549 * fnmatch.h, fnmatch.c: New files.
550 * ldlex.l: Remove unused definition of FILENAME. Add definition
551 of WILDCHAR. In SCRIPT mode, accept any sequence of WILDCHAR as a
553 * ldgram.y (file_NAME_list): Accept '*' and '?' specially.
554 (input_section_spec): Accept '?' specially.
555 (statement): Change exp to mustbe_exp in length and FILL cases.
556 (section): Call ldlex_script before section statements, and call
557 ldlex_popstate after them.
558 * ldlang.c: Include "fnmatch.h".
559 (wildcardp): New static function.
560 (wild_section): Permit the section name to be a wildcard.
561 (wild_file): New static function, broken out of wild.
562 (wild): Call wild_file. Permit the file name to be a wildcard.
563 (open_input_bfds): Don't call lookup_name for a wildcard pattern.
564 * Makefile.in: Rebuild dependencies.
565 (CFILES): Add fnmatch.c.
566 (HFILES): Add fnmatch.h.
567 (OFILES): Add fnmatch.o.
568 * ld.texinfo: Document that file and section names can now be
571 * ldlang.c (lang_place_orphans): Correct condition: place a common
572 section if not relocateable or if common definitions are forced.
577 * emulparams/d10velf.sh (SCRIPT_NAME): Change to elf.
581 * configure.tgt (d10v-*-*): Don't require the -elf, allow plain d10v.
585 * Makefile.in (ed10velf.c): New target.
586 * configure.tgt (d10v-*-elf*): New target.
587 * emulparams/d10velf.sh: New file.
592 * configure.tgt (sparc*-*-sysv4*): New target. From Andrew Gierth
595 * configure.host: Change irix5 to irix[56]*.
596 * configure.tgt: Likewise.
600 * emultempl/pe.em (sort_sections): Pay attention to return code.
602 * ldmisc.c (demangle): Remove all prefix '.'s from a name.
606 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Round
607 the value of __start_SECNAME to the alignment required by the
608 section to be placed.
612 * configure.tgt (mips*el-*-elf*): Use elf32elmip.
613 (mips*-*-elf*): Use elf32ebmip.
614 * emulparams/elf32bmip.sh (EMBEDDED): Don't define.
615 * emulparams/elf32lmip.sh (EMBEDDED): Don't define.
616 * emulparams/elf32elmip.sh: New file; copy of elf32lmip.sh with
618 * emulparams/elf32ebmip.sh: New file; copy of elf32bmip.sh with
620 * emulparams/elf32b4300.sh (EMBEDDED): Define.
621 * emulparams/elf32l4300.sh (EMBEDDED): Define.
622 * Makefile.in (ALL_EMULATIONS): Add eelf32ebmip.o eelf32elmip.o.
623 (eelf32ebmip.c, eelf32elmip.c): New targets.
627 * ldver.c (ldversion): Set version to cygnus-2.7.1.
629 * Released binutils 2.7.
631 * emulparams/pc532macha.sh: Rename from pc532machaout.sh to avoid
632 System V file name limitations.
633 * configure.tgt (nc32k-pc532-mach*, ns32k-pc532-ux*): Use
634 pc532macha rather than pc532machaout.
635 * Makefile.in (ALL_EMULATIONS): Change epc532machaout.o to
637 (epc532macha.c): Rename target from epc532machaout.c.
641 * ldlang.c (print_padding_statement): Use %u, not %x, to print
646 * mpw-eppcmac.c: Update to reflect May 23 change to aix.em.
650 * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Put the .sa
651 file just before the .so file, rather than just after.
653 * configure.host: Use -print-file-name=FILE rather than piping
654 -print-libgcc-file-name through sed.
655 (i[345]86*-*-sco*, i[345]86-*-isc*): Create crtbegin.o and
656 crtend.o files, in case gcc doesn't use them.
657 * Makefile.in (mostlyclean): Remove crtbegin.o and crtend.o.
661 * configure.tgt (mips*-dec-osf*): New target.
665 * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
666 INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
668 * configure.in (AC_PREREQ): autoconf 2.5 or higher.
669 (AC_PROG_INSTALL): Added.
670 * configure: Rebuilt.
674 * scripttempl/elfppc.sc (_GLOBAL_OFFSET_TABLE_): Don't do a
675 PROVIDE of _GLOBAL_OFFSET_TABLE_, since it needs to be at a
680 * ldlang.h (enum section_type): Define.
681 (lang_output_section_statement_type): Remove loadable field. Add
683 (lang_enter_output_section_statement): Change flags parameter in
684 prototype to sectype.
685 * ldgram.y (typebits): Remove.
686 (sectype): New static variable.
687 (opt_at): Use sectype rather than typebits.
688 (type): Set sectype rather than typebits.
690 * ldlex.l: Recognize DSECT, COPY, INFO, and OVERLAY in
692 * ldlang.c (lang_output_section_statement_lookup): Set sectype
693 field rather than loadable field.
694 (wild_doit): Check sectype rather than loadable.
695 (lang_record_phdrs): Likewise.
696 (lang_enter_output_section_statement): Rename flags parameter to
697 sectype. Set sectype field rather than loadable field. Set flags
698 field based on sectype.
702 * scripttempl/elf.sc: Force .stab* and .comment sections to start
705 * configure.in: On alpha*-*-osf*, link against libbfd.a if not
706 using shared libraries.
707 * configure: Rebuild with autoconf 2.10.
711 * configure.tgt: Add support for *-*-rtems* configurations.
715 * configure.tgt (alpha-*-linuxecoff*): New target.
716 (alpha-*-linux*): Use elf64alpha.
717 * emulparams/elf64alpha.sh: New file.
718 * emultempl/elf32.em: If ELFSIZE is not set, set it to 32. Use
719 ${ELFSIZE} rather than 32 when calling BFD routines.
720 (hold_rodata): New static variable.
721 (gld${EMULATION_NAME}_place_orphan): Use hold_rodata for a
722 readonly section that is not code.
723 (gld${EMULATION_NAME}_place_section): Set hold_rodata. Don't use
724 a .rel section unless its bfd_section field is not NULL.
725 * Makefile.in (ALL_EMULATIONS): Add eelf64alpha.o.
726 (eelf64alpha.c): New target.
730 * ldmisc.c (vfinfo): Correct handling of 0 in %W case.
734 Add enough support to understand the gcc svr3.ifile script:
735 * ldlex.l: Recognize BLOCK and GROUP in EXPRESSION context. Add
737 * ldgram.y: Add BIND token.
738 (section): Recognize GROUP.
739 (opt_ext_with_type): Recognize a couple of cases of BIND.
740 * ldlang.c (init_os): Don't do anything if section is already
741 initialized. Call exp_init_os on addr_tree field.
742 (exp_init_os): New static function.
743 (map_input_to_output_sections): Call exp_init_os on assignment
745 (lang_place_orphans): Check for common sections by name COMMON
746 rather than by common_section field. Don't warn about absence of
749 * ldlang.h (lang_input_statement_type): Remove useless fields
750 common_section, common_output_section, and complained, as well as
751 all references to them.
753 * ldexp.c: Reindent a lot of code.
754 (exp_fold_tree): Call FAIL rather than einfo in default case.
758 * configure.host (m88*-*-dgux*): Quote HOSTING_CRT0. From
763 * scripttempl/h8300s.sc: New file for H8/S.
764 * emulpararms/h8300s.sh: New file for H8/S.
765 * Makefile.in (ALL_EMULATIONS): Add H8/S.
766 (e_h8300s.c): Add dependencies.
767 * configure.tgt: Add H8/S to targ_extra_emuls.
771 * configure.tgt (i[345]86*-*-isc*): New target. From
776 * lexsup.c: Include "libiberty.h".
777 (parse_args): Copy the -Y argument into memory.
778 (set_default_dirlist): Don't put the ':' back into the directory
783 * emultempl/sunos.em: Include libiberty.h.
784 (gld${EMULATION_NAME}_set_symbols): New static function to add
785 LD_LIBRARY_PATH to the list of search directories.
786 (ld_${EMULATION_NAME}_emulation): Add new set_symbols routine.
790 * emulparams/elf32bmip.sh (OTHER_GOT_SYMBOLS): Use ALIGN(16)
791 rather than . when computing _gp value. From Per Fogelstrom.
792 * emulparams/elf32lmip.sh (OTHER_GOT_SYMBOLS): Likewise.
794 * ldmain.c (main): Don't close and unlink the file on error, since
795 remove_output will do it anyhow.
796 * ldlang.c (open_output): Set boolean variable to true, not 1.
800 * emulparams/{elf32b4300.sh,elf32l4300.sh} (SCRIPT_NAME): Use
801 elfmips instead of elf.
805 * ldcref.c: New file.
806 * ld.h (add_cref, output_cref): Declare.
807 * ldmain.c (main): Initialize notice_all field. If it is set at
808 end of link, call output_cref.
809 (notice): Rename from notice_ysym. Check notice_all.
810 * ldmisc.c (finfo): Make globally visible.
811 * ldmisc.h (finfo): Declare.
812 * lexsup.c (OPTION_CREF): Define.
813 (ld_options): Add "cref".
814 (parse_args): Handle OPTION_CREF.
815 * Makefile.in: Rebuild dependencies.
816 (CFILES): Add ldcref.c.
817 (OFILES): Add ldcref.o.
818 * ld.texinfo, ld.1: Document --cref.
822 * Makefile.in (install): Make $(tooldir) and $(tooldir)/bin.
826 * emultempl/pe.em (sort_sections): Don't assume that a
827 wild_statement has a section name.
831 * scripttempl/elfmips.sc: Quote test -z argument.
833 * ld.texinfo: Clarify the CONSTRUCTORS command.
837 * emultempl/aix.em (gld${EMULATION_NAME}_read_file): Initialize
842 * ldlang.c (wild_doit): Don't copy over SEC_LINK_{ONCE,DUPLICATES}
844 * emultempl/pe.em (sfunc): Renamed to sort_by_file_name.
845 (sort_by_section_name, sort_sections_1): New functions.
846 (sort_sections): Only sort by file name sections in .idata.
847 Add "Grouped Sections" support.
848 (gld${EMULATION_NAME}_place_orphan): Rewrite to support Grouped
850 (gld${EMULATION_NAME}_place_section): Delete.
851 * scripttempl/pe.sc (.text,.data,.rdata): Add *(.foo\$).
852 (.CRT,.rsrc): Rewrite to use Grouped Section support.
856 * mpw-eppcmac.c: Update to reflect changes to aix.em.
860 * ldlang.c (dprint_statement): Stop printing at end of list.
864 Support for --force-exe-suffix
865 * ld.h (args_type): Add force_exe_suffix.
866 * ld.texinfo: Add documentation.
867 * ldmain.c (main): Add support for option.
868 * lexsup.c (OPTION_FORCE_EXE_SUFFIX): New.
869 (ld_options, parse_args): Add support for option.
873 * emultempl/pe.em (set_pe_value): Pass 0 not 16 to strtoul call.
877 * scripttempl/elfppc.sc (__stack): Make __stack 0 if it was
878 referenced but not defined.
882 * emulparams/{elf32bmip.sh,elf32lmip.sh,mipsidt.sh,mipsidtl.sh}:
883 Set a new variable to signify if the final target is an embedded
885 * scripttempl/{mips.sc,elfmips.sc}: Don't add SIZEOF_HEADERS to
886 .text for an embedded system.
890 * scripttempl/pe.em (gld${EMULATION_NAME}_place_orphan): New function.
891 (gld${EMULATION_NAME}_place_section): New function.
892 (hold_{section,use,text,rdata,data}): New static locals.
893 (ld_${EMULATION_NAME}_emulation): Update orphan field.
894 * scripttempl/pe.sc: Whitespace cleanup. Semicolon usage cleanup.
895 (INIT,FINI): Delete, unused.
896 (.text): Document orphan .text.foo sections.
897 (.rdata): Document orphan .rdata.foo sections.
898 (.data): Document orphan .data.foo sections.
902 * scripttempl/h8300.sc: Place ".tiny" sections right
903 after ".data" sections.
904 * scripttempl/h8300h.sc: Place ".tiny" sections into
905 the "tiny" memory region, 0xff8000 through 0xffff00.
907 * scripttempl/h8300.sc: Set the entry point to the value of
908 "_start" rather than the start of the text segment.
909 * scripttempl/h8300h.sc: Likewise.
911 * scripttempl/h8300.sc: Place .rodata sections before .text
912 sections in main ram.
913 * scripttempl/h8300h.sc: Likewise.
917 * scripttempl/h8300h.sc: Use "eight", not "eightbit" for the
918 8-bit region and 8-bit sections.
922 * ldlang.c (section_already_linked): Fix typos.
926 * scripttempl/pe.sc (.endjunk): Define __end__.
930 * ldlang.c (longest_section_name): Remove.
931 (SECTION_NAME_MAP_LENGTH): Define.
932 (print_size, print_alignment, print_fill, print_section): Remove.
933 (print_flags): Remove.
935 (print_output_section_statement): Rewrite.
936 (print_assignment): Rewrite.
937 (print_one_symbol): Rewrite.
938 (print_input_section): Rewrite.
939 (print_fill_statement): Rewrite.
940 (print_data_statement): Rewrite.
941 (print_address_statement): New static function.
942 (print_reloc_statement): Rewrite.
943 (print_padding_statement): Rewrite.
944 (print_wild_statement): Rewrite.
945 (print_statement_list): Clean up.
946 (print_statement): Clean up. Some minor output changes.
947 (print_statements): Clean up.
948 (load_symbols): Put another - before -whole-archive.
949 * ldexp.c (exp_print_tree): Change etree_value and etree_rel to
950 print 0x and to omit leading zeroes. For etree_rel, use %B to
951 print the BFD. For etree_assign, remove the space after the
953 * ldwrite.c: Include "libiberty.h".
954 (clone_section): Call xstrdup, not strdup.
955 (ldwrite): Don't print any map information.
956 (print_symbol_table, print_file_stuff, print_symbol): Remove.
957 * ldmain.c (main): Call lang_map when appropriate.
958 * ldmisc.c (vfinfo): Add support for %W.
959 (print_address): Remove.
960 * ldmisc.h (print_address): Don't declare.
961 * Makefile.in: Rebuild dependencies.
965 * configure.host (m68*-*-linux*): Add -dynamic-linker to
966 HOSTING_CRT0. Search -lgcc both before and after -lc in
967 HOSTING_LIBS. Look for crt{begin,end}.o in the compiler directory
969 (i[345]86-*-linux*): Look for crt{begin,end}.o in the compiler
974 * ldmisc.h (demangle): Declare.
975 * ldmisc.c: Include "libiberty.h". Include demangle.h with "",
977 (demangle): Make non-static. Remove remove_underscore paramter.
978 Always return an allocated string.
979 (vfinfo): Free result of demangle. Add case 'G'. Use %T to print
980 functionname, rather than calling demangle. Print a colon between
981 the BFD(section+offset) and the line number.
982 * ldmain.c (add_archive_element): Improve format of archive
983 information in map file.
984 (constructor_callback): Don't print anything to the map file.
985 * ldlang.c (lang_one_common): Improve format of common symbol
986 information in map file.
987 * ldctor.c (ldctor_build_sets): If producing a map file, print set
989 * ldwrite.c (print_symbol_table): Print a newline before the
990 header in the map file.
991 * Makefile.in: Rebuild dependencies.
993 * ldmisc.c (vfinfo): Reindent.
997 * ldlang.c (lang_size_sections): If _cooked_size is not 0, then
998 don't clobber it when not relaxing.
1000 * ld.h (ld_config_type): Remove traditional_format field.
1001 * ldmain.c (main): Use link_info.traditional_format rather than
1002 config.traditional_format.
1003 * ldlang.c (ldlang_open_output): Likewise.
1004 * lexsup.c (parse_args): Likewise.
1005 * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Likewise.
1006 * mpw-eppcmac.c (gldppcmacos_parse_args): Likewise.
1008 * ldlang.c (wild_doit): Discard debugging sections if we are
1009 stripping debugging information.
1011 * emulparams/z8002.sh (ARCH): Set to z8002, not z8k.
1015 * ldexp.c (fold_binary): Correct handling of subtraction with
1017 (fold_name): Permit symbols in lang_allocating_phase_enum.
1019 * scripttempl/aout.sc: Only PROVIDE __stack when RELOCATING. Undo
1020 accidental changes in last patch.
1024 * configure.tgt (powerpc*-*-{sysv,linux}): Add aliases.
1025 (powerpcle*-*-{sysv,solaris}): Ditto.
1029 * scripttempl/aout.sc: Add PROVIDE (__stack = 0) so I can use it
1030 in m68k/crt0.S without things blowing up.
1034 * scripttempl/m68kcoff.sc: Remove default address for .data so
1035 .text, .data, and .bss are all sequential.
1039 * scripttempl/m68kcoff.sc: Remove regions and simplify.
1043 * scripttempl/h8300.sc: Add the "8-bit area" in the upper 256
1044 bytes of the address space. Put data from the ".eight" sections
1045 into the 8-bit area.
1046 * scripttempl/h8300h.sc: Likewise.
1050 * emultempl/generic.em (gld${EMULATION_NAME}_before_parse):
1051 Pass $ARCH to ldfile_set_output_arch instead of setting
1052 ldfile_output_architecture directly.
1056 * scripttempl/elfppc.sc (.init,.fini): Put .init, .fini section
1057 next to .text. Put _etext after .text, .init, .fini, and
1058 .rodata{,2} sections.
1062 * ld.texinfo: Rearrange option documentation.
1064 * lexsup.c (ld_options): New static array.
1065 (parse_args): Build shortopts and longopts from ld_options array.
1066 (help): New static function.
1067 * ldver.h (help): Don't declare.
1068 * ldver.c (ldversion): Reindent.
1071 * ld.texinfo, ld.1: Mention -E as a synonym for -export-dynamic.
1075 * emultempl/elf32.em: When checking for a native emulation, check
1076 that the current emulation is the default emulation.
1077 * emultempl/sunos.em: Likewise.
1079 * configure.in: Permit --enable-shared to specify a list of
1081 * configure: Rebuild.
1083 * lexsup.c (parse_args): Add -E as a synonym for -export-dynamic,
1084 for HP/UX compatibility.
1088 * emultempl/elf32.em (gld${EMULATION_NAME}_check_ld_so_conf): New
1089 static function, if ${host} = ${target}.
1090 (gld${EMULATION_NAME}_after_open): Call check_ld_so_conf to find a
1091 needed shared library if ${host} = $[target}.
1093 * configure.host (i[345]86-*-linux*): Add -dynamic-linker to
1094 HOSTING_CRT0. Search -lgcc both before and after -lc in
1097 * configure.tgt: Add i[345]86-*-freebsdelf* target; from John
1102 * emulparams/elf32{b,l}4300.sh (MACHINE): Add explicit
1103 architecture number.
1104 * scripttempl/elf.sc: Use $MACHINE definition if present.
1105 * configure.tgt (targ_extra_emuls): Force 4100 build to use same
1110 * ldlang.c (lang_size_sections): Change region check to handle
1111 regions which end at the highest possible address correctly.
1114 * ldlang.c (section_already_linked): New static function.
1115 (wild_doit): Discard sections with SEC_EXCLUDE set if not doing a
1116 relocateable link. Don't worry about section being NULL, since it
1117 never should be. Don't call init_os unless the section is going
1119 (ldlang_add_file): Call section_already_linked for each section.
1120 * ldmain.c (multiple_definition): Don't warn about multiple
1121 definitions in sections which are being discarded.
1125 * scripttempl/{ppcpe.sc, pe.sc} (.junk): Remove and use /DISCARD/.
1126 * emultempl/pe.em (init): Remove special case PPC code.
1130 * scripttempl/h8300.sc: Make vectors section 0xc4 bytes long
1131 so as not to overwrite the magic syscall entry at 0xc4.
1132 * scripttempl/h8300h.sc: Likewise.
1136 * configure.tgt (sparc64-*-solaris2*): Delete.
1137 Stick with sparc-*-solaris2*.
1141 * ld.h (DISCARD_SECTION_NAME): Define to "/DISCARD/".
1142 * ldlang.c (init_os): Fail on an attempt to initialize any section
1143 named DISCARD_SECTION_NAME.
1144 (wild_doit): Discard input sections assigned to an output section
1145 named DISCARD_SECTION_NAME.
1146 * ld.texinfo: Document use of /DISCARD/.
1148 * ldlang.c: Fix some indentation and comments.
1152 * ldmain.c (main): Call bfd_set_error_program_name.
1156 * ld.texinfo: Fix a couple of indexing entries. Mention that
1157 --verbose displays builtin linker scripts.
1159 * ldmisc.c (vfinfo): case 'I': If the file is not in an archive,
1160 and the local symbol name does not match the filename, print the
1164 * lexsup.c (parse_args): -Bshareable is a synonym for -shared.
1165 * emulparams/elf_i386.sh (NONPAGED_TEXT_START_ADDR): Make the same
1170 * ld.texinfo: Fix typos. Use @pxref only inside parentheses.
1174 * ldmain.c (add_wrap): New function.
1175 * ldmain.h (add_wrap): Declare.
1176 * lexsup.c (parse_args): Call add_wrap.
1180 * configure.host (sparc*-*-solaris2* host): Accept any sparc variant.
1184 * scripttempl/h8300.sc: Change name of page zero memory
1185 from "null" to "vectors". Create an output section for
1186 vectors. Add comments on how to explicitly place items
1187 in the vector table.
1188 * scripttempl/h8300h.sc: Likewise.
1192 * emultempl/lnk960.em (machine_table): Add jx and hx.
1194 * genscripts.sh: Don't use ${9:-xx}, since Ultrix /bin/sh doesn't
1199 * ld.h (ld_config_type): Add warn_multiple_gp field.
1200 * lexsup.c (parse_args): Handle --warn-multiple-gp.
1201 * ldmain.c (warning_callback): Suppress multiple gp values warning
1202 if --warn_multiple_gp was not used.
1203 * ld.texinfo, ld.1: Document --warn-multiple-gp.
1207 * lexsup.c (parse_args): Handle --wrap.
1208 * ldmain.c (main): Initialize link_info.wrap_hash.
1209 * ldexp.c (fold_name): Use bfd_wrapped_link_hash_lookup in DEFINED
1211 * ld.texinfo, ld.1: Document --wrap.
1213 * configure: Rebuild with autoconf 2.8.
1215 Don't do SunOS style dynamic linking for sparc-aout:
1216 * configure.tgt (sparc64-*-aout*): Use sparcaout, not sun4.
1217 (sparclite*-fujitsu-*, sparc*-*-aout): Likewise.
1218 (sparc*-wrs-vxworks*): Likewise.
1219 * emulparams/sparcaout.sh: New file.
1220 * Makefile.in (ALL_EMULATIONS): Add esparcaout.o.
1221 (esparcaout.c): New target.
1225 * scripttempl/elfppc.sc (.sdata2, .sbss2): Implement Feb 2 change
1226 in a different manner to work around differences in shell variable
1231 * ldemul.h (ldemul_unrecognized_file): Declare.
1232 (ldemulation_xfer_type): Add unrecognized_file field.
1233 * ldemul.c (ldemul_unrecognized_file): New function.
1234 * ldlang.c (load_symbols): If a file can not be recognized, call
1235 ldemul_unrecognized_file before trying it as a linker script.
1236 * aix.em (gld${EMULATION_NAME}_unrecognized_file): New static
1238 (gld${EMULATION_NAME}_read_file): Use FOPEN_RT, not "r".
1239 (ld_${EMULATION_NAME}_emulation): Initialize unrecognized_file.
1243 * ldlang.c (wild): Handle foo.a(.text) by mapping each included
1248 * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment):
1249 Search trinary.cond rather than searching trinary.lhs twice.
1253 * mpw-make.sed: Edit out shared library support.
1254 (@TDIRS@): Edit out, can't use genscripts.
1258 * configure.tgt (m68k-*-linuxaout*, m68k-*-linux*): New targets.
1259 * emulparams/m68klinux.sh: New file.
1260 * emultempl/linux.em (gld${EMULATION_NAME}_before_allocation):
1261 Call bfd_${EMULATION_NAME}_size_dynamic_sections instead of
1262 bfd_linux_size_dynamic_sections.
1263 * Makefile.in (ALL_EMULATIONS): Add em68klinux.o.
1264 (em68klinux.c): New target.
1265 * configure.host (m68*-*-linuxaout*, m68*-*-linux*): New hosts.
1269 * Makefile.in (ALL_EMULATIONS): Sort into alphabetical order.
1270 Fill in missing entries.
1272 * lexsup.c (parse_args): Recognize --no-whole-archive.
1273 * ldlang.h (lang_input_statement_type): Add whole_archive field.
1274 * ldlang.c (new_afile): Set whole_archive field.
1275 (load_symbols): Check input file specific whole_archive field
1276 rather than global variable.
1277 * ld.texinfo, ld.1: Document --no-whole-archive.
1281 * configure.tgt: Correct gldi960 to gld960.
1285 * emultempl/elf32.em (gld${EMULATION_NAME}_check_needed): Check
1286 the SONAME if it is available.
1287 (gld${EMULATION_NAME}_stat_needed): Use the SONAME, not the
1288 filename, when checking for conflicting library versions. Don't
1289 assume that the suffix is only numbers and dots.
1291 * ld.texinfo: Mention that -R can be used for -rpath.
1295 * configure.host: Check for 'do not mix' from native linker before
1296 trying to use -rpath.
1300 * configure.in: Remove explicit substitution of CFLAGS; autoconf
1302 * configure: Rebuild.
1303 * Makefile.in (LDFLAGS): Set to @LDFLAGS@.
1305 * configure.in: Call AC_PROG_CC before configure.host.
1306 * configure: Rebuild.
1307 * configure.host: Remove go32 host, since it should no longer be
1308 necessary. Don't set CC for romp host.
1310 * scripttempl/elf.sc: Don't skip a page in virtual memory space if
1311 the text segment ends exactly on a page boundary.
1313 * configure.in: Substitute RPATH_ENVVAR.
1314 * configure: Rebuild.
1315 * configure.host: Set RPATH_ENVVAR.
1316 * Makefile.in (RPATH_ENVVAR): New variable.
1317 (check): Use $(RPATH_ENVVAR) rather than LD_LIBRARY_PATH.
1321 * configure.in: Redo emulation handling so that each emulation
1322 searches the correct tool directory, based on the target alias.
1323 For example, "configure --enable-targets=m68k-coff i386-linux"
1324 will search /usr/local/i386-linux/lib for linux and
1325 /usr/local/m68k-coff/lib for m68k-coff.
1326 * configure: Rebuild.
1327 * configure.tgt: Add special tdir settings for Linux.
1328 * Makefile.in: Add @TDIRS@. Pass "$(tdir_EMUL)" to ${GENSCRIPTS}
1329 for each eEMUL.c target.
1330 * genscripts.sh: Accept specific alias as 9th argument, and use it
1335 * ldlang.c (lang_set_startof): Don't do anything for a
1338 * ldgram.y (mri_script_file): Call mri_draw_tree.
1339 * mri.c (mri_draw_tree): Make globally visible. Don't bother to
1340 create memory regions.
1341 (mri_load): Don't call mri_draw_tree.
1342 * mri.h (mri_draw_tree): Declare.
1344 * configure.tgt (m68*-*-psos): New target.
1345 * emulparams/m68kpsos.sh: New file.
1346 * scripttempl/psos.sc: New file.
1347 * Makefile.in (ALL_EMULATIONS): Add em68kpsos.o.
1348 (em68kpsos.c): New target.
1352 * configure.tgt (*-*-ieee*): New target; use vanilla.
1354 * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Strip
1355 `:foo' from ${ARCH}.
1359 * scripttempl/i386msdos.sc: Don't pad the .text section. Put
1364 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
1366 * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed): Warn if
1367 it looks like we might be linking in two different versions of the
1372 * ldlang.c (lang_size_sections): Increment the section size when a
1373 padding statement is encountered.
1377 * configure.in: Look for --enable-shared. Change the value of
1378 BFDLIB when linking against a shared library on SunOS.
1379 * configure: Rebuild.
1380 * configure.host: If using a shared BFD library, try to pass a
1381 reasonable -rpath option when linking.
1382 * Makefile.in (BFDLIB): Set to @BFDLIB@.
1386 * emulparams/elf64_sparc.sh (ARCH): Change to `sparc:v9'.
1387 * emultempl/generic.em: Strip `:foo' from ${ARCH}.
1391 Support for building bfd and opcodes as shared libraries, based on
1393 * configure.in (HLDFLAGS): New substitution.
1394 * configure: Rebuild.
1395 * configure.host: Set HLDFLAGS on SunOS.
1396 * Makefile.in (HLDFLAGS): New variable.
1397 (BFDDEP): New variable.
1398 (BFDLIB): Change to -L../bfd -lbfd.
1399 ($(LD_PROG)): Depend upon $(BFDDEP) rathern than $(BFDLIB). Use
1400 $(HLDFLAGS) in link.
1401 (check): Set LD_LIBRARY_PATH in the environment.
1405 * scripttempl/elfppc.sc (.sdata2, .sbss2): Put .sdata2 and .sbss
1406 in the read-only section, not read/write unless we are making a
1408 (.debug*): Add dwarf debug sections.
1409 (.rela.{sdata*,sbss*}): Add sections.
1413 * configure: Regenerate.
1417 * emulparams/elf_i386.sh (TEXT_START_ADDR): Change to 0x8048000,
1418 for SVR4 compatibility.
1420 * ldexp.c (exp_fold_tree): Correct handling of ABSOLUTE.
1424 * configure.tgt (i[345]86-*-cygwin32, powerpcle-*-cygwin32): New.
1425 * emultempl/pe.em (definfo init): Make the default stack reserve
1430 * configure.tgt (m68*-apple-aux*): New target.
1431 * emulparams/m68kaux.sh: New file.
1432 * scripttempl/m68kaux.sc: New file.
1433 * Makefile.in (ALL_EMULATIONS): Add em68kaux.o.
1434 (em68kaux.c): New target.
1438 * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Ignore
1439 -bnoentry, since the right thing tends to happen anyhow.
1443 * ld.texinfo, ld.1: Document -export-dynamic.
1447 * emultempl/sunos.em: Check for native compile by comparing
1448 ${target} and ${host}.
1452 * emulparams/{elf32b4300.sh, elf32l4300.sh}: Changed
1453 TEXT_START_ADDR to allow use on IDT and PMON systems.
1457 * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args):
1462 * configure.tgt (sparc64-*-solaris2*): New configuration.
1463 (sparc64-*-aout*): Renamed from sparc64*.
1467 * Makefile.in (GENSCRIPTS): Pass @host@ @target@ @target_alias@.
1468 * genscripts.sh: Set host, target and target_alias variables.
1469 Check for native compile by comparing ${target} and ${host}.
1470 * emultempl/elf32.em: Likewise.
1471 * scripttempl/elfmips.sc: Test ${target}, not ${target_alias}.
1475 * scripttempl/elfppc.sc: Refine eabi support to better support
1476 .sdata, .sdata2, .sbss, etc. sections.
1480 * ldgram.y (%union): Add phdr field.
1481 (phdr): Use phdr_qualifiers rather than opt_hdrs and opt_at.
1482 (phdr_qualifiers): New nonterminal. Add support for FLAGS.
1483 (opt_hdrs, hdr): Remove.
1484 (phdr_val): New nonterminal.
1485 * ldlang.c (lang_new_phdr): Replace hdrs parameter with filehdr
1486 and phdrs parameters. Add flags parameter.
1487 (lang_record_phdrs): Update for changes to lang_phdr. Pass flags
1489 * ldlang.h (struct lang_phdr): Replace hdrs field with filehdr and
1490 phdrs fields. Add flags field.
1491 (LANG_PHDR_FILEHDR, LANG_PHDR_PHDRS): Remove.
1492 (lang_new_phdr): Update declaration.
1493 * ld.texinfo: Document FLAGS.
1497 * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation):
1498 Don't make a shared library because of an undefined reference to
1499 __GLOBAL_OFFSET_TABLE_.
1501 Add some Irix 5 support, mostly from Kazumoto Kojima
1503 * emulparams/elf32bmip.sh (SCRIPT_NAME): Change to elfmips.
1504 (SHLIB_TEXT_START_ADDR): Define.
1505 (OTHER_GOT_SYMBOLS): Define.
1506 (OTHER_READWRITE_SECTIONS): Remove initialization of _gp.
1507 (EXECUTABLE_SYMBOLS): Don't define.
1508 (DYNAMIC_LINK): Don't define.
1509 * emulparams/elf32lmip.sh: Same changes as elf32bmip.sh.
1510 * scripttempl/elfmips.sc: New file.
1511 * configure.host (mips*-dec-bsd*): Change mips to mips*.
1512 (mips*-sgi-irix4*): Likewise.
1513 (mips*-sgi-irix5*): New entry.
1514 * Makefile.in (eelf32bmip.c): Depend upon elfmips.sc rather than
1516 (eelf32lmip.c): Likewise.
1520 * scripttempl/elfppc.sc: Remove support for .rel.* sections. Add
1521 .rela.got.neg section.
1525 * scripttempl/sh.sc: Only build constructors when CONSTRUCTING.
1527 * ldmisc.c: Include <stdarg.h> rather than <varargs.h> if
1528 ANSI_PROTOTYPES is defined. Remove special handling of
1529 WINDOWS_NT. Various indendation fixes.
1530 (vfinfo): Change fmt parameter to const char *.
1531 (info_msg): Write <stdarg.h> version.
1532 (einfo, minfo, finfo): Likewise.
1533 (info_assert): Change file parameter to const char *.
1534 * ldmisc.h (einfo, minfo, info_msg): If ANSI_PROTOTYPES is
1535 defined, use a real prototype.
1536 (info_assert): Change first parameter to be const char *.
1540 * scripttempl/elfppc.sc: Add support for .sdata2/.sbss2, etc. Add
1541 in old support that 2.7.2 needs, but the current compiler does
1544 * Makefile.in (eelf32{,l}ppc.c): Fix up dependencies to use the
1545 correct Linker script template.
1547 * emulparams/elf32{,l}ppc.sh (TEXT_START_ADDR): Set to 0x40000,
1549 (DATA_ADDR,NONPAGED_TEXT_START_ADDR): Delete.
1553 * scripttempl/alpha.sc: Put .rconst right after .rdata.
1557 * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation):
1558 sort using right pointer.
1562 * scripttempl/elfppc.sc: Remove support for creating special
1563 labels for eabi section begin/end here. The compiler now uses
1564 crt{i,n}.o to create these symbols.
1568 * configure.host: Change existing Linux HOSTING_CRT0 to be used
1569 for a.out only, and put in appropriate HOSTING_CRT0 and
1570 HOSTING_LIBS values for Linux ELF.
1574 * scripttempl/h8300.sc: Use all 64K for ram.
1575 * scripttempl/h8300h.sc: Define 256K ram size.
1579 * emultempl/aix.em (gld${EMULATION_NAME}_before_allocation): Pass
1580 export_defines as true to bfd_xcoff_size_dynamic_sections if -unix
1581 was used, regardless of whether -bE was used.
1585 * emultempl/aix.em (gld${EMULATION_NAME}_after_open): Only set
1586 relocateable before calling ldctor_build_sets if the output file
1587 is in an XCOFF format.
1591 * ldwrite.c (build_link_order): When handling a data statement, if
1592 the endianness of the output file is unknown, use the endianness
1597 * mpw-config.in: Recognize mips-*-* as equivalent to
1599 * mpw-eppcmacos.c: Rename to shorter mpw-eppcmac.c.
1600 * mpw-ld.r: Add version resources.
1601 (cfrg): Use symbolic instead of literal name for executable.
1605 * scripttempl/ppcpe.sc (FINI): Moved the .reloc section.
1609 * ldlang.c (print_statement{,s}): Delete duplicate prototype.
1610 (print_statement_list): Renamed from print_statement. All callers
1612 (print_statement): New function to print just one statement.
1613 (print_{data,reloc,padding}_statement): Don't crash if
1614 output_section == NULL.
1615 (dprint_statement): New function.
1617 * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Fix
1618 call to sort_sections.
1622 * emultempl/aix.em (unix_ld): New static variable.
1623 (gld${EMULATION_NAME}_parse_args): Handle -unix.
1624 (gld${EMULATION_NAME}_before_allocation): If unix_ld, pass
1625 gc as false and export_defineds as true to size_dynamic_sections.
1627 * ldexp.c (exp_fold_tree): Permit assignments to dot in the final
1628 phase if the current section is abs_output_section.
1633 * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Fix call
1638 * ldgram.y (PHDRS): New token.
1639 (ifile_p1): Accept phdrs.
1640 (section): Accept phdr_opt at the end of the section definition.
1641 (phdr_op): New nonterminal.
1642 (phdrs, phdr_list, phdr, phdr_type, opt_hdrs, hdr): Likewise.
1643 * ldlex.l: Accept PHDRS.
1644 * ldlang.h (struct lang_output_section_phdr_list): Define.
1645 (lang_output_section_statement_type): Add phdrs field.
1646 (struct lang_phdr): Define.
1647 (LANG_PHDR_FILEHDR, LANG_PHDR_PHDRS): Define.
1648 (lang_new_phdr): Declare.
1649 * ldlang.c (lang_phdr_list): New static variable.
1650 (lang_output_section_statement_lookup): Initialize phdrs field.
1651 (lang_process): Call lang_record_phdrs.
1652 (lang_new_phdr): New function.
1653 (lang_section_in_phdr): New function.
1654 (lang_record_phdrs): New static function.
1655 * ld.texinfo: Document PHDRS.
1659 * scripttempl/ppcpe.sc: Moved .edata into its own section to
1664 * configure.host (m68*-motorola-sysv): Define HOSTING_CRT0 and
1665 HOSTING_LIBS for testing.
1666 (m88*-motorola-sysv3): Define HOSTING_CRT0 and HOSTING_LIBS for
1671 * lexsup.c (parse_args): Set config.dynamic_link to false for -N
1676 * configure: Rebuild with autoconf 2.7.
1680 * scripttempl/pe.sc: Two .junk's is too much junk.
1684 * configure.in: Use BFD_NEED_DECLARATION.
1685 * acconfig.h: Put NEED_DECLARATION_FREE in @TOP@ section.
1686 * configure, config.in: Rebuild with autoconf 2.6.
1688 * ldmain.c (constructor_callback): Don't warn about BFD_RELOC_CTOR
1689 being unsupported if this is not a relocateable link and the input
1690 BFD supports it, since ldctor_build_sets can cope with that case.
1694 * configure.tgt (powerpc-*-macos*): New target.
1695 * emulparams/ppcmacos.sh: New file, PowerMac emulation.
1696 * Makefile.in (ALL_EMULATIONS): Add eppcmacos.o.
1697 (eppcmacos.c): New target.
1698 * mpw-eppcmacos.c: Update.
1699 * mpw-make.sed: Edit out attempts to use {GENSCRIPTS}.
1703 * Makefile.in (CC_FOR_TARGET): Use @host@ and @target@, not
1704 $(host_canonical) and $(target_canonical).
1705 (CXX_FOR_TARGET): Likewise.
1709 * scripttempl/pe.sc (.endjunk): Move definition of `end' to here
1710 so the malloc heap begins at a sane place.
1714 Version 2.6 released.
1715 * ldver.c (ldversion): Update to 2.6.
1717 * Makefile.in (mostlyclean): Delete ldemul-list.h here, but not
1718 $(GENERATED_*FILES), since they need to be retained by distclean.
1719 (maintainer-clean, realclean): Delete them here.
1723 * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args): Open the
1724 base file with FOPEN_WB, not "w".
1726 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Use the
1727 environment variable LD_RUN_PATH if neither -rpath nor -rpath-link
1729 (gld${EMULATION_NAME}_before_allocation): Use the environment
1730 variable LD_RUN_PATH if -rpath was not used.
1731 * ld.texinfo, ld.1: Document LD_RUN_PATH.
1735 * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Recognize
1736 -bl and -bloadmap options.
1738 * ldfile.c (ldfile_try_open_bfd): If bfd_error_invalid_target,
1739 report a better error.
1741 * emultempl/aix.em (gld${EMULATION_NAME}_before_allocation): Add
1742 new local variable special_sections, and pass it to
1743 size_dynamic_sections. Look through the results, and move the
1744 sections around in the mapping so that they are defined correctly.
1748 * ldemul.c (ldemul_default_target): Cast getenv return value.
1752 * emulparams/ppcpe.sh (ARCH): New file for PowerPC Portable
1754 * scripttempl/ppcpe.sc: New file for PowerPC Portable Executable
1757 * configure.tgt (targ_extra_emuls): Added powerpcle-pe target.
1758 * Makefile.in (ALL_EMULATIONS): Added eppcpe.o target.
1760 * emultempl/pe.em (TARGET_IS_ppcpe): file tailoring macro
1761 (gld_$_before_allocation): added hooks for toc construction based
1766 * ld.texinfo: The linker does not use _main as an entry point.
1770 * scripttempl/m88kbcs.sc (.data): Calculate next boundary modulo
1775 * configure.in: Add test for whether free must be declared.
1776 * sysdep.h: Declare free if necessary. Include "ansidecl.h".
1777 * acconfig.h: Explain NEED_DECLARATION_FREE.
1778 * configure, config.in: Rebuild.
1780 * lexsup.c (parse_args): Take B:: out of shortopts.
1784 * emulparams/i386nbsd.sh (EXECUTABLE_SYMBOLS): Set __DYNAMIC to 0
1785 for now, as with m68k4kbsd, until shared library support gets
1788 * configure.host: For i386 BSD variants, crt0.o lives in
1789 /usr/lib. (True for NetBSD at least, unconfirmed for others.)
1793 * Makefile.in (ALL_EMULATIONS): Add edelta68.o.
1794 (edelta68.c): New target.
1795 * configure.tgt (m68*-motorola-sysv*): New target.
1796 * emulparams/delta68.sh: New file.
1797 * scripttempl/delta68.sc: New file.
1799 * scripttempl/m88kbcs.sc: Handle .init and .fini. Change section
1804 * ldgram.y (mri_script_command): Accept ',' as well as '=' in
1805 ALIGN and ALIGNMOD statements.
1807 * emultempl/aix.em: Include ldgram.h.
1808 (gld${EMULATION_NAME}_parse_args): Handle -pD and -pT, as used on
1810 * Makefile.in ($(EMULATION_OFILES)): Depend upon ldgram.h.
1814 * configure.host (alpha-*-linux*): New host.
1815 * configure.tgt (alpha-*-linux*): New target.
1819 * emultempl/aix.em (export_files): Remove.
1820 (import_files): Make static.
1821 (struct export_symbol_list): Define.
1822 (export_symbols): New static variable.
1823 (gld${EMULATION_NAME}_parse_args): Handle an initial -b option
1824 correctly. Call read_file for an export file.
1825 (gld${EMULATION_NAME}_before_allocation): Call
1826 bfd_xcoff_export_symbol for each export symbol, rather than
1827 calling read_file for each export file.
1828 (gld${EMULATION_NAME}_read_file): For an export file, make the
1829 exported symbols undefined, and store them on the export_symbols
1834 * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args):
1835 Don't hang if last option is unrecognised.
1836 (gld_${EMULATION_NAME}_set_symbols): Insert created
1837 symbols into ABS output section.
1841 * Makefile.in (ALL_EMULATIONS): Added support for the NetBSD
1843 (em68k4knbsd.c): New rule.
1845 * configure.tgt: Added support for the NetBSD m68k4k arch.
1847 * genscripts.sh, ldint.texinfo,
1848 emulparams/{a29k,armaoutb,armaoutl,coff_sparc,ebmon29k,gld960,
1849 gld960coff,go32,h8300,h8300h,h8500,h8500b,h8500c,h8500m,h8500s,
1850 hp300bsd,hp3hpux,hppaelf.sh,i386aout,i386bsd,i386coff,i386go32,
1851 i386linux,i386lynx,i386nbsd,lnk960,m68kaout,m68kcoff,m68klynx,
1852 m88kbcs,mipsbig,mipsbsd,mipsidt,mipsidtl,mipslit,news,ns32knbsd,
1853 pc532machaout,riscix,sa29200,sh,shl,sparclynx,sparcnbsd,
1854 st2000,sun3,sun4,vanilla,vax,vsta,w65,z8001,z8002}.sh: Changed
1855 PAGE_SIZE to TARGET_PAGE_SIZE.
1857 * emulparams/m68knbsd.h: Ditto.
1858 (TEXT_START_ADDR, NONPAGED_TEXT_START_ADDR): We have 8K pagesize.
1859 (EXECUTABLE_SYMBOLS): Hardcode __DYNAMIC to zero for the time
1862 * emulparams/m68k4knbsd.sh: New file.
1864 * scripttempl/aout.sc: Expand EXECUTABLE_SYMBOLS if relocating.
1868 * emultempl/aix.em: Include ldctor.h.
1869 (gld${EMULATION_NAME}_after_open): New static function.
1870 (gld${EMULATION_NAME}_before_allocation): Call find_relocs.
1871 (gld${EMULATION_NAME}_find_relocs): New static function.
1872 (gld${EMULATION_NAME}_find_exp_assignment): New static function.
1873 (ld_${EMULATION_NAME}_emulation): Use new after_open function.
1874 * scripttempl/aix.sc: Use CONSTRUCTORS in .data.
1875 * ldctor.c (struct set_info): Move definition into ldctor.h.
1876 (struct set_element): Likewise.
1877 (sets): Make non-static.
1878 (ldctor_add_set_entry): Add name parameter. Save it in the new
1880 (ldctor_build_sets): Avoid being called twice. Pass set element
1881 name to lang_add_reloc.
1882 * ldctor.h (struct set_info): Move definition here from ldctor.c.
1883 (struct set_element): Likewise. Add new field name.
1885 (ldctor_add_set_entry): Declare new name parameter.
1886 * ldwrite.c (build_link_order): Don't insist that either name or
1887 section be NULL in a lang_reloc_statement.
1888 * ldmain.c (add_to_set): Pass NULL to ldctor_add_new_set_entry for
1890 (constructor_callback): Pass name to ldctor_add_new_set_entry for
1893 * ldmisc.c (demangle): Fix indentation. Remove a leading period.
1897 * mpw-config.in: Add PowerMac target support, generate config.h.
1898 * mac-ld.r: New file, Mac resources.
1899 * mpw-make.sed: New file, edits Makefile.in into MPW syntax.
1900 * mpw-make.in: Remove.
1901 * mpw-eppcmacos.c: Prebuilt version of PowerMac linking script.
1905 * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Treat
1906 -static as a synonym for -bnso.
1908 * scripttempl/aix.sc: Move special symbols inside sections.
1909 Always start .data at 0.
1913 * Makefile.in (diststuff): Also make info.
1914 (maintainer-clean realclean): Also delete *.info*.
1918 * emultempl/aix.em: Add support for various AIX linker options,
1919 for AIX import and export files, and for AIX shared objects.
1920 * scripttempl/aix.sc: Add .pad. Put .ds just before the TOC.
1922 * ldmain.c (main): Initialize new field link_info.static_link.
1924 * ldmain.c (add_keepsyms_file): Add \n at end of einfo calls.
1925 (constructor_callback): Likewise.
1926 * ldmisc.c (vfinfo): Likewise.
1927 * ldwrite.c (build_link_order): Likewise.
1929 * ld.texinfo: The MRI ALIGN directive is supported.
1933 * emulparams/elf32vr4300.sh: Deleted.
1934 * emulparams/elf32vr4300el.sh: Deleted.
1935 * emulparams/elf32b4300.sh: Added.
1936 * emulparams/elf32l4300.sh: Added.
1937 * configure.tgt, Makefile.in: Updated the build to use the
1938 new 8.3 unique names.
1942 * ldlang.c (entry_symbol): Make non-static.
1943 * ldlang.h (entry_symbol): Declare.
1945 * ldlex.l: Treat PROVIDE as a keyword in expression state.
1949 * scripttempl/pe.sc (.bss): Move to be after .text
1953 * emultempl/sunos.em (gld${EMULATION_NAME}_find_exp_assignment):
1954 Search trinary.cond rather than searching trinary.lhs twice. From
1957 * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Move
1958 directory searching code into gld${EMULATION_NAME}_search_dir.
1959 (gld${EMULATION_NAME}_search_dir): New static function, extracted
1960 from gld${EMULATION_NAME}_find_so.
1961 (global_needed, global_found): New static variables.
1962 (gld${EMULATION_NAME}_after_open): New static function.
1963 (gld${EMULATION_NAME}_search_needed): New static function.
1964 (gld${EMULATION_NAME}_try_needed): New static function.
1965 (gld${EMULATION_NAME}_check_needed): New static function.
1966 (ld_${EMULATION_NAME}_emulation): Use new after_open function.
1967 * ld.texinfo, ld.1: Mention -rpath-link on SunOS.
1969 * Makefile.in (eelf32ppc.c): Depend upon elf32.em, not generic.em.
1970 (eelf32lppc.c): Likewise.
1971 * emulparams/elf32lppc.sh (TEMPLATE_NAME): Define as elf32.
1972 (GENERATE_SHLIB_SCRIPT): Define as yes.
1976 * emultempl/elf32.em: Struct bfd_elf_link_needed_list is now named
1977 bfd_link_needed-list; make appropriate changes.
1979 * configure.tgt (powerpc-*-aix*): New target; use aixppc.
1980 (rs6000-*-aix*): New target; use aixrs6.
1981 * emulparams/aixppc.sh, emulparams/aixrs6.sh: New files.
1982 * emultempl/aix.em: New file.
1983 * scripttempl/aix.sc: New file.
1984 * Makefile.in (ALL_EMULATIONS): Add eaixppc.o and eaixrs6.o.
1985 (eaixppc.c, eaixrs6.c): New targets.
1989 * scripttemp/pe.sc (.reloc): Move to the end.
1993 * ldlang.c (lang_finish): Don't try to use an entry_symbol from a
1994 section which was not linked into the final output.
1998 * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args): Fix
2003 * ld.h (args_type): Add rpath_link field.
2004 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search for
2005 required dependencies in rpath_link path. Only search
2006 LD_LIBRARY_PATH when configured native.
2007 * lexsup.c (parse_args): Recognize -rpath-link.
2008 * ld.1, ld.texinfo: Document -rpath-link.
2012 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
2013 bother searching for needed libraries unless doing a final link.
2019 * ld/ld.1: Fix formatting bugs.
2023 * ldexp.c (exp_get_abs_int): Return bfd_vma, not int.
2024 * ldexp.h (exp_get_abs_int): Update declaration.
2025 * ldlang.c (print_output_section_statement): Use fprintf_vma to
2026 print return value of exp_get_abs_int.
2030 * emultempl/elf32.em (global_stat): New file static variable.
2031 (gld${EMULATION_NAME}_try_needed): Call stat_needed to make sure
2032 that the file has not already been included under another name.
2033 (gld${EMULATION_NAME}_stat_needed): New static function.
2037 * scripttempl/armcoff.sc: Start .text at 0x8000.
2038 Start .data at 0x40000.
2042 * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): If
2043 command_line.rpath is set, use it, rather than the -L options, to
2044 build the rules section.
2045 * ld.texinfo: Document this use of -rpath.
2047 * lexsup.c (parse_args): Don't set link_info.shared for -assert
2048 pure-text. Pass true, not 1, to lang_add_entry.
2049 * emultempl/sunos.em (find_assign): New static variable.
2050 (found_assign): New static variable.
2051 (gld${EMULATION_NAME}_before_allocation): Rename local h to hdyn.
2052 If not a relocateable link, and no start symbol was specified on
2053 the command line, and there are any undefined symbols, set
2054 link_info.shared. If link_info.shared is set, set the address of
2055 the .text section to 0x20.
2056 (gld${EMULATION_NAME}_find_assignment): Rename from
2057 gld${EMULATION_NAME}_find_statement_assignment. If find_assign is
2058 set, then just set found_assign based on whether an assignment is
2059 found to find_assign.
2060 (gld${EMULATION_NAME}_get_script): Don't use a special script when
2061 producing a shared library.
2062 * emulparams/sun4.sh (GENERATE_SHLIB_SCRIPT): Remove.
2063 * scripttempl/aout.sc: Remove CREATE_SHLIB tests.
2064 * ldlang.c (entry_from_cmdline): New global variable.
2065 (lang_add_entry): Change cmdline parameter from int to boolean.
2066 Use global entry_from_cmdline rather than function static
2068 * ldlang.h (entry_from_cmdline): Declare.
2069 (lang_add_entry): Change declaration of second parameter from int
2071 * ldgram.y: Pass false, not 0, to lang_add_entry.
2075 * ld.h (parsing_defsym): Declare.
2076 * ldlex.h (lex_string): Declare.
2077 * ldlex.l (lex_string): Define.
2078 * lexsup.c (parsing_defsym): Define.
2079 (parse_args): In OPTION_DEFSYM case, set lex_string before calling
2080 lex_redirect, and clear it after calling yyparse. Set
2081 parsing_defsym around call to yyparse.
2082 * ldmain.c (main): Set lex_string before calling lex_redirect, and
2083 clear it after calling yyparse.
2084 * ldmisc.c (vfinfo): For %S, handle --defsym arguments and built
2085 in linker scripts correctly.
2087 * scripttempl/sparccoff.sc: Add .ctors/.dtors handling like other
2088 COFF targets, allowing for the leading underscore used on SPARC
2091 * lexsup.c (parse_args): Handle -assert.
2092 * emulparams/sun4.sh (GENERATE_SHLIB_SCRIPT): Define.
2093 * emultempl/sunos.em (gld${EMULATION_NAME}_get_script): Use the
2094 shared library script when appropriate.
2095 * scripttempl/aout.sc: If CREATE_SHLIB is set, start the .text
2096 section at SIZEOF_HEADERS.
2100 * Makefile.in (earmcoff.c): Build.
2101 * configure.tgt (arm-*-coff): New target
2102 * emulparms/armcoff.sh: New file.
2103 * scripttempl/armcoff.sc: New file.
2107 * scripttempl/i386coff.sc: Remove .data2; no longer needed.
2111 * ldfile.c (ldfile_set_output_arch): Make arch const.
2115 * scripttempl/elfppc.sc: Correctly locate __bss_start at the
2116 beginning of the .bss area, not at the end of data. Add
2117 __sbss_{start,end} symbols.
2121 * Makefile.in (CC_FOR_TARGET): Quote $(program_transform_name).
2122 (CXX_FOR_TARGET, install): Likewise.
2127 * Makefile.in (CC_FOR_TARGET): Remove brokensed stuff.
2128 (CXX_FOR_TARGET): Likewise.
2129 (install): Likewise.
2130 (GENERATED_HFILES): Remove config.h.
2131 (.dep): Depend upon config.h.
2135 * configure.tgt (mips*-dec-netbsd*): New target.
2139 * configure.host (m88*-*-dgux*): Fix another shell syntax error.
2143 * configure.host (i[345]86-*-bsd*): Fix shell syntax error.
2147 * scripttemp/pe.sc: Allow both spellings of .ctors/.dtors.
2148 Start .text section on the right boundary. Always align
2153 * Makefile.in (maintainer-clean): New target.
2155 * ldmain.c (struct warning_callback_info): Define.
2156 (warning_callback): Add new parameter symbol. Call
2157 warning_find_reloc to try to find the section and VMA.
2158 (warning_find_reloc): New static function.
2159 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
2160 Pass NULL as symbol parameter to warning callback.
2162 * ld.texinfo: Clarify -L option.
2164 * ldlang.c (lang_one_common): Add cast to avoid warning.
2165 (topower): Likewise. Also, reindent.
2166 * ldwrite.c (clone_section): Change i to unsigned int.
2167 * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Add
2168 cast to avoid warning.
2172 * Makefile.in (config.status): Depend upon configure.tgt.
2174 * ldemul.h (ldemul_set_symbols): Declare.
2175 (ldemul_parse_args): Declare.
2176 * ldemul.c (ldemul_parse_args): Fix indentation.
2178 * configure.in: Call AC_HEADER_DIRENT.
2179 * configure, config.in: Rebuild.
2180 * emultempl/sunos.em: Use autoconf recommend mechanism to define
2181 DIR and struct dirent.
2183 * configure.tgt (mips*-*-bsd*): New case.
2185 * configure.host (i[345]86-sequent-ptx* | i[345]86-sequent-sysv*)
2187 * configure.tgt (i[345]86-*-ptx*): New case.
2191 * config.in: Rename from config.h.in.
2192 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
2193 Check for config.h:config.in when creating stamp-h.
2194 * configure: Rebuild.
2195 * Makefile.in (stamp-h): Depend upon config.in rather than
2196 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
2197 calling config.status.
2199 * Makefile.in (distclean): Remove config.h and stamp-h.
2201 * configure.host (sparc-*-sunos64*): Remove.
2202 * ldlang.c (lang_map): Check BFD64, not HOST_64_BIT.
2204 * ldexp.c (exp_fold_tree): Don't warn about moving the location
2205 counter backward in the absolute section.
2209 * configure.in: Rewrite to use autoconf.
2210 * configure.host: New file.
2211 * configure.tgt: New file.
2212 * aclocal.m4: New file.
2213 * configure: New file, built by autoconf.
2214 * acconfig.h: New file.
2215 * config.h.in: New file, built by autoheader.
2216 * sysdep.h: New file.
2217 * ld.h: Incorporate old contents of config.h.
2219 * Makefile.in: Various changes for new configure script. Also:
2220 (CC_FOR_BUILD): Remove.
2221 (ldmain.o): Don't bother to ensure that EMUL is non-empty.
2222 (dep.sed): Use @SRCDIR@, not @srcdir@.
2223 * dep-in.sed: Use @SRCDIR@, not @srcdir@.
2224 * genscripts.sh: Create ldscripts if it does not exist.
2225 * ldemul.c, lexsup.c, mpw-emipsidt.c: Don't include "config.h".
2226 * mpw-esh.c, emultemp/*.em: Likewise.
2227 * ldmain.c: Likewise. Include <ctype.h>. Don't try to set
2229 * config/*.mt, config/*.mh: Remove.
2233 * configure.in: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
2234 ns32k-pc532-lites* like ns32k-pc532-netbsd*. From Ian Dall.
2238 * scripttempl/pe.sc: Fix typo in spelling of .ctors/.dtors.
2242 * ldmain.c (warning_callback): Add abfd, section, and address
2244 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
2245 Change call to warning accordingly.
2247 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): If not
2248 relocateable and not shared, put .gnu.warning.SYMBOL sections into
2253 * configure.in: Added mips*vr4300-idt-elf* and
2254 mips*vr4300el-idt-elf* targets.
2255 * Makefile.in: Added eelf32vr4300* targets.
2256 * emulparams/{elf32vr4300.sh, elf32vr4300el.sh}: Added.
2257 * config/{mips-vr4300.mt, mips-vr4300el.mt}: Added.
2261 * scripttempl/a29k.sc: Fix to be reasonable. From Brendan Kehoe
2266 * ldemul.c (ldemul_parse_args): New.
2267 * ldemul.h (ld_emulation_xfer_struct): Add parse_args.
2268 * lexsup.c (all pe stuff): Moved into pe.em
2269 (parse_args): Call emulation arg parser.
2270 * emultempl/pe.em (parse_args): handle PE specfic args.
2274 * ldlang.c (lang_memory_region_lookup): Don't use the first region
2275 as the default region. Create a new region instead.
2279 * ldemul.c (ldemul_set_symbols): New function.
2280 * ldemul.h (ld_emulation_xfer_struct): Add set_symbols.
2281 * ldmain.c (main): Add call to ldemul_set_symbols.
2282 * lexsup.c (set_pe_value): New args.
2284 (parse_args): Cope with new set_pe_value args.
2285 * emultempl/pe.em (set_symbols): New function.
2286 (ld_emulation_xfer_struct): Add set_symbols.
2287 * scripttempl/pe.sc: Use new symbols.
2291 * lexsup.c (parse_args): Don't call set_default_dirlist for -O.
2292 For -Y, ignore a leading `P,', and only call set_default_dirlist
2293 after processing all the other arguments.
2297 * scripttempl/pe.sc: Keep .edata, don't base stabs at 0.
2298 * emulparams/armpe.sh: Run PE script.
2302 * ldmain.c (main): Remove PE stuff.
2303 * lexsup.c (options): Load more PE options.
2304 (set_pe_value): New function.
2309 * emultempl/{armpe.sc, i386pe.sc}: Deleted.
2310 * emultempl/pe.sc: New file performs generic PE support and sorts
2312 * emulparams/{armpe.sh,i386pe.sh}: Use new file.
2313 * scripttempl/{armpe.sc, i386pe.sc}: Deleted
2314 * scripttempl/pe.sc: New.
2315 * Makefile.in: Use new files.
2319 * scripttempl/h8500s.sc (.rdata): All data must go in data segment.
2320 (.strings,.ctors,.dtors): Likewise.
2324 * scripttempl/armpe.sc: Always start code at 0x401000, even
2326 * ldwrite.c (strdup): New extern declaration.
2327 * ldgram.y (atype): New rule to clarify type parsing.
2328 * ldlang.c (init_os): Remove commented out code.
2329 (lang_size_sections): Set SEC_ALLOC and SEC_LOAD bits
2330 unless told not to by the link script.
2334 * ldlang.c (lang_set_startof): New static function.
2335 (lang_process): Call it.
2337 * ldgram.y: Tweak casesymlist to avoid bison errors.
2339 * lexsup.c (parse_args): Accept -h as a synonym for --soname, for
2340 Solaris compatibility.
2344 * ldgram.y (YYDEBUG): If not defined, define as 1.
2345 (CASE, EXTERN, START): New tokens.
2346 (mri_script_command): Handle CASE, EXTERN, INCLUDE, START.
2347 (casesymlist): New nonterminal.
2348 (extern_name_list): New nonterminal.
2349 * ldlex.l: Accept lower case trailing base specifiers. Don't
2350 ignore the first digit when the base is a suffix. Accept many
2351 EXPRESSION state tokens in MRI state. Support MRI continuation
2352 lines and MRI semicolon comments. Accept all MRI keywords in
2353 lower case. Add CASE, EXTERN, and START MRI keywords.
2357 * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Use xmalloc
2362 * Makefile.in (CC_FOR_TARGET, CXX_FOR_TARGET): Don't use
2363 $r/../gcc/xgcc unless it is present.
2367 * scripttempl/m68kcoff.sc: Only put .ctors and .dtors in .text
2369 * scripttempl/m68klynx.sc: Likewise.
2370 * scripttempl/nw.sc: Likewise.
2371 * scripttempl/sa29200.sc: Likewise.
2372 * scripttempl/sparclynx.sc: Likewise.
2376 * emulparams/{z8001.sh, z8002.sh}: Fix typo.
2380 * configure.in (i[345]86-*-linuxoldld): Treat like linuxaout*.
2384 * scripttempl/i386pe.sc: Cope with constructors.
2385 * scripttempl/z8ksim.sc: Deleted.
2386 * scripttempl/z8000.sc: Resurrected as this, but
2387 can handle z8001 and z8002 formats.
2388 * emulparams/z8ksim.sh: Deleted.
2389 * emulparams/{z8001.sh, z8002.sh}: New files.
2390 * config/z8ksim.mt: Deleted
2391 * config/z8k-coff.mt: New, generates both emulations.
2395 * ldmisc.c (vfinfo): In %C and %D case, always print the BFD using
2396 %B, in case it is in an archive.
2400 * ldlang.c (lang_process): Call reset_memory_regions for each
2405 * scripttempl/elfppc.sc: Add support for .sdata, .sbss, and
2410 * ldmain.c (constructor_callback): Allocate set_name in stack
2411 frame, rather than always calling alloca with a fixed size.
2415 * emulparams/armpe.sh (OUTPUT_FORMAT): Change to pei-arm-little.
2416 (LITTLE_OUTPUT_FORMAT, BIG_OUTPUT_FORMAT): Define.
2420 * ldwrite.c (clone_section): Set the alignment of the clone
2421 section to that of the section being cloned.
2423 * ldwrite.c (split_sections): Don't split the first input section
2424 into a new output section.
2428 * emulparams/elf32ppc.sh (TEMPLATE_NAME): Define as elf32.
2429 (GENERATE_SHLIB_SCRIPT): Define as yes.
2433 * emultempl/mipsecoff.em (check_sections): Use %P, not %F.
2435 * ldver.c (help): Update list of options to match currently
2440 * emultempl/lnk960.em (ld_lnk960_emulation): Initialize
2443 * ldexp.c (exp_intop): Don't cast stat_alloc arg to bfd_size_type;
2444 it takes a size_t anyhow.
2445 (exp_binop): Likewise.
2446 (exp_trinop): Likewise.
2447 (exp_unop): Likewise.
2448 (exp_nameop): Likewise.
2449 (exp_assop): Likewise.
2450 * ldlang.c (lang_memory_region_lookup): Likewise.
2451 (init_os): Likewise.
2452 (ldlang_add_undef): Likewise.
2453 (insert_pad): Likewise.
2454 * ldfile.c (ldfile_add_arch): Don't cast xmalloc arg to
2457 * Makefile.in (ALL_EMULATIONS): It's earmaoutb.o, not earmoutb.o.
2461 * ldemul.h (ldemul_open_dynamic_archive): Add search parameter to
2463 (ld_emulation_xfer_type): Add search parameter to
2464 open_dynamic_archive entry point.
2465 * ldemul.c (ldemul_open_dynamic_archive): Add search parameter.
2466 * ldfile.c (ldfile_try_open_bfd): Rename from try_open_bfd, and
2467 make non-static. Change all callers to use new name.
2468 (ldfile_open_file_search): Make static. If entry is dynamic, call
2469 ldemul_open_dynamic_archive.
2470 (ldfile_open_file): Don't call ldemul_open_dynamic_archive.
2471 * ldfile.h (ldfile_open_file_search): Don't declare.
2472 (ldfile_try_open_bfd): Declare.
2473 * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
2474 Accept search parameter. Don't search for a library, just look in
2476 * emultempl/linux.em (gld${EMULATION_NAME}_open_dynamic_archive):
2481 * ldmain.c (set_scripts_dir): Don't base script directory on
2486 * ldmisc.c (vfinfo): Don't print the line number if it isn't
2491 * ld.h (ld_config_type): Add field warn_constructors.
2492 * ldmain.c (add_to_set): Warn if config.warn_constructors.
2493 (constructor_callback): Likewise.
2494 * lexsup.c (parse_args): Handle -warn-constructors.
2495 * ld.texinfo, ld.1: Document -warn-constructors.
2497 * emultempl/elf32.em (gld${EMULATION_NAME}_check_needed): Don't
2498 get confused by directory names if we searched for the file.
2501 * ldlang.h (lang_input_statement_type): Add new field dynamic.
2502 * ldlang.c (new_afile): Set dynamic from config.dynamic_link.
2503 * ldfile.c: Include bfdlink.h.
2504 (ldfile_open_file): Check dynamic field of entry, not global
2505 dynamic_link field. Don't do a dynamic search when doing a
2507 * ldmain.c (main): Don't warn about dynamic_link for a
2509 * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Skip file if
2511 (gld${EMULATION_NAME}_create_output_section_statements): Always
2512 loop over input files.
2513 * Makefile.in: Rebuild dependencies.
2515 * ld.texinfo, ld.1: Document -Bstatic, -Bdynamic, -Bshared, and
2520 * ldmain.c (main): Set link_info.symbolic to false.
2521 * lexsup.c (parse_args): Handle -Bsymbolic.
2525 * ldmain.c (HAVE_SBRK): Define for everything except
2526 specific systems that are known to not support sbrk.
2527 (main): Use HAVE_SBRK to decide whether or not to use sbrk.
2531 * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment):
2532 Handle etree_provide.
2534 * emultempl/elf32.em (global_needed): New static variable.
2535 (global_found): Likewise.
2536 (gld${EMULATION_NAME}_after_open): New static function.
2537 (gld${EMULATION_NAME}_search_needed): Likewise.
2538 (gld${EMULATION_NAME}_try_needed): Likewise.
2539 (gld${EMULATION_NAME}_check_needed): Likewise.
2540 (ld_${EMULATION_NAME}_emulation): Replace after_open_default with
2541 gld${EMULATION_NAME}_after_open.
2545 * configure.in (i386-*-win32): New target.
2549 * lexsup.c (parse_args): Let -G either set the small data size or
2550 be equivalent to --shared, depending on the next argument. Accept
2551 and ignore -z for Solaris compatibility.
2555 * lexsup.c (parse_args): Cast fopen result to PTR before storing
2556 it in link_info.base_file. Fix indentation.
2560 * ldmain.c (main): Always initialize PE info in link_info.
2561 * lexsup.c (OPTION_BASE_FILE): New option.
2562 (parse_args): Handle new option.
2563 * emulparams/armpe.sh: Output pei.
2564 * emultempl/i386pe.em: Add newline to end.
2565 * scripttempl/armpe.sc: Change output and quote the $s.
2566 * scripttempl/i386pe.sc: Change output and quote the $s.
2572 * configure.in (i386-*-msdos*, i386-*-moss*): New targets.
2573 * Makefile.in (ALL_EMULATIONS): Added i386msdos.o.
2574 (i386msdos.o): New target.
2575 * config/i386-msdos.mt: Created.
2576 * emulparams/i386msdos.sh: Created.
2577 * scripttempl/i386msdos.sc: Created.
2581 * scripttempl/elfppc.sc (.fixup): Add support for a .fixup section
2582 that contains pointers to be relocated.
2586 * mpw-esh.c: New file, modified for MPW from esh.c.
2587 * scripttempl/sh.sc: Reformatted to simplify MPWification,
2588 use *() to concat stab sections instead of [].
2592 * scripttempl/armpe.sc: Add constructor support.
2596 * ldlang.c (lang_size_sections): Any section with a DATA
2597 statement has contents.
2601 * emulparams/m68kelf.sh (NOP): Define.
2602 (DYNAMIC_LINK): Don't define.
2603 (TEXT_START_ADDR): Set to 0x80000000; the extra 0x100 for headers
2604 will come from the linker script.
2608 * emulparams/armpe.sh, scriptempl/armpe.sc: Add end and stack.
2612 * configure.in (i[345]86-*-gnu*): Use GNU elf config.
2617 * Makefile.in: Fixup more gotchas from renaming elf32ppcle to
2622 Add support for ARM-PE.
2623 * Makefile.in (ALL_EMULATIONS): Add armpe.o
2624 * configure.in: Recognize armpe.
2625 * config/arm-pe.mt: New file.
2626 * emulparams/armpe.sh: New file.
2627 * scripttempl/armpe.sc: New file.
2632 * configure.in (h8300h-*-hms): Deleted
2633 * config/cf-h8300h.mt: Deleted.
2640 * Makefile.in (ALL_EMULATIONS): Add earmout[lb].o
2641 * configure.in: Recognize arm{,e[lb]-*-aout.
2642 * config/arm[lb]-aout.mt: New files.
2643 * emulparams/armaout[lb].sh: New files.
2644 * scripttempl/armaout.sc: New file.
2648 * config/ppcle-elf32.mt (EMUL): Use elf32lppc, not elf32ppcle, to
2649 be unique in 8 characters for DOS.
2651 * emulparams/elf32lppc.sh: New file, renamed from elf32ppcle.sh.
2652 * emulparams/elf32ppcle.sh: Deleted.
2657 Initial support for PE executables (eg NT, win32)
2659 * Makefile.in (configure.in, ei386pe): Add support.
2660 * ldmain.c (main): Initialize PE argument info.
2661 * ldwrite.c (print_file_stuff): Don't print out .drectve
2662 and .debug section info.
2663 * lexsup.c (set_subsystem, set_stack_heap, OPTION_HEAP,
2664 OPTION_SUBSYSTEM, parse_argsm set_subsystem, set_stack_heap):
2665 Handle new arguments.
2666 * config/i386-pe.mt, emultempl/i386pe.em, scripttempl/i386pe.sc:
2671 * scripttempl/hppaelf.sc: Remove .PARISC.unwind section from text
2672 segment. This allows ld -r to preserve unwind sections.
2676 * configure.in: Add little endian PowerPC support.
2678 * Makefile.in (ALL_EMULATIONS): Add eelf32ppcle.o.
2679 (eelf32ppcle.c): Support for little endian PowerPC.
2681 * config/ppcle-elf32.mt: New file for little endian PowerPC.
2682 * emulparams/elf32ppcle.sh: Ditto.
2686 * ldlang.c (print_output_section_statement): Check
2687 subsection_alignment, instead of checking section_alignment twice.
2692 * configure.in (hppa*-*-lites*): Handle like hppa*-*-*elf*.
2696 * ldwrite.c (ldwrite): Before doing anything, reset the error
2697 code. If bfd_final_link returns an error, but the error code is
2698 unset, don't issue an extra message. Assume a correct error
2699 message was already set.
2703 * Makefile.in (ALL_EMULATIONS): Added em68kelf.o.
2704 (em68kelf.o): New target.
2705 * config/m68k-elf.mt, emulparams/m68kelf.sh: New files.
2706 * configure.in: Use them for m68*-*-elf.
2710 Merge in support for Mac MPW as a host.
2711 (Old change descriptions retained for informational value.)
2713 * mpw-config.in (i386-unknown-aout): Change to i386-unknown-go32.
2714 (i386-unknown-coff): Remove.
2715 (sh-hitachi-hms): New target.
2716 (emulation_ofiles): Set correctly for each target.
2717 (version, TDEFINES): Add to makefile fragment.
2718 * mpw-make.in (BISON): Use byacc instead of bison.
2719 (em_*.c): Replace with e*.c everywhere.
2720 (ldgram.h): Separate action from ldgram.c generation.
2721 (LD_PROG): Depend on Version.r.
2722 (Version.r): generate from version info.
2723 * mpw-emipsidt.c: New file, modified for MPW from emipsidt.c.
2725 * mpw-config.in (m68k-apple-macos, ppc-apple-macos,
2726 i386-unknown-aout, i386-unknown-coff): New targets.
2727 (m68k-aout, m68k-coff): Remove targets.
2728 (mk.tmp): Add definition of EMUL.
2730 * mpw-config.in (emulname): Set based on target.
2731 (ldemul-list.h): Construct.
2732 * mpw-make.in (install-only): New target.
2733 (install): Depend on install-only.
2735 * mpw-make.in (bindir): Fix pathname.
2736 (install): Move here from mpw-build.in.
2738 * mpw-config.in: New file, MPW configuration fragment.
2739 * mpw-make.in: New file, MPW makefile fragment.
2740 (This file is semi-automatically generated from Makefile.in.)
2741 * ldfile.c (slash): If MPW, set to `:'.
2742 * ldlex.l (TRUE_FALSE_ALREADY_DEFINED): If MPW, set this to
2743 prevent redefinition errors.
2748 * emulparams/arcelf.sh (ENTRY): Define.
2753 * ldwrite.c (clone_section): Align clone sections on even
2758 * configure.in: Change linux to default to elf. Using
2759 i[345]86-*-linuxaout will build a linker which defaults to a.out.
2760 * config/i386-laout.mt: Rename from old config/i386-linux.mt.
2761 * config/i386-linux.mt: Rename from old config/i386-lelf.mt.
2762 * config/i386-lelf.mt: Remove.
2766 * ldmain.c (main): If opening the map file fails, call
2767 bfd_set_error before calling einfo.
2769 * ld.texinfo, ld.1: Document the -no-keep-memory option.
2773 * ldmain.c (main): Revert patch of March 10, since the SVR4 linker
2774 does mark shared libraries as executable.
2778 * ldlang.c (lang_common): Change power to int. Pass larger values
2779 before smaller values.
2780 (lang_one_common): Treat info as int *. Don't bother to check for
2781 last value, since it is now zero.
2785 * ldlang.c (load_symbols): An empty archive is OK.
2789 * ldmain.c (progress.h): Include.
2790 (main): Call START_PROGRESS and END_PROGRESS.
2794 * scripttempl/elfppc.sc: Move _GOT2_END_ after the .ctors and
2795 .dtors sections, so that these pointers get relocated also.
2796 Define the symbols __{C,D}TOR_{LIST,END}__ to mark the beginning
2797 and end of the constructors/destructors.
2801 * ldlang.c (load_symbols): If whole_archive is true and ENTRY
2802 describes an archive, call bfd_link_add_symbols on each member.
2803 * ldmain.c (whole_archive): New variable.
2804 (main): Initialize it to false.
2805 * ldmain.h: Declare whole_archive.
2806 * lexsup.c (parse_args): Grok --whole-archive switch.
2807 * ld.texinfo, ld.1: Document --whole-archive.
2811 * genscripts.sh (EMULATION_NAME): Set LIB_PATH to empty when not
2812 using the default emulation.
2814 * config/dgux.mh (HOSTING_EMU): Use -m rather than trying to set
2816 * config/hppaelf.mh (HOSTING_EMU): Likewise.
2820 * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Set force_maj
2825 * ldmain.c (main): Don't set EXEC_P if link_info.shared is set.
2827 * ldlex.l: Return -lFILENAME as the token LNAME.
2828 * ldgram.y: Add token LNAME.
2829 (input_list): Treat LNAME like NAME, but pass it to
2830 lang_add_input_file as lang_input_file_is_l_enum.
2831 * ld.texinfo: Document using -lFILENAME in INPUT.
2835 * ldlang.c (lang_check): If the architectures are compatible call
2836 bfd_merge_private_bfd_data to let the backend do additional
2842 * emulparams/arcelf.sh (OUTPUT_FORMAT): Change to elf32-littlearc.
2843 (LITTLE_OUTPUT_FORMAT, BIG_OUTPUT_FORMAT): Define.
2848 * ldemul.c (ldemul_choose_mode): If emulation not recognized, list
2849 all supported emulations.
2853 * ldemul.c (ldemul_list_emulations): New function.
2854 * ldemul.h (ldemul_list_emulations): Declare.
2855 * ldver.c (help): List supported targets and emulations.
2859 * scripttempl/elf.sc (.debug): Relocate to address 0.
2860 (.debug_srcinfo, .debug_aranges, .debug_pubnames,
2861 .debug_sfnames, .line): Likewise.
2865 * emultempl/elf32.em (hold_rel): New static variable.
2866 (gld${EMULATION_NAME}_place_orphan): Place readonly sections with
2867 contents whose names begin with ".rel" after hold_rel. Remove the
2868 assertion which checked for unplaced .rel sections. Don't try to
2869 sort the section into place if place->bfd_section is NULL.
2870 (gld${EMULATION_NAME}_place_section): Set hold_rel to the first
2871 section beginning with ".rel".
2876 * ld.texinfo: -X and -x work even if -s or -S are not specified.
2877 * ld.1: Similar change.
2881 * emulparams/gld960coff.sh (COFF_CTORS): Define.
2882 * scripttempl/i960.sc: Use COFF_CTORS if CONSTRUCTING.
2886 * configure.in (i[345]86-*-linuxelf*): New target. Use i386-lelf.
2887 (i[345]86-*-gnuelf*): New target. Use i386-gelf.
2888 * config/i386-lelf.mt: New file.
2889 * config/i386-gelf.mt: New file.
2893 * configure.in: Match on mips-ecoff, and default to the IDT
2898 * scripttempl/elfppc.sc: Add support for .got1 and .got2 sections.
2899 Offset _GLOBAL_OFFSET_TABLE_ 32768 from the start of the GOT area
2900 to double the size of the table.
2905 * emulparms/arcelf.sh (TEMPLATE_NAME): Comment out.
2910 * Makefile.in (distclean): Do recursive deletion, since ldscripts
2915 * ldmain.c (main): If trace_file_tries is true, and we are using
2916 an internal linker script, print out the script.
2917 * ldfile.c (try_open): Reindent function. Make the messages about
2918 opening script files more informative.
2920 * lexsup.c (parse_args): For -V, call ldversion with 1, not 0.
2921 * ld.texinfo, ld.1: Update accordingly.
2925 * ldlang.c (lang_one_common): Adjust references to common symbol
2926 information for new structure.
2930 * ldmain.c (undefined_symbol): Handle section being NULL.
2932 * ldctor.c (ldctor_build_sets): Handle bfd_link_hash_defweak.
2933 * ldexp.c (fold_name): Likewise.
2934 * ldlang.c (print_one_symbol): Likewise.
2935 (lang_finish): Likewise.
2936 * ldmain.c (multiple_common): Likewise.
2937 * ldwrite.c (print_symbol): Likewise. Also, bfd_link_hash_weak
2938 renamed to bfd_link_hash_undefweak.
2940 * scripttempl/alpha.sc: Set address of .data section correctly
2941 when -n or -N is used. Patch from Chris G Demetriou
2943 * scripttempl/mips.sc: Similar change.
2947 * ldlang.c (lang_size_sections): Clarify error message when user
2948 specified start addr conflicts with region. Fix resetting of
2953 * ldexp.c (fold_name): In case NAME, permit an absolute symbol
2954 in lang_allocating_phase_enum.
2958 * Makefile.in (distclean): Depend upon clean. Don't bother to
2959 remove files which will be removed by clean. From patch by
2964 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): For
2965 a MIPS target, clobber the size of all but the first input
2966 .reginfo section to be 0, so that lang_size_sections sets the
2967 correct size for the output .reginfo section.
2971 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
2972 Remove unused variable is.
2976 * configure.in: Add support for powerpc-*-eabi.
2978 * scripttempl/elfppc.sc: New file for PowerPC embedded ABI
2981 * emulparams/elf32ppc.sh (SCRIPT_NAME): Use elfppc.sc instead of
2982 elf.sc, which defines some new symbols PowerPC elf needs.
2986 * ldctor.c (ldctor_add_set_entry): Don't dump core if a
2987 constructor entry is in the absolute section.
2991 * configure.in (i[345]86-*-gnu*): Set ld_target to i386-gnu.
2992 * config/i386-gnu.mt: New file. Include ELF support.
2996 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): If
2997 there are any input sections named .gnu.warning, treat them as
2998 containing a warning message to be printed by the linker, and
2999 clobber the size so that the message is not copied into the output
3001 * scripttempl/elf.sc: Put .gnu.warning sections into the .text
3004 Sun Jan 15 16:45:00 1995 Steve Chamberlain <sac@splat>
3006 * configure.in (w65-*-*): New target.
3007 * Makefile.in: Update.
3008 * scripttempl/w65.sc: New.
3009 * config/coff-w65.mt: New.
3013 * ldlang.c (lang_place_orphans): Don't ignore files with
3014 just_syms_flag set. Instead, put all their sections in
3015 bfd_abs_section_ptr, using the section VMA as the output_offset.
3019 * ldctor.c (ldctor_build_sets): Don't use `const' with typedef
3020 name `reloc_howto_type', since it's now defined to be const.
3021 * ldlang.c (lang_add_reloc): Ditto.
3022 * ldlang.h (lang_reloc_statement_type, lang_add_reloc): Ditto.
3026 * ldexp.c (fold_binary): Adding or subtracting an absolute value
3027 to a relative value does not require forcing the relative value to
3028 be absolute. Also, reindent function.
3032 * ldwrite.c (clone_section): Create a symbol with the
3033 same name as the section.
3037 * ld.h (split_by_reloc, split_by_file): New flags.
3038 * ldwrite.c (clone_section, split_sections): New functions.
3039 * lexsup.c (parse_args): Understand new split options.
3044 * configure.in (arc-elf): New target.
3045 * Makefile.in (earcelf.c): New target.
3046 * config/arc-elf.mt: New file.
3047 * emulparms/arcelf.sh: New file.
3052 * scripttempl/elf.sc: Move .ctors and .dtors from .text segment to
3053 .data segment. They must be writable when creating a shared
3058 * emultempl/miposecoff.em: New file.
3059 * emulparams/mipsidt.sh (TEMPLATE_NAME): Set to mipsecoff.
3060 * emulparams/mipsidtl.sh (TEMPLATE_NAME): Likewise.
3061 * scripttempl/mips.sc: Put .rel.sdata sections in .text, and
3062 provide __runtime_reloc_start and __runtime_reloc_stop if they are
3063 used. Align _fdata to a 16 byte boundary.
3064 * Makefile.in (emipsidt.c): Depend upon mipsecoff.em rather than
3066 (emipsidtl.c): Likewise.
3067 (check): Pass CC_FOR_HOST and CFLAGS_FOR_HOST to runtest.
3069 * ld.h (args_type): Add new field embedded_relocs.
3070 * ldemul.h (ldemul_after_open, after_open_default): Declare.
3071 (ld_emulation_xfer_struct): Add new field after_open.
3072 * ldemul.c (ldemul_after_open): New function.
3073 (after_open_default): New function.
3074 * ldlang.c (lang_process): Call ldemul_after_open.
3075 * lexsup.c (parse_args): Handle --embedded-relocs.
3076 * emultempl/elf32.em (ld_${EMULATION_NAME}_emulation): Initialize
3077 new after_open field to after_open_default.
3078 * emultempl/generic.em, emultempl/gld960.em: Likewise.
3079 * emultempl/gld960c.em, emultempl/hppaelf.em: Likewise.
3080 * emultempl/linux.em, emultempl/m88kbcs.em: Likewise.
3081 * emultempl/sunos.em, emultempl/vanilla.em: Likewise.
3082 * ld.texinfo, ld.1: Mention -embedded-relocs.
3086 * Makefile.in: Add eshl.o.
3087 * config/coff-sh.mt: Add shl emulation.
3091 * scripttempl/elf.sc: Fill .text section with NOPS. From Eric
3097 * config/i386linux.mh: New file; set HOSTING_CRT0.
3098 * genscripts.sh: Don't put ${libdir} in LIB_PATH if it is
3099 /usr/lib, since that is already in LIB_PATH.
3103 * scripttempl/hppaelf.sc (.text): Handle a use rdefined text start
3105 (.data, .bss): If "-N", then place the data/bss just after the end
3106 of the .text section rather than at the default 0x40000000.
3108 * scripttempl/hppaelf.sc (.text): Place unwind descriptors in the
3114 * ldlang.c (lang_finish): Don't warn if entry symbol not found
3115 when generating a shared library.
3116 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Warn if
3117 attempting to place an orphaned relocation section when generating
3118 a dynamically linked object.
3120 * scripttempl/elf.sc: Add ENTRY(${ENTRY}), and default ${ENTRY} to
3125 * ld.h (args_type): Add field export_dynamic.
3126 * lexsup.c (parse_args): Recognize --export-dynamic.
3127 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
3128 Pass export_dynamic argument to bfd_elf32_size_dynamic_sections.
3132 * ldlang.c (lang_one_common): Set SEC_ALLOC in any section where
3133 we allocate common symbols.
3137 * scripttempl/elf.sc: Add .rel.init, .rela.init, .rel.fini, and
3138 .rela.fini to the list of .rel* sections.
3142 * ldlang.c (load_symbols): Add new argument place. Only accept
3143 linker scripts if place is not NULL. Put commands found in an
3144 assumed linker script into place.
3145 (lookup_name): Pass NULL as place argument to load_symbols.
3146 (open_input_bfds): In lang_input_statement_enum case, pass a place
3147 argument to load_symbols, and store any new statements after the
3152 * ldver.c (ldversion): Bump to 2.5.3.
3156 * Makefile.in (e*nbsd.c): Fix typo in dependencies.
3160 * Makefile.in (check): Add missing "else true" clause.
3162 * emulparams/vax.sh (OUTPUT_FORMAT): Use "a.out".
3164 * scripttempl/go32coff.sc: Changes from DJ Delorie: Change default
3165 entry point to "start". Align at end of each section to 0x200.
3166 Start .text section 0x1000 later. Add _etext, _edata, _end
3171 * ldctor.c (ldctor_add_set_entry): Don't permit a set to be
3172 composed of different object file formats.
3173 (ldctor_build_sets): If the output format does not support the
3174 reloc, and we are not generating a relocateable link, try getting
3175 the reloc from the input format.
3179 * Makefile.in (ALL_EMULATIONS): Added em68knbsd.o.
3180 (em68knbsd.c): New target.
3182 * config/m68k-nbsd.mt: New file.
3183 * emulparams/m68knbsd.sh: New file.
3184 * configure.in (m68*-*-netbsd*): Use above configs.
3188 * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): If we find an
3189 appropriately named static library, stop the search at that
3194 * Makefile.in (ALL_EMULATIONS): Added ei386nbsd.o, ens32knbsd.o
3195 and esparcnbsd.o; sorted entries.
3196 (ei386nbsd.c,ens32knbsd.c,esparcnbsd.c): New targets.
3198 * config/netbsd532.mt: Removed.
3199 * emulparams/netbsd532.sh: Removed.
3201 * config/{i386-nbsd.mt,ns32k-nbsd.mt,sparc-nbsd.mt}: New files.
3202 * emulparams/{i386nbsd.sh,ns32knbsd.sh,sparcnbsd.sh}: New files.
3203 * configure.in (i[345]86-*-netbsd*, ns32k-pc532-netbsd*,
3204 sparc*-*-netbsd*): Use above configs.
3208 * ldmain.c (multiple_common): One of the types may now be
3209 bfd_link_hash_indirect. The old BFD argument may be NULL.
3213 * configure.in: Add * at the end of m68k-hp-hpux.
3217 * ldlex.l: Cast assignment to yy_ch_buf field to char *, not to
3222 * scripttempl/nw.sc: Gather constructors and destructors and
3223 define __CTOR__LIST__ and __DTOR_LIST__ appropriately.
3227 * Makefile.in (ALL_EMULATIONS): Add ei386nw.o and eppcnw.o.
3228 (ei386nw.c, eppcnw.c): New targets.
3230 * config/{i386,ppc}-nw.mt, emulparams/{i386,ppc}nw.sh,
3231 scripttempl/nw.sc: New files, for i386 and powerpc netware.
3233 * configure.in: Changed netware ld_target name to be {i386,ppc}-nw
3234 instead of {i386,ppc}-elf.
3236 * configure.in (sparc*-*-netware): Removed. There is no such
3239 * ldint.texinfo: Move misplaced `@end iftex'.
3243 * scripttempl/elf.sc: Add .rel.ctors, .rela.ctors, .rel.dtors, and
3244 .rela.dtors to the list of .rel* sections.
3248 * ldver.c (ldversion): Update to version 2.5.
3249 * Version 2.5 released.
3251 * configure.in (all_targets): Handle i386-linux*.
3255 * scripttempl/aout.sc: Set _etext and __etext to ., not
3256 ${DATA_ALIGNMENT}. This is compatible with SunOS, and, with luck,
3257 will not break any other system. From Eric Valette
3262 * lexsup.c (parse_args): Change -V to be a synonym for -v. Add
3263 --verbose to get the old -V behaviour.
3264 * ld.1, ld.texinfo: Document this change.
3268 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Remove
3269 assertion, since it could fail with a user defined linker script.
3271 * ldexp.c (fold_name): For DEFINED case, don't try to look up the
3272 name in the hash table during the first phase--the hash table does
3273 not even exist at that point, much less have the right value.
3275 * Makefile.in (CC): Define.
3276 (CXX): Move definition, change from g++ to gcc.
3277 (EXPECT, RUNTEST): Copy definitions from top level Makefile.in.
3278 (RUNTEST_CC, RUNTEST_CFLAGS): Remove.
3279 (RUNTEST_CXX, RUNTEST_CXXFLAGS): Remove.
3280 (CC_FOR_TARGET, CXX_FOR_TARGET): Copy from top level Makefile.in.
3281 (.cc.o): Comment out.
3283 (site.exp): Don't create testdir or set tmpdir.
3284 (check): Run checks even if not running native. Use CC_FOR_TARGET
3285 instead of RUNTEST_CC, and likewise for CXX.
3286 (cdtest targets): Comment out.
3287 * config/solaris2.mh (HOSTING_LIBS): Only mention crtend.o once.
3288 * cdtest-bar.cc, cdtest-foo.cc, cdtest-foo.h: Remove.
3289 * cdtest-main.cc, cdtest.exp: Remove.
3293 * emulparams/elf32bmip.sh: Rename from elf32mipb.sh to avoid DOS
3294 file naming problems.
3295 * emulparams/elf32lmip.sh: Rename from elf32mipl.sh.
3296 * Makefile.in (ALL_EMULATIONS): Rename eelf32mipb.o to
3297 eelf32bmip.o and eelf32mipl.o to eelf32lmip.o.
3298 (eelf32bmip.c): Rename from eelf32mipb.c. Use elf32bmip.sh.
3299 (eelf32lmip.c): Rename from eelf32mipl.c. Use elf32lmip.sh.
3300 * config/mipsb-elf32.mt (EMUL): Use elf32bmip, not elf32mipb.
3301 * config/mipsl-elf32.mt (EMUL): Use elf32lmip, not elf32mipl.
3303 * genscripts.sh: Always search /usr/local/TARGET/lib.
3305 * scripttempl/elf.sc: If -N is set, force DATA_ADDR to be ".".
3309 * configure.in: Handle i386-bsdi* targets like i386-bsd.
3313 * lexsup.c (parse_args): Add support for -a for HP/UX
3316 * lexsup.c (parse_args): -c takes an argument.
3320 * ld.h (args_type): Add new field endian.
3321 * lexsup.c (parse_args): Handle -EB and -EL by setting
3322 command_line.endian.
3323 * ldgram.y (ifile_p1): Accept OUTPUT_FORMAT with three arguments.
3324 * ldlang.c (lang_add_output_format): Add arguments big and little.
3325 If command_line.endian is set, use it to select big or little
3326 rather than the default. Changed all callers.
3327 * ldlang.h (lang_add_output_format): Update declaration.
3328 * emulparams/elf32mipb.sh: Define BIG_OUTPUT_FORMAT and
3329 LITTLE_OUTPUT_FORMAT.
3330 * emulparams/elf32mipl.sh: Likewise.
3331 * emulparams/mipsbig.sh: Likewise.
3332 * emulparams/mipsbsd.sh: Likewise.
3333 * emulparams/mipsidt.sh: Likewise.
3334 * emulparams/mipsidtl.sh: Likewise.
3335 * emulparams/mipslit.sh: Likewise.
3336 * scripttempl/elf.sc: Define BIG_OUTPUT_FORMAT and
3337 LITTLE_OUTPUT_FORMAT if not already defined. Pass them to
3339 * scripttempl/mips.sc: Pass BIG_OUTPUT_FORMAT and
3340 LITTLE_OUTPUT_FORMAT to OUTPUT_FORMAT.
3341 * scripttempl/mipsbsd.sc: Likewise.
3343 * Makefile.in (ldgram.h): Make separate target from ldgram.c,
3344 depending upon ldgram.c, so that a parallel make does not try to
3347 * configure.in (mips*el-elf*): New target.
3348 * Makefile.in (ALL_EMULATIONS): Add eelf32mipb.o and eelf32mipl.o.
3349 (eelf32mipl.c): New target.
3351 * config/mipsl-elf32.mt: New file.
3352 * emulparams/elf32mipl.sh: New file.
3356 * ldmain.c (main): Rather than prohibiting ld -r -s, treat it as
3361 * ldmisc.c (vfinfo): Print BFD file name as well as file name
3362 returned by find_nearest_line, in case the file name is something
3363 unhelpful such as a .h file. Handle %u.
3367 * ldlang.c (lang_do_assignments): Make sure output statement
3368 has an attached bfd_section before trying to dereference it.
3372 * ld.h (ld_config_type): Add new field warn_once.
3373 * ldmain.c (undefined_symbol): Handle -warn-once.
3374 * lexsup.c (parse_args): Recognize -warn-once.
3375 * ld.texinfo (Options): Document -warn-once.
3378 * ldmisc.c (vfinfo): Handle %D as %C, but never print the function
3379 name. For %C, print the function name on a separate line, to keep
3380 the length of error messages under control.
3381 * ldmain.c (multiple_definition): Use %D for ``first defined
3383 (undefined_symbol): Use %D for ``more undefined references
3386 * ldmisc.c (multiple_warn): Remove; no longer used.
3387 * ldmisc.h (multiple_warn): Don't declare.
3391 * ldlang.c (print_output_section_statement): Print all lines
3396 * ldlang.c (load_symbols): Check for archive before object. Use
3397 bfd_check_format_matches, and, if ambiguous, print a list of
3398 matching formats. If file format is not recognized, treat file as
3400 * ldgram.y (yyerror): If assuming an object file is a script,
3401 mention that. Tweak the format of the error messages.
3402 * ldlex.l (lex_warn_invalid): If assuming an object is a script,
3403 guess that this is not actually a script, and just report that the
3404 file format was not recognized.
3405 * ld.texinfo (Options): Admit that -( may be used more than once.
3406 Add note that unrecognized object files are now treated as linker
3409 * ldfile.c (ldfile_input_filename): Make const.
3410 (ldfile_assumed_script): New variable.
3411 (try_open): Change arguments types to const.
3412 (ldfile_find_command_file): Likewise.
3413 (ldfile_open_command_file): Likewise. Also, set lineno to 1.
3414 * ldfile.h: Update declarations for ldfile.c changes.
3415 * ldlex.l: Include <ctype.h>.
3416 (file_name_stack): Change to be const char *.
3417 (lineno_stack): New static variable.
3418 (<<EOF>>): Set lineno as well as ldfile_input_filename.
3419 (lex_push_file): Make name argument const. Initialize
3421 (lex_redirect): Initialize lineno_stack entry.
3422 (lex_warn_invalid): Handle non printable characters nicely.
3423 * ldlex.h (lex_push_file): Declare second argument as const.
3425 * ldgram.y (ifile_p1): Recognize GROUP.
3426 * ldlex.l: Recognize GROUP.
3427 * ld.texinfo (Option Commands): Document GROUP.
3431 * config/m68klynx.mh: New file.
3435 * emultempl/hppaelf.em: Add newlines to the error messages.
3439 * config/i386lynx.mh: New file.
3440 * scripttempl/i386lynx.sc: Don't put .ctors and .dtors in .text
3441 unless CONSTRUCTING.
3445 * emulparams/elf32mipb.sh (TEMPLATE_NAME): Define as elf32.
3446 (GENERATE_SHLIB_SCRIPT): Define as yes.
3447 (DYNAMIC_LINK): Define as false.
3448 * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse):
3449 Initialize config.dynamic_link to DYNAMIC_LINK if it is defined.
3450 (gld${EMULATION_NAME}_place_orphan): Reset stat_ptr at end.
3451 * Makefile.in (eelf32mipb.c): Depend upon elf32.em rather than
3456 * scripttempl/h8500b.sc: Put rdata stuff into own segment.
3460 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Don't define;
3461 .got section is now explicitly handled in elf.sc.
3465 * scripttempl/alpha.sc: Redo script to set . outside of sections
3466 and not bother to explicitly specify section addresses.
3467 Explicitly place .sdata section.
3471 * scripttempl/m68kcoff.sc: Put .bss in data segment.
3473 * scripttempl/h8300.sc: Change .stab and .stabstr to use a VMA of
3474 0, and to only be marked as NOLOAD if relocating.
3475 * scripttempl/h8500.sc, scripttempl/h8500b.sc: Likewise.
3476 * scripttempl/h8500c.sc, scripttempl/h8500m.sc: Likewise.
3477 * scripttempl/h8500s.sc, scripttempl/i386coff.sc: Likewise.
3478 * scripttempl/i386go32.sc, scripttempl/i386lynx.sc: Likewise.
3479 * scripttempl/m68kcoff.sc, scripttempl/m68klynx.sc: Likewise.
3480 * scripttempl/sh.sc, scripttempl/sparccoff.sc: Likewise.
3481 * scripttempl/sparclynx.sc: Likewise.
3485 * Makefile.in, configure.in: Add support (disabled) the ARM/RISCiX.
3486 * config/riscix.mt, emulparams/riscix.sh, scripttempl/riscix.sc:
3491 * ld.h (args_type): Add field soname.
3492 * lexsup.c (parse_args): Handle -soname argument.
3493 * emultempl/elf32.em: In call to bfd_elf32_size_dynamic_sections,
3495 * ld.texinfo: Document -soname.
3499 * ldlang.c (lang_check): Don't try to set the architecture if the
3500 input and output files are incompatible. Just warn.
3504 * configure.in: Change i[34]86 to i[345]86.
3508 * emulparams/hp3hpux.sh: Define __DYNAMIC to be 0.
3512 Make the ELF linker handle orphaned sections reasonably. Also,
3513 define __start_SECNAME and __stop_SECNAME around sections whose
3514 names can be represented in C, for the benefit of symbol sets in
3516 * ldemul.h (ldemul_place_orphan): Declare.
3517 (ld_emulation_xfer_type): Add place_orphan field.
3518 * ldemul.c (ldemul_place_orphan): New function.
3519 * ldlang.h (wild_doit): Declare.
3520 * ldlang.c (wild_doit): Make nonstatic.
3521 (lang_place_orphans): Call ldemul_place_orphan.
3522 * emultempl/elf32.em: Include <ctype.h> and "ldgram.h".
3523 (hold_section, hold_use, hold_text, hold_data, hold_bss): New
3525 (gld${EMULATION_NAME}_place_orphan): New static function.
3526 (gld${EMULATION_NAME}_place_section): New static function.
3527 (ld_${EMULATION_NAME}_emulation): Initialize place_orphan field.
3531 * scripttempl/aout.sc: Add .linux-dynamic after .data.
3535 * lexsup.c (parse_args) Treat --dll-verbose as --version, for
3540 * ldexp.h (exp_get_abs_int): Declare.
3544 * ldlang.c (lang_do_assignments): Handle complex AT's better.
3545 * ldexp.c (exp_get_abs_int): New function.
3549 * configure.in: add i960-nindy-coff support.
3553 * ldlex.l (yy_create_string_buffer): Handle change to internal
3554 interface in flex 2.4.7.
3558 * emultempl/linux.em (gld${EMULATION_NAME}_find_address_statement):
3559 New function; add 0x20 to any use of -Ttext.
3560 (gld${EMULATION_NAME}_create_output_section_statements): New
3562 (ld_${EMULATION_NAME}_emulation): Use the new function
3563 gld${EMULATION_NAME}_create_output_section_statements.
3567 * scripttempl/mips.sc: Redo script to set . outside of sections
3568 and not bother to explicitly specify section addresses.
3572 * scripttempl/elf.sc: Copy several more relocation sections into
3573 the output. Put .got.plt sections into .got.
3577 * scripttempl/elf.sc: Use PROVIDE to define etext, edata, and end.
3579 Add a new script operator, PROVIDE, to define a symbol only if it
3581 * ldgram.y (PROVIDE): New token.
3582 (assignment): Accept PROVIDE.
3583 * ldlex.l (PROVIDE): New token.
3584 * ldexp.h (node_type): Add etree_provide to node_class enum.
3585 (exp_provide): Declare.
3586 * ldexp.c (exp_fold_tree): Handle etree_provide.
3587 (exp_provide): New function.
3588 (exp_print_tree): Handle etree_provide.
3589 * ld.texinfo: Document PROVIDE.
3591 * ldlang.c (lang_common): Pass desired alignment to
3592 lang_one_common as power of two.
3593 (lang_one_common): Get common symbol alignment from linker hash
3594 table entry. Treat desired alignment as a power of two.
3596 * ldlang.c (wild_section): Attach all section with the given name,
3597 not just the first one. If there is no name, attach all sections
3598 even if the SEC_IS_COMMON flag is set.
3602 * ld.h (args_type): Add field rpath.
3603 * lexsup.c (S_ISDIR): Define if not already defined.
3604 (parse_args): Add support for -rpath. If -R is used to name a
3605 directory, treat it as -rpath for Solaris compatibility.
3606 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
3607 Pass command_line.rpath to bfd_elf32_size_dynamic_sections.
3608 * ldmain.c (main): Initialize command_line.rpath to NULL.
3609 * ld.texinfo: Document -rpath option.
3613 * emulparams/pc532machaout.sh: New file. Pc532 mach script
3616 * emulparams/netbsd532.sh: New file. Netbsd 532 script parameters.
3618 * config/pc532mach.mt: New file. Pc532 mach target support.
3620 * config/pc532mach.mh: New file. Pc532 mach host support.
3622 * config/netbsd532.mt: New file. Netbsd 532 target support.
3624 * configure.in: Add ns32k-pc532-mach and ns32k-pc532-netbsd support.
3626 * Makefile.in: Add epcmachaout.c dependency and enetbsd532.c
3631 * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Use
3632 bfd_abs_section_ptr, not &bfd_abs_section.
3634 * lexsup.c (parse_args): Changed "retain-symbols-file" from
3635 no_argument to required_argument. From djm.
3639 * scripttempl/elf.sc: Explicitly mention .stab and .stabstr
3640 sections to force a VMA of 0; needed for ELF backends which have
3641 not been converted to the new linker style.
3645 * scripttempl/hppaelf.sc (__stack_zero): Don't define this name,
3646 it was for the HPUX dynamic loader's use and it creates problems
3651 * ldlang.c (lang_do_assignments): No longer static. Delete decl.
3652 * ldlang.h (lang_do_assignments): Put external decl here.
3653 * emultempl/hppaelf.em: Minor cleanups throughout file.
3654 (hppa_elf_create_output_section_statements): Rewrite.
3655 (hppaelf_finish): Rewrite.
3659 * config/solaris2.mh (NATIVE_LIB_DIRS): Define as /usr/ccs/lib.
3661 * lexsup.c (parse_args): Accept -Bstatic and -Bdynamic. Do not
3663 * ld.texinfo: -Bstatic is not ignored.
3667 * ldlex.l: Recognize \r the same as \n.
3671 Preliminary support for generating shared libraries, from Eric
3673 * genscripts.sh: If the emulation parameter file sets
3674 GENERATE_SHLIB_SCRIPT, generate a .xs script file with
3675 CREATE_SHLIB defined.
3676 * emultempl/elf32.em (gld${EMULATION_NAME}_get_script): If
3677 link_info.shared is set, use the .xs script file.
3678 * scripttempl/elf.sc: If CREATE_SHLIB is set, don't create a
3679 .interp section, and don't include TEXT_START_ADDR in the starting
3680 address of the first section.
3681 * emulparams/elf_i386.sh (GENERATE_SHLIB_SCRIPT): Likewise.
3682 * emulparams/elf32_sparc.sh (GENERATE_SHLIB_SCRIPT): Define.
3686 * configure.in: Change --with-targets to --enable-targets.
3690 * lexsup.c (parse_args): Add support for new options -( -) with
3691 synonyms --start-group --end-group.
3692 * ldlang.h (enum statement_enum): Add lang_group_statement_enum.
3693 (lang_group_statement_type): Define new struct.
3694 (lang_statement_union_type): Add group_statement field.
3695 (lang_enter_group, lang_leave_group): Declare.
3696 * ldlang.c (lang_for_each_statement_worker): Handle
3697 lang_group_statement_enum.
3698 (map_input_to_output_sections, print_statement): Likewise.
3699 (lang_size_sections, lang_do_assignments): Likewise.
3700 (open_input_bfds): Completely rewrite. Now does its own looping,
3701 rather than using lang_for_each_statement. Handle groups.
3702 (lang_process): Update call to open_input_bfds.
3703 (print_group): New static function.
3704 (lang_enter_group, lang_leave_group): New static functions.
3705 * ldfile.c (ldfile_open_file): If the file has already been
3706 opened, just return rather than taking an assertion failure.
3707 * ldver.c (help): Mention new options.
3708 * ld.texinfo: Document new options.
3710 * ldlang.c (end_of_data_section_statement_list): Don't define.
3711 (lang_leave_output_section_statement): Don't set obsolete variable
3712 end_of_data_section_statement_list.
3714 * scripttempl/go32coff.sc: Don't put ${DATA_ALIGNMENT} inside an
3717 * ldlang.c (lang_size_sections): Adjust current region address
3718 even for sections with an explicit address. From
3721 * emulparams/i386linux.sh (NONPAGED_TEXT_START_ADDR): Set to 0.
3724 * scripttempl/mipsbsd.sc: Let sections align to their natural
3729 * ldlang.c (lang_init): Use new bfd_abs_section_ptr, not
3731 (lang_abs_symbol_at_beginning_of): Likewise.
3732 (lang_abs_symbol_at_end_of): Likewise.
3733 (lang_size_sections): Use bfd_is_abs_section to check for the
3734 absolute section. Don't try to set the VMA or output_offset or
3735 size of the absolute section.
3736 * ldmain.c (notice_ysym): Use bfd_is_und_section to check for the
3741 * scripttempl/hppaelf.sc: Place .data and .bss at 0x40000000
3742 when generating relocatable objects.
3746 * emultempl/linux.em: New file providing support for linking
3747 against Linux shared libraries.
3748 * config/i386-linux.mt (ei386linux.c): Depend upon linux.em.
3749 * emulparams/i386linux.sh (TEMPLATE_NAME): Define as linux.
3753 * lexsup.c (parse_args): Add -shared to longopts, and handle it.
3754 * ldmain.c (main): Initialize link_info.shared to false. Give
3755 error if link_info.relocateable and link_info.shared are both set.
3757 * configure.in: If EMUL_EXTRA* is defined in a config file, treat
3758 it as naming an emulation to be added to EMULATION_OFILES.
3759 * config/i386-linux.mt (EMUL_EXTRA1): Define as elf_i386.
3761 * Makefile.in: Rebuilt dependencies.
3762 (ALL_EMULATIONS): Add ei386linux.o, eelf32_sparc.o,
3763 eelf64_sparc.o. Remove $(OTHER_EMULATIONS).
3764 (ei386linux.c, eelf32_sparc.c, eelf64_sparc.c): New targets.
3765 * config/i386-linux.mt (OTHER_EMULATIONS): Don't define.
3766 (ei386linux.c): Remove; now in Makefile.in.
3767 * config/i386-lynx.mt (OTHER_EMULATIONS): Don't define.
3768 * config/m68k-lynx.mt (OTHER_EMULATIONS): Don't define.
3769 * config/sparc-lynx.mt (OTHER_EMULATIONS): Don't define.
3770 * config/sparc64-elf.mt (OTHER_EMULATIONS): Don't define.
3771 (eelf64_sparc.c): Remove; now in Makefile.in.
3772 * config/sun4sol2.mt (OTHER_EMULATIONS): Don't define.
3773 (eelf32_sparc.c): Remove; now in Makefile.in.
3775 * ldexp.c (exp_print_tree): Don't crash if etree_rel section has
3776 no owner--it might be bfd_abs_section. From Eric Youngdale
3779 * scripttempl/aout.sc: Let sections align to their natural
3784 * ldemul.h (ldemul_open_dynamic_archive): Declare.
3785 (ld_emulation_xfer_type): Add new field open_dynamic_archive.
3786 * ldemul.c: Include ldexp.h and ldlang.h.
3787 (ldemul_open_dynamic_archive): New function.
3788 * ldfile.h (ldfile_open_file_search): Declare.
3789 * ldfile.c: Include ldemul.h.
3790 (try_open_bfd): Rename from cache_bfd_openr. Return boolean
3791 argument, not bfd *. Change all callers.
3792 (ldfile_open_file_search): Rename from open_a. Return boolean
3793 argument, not bfd *. Clean up. Change all callers.
3794 (ldfile_open_file): If doing a dynamic link, call
3795 ldemul_open_dynamic_archive rather than assuming the extension of
3796 a dynamic object is ".so".
3797 * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
3799 (ld_${EMULATION_NAME}_emulation): Initialize open_dynamic_archive
3801 * emultempl/sunos.em (ld_${EMULATION_NAME}_emulation): Likewise.
3803 * ldmain.c (get_emulation): Ignore -m486 for Linux compatibility.
3804 * lexsup.c (parse_args): Ignore -qmagic for Linux compatibility.
3805 Accept -static as a synonym for -non_shared.
3807 Let the user change the dynamic linker used by ELF code.
3808 * ld.h (args_type): Add new field interpreter.
3809 * lexsup.c (parse_args): Add dynamic-linker to longopts, and
3811 * ldmain.c (main): Initialize command_line.interpreter to NULL.
3812 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Get
3813 the ELF backend to return the .interp section. If
3814 command_line.interpreter is not NULL, set the contents of .interp
3816 * ld.texinfo: Mention -dynamic-linker.
3818 * config/sun4sol2.mt (eelf32_sparc.c): Depend upon elf32.em, not
3821 * lexsup.c (parse_args): Sort out the option macros and change the
3822 definitions to make it easier to add a new option.
3824 * scripttempl/aout.sc: Define __etext and __edata to go along with
3827 * ld.h (ld_config_type): Add new field traditional_format.
3828 * lexsup.c (parse_args): Add traditional-format to longopts, and
3830 * ldmain.c (main): Initialize config.traditional_format to false.
3831 * ldlang.c (ldlang_open_output): Set BFD_TRADITIONAL_FORMAT in BFD
3832 flags of output_bfd according to config.traditional_format.
3833 * ldver.c (help): Mention -traditional-format.
3834 * ld.texinfo: Document -traditional-format.
3838 * ldctor.c (ldctor_add_entry): Add entries to a set in the order
3839 they are encountered.
3843 * emulparams/i386linux.sh (TEXT_START_ADDR): Define as 0x1000.
3844 (NONPAGED_TEXT_START_ADDR): Define as 0x20.
3848 * scripttempl/alpha.sc: Define _ftext, _etext and _fdata insted of
3849 _FTEXT, _ETEXT and _FDATA. Dont define _END.
3851 * ldfile.c (open_a): If this is not an archive, try to open it in
3852 the current directory before searching for it.
3854 * lexsup.c (parse_args): Treat -i as a synonym for -r.
3856 * ldgram.y (exp): Treat BLOCK as a synonym for ALIGN, so that
3857 BLOCK works in a section address as documented.
3859 * ldgram.y (YYDEBUG): Don't define.
3863 * emultempl/gld960.em: Pass false for new argument to
3864 ldfile_add_library_path.
3865 * emultempl/gld960c.em, emultempl/lnk960.em: Likewise.
3867 * emultempl/sunos.em: Only look for .so files if doing a dynamic
3872 * scripttempl/i960.sc: Add CONSTRUCTORS to .data.
3876 * Makefile.in (check): Delete ld.new dependency so that a regression
3877 test doesn't trigger a rebuild of the linker.
3881 * ldlang.c (map_input_to_output_sections): For lang_address, call
3882 init_os if it hasn't already been called.
3886 Add support for SunOS shared libraries.
3887 * aout.sc: Don't define __DYNAMIC here. Add new sections used by
3888 shared library support code.
3889 * emultempl/sunos.em: New file.
3890 * emulparams/sun4.sh (TEMPLATE_NAME): Define as sunos.
3891 * emulparams/sun3.sh (TEMPLATE_NAME): Likewise.
3892 * Makefile.in (esun4.c): Depend upon sunos.em, not generic.em.
3893 (esun3.c): Likewise.
3895 * ldlang.c: Minor formatting cleanups.
3896 (lang_for_each_input_file): New function.
3897 * ldlang.h (lang_for_each_input_file): Declare.
3899 * ldfile.h (search_dirs_type): Move from ldfile.c, and add cmdline
3901 (search_head): Declare.
3902 (ldfile_add_library_path): Add new cmdline argument in prototype.
3903 * ldfile.c (search_head): Make non-static.
3904 (search_dirs_type): Move to ldfile.h.
3905 (ldfile_add_library_path): Accept cmdline argument, and save it.
3906 * lexsup.c (parse_args): Pass true for new cmdline argument of
3907 ldfile_add_library_path.
3908 (set_default_dirlist): Likewise.
3909 * ldmain.c (check_for_scripts_dir): Pass false for new cmdline
3910 argument of ldfile_add_library_path.
3911 * ldgram.y (ifile_p1): Likewise.
3915 * ldlang.h (lang_input_statement_type): Remove fields subfiles,
3916 total_size, superfile and chain.
3917 * ldfile.c (open_a): Don't clear search_dirs_flag.
3918 (ldfile_open_file): Don't try to open superfile. Assert that file
3919 has not already been opened.
3920 * ldlang.c (new_afile): Don't initialize superfile.
3921 * ldmain.c (add_archive_element): Don't initialize subfiles or
3922 chain or superfile. Initialize search_dirs_flag to false.
3926 * ldver.c (ldversion): Changed version to "cygnus-2.4.1".
3928 Changes from binutils-2.4 release:
3930 * genscripts.sh (RELOCATING, CONSTRUCTING): When setting
3931 variables, use whitespace, so scripts don't break.
3933 * config/alphaosf.mh (HDEFINES, CFLAGS): Deleted.
3935 * emultempl/generic.em: Find emultempl/stringify.sed in ${srcdir}.
3937 * cdtest-bar.cc: Renamed from cdtest-func.cc.
3938 * Makefile.in: Noted change.
3940 * scripttempl/a29k.sc: Don't include /lab3/u3/..../segments.o; I
3941 don't know where that's supposed to come from, or why it's
3946 * configure.bat: update to latest makefile.in
3947 * emulpara/go32.sh: set to coff-go32 not aout
3948 * emultemp/generic.em: strength-reduce the structure of
3949 this shell script, since the only available shell for
3950 DOS can't handle complex syntax.
3951 * emultemp/stringify.sed: for "sed -f" instead of inline.
3952 * makefile.in: depend on stringify.sed as well as genscripts.sh
3953 * scripttemp/go32coff.sc: correct for djgpp 1.11's COFF format
3954 * genscripts.sh: empty variables aren't always considered "set",
3955 so set them to "y" instead.
3959 * ldlang.c (entry_symbol): Make static.
3960 (lang_add_entry): Add cmdline argument.
3961 * ldlang.h (lang_add_entry): Change prototype.
3962 * ldgram.y (statement_anywhere): Change lang_add_entry call.
3963 * lexsup.c (parse_args): Likewise.
3967 * emulparams/elf32mipb.sh (OTHER_READONLY_SECTIONS): Don't give
3968 .reginfo an address.
3969 (OTHER_READWRITE_SECTIONS): Don't give .lit4 or .lit8 an address.
3970 (OTHER_SECTIONS): Define for .gptab.sdata and .gptab.sbss.
3971 * scripttempl/elf.sc: Use OTHER_SECTIONS at end of script.
3975 Add support for ELF shared libraries.
3976 * ld.h (ld_config_type): Add field dynamic_link.
3977 * ldmain.c (main): Initialize config.dynamic_link to false. Warn
3978 on attempts to use -r with -relax, -call_shared or -s.
3979 * lexsup.c (longopts): Separate OPTION_CALL_SHARED from
3980 OPTION_NON_SHARED. Add OPTION_IGNORE. Adjust macro values
3981 accordingly. Add "dy" and "non_shared" options. Change "Qy" to
3982 OPTION_IGNORE for now. Handle OPTION_CALL_SHARED and
3983 OPTION_NON_SHARED by setting dynamic_link field accordingly.
3984 Handle OPTION_IGNORE by ignoring it. Clear dynamic_link field for
3986 * ldfile.c (ldfile_open_file): If config.dynamic_link is true, try
3987 opening a file with a .so extension first.
3988 * emultempl/elf32.em: New file.
3989 * emulparams/elf32_sparc.sh (TEXT_START_ADDR): Change to 0x10000.
3990 (NONPAGED_TEXT_START_ADDR): Likewise.
3991 (TEMPLATE_NAME): Define as elf32.
3993 * emulparams/elf_i386.sh (TEMPLATE_NAME): Define as elf32.
3994 * scripttempl/elf.sc: Add placement for new dynamic sections.
3995 Don't use CREATE_OBJECT_SYMBOLS. Define _etext, _edata and _end
3996 outside of any section. Don't use ALIGN(8); just let one section
3997 VMA follow another. Put .dynbss in .bss. Don't mention debugging
3998 sections; they'll be handled correctly anyhow.
3999 * Makefile.in (eelf_i386.c): Depend upon elf32.em, not generic.em.
4003 * Makefile.in (install): Redirect output of ln to /dev/null.
4007 * emultempl/hppaelf.em: Change all references of
4008 .hppa_linker_stubs to .PARISC.stubs.
4009 * scripttempl/hppaelf.sc: Likewise.
4013 * ldlang.c (print_output_section_statement): Change ``no attached
4014 output section'' message slightly.
4015 (lang_do_assignments): Don't recurse down if there is no real
4018 * config/i386-linux.mt (OTHER_EMULATIONS): Change em_ to e to
4019 match corresponding change in emulation templates.
4020 * config/i386-lynx.mt, config/m68k-lynx.mt: Likewise.
4021 * config/sparc-lynx.mt, config/sun4sol2.mt: Likewise.
4025 * ldver.c (ldversion): Updated version number.
4027 * cdtest-foo.cc: Use explicit "#pragma implementation".
4028 * cdtest-bar.cc: Renamed from cdtest-func.cc.
4029 * Makefile.in: References to cdtest-func.o changed to
4034 Don't create unnecessary output sections.
4035 * ldlang.c (out_bfd_get_section_by_name): Remove.
4036 (wild_section): Call bfd_get_section_by_name rather than
4037 our_bfd_get_section_by_name. Don't call wild_doit if there is no
4039 (lang_create_output_section_statements): Remove.
4040 (map_input_to_output_sections): For several cases, call init_os if
4041 it has not already been called.
4042 (lang_size_sections): If output section was not created, skip it.
4043 (lang_process): Don't call lan_create_output_section_statements.
4044 (lang_place_orphans): Skip files with just_syms_flags set to true.
4045 * ld.texinfo: Document change.
4049 * ldlang.c (wild_doit): Don't bother initializing the vma and
4050 section size. Don't special case SEC_SHARED_LIBRARY.
4051 (lang_size_sections): Handle SEC_COFF_SHARED_LIBRARY sections
4056 * config/go32.mh : New file for Xgo32X.
4060 * ldfile.c (ldfile_open_command_file): Set bfd_error_system_call
4061 before calling einfo, since we are reporting an fopen failure.
4064 * configure.in: Use "e" rather than "em_" as prefix for
4069 * emultempl/generic.em: Use "e" rather than "em_" as prefix for
4071 * emultempl/gld960.em, emultempl/gld960c.em, emultempl/lnk960.em,
4072 emultempl/hppaelf.em, emultempl/m88kbcs.em, emultempl/vanilla.em:
4074 * Makefile.in: Changed all generated file names.
4075 (ldemul-list.h): Depend on Makefile, not config.status. Changed
4076 sed patterns to handle new filenames.
4078 * config/mipsl-idt.mt: Renamed from mips-idtl.mt.
4079 * configure.in: Adjusted.
4083 * Makefile.in (install-info): Don't use "$<*", it doesn't always
4084 work. Instead, check build dir and $srcdir explicitly, and use
4085 `echo' to get all the filenames.
4087 * configure.in (h8300h-*-hms): Changed ld_target name to
4089 * config/cf-h8300h.mt: Renamed from coff-h8300h.mt, to make it
4092 * config/i960coff.mt: New file.
4093 * emulparams/gld960coff.sh: New file.
4094 * emultempl/gld960c.em: New file.
4095 * configure.in (i960-*-vxworks5* except -vxworks5.0*): Use
4096 i960coff configuration.
4097 * Makefile.in (em_gld960coff.c): Added dependencies, build rule.
4099 * Makefile.in (ALL_EMULATIONS): Remove em_delta68.o, since the
4100 code isn't included in FSF releases, and it can still be
4101 explicitly selected.
4102 (distclean): Remove site.bak and tmpdir.
4103 (STAGESTUFF): Removed $(GENERATED_CFILES) $(GENERATED_HFILES).
4104 (mostlyclean): Delete them explicitly here. Also remove tmpdir.
4106 Patches from Ralph Campbell:
4107 * config/mipsbsd.mh: New file.
4108 * Makefile.in (em_mipsbsd.c): Use mipsbsd.sc, not aout.sc.
4109 * scripttempl/mipsbsd.sc: Don't define __DYNAMIC.
4110 * emulparams/mipsbsd.sh (OUTPUT_FORMAT): Fix name to have `a.out'
4113 * configure.in (i386-*-gnu*): Treat like i386-*-mach*.
4117 * config/m68k.mt (EMUL): Set to m68kaout.
4118 * emulparams/m68kaout.sh: New file.
4119 * Makefile.in (ALL_EMULATIONS): Add em_m68kaout.o.
4120 (em_m68kaout.c): New target.
4122 * ldlang.c (lang_size_sections): If dot moves because of an
4123 assignment, don't try to insert a pad into the absolute output
4124 section, just change the address of the default memory region
4127 * Makefile.in (mostlyclean): Remove cdtest.tmp, cdtest-ur,
4128 cdtest-ur.out, and cdtest-ur.tmp.
4132 * scripttempl/sa29200.sc: Align all sections to four byte
4137 * Makefile.in, configure.in: Support for go32 coff.
4138 * config/i386-go32.mt: New file
4139 * emulparams/i386go32.sh: New file
4140 * scripttempl/i386go32.sc: New file
4144 * Makefile.in (em_m68klynx.c, em_i386lynx.c, em_sparclynx.c): Use
4145 Lynx-specific script templates.
4146 * configure.in (sparclite*-*-coff): Use coff-sparc.
4147 * emulparams/i386lynx.sh (SCRIPT_NAME): Set to i386lynx.
4148 * emulparams/sparclynx.sh (SCRIPT_NAME): Set to sparclynx.
4149 (ENTRY): Set to __main.
4150 * scripttempl/i386lynx.sc: New file, script for I386 Lynx.
4151 * scripttempl/m68klynx.sc: Add insertion of ctor/dtor sections.
4152 * scripttempl/sparclynx.sc: New file, script for uSparc Lynx.
4156 * scripttempl/mips.sc: Force _gp and .lit8 to be aligned to a 16
4157 byte boundary, in case the global constructors do not take up an
4160 * config/i386v4.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not
4161 exist, get crtbegin based on gcc -print-libgcc-file-name.
4162 (HOSTING_LIBS): Similar change for ../gcc/crtend.o.
4166 * ldlang.c (lang_size_sections): When no address is given for a
4167 section, align it according to its requirements.
4171 * Makefile.in (clean, distclean): Remove configdoc.texi.
4175 * configure.in: Add i[34]86-*-bsd386 to the patterns recognized.
4179 * ldlang.c (lang_size_sections): When relaxing, adjust the
4180 position of a padding statement, and adjust dot accordingly.
4184 * Makefile.in (EXPECT, RUNTEST): Set these for the check goal.
4188 * scripttempl/i386coff.sc: If relocating, don't put .init and
4189 .fini sections into .text; keep them separate.
4190 * config/i386sco.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not
4191 exist, get crtbegin based on gcc -print-libgcc-file-name.
4192 (HOSTING_LIBS): Similar change for ../gcc/crtend.o.
4196 * Makefile.in (check): Set TCL_LIBRARY for runtest.
4200 * configure.in (hppa*-*-*elf*): Don't require "-hp-" for the
4203 * emultempl/hppaelf.em (hppaelf_finish): Only resize sections
4204 if building a final executable.
4208 * ldmain.c (main): Check the return value of bfd_close.
4212 * scripttempl/alpha.sc: Clean up section alignment to ensure that
4213 sections never overlap when using -r.
4217 * ldmisc.c (vfinfo): Change symbol reading slightly for recent BFD
4218 changes: get_symtab_upper_bound renamed and returns long,
4219 bfd_canonicalize_symtab returns long, check for error indications.
4223 * ldlang.c (print_input_section): For section size, use
4224 _cooked_size if it is non-zero, size otherwise.
4225 (size_input_section): Likewise.
4226 (lang_do_assignments): Likewise (case lang_input_section_enum).
4230 * ldlang.c (new_afile): Add new argument add_to_list. Don't set
4231 real to true for lang_input_file_is_marker_enum. Clear the_bfd.
4232 (lang_add_input_file): Pass true to new_afile for add_to_list.
4233 (lookup_name): Remove force_load argument. Changed all callers.
4234 Pass false to new_afile for add_to_list. Split loading of symbols
4235 out into separate function.
4236 (load_symbols): New function split out of lookup_name. Don't load
4237 the symbols if they are already loaded.
4238 (open_input_bfds): For lang_input_statement_enum call load_symbols
4239 rather than lookup_name.
4240 (lang_process): Pass abs_output_section rather than NULL to
4242 (lang_startup): Set real field of first_file to true.
4246 * ldlang.c (had_relax): Removed.
4247 (relax_again): New static variable.
4248 (lang_size_sections): Change call to bfd_relax_section to
4249 correspond to BFD changes. Set relax_again appropriately.
4250 (lang_process): Remove #if 0 code. When relaxing, keep calling
4251 lang_do_assignments and lang_size_sections until relax_again
4254 * emultemp/gld960.em: Include libiberty.h
4255 (gld960_before_parse): Pass NULL as final argument to concat.
4259 * scripttempl/aout.sc: Force _end and __end to be aligned to a
4262 * ldwrite.c (build_link_order): Handle lang_data_statement_enum by
4263 building a bfd_data_link_order, rather than by setting the section
4264 contents immediately.
4268 Changes to make -Ur work again.
4269 * ldmain.c (add_to_set): Now takes reloc argument rather than
4270 bitsize. Check config.build_constructors here. If an new hash
4271 table entry is created, mark it as undefined.
4272 (constructor_callback): No longer takes bitsize argument. Pass
4273 BFD_RELOC_CTOR to ldctor_add_set_entry, but first make sure the
4274 BFD backend supports it.
4275 (reloc_overflow): Handle a NULL abfd argument.
4276 (reloc_dangerous, unattached_reloc): Likewise.
4277 * ldctor.c: Include ldmain.h.
4278 (struct set_info): Change bitsize field to reloc.
4279 (ldctor_add_set_entry): Now takes reloc argument rather than
4280 bitsize. Don't bother to check config.build_constructors here.
4281 (ldctor_build_sets): Get the size from the reloc howto. If
4282 generating relocateable output, call lang_add_reloc rather than
4284 * ldctor.h (ldctor_add_set_entry): Change declaration to use reloc
4286 * ldlang.h (statement_enum): Add lang_reloc_statement_enum.
4287 (lang_reloc_statement_type): New structure.
4288 (lang_statement_union_type): Add reloc_statement field.
4289 (lang_add_reloc): Declare new function.
4290 * ldlang.c (lang_for_each_statement_worker): Handle
4291 lang_reloc_statement_enum.
4292 (map_input_to_output_sections, print_statement): Likewise.
4293 (lang_size_sections, lang_do_assignments): Likewise.
4294 (print_reloc_statement): New function.
4295 (lang_add_reloc): New function.
4296 * ldwrite.c (build_link_order): Handle lang_reloc_statement_enum.
4298 * Makefile.in (cdtest.out, cdtest-ur.o): New targets.
4299 (cdtest-ur, cdtest-ur.out): New targets.
4300 (check-cdtest): Now also check that -Ur works correctly.
4302 * scripttemp/alpha.sc: Align all sections to 16 byte boundaries.
4306 * ldlang.c (lang_process): Move lang_common call before
4307 map_input_to_output_sections, to ensure that any alignment
4308 constraints set by common symbols are copied over to the output
4313 * emulparams/elf32ppc.sh (TEMPLATE_NAME): Don't define.
4314 (OTHER_READWRITE_SECTIONS): Rename .toc to .got.
4315 * Makefile.in (em_elf32ppc.c): Depend upon generic.em, not ppc.em.
4316 * emultempl/ppc.em: Remove ugly stub code; turns out not to be
4321 * config/i386bsd.mh: New file.
4325 * elf.sc: Permit TEXT_START_SYMBOLS and DATA_START_SYMBOLS to be
4327 * emulparams/elf32mipb.s (TEXT_START_SYMBOLS): Define _ftext.
4328 (DATA_START_SYMBOLS): Define _fdata.
4332 * ldlang.c (cat): Define using ANSI style if ALMOST_STDC defined.
4336 * emultempl/hppaelf.em (hppaelf_finish): Update comments. This
4337 works again. Attach some output symbols to the stub file bfd.
4339 * emultempl/hppaelf.em: Include elf32-hppa.h.
4340 (file_chain): Add decl.
4341 (hppa_look_for_stubs_in_section): Delete decl.
4342 (hppaelf_finish): Reenable code. Do not pass symbols
4343 down to hppa_look_for_stubs_in_section.
4347 * ldmain.c (write_map): Don't define. Removed all references.
4348 Just use map_file or map_filename instead.
4349 (add_archive_element): Use minfo to write map information, not
4351 (constructor_callback): Use fprintf to write map information, not
4353 * ldmain.h (write_map): Don't declare.
4354 * ldgram.y (mri_script_command): Removed reference to write_map.
4355 * ldlang.c (lang_one_common): Likewise.
4356 * lexsup.c (parse_args): Likewise.
4360 * scripttempl/elf.sc: Force all sections to be aligned.
4362 * ldgram.y (section): Reverse the order of memspec_opt and
4363 fill_opt to avoid an ambiguity when both are used.
4364 * ld.texinfo: Changed accordingly.
4366 * ldgram.y: Move include of ldlex.h back with other includes.
4367 * ldlex.h (input_type): Don't initialize enum constants to
4369 * ldlex.l: Use a switch to return the right token based on
4370 input_type, rather than knowing that input_type has a value based
4373 * ldgram.y (dirlist_ptr): Removed; not used.
4374 * lexsup.c: Include ldver.h.
4375 * Makefile.in: Rebuilt dependencies.
4379 * ldlang.c (lookup_name): don't call bfd_set_gp_size.
4380 (ldlang_add_file): call it here instead.
4384 * ldgram.y: Include ldlex.h after %token decls, for byacc.
4388 * emultempl/hppaelf.em: First attempt to clean this file up.
4389 Add comments in several functions as to their purpose and
4390 how they function (or my current best guess). Clean up horrible
4391 spacing and indention that never should have been accepted in the
4392 first place. Add FIXMEs for issues which need to be resolved.
4393 Disable linker-stub generation until it gets fixed. This allows
4394 the linker to at least work on simple code for testing purposes.
4396 * ldlang.c (lang_size_sections): No longer static (PA ELF calls
4397 it via hppaelf_finish). Prototype moved into ldlang.h.
4398 (lang_process): Move problematic extra call to lang_size_sections
4399 into the PA ELF specific code.
4400 * emultempl/hppaelf.em (hppaelf_finish): Extra call to
4401 lang_size_sections moved here.
4405 * configure.in (powerpc-*-elf*): New target; use ppc-elf32.
4406 * config/ppc-elf32.mt: New file.
4407 * emulparams/elf32ppc.sh: New file.
4408 * emultempl/ppc.em: New file.
4409 * Makefile.in (ALL_EMULATIONS): Added em_elf32ppc.o.
4410 (em_elf32ppc.c): New target; uses elf32ppc.sh, ppc.em and elf.sc.
4411 (EMULATION_OFILES): Added dependencies on ldexp.h and ldlang.h.
4415 * lexsup.c (parse_args): Use symbolic numbers for long options.
4416 Fix misunderstanding in -Y and -call_shared et al.
4418 Use getopt instead of lex and yacc to parse the command line.
4420 * ld.texinfo (Options): Document changes to option syntax.
4421 * Makefile.in: Update dependencies.
4422 * ldver.c (help): Tweak dashes in usage message.
4423 * ldgram.y (%union): Remove unused members.
4424 Remove %tokens for command line options; add ones for input types.
4425 (command_line): Rules removed.
4426 (file): Instead of command line, recognize an
4427 input type indicator, then use the nonterminal for that type.
4428 (defsym_expr): New nonterminal from code formerly in command_line.
4429 * ldlex.h: Declare parser input type enum and variable.
4430 Don't declare parse_line.
4431 * ldlex.l: Remove unused variables. Make some used ones static
4433 (COMMAND): Start state and its rules removed.
4434 At start of yylex, return input state token if at start of input.
4435 (lex_redirect): Don't need to set yyout.
4436 (ldlex_command): Function removed.
4437 * ldmain.c (main): Instead of calling parse_line, set up the
4438 redirections and call yyparse directly.
4439 * ldmisc.c (vfinfo): If there's no input filename, print nothing, not
4441 * lexsup.c: Remove #if 0'd code.
4442 (parse_line): Function removed.
4443 (parse_args): Rewrite to use getopt_long_only.
4444 (set_default_dirlist): New function from code formerly in
4445 ldgram.y:command_line.
4446 (set_section_start): New function.
4447 * emultempl/generic.em, emultempl/gld960.em, emultempl/hppaelf.em,
4448 emultempl/lnk960.em, emultempl/m88kbcs.em: Don't enclose
4449 compiled-in link scripts in "{" and "}", as the grammar no longer
4454 * Makefile.in (ld.dvi): Depend on configdoc.texi, but don't
4455 require that it be in $(srcdir).
4459 * ldlang.c (lang_size_sections): Only align section to alignment
4460 required by linker script, not to maximum alignment of input
4463 * ldlang.h (largest_section): Don't declare.
4464 * ldlang.c (largest_section): Don't define.
4465 (size_input_section): Don't set largest_section; not used.
4469 * ldlang.c (new_afile): Pass NULL as last argument to concat.
4473 * ldlang.c, ldmain.c: Include libiberty.h.
4475 * ldmisc.h (concat): Don't declare.
4476 * ldmisc.c (concat): Don't define; just use the one in libiberty.
4478 * ld.h (as_output_section_statement): Removed; not used.
4482 * ldlang.c, ldmain.c, ldmisc.c: Use bfd_get_error and
4483 bfd_set_error and new error names.
4487 * ldwrite.c (build_link_order): If the cooked size of the section
4488 has been set, use it, for determining link_order size.
4489 (ldwrite): In the error message displayed if bfd_final_link fails,
4490 indicate that it was in fact the final link step that failed.
4492 * ldlang.c (lang_size_sections): Clear bfd_error before calling
4493 bfd_relax_section, in case it returns false but doesn't flag an
4494 error. If an error is returned, indicate which one it is in the
4497 * Makefile.in (install-info): Depend on ld.info, and use "$<*" so
4498 it'll get picked up from $(srcdir) if appropriate.
4502 * scripttempl/aout.sc: Only pad .text if PAD_TEXT is set.
4503 * emulparams/i386mach.sh (PAD_TEXT): Set PAD_TEXT.
4507 * ldlex.l (comment): Increment line number when newline is read.
4511 * ldlang.c (lookup_name): Take new argument, force_load. If true,
4512 reload the file even if it is already loaded.
4513 (wild): Call lookup_name with force_load argument of 0.
4514 (open_input_bfds): Call lookup_name with force_load argument of 1.
4515 (print_symbol): Remove declaration of non-existent function.
4516 (print_one_symbol): Return true rather than falling off end.
4520 * ldmain.c (main): Use %ld when printing long values.
4522 * scripttempl/elf.sc: Move _edata after the .sdata section.
4523 Permit OTHER_BSS_SYMBOLS to be defined.
4524 * emulparams/elf32mipb.s (OTHER_BSS_SYMBOLS): Define _fbss.
4528 * Rename all "hppaosf" files to "hppaelf".
4529 * Change all "osf" references to "elf" in hppaelf files.
4530 * Makefile.in: Likewise.
4531 * configure.in: Likewise.
4535 * ldmain.c (main): Call xatexit, not atexit.
4536 Call xmalloc_set_program_name.
4538 * ldlang.c (lang_size_sections): Check if bfd_relax_section set
4543 * emultempl/lnk960.em (append), emultempl/hppaosf.em
4544 (hppaosf_finish): Call xmalloc, not ldmalloc.
4545 * ldmain.c (preserve_output): Function removed.
4546 (main): Do it here instead.
4550 * ldlang.h (LANG_FOR_EACH_{INPUT,OUTPUT}_SECTION): Delete (unused)
4551 GNU C specific macros.
4553 * emultempl/hppaosf.em (hppaosf_finish): Expand the only remaining
4554 call to LANG_FOR_EACH_INPUT_SECTION.
4558 * ldmisc.c (ldmalloc, xmalloc, ldrealloc, xrealloc): Functions
4559 deleted; will use libiberty versions instead.
4560 * ldctor.c ldfile.c ldlang.c ldmain.c ldmisc.c ldmisc.h lexsup.c
4561 mri.c Makefile.in: Change callers.
4563 * ldmisc.c (vfinfo): Remove cleanup code.
4564 * ldmain.c (remove_output): Put it here (new function).
4565 (preserve_output): New function.
4566 (main): Register remove_output and preserve_output with atexit.
4567 * ldmain.c ldgram.y: Call xexit instead of exit.
4568 * ldmisc.h: Declare xexit.
4572 * Makefile.in: Lots of new H8/500 memory models.
4576 * ldlex.l: Removed duplicate rules.
4577 (yywrap): Provide default definition, needed with some versions of
4582 * ldmisc.c (vfinfo): For `%I', if the file is in an archive, print
4583 the archive filename too.
4585 * ldlex.l: Add rule to catch invalid input characters instead of
4586 printing them. Include "ldmain.h" for program_name decl.
4587 (lex_warn_invalid): New function.
4588 * Makefile.in: Add dependency.
4592 * Makefile.in (check): Don't bother running any tests of
4593 cross-linker until the test suite no longer assumes native mode.
4597 * ldlang.c (print_one_symbol, print_input_section): Print
4598 global symbols in symbol table again.
4602 * ldmain.c ldmain.h ldgram.y: If -v -V or --version was given,
4603 exit successfully instead of complaining if no input files are
4608 * Makefile.in: Format variable definitions consistently.
4609 (LD_PROG): Remove unnecessary variables from link command,
4610 change variable LOADLIBES to EXTRALIBS.
4612 * ldmain.c (main): Compute and display total execution time.
4613 * ld.texinfo (-stats): Document the option.
4617 * ldmain.c (reloc_overflow): Added name, reloc_name and addend
4620 * ldlang.c (lookup_name): Set BFD GP size to -G argument value
4623 * ldlang.c (relaxing): Removed global variable.
4624 (lang_size_sections): If the canonical symbols have not already
4625 been read in, read them in before relaxing.
4626 * ldlang.h (relaxing): Removed declaration.
4630 * ldlang.c (new_afile): Initialize loaded field to false.
4631 (lookup_name): If file was already loaded, don't call the
4632 add_symbols entry point again.
4636 * ld.texinfo: Clarify what -T option does.
4640 * scripttempl/m88kbcs.sc: Don't use CREATE_OBJECT_SYMBOLS, that's
4645 * ldmain.c (add_archive_element): If trace_files or
4646 trace_file_tries, print file name.
4647 * ldlang.c (lookup_name): Likewise.
4648 (ldlang_add_file): Don't put files on input_bfds list in reverse
4651 * scripttempl/elf.sc: Correct typo.
4655 * ldgram.y, ldlex.l: Make the space between -e, -u, and -y and
4656 their arguments optional, for compatibility with the old GNU ld.
4660 * scripttempl/elf.c: Define __bss_start before the .sbss section.
4664 * ldmain.c (add_to_set): Add bitsize argument.
4665 (constructor_callback): New function.
4666 (link_callbacks): Add constructor_callback.
4667 * ldctor.c (struct set_info): Add bitsize field.
4668 (ldctor_add_set_entry): Add bitsize argument.
4669 (ldctor_build_sets): Base the size of the elements of the set on
4670 the bitsize, rather than always using LONG.
4671 * ldctor.h (ldctor_add_set_entry): Add bitsize to declaration.
4673 * ld.h (QUAD_SIZE): Define.
4674 * ldgram.y (QUAD): New token.
4675 (length): Handle it.
4676 * ldlex.l: Return QUAD.
4677 * lexsup.c (keywords): Add QUAD.
4678 * ldwrite.c (build_link_order): Handle QUAD.
4679 * ldlang.c (print_data_statement): Handle QUAD.
4680 (lang_size_sections): Likewise.
4681 (lang_do_assignments): Likewise.
4682 * ldexp.c (exp_print_token): Add QUAD to table.
4683 * ld.texinfo: Describe QUAD.
4685 * scripttempl/alpha.sc: Don't create .lit4 or .sdata sections,
4686 since the Alpha doesn't use them.
4690 * ldemul.h (ld_emulation_xfer_struct): Comment the members.
4694 * Makefile.in, configure.in: Add support for VSTa micro-kernel.
4695 * config/vsta.mt, emulparams/vsta.sh: New files for VSTa.
4699 * scripttempl/aout.sc: Pad .text to DATA_ALIGNMENT if relocating;
4700 needed for i386mach. (Should be a no-op on other systems.)
4702 * emulparams/i386mach.sh (SEGMENT_SIZE): Fix again.
4703 (PAGE_SIZE): Don't define; not used.
4707 * ldgram.y (yyerror): Make argument const char *, and actually
4708 print it out rather than assuming it is a syntax error.
4709 * ldmisc.h: Change declaration of yyerror.
4710 * ldemul.c, ldwrite.c: Add /*ARGSUSED*/ as appropriate.
4714 * emulparams/i386mach.sh (NONPAGED_TEXT_START_ADDR): Don't include
4715 exec header offset, since the exec header isn't loaded.
4716 (PAGE_SIZE, SEGMENT_SIZE): Agree with bfd/i386mach3.c.
4720 A major rewrite to move the bulk of the linker into BFD so that
4721 more efficient backend code can be written for specific object
4723 * lderror.c, lderror.h, ldindr.c, ldindr.h, ldsym.c, ldsym.h,
4724 ldwarn.c, ldwarn.h, relax.c, relax.h: Removed.
4725 * ldctor.c, ldctor.h: Complete rewrite.
4726 * ldwrite.c, ldwrite.h: Complete rewrite.
4727 * ld.h (strip_symbols_type, strip_symbols): Removed. Use
4728 link_info.strip instead. Changed all uses.
4729 (discard_locals_type, discard_locals): Removed. Use
4730 link_info.discard instead. Changed all uses.
4731 (ld_config_type): Removed relocateable_output field; use
4732 link_info.relocateable instead; changed all uses. Added stats
4734 (set_asymbol_chain, get_asymbol_chain, get_loader_symbol,
4735 set_loader_symbol): Removed.
4736 * ldexp.h (node_class): Added etree_rel.
4737 (etree_type): Added rel field.
4738 * ldexp.c (exp_print_token): Bracketed table initialization.
4739 (exp_relop): New function.
4740 (fold_name): Use linker hash table rather than ldsym functions.
4741 (exp_fold_tree): Likewise. Also, handle etree_rel case.
4742 (exp_print_tree): Handle etree_rel.
4743 * ldgram.y (strip_symbols, discard_locals): Removed.
4744 (OPTION_stats, OPTION_no_keep_memory): New tokens. Handle them.
4745 (REL): New token. Does not appear in grammar, but needed for
4747 (file): Don't call lang_final; it's called by main anyhow.
4748 * ldlex.l: Accept -stats and -no-keep-memory options.
4749 * ldlang.h (fill_type): Make unsigned int, not unsigned short.
4750 * ldlang.c: Consistently use fill_type for fill argument.
4751 (lang_init_script_file, script_file): Removed.
4752 (create_object_symbols): Removed. Use
4753 link_info.create_object_symbols_section instead. Changed all
4755 (lang_add_keepsyms_file): Removed.
4756 (lookup_name): Call bfd_link_add_symbols instead of
4757 ldmain_open_file_read_symbol.
4758 (wild): Don't iterate over script_file.
4759 (open_output): Create link hash table.
4760 (lang_place_undefineds): Rewrote.
4761 (lang_size_sections): Handle relaxing (doesn't work yet).
4762 (lang_relocate_globals): Removed.
4763 (lang_finish): Use link hash table rather than ldsym functions.
4764 (lang_common): Rewrote.
4765 (lang_one_common): New function.
4766 (ldlang_add_file): Add file to link_info.input_bfds list. Set
4768 (create_symbol): Removed.
4769 (lang_process): Don't call lang_init_script_file. Call
4770 ldctor_build_sets rather than find_constructors. Don't call
4771 lang_relocate_globals.
4772 (lang_abs_symbol_at_beginning_of): Rewrote.
4773 (lang_abs_symbol_at_end_of): Rewrote.
4774 * ldmain.c (had_y): Removed.
4775 (lprefix, lprefix_len): Removed; use link_info fields instead.
4777 (multiple_def_count, commons_pending, undefined_global_sym_count,
4778 total_symbols_seen, total_files_seen): Removed.
4779 (link_callbacks, link_info): New variables.
4780 (main): Initialize link_info. Don't call init_bfd_error_vector or
4781 ldsym_init. Don't set now unused variables. Handle -stats.
4782 (get_emulation): Removed obsolete and nonfunctional GNU960 code.
4783 (add_ysym): Rewrote.
4784 (read_entry_symbols, refize, enter_global_ref, enter_file_symbols,
4785 search_library, gnu960_check_format, decode_library_subfile,
4786 linear_library, symdef_library, clear_syms, subfile_wanted_p):
4788 (add_keepsyms_file, add_archive_element, multiple_definition,
4789 multiple_common, add_to_set, warning_callback, undefined_symbol,
4790 reloc_overflow, reloc_dangerous, unattached_reloc, notice_ysym):
4792 * ldmisc.c (vfinfo): Accept a string for %T, not a symbol. Don't
4793 require symbols for %C; look them up instead.
4794 * emultempl/hppaosf.em: Pass link_info to
4795 hppa_look_for_stubs_in_section.
4796 * Makefile.in: Rebuilt dependencies.
4797 (CFILES): Removed lderror.c, ldindr.c, ldsym.c, ldwarn.c, and
4799 (HFILES): Removed lderror.h, ldindr.h, ldsym.h, ldwarn.h, and
4801 (EMULATION_OFILES): Depend on bfdlink.h, ldmain.h, ldexp.h,
4802 ldlang.h and ldctor.h.
4804 * Makefile.in (ldlex.c): Don't depend on ldgram.h. Remove
4805 declarations of free and malloc from flex output. Change malloc
4806 to ldmalloc in flex output.
4810 * ldmain.c (lprefix): Change default from a char to a string
4811 with only one character.
4812 (lprefix_len): Set default to one.
4814 * ldmain.h (lprefix_len): Declare.
4816 * ldsym.c (write_file_locals): Use strncmp rather than a character
4817 comparison for lprefix.
4819 * emultmpl/m88kbcs.em (before_parse): Set lprefix and lprefix_len
4822 * emultmpl/hppaosf.em: Include ldexp.h.
4823 (before_parse): Set lprefix and lprefix_len correctly.
4827 * ldlex.h: Don't declare yywrap if it is a macro.
4828 * ldlex.l: Include sysdep.h.
4829 * ldlang.c (lang_for_each_statement_worker,
4830 lang_for_each_statement): Forgot to use PARAMS.
4834 * Makefile.in: Added .PHONY targets where appropriate. Added some
4836 (gcclibdir, version): Removed unused variables.
4837 (DEP): New variable, set to mkdep.
4838 (ALL_CFLAGS): New variable. Used in .c.o target.
4839 (CFILES, HFILES, GENERATED_CFILES, GENERATED_HFILES): New
4841 (HEADERS, MANSOURCES, LDCSOURCES, GENERATED_SOURCES,
4842 GENERATED_HEADERS, LDSOURCES, BFD_SOURCES, SOURCES): Removed
4843 mostly obsolete variables. Adjusted remaining uses.
4844 (DEF_EMUL): Removed variable.
4845 (ldmain.o): Handle undefined EMUL error correctly.
4846 (ldemul-list.h): Depend on config.status rather than Makefile.
4847 Create via temporary file.
4848 (ver960.c, roll, make): Removed obsolete targets.
4849 (.dep, .dep1, dep.sed, dep, dep-in): New targets. Used to rebuild
4851 * dep-in.sed: New file, used when rebuilding dependencies.
4855 Made many changes to eliminate gcc warnings. Made various
4856 cosmetic changes, declared various things in header files, removed
4857 various extern declarations from .c files. No substantive
4860 * ldlang.c (lang_process): Ifdef out final call to
4861 lang_size_sections again (reverting change of Nove 2), since it
4862 breaks the Sun4 linker.
4866 * configure.in (alpha-*-netware*): New target; use alpha.
4870 * configure.in: Group targets by CPU. Merge some m68k target
4871 entries with different CPU specs that use the same ld_target
4874 * configure.in: Add sparc*-*-coff.
4875 * config/coff-sparc.mt, emulparams/coff_sparc.sh: New files.
4876 * Makefile.in (ALL_EMULATIONS): Add em_coff_sparc.o.
4877 (em_coff_sparc.c): Add dependencies and build rules.
4879 * ldmisc.c (errno, sys_nerr, sys_errlist): Don't declare.
4883 * ldgram.y (OPTION_call_shared, OPTION_non_shared, OPTION_Oval):
4885 (command_line_option): Accept and ignore them (for now).
4886 * ldlex.l (<COMMAND>): Handle -non_shared, -call_shared, and -On
4887 where n is a number.
4891 * ldmain.c (subfile_wanted_p): If merging a common symbol which is
4892 not in bfd_com_section, create the section in the BFD so that it
4893 can be placed in the right output section.
4897 * configure.in (mips*-sgi-irix5*): New target. Use mipsb-elf32.
4898 * emulparams/elf32mipsb.sh (DATA_ADDR): Define.
4899 (OTHER_READONLY_SECTIONS): Define for .reginfo.
4900 (EXECUTABLE_SYMBOLS): Define for _DYNAMIC_LINK.
4901 * scripttempl/elf.sc: Use EXECUTABLE_SYMBOLS when not relocating.
4902 Move OTHER_READONLY_SECTIONS after all the other readonly
4903 sections. Don't use DATA_ADDR twice.
4905 * ldmain.c (enter_file_symbols): Removed duplicate tests of p. If
4906 p is in a common section, make sure the BFD has a section of that
4909 * ldlang.c (lang_common): Add newline to error message.
4913 * emulparams/m68klynx.sh (SCRIPT_NAME): Define to use a
4914 Lynx-specific script instead of m68kcoff.
4915 (OUTPUT_FORMAT): Define as "coff-m68k-lynx".
4916 (ENTRY): Define as __main.
4917 (TEXT_START_ADDR): Define as 0.
4918 (PAGE_SIZE): Define as 0x1000.
4919 * emulparams/i386lynx.sh, emulparams/sparclynx.sh: Fix comment.
4920 * scripttempl/m68klynx.sc: New file.
4924 * ldmain.c (get_emulation): Ignore -mips1, -mips2 and -mips3
4925 arguments rather than treating them as emulation names.
4929 * configure.in: Support x86 unixware and netware plus generic netware.
4933 * emulparams/i386mach.sh (TEXT_START_ADDR, NONPAGED_TEXT_START_ADDR):
4938 * Makefile.in (distclean): Don't delete dvi or info files.
4939 (ld.info): Update dependency list.
4940 (ld.dvi): Ditto. Extend TEXINPUTS to get bfdsumm.texi.
4944 * ldlang.c (lang_add_output): Take new arg, FROM_SCRIPT.
4945 Set output_filename instead of creating a new node.
4946 (open_output): Don't set output_filename.
4947 (lang_final): Create the new node here.
4948 * ldlang.c, ldlang.h, ldgram.y, mri.c: pass FROM_SCRIPT.
4954 * scripttempl/hppaosf.sc: (___stack_zero, etext, _etext,
4955 edata, _edata, end): Add definitions of these symbols.
4956 (__end): Remove definition of this symbol.
4957 (__data_start): Move definition of this symbol.
4959 * emultempl/hppaosf.em: Various fixes and support for linker stub
4961 (hppaosf_finish, hppaosf_search_for_padding_statements,
4962 hppaosf_create_output_section_statements): New functions in
4963 support of linker stub generation.
4964 (ld_hppaosf_emulation): Redefine to include new
4965 emulation-specific routines.
4967 * ldlang.c (lang_process): Re-enable last call lang_size_sections.
4968 Pass abs_output_section rather than NULL to avoid invalidating
4973 * Makefile.in (ALL_EMULATIONS): Add em_i386mach.o.
4974 (em_i386mach.c): New rule.
4975 * configure.in (i[34]86-*-mach*): New case.
4976 * config/i386-mach.mt: New file.
4977 * emulparams/i386mach.sh: New file.
4981 * ld.h (flag_is_*): Removed macros.
4982 * ldmain.c (enter_global_ref), ldsym.c (write_file_locals):
4983 Consistently check the BFD symbol flags directly, rather than
4984 using file_is_* macros.
4988 * configure.in (sparc*-*-lynxos*): New target.
4989 * Makefile.in: Add rule for em_sparclynx.c.
4990 (ALL_EMULATIONS): Add Lynx emulations.
4991 * config/sparc-lynx.mt: New file.
4992 * emulparams/sparclynx.sh: New file.
4993 * scripttempl/sparccoff.sc: New file.
4997 * Makefile.in: Add dependency for $(EMULATION_OFILES).
5001 * relax.c (write_relax): Check return value of bfd_seclet_link.
5005 * ldlang.c (delete_output_file_on_failure): New variable.
5006 (open_output): Set it after bfd open succeeds.
5007 * ldmisc.c (vfinfo): Test it.
5011 * ldsym.c (write_file_locals): Set the BSF_FILE flag for object
5014 * ldemul.c: Support was added to allow emulation-specific
5015 processing to occur. This support was added primarily for linker
5016 stub generation in the elf32-hppa gld.
5017 (ldemul_finish, ldemul_create_output_section_statements): New
5019 * ldemul.h: Support was added to allow emulation-specific
5020 processing to occur. (As described above.) Added finish and
5021 create_output_section_statements fields to
5022 ld_emulation_xfer_struct structure.
5023 * ldlang.c: Add calls to emulation-specific routines.
5024 (lang_process): Add call to
5025 ldemul_create_output_section_statements function.
5026 (lang_process): Add call to a emulation-specific routine (and
5027 some processing after the call).
5031 * configure.in: mips*- instead of mips-, mips*el changes
5035 * configure.in (alpha-*-osf*): New target; use alpha.mt.
5036 * Makefile.in (ALL_EMULATIONS): Added em_alpha.o.
5037 (em_alpha.c): New target; use alpha.sh and alpha.sc.
5038 * config/alphaosf.mh (NATIVE_LIB_DIRS, HOSTING_CRT0): Define.
5039 * config/alpha.mt: New file.
5040 * emulparams/alpha.sh: New file.
5041 * scripttempl/alpha.sc: New file.
5045 * ldlang.c (lang_size_sections, lang_common): ALIGN_N can't handle
5046 types of different sizes (eg: 64 and 32 bits), so coerce.
5047 * ld.h (ALIGN_N): Add warning about usage.
5051 * ldmain.c (enter_global_ref): Just ignore any weak symbol for
5052 which we already have a definition, rather than checking in
5053 several different places whether the symbol is weak.
5057 * configure.in (mips-*-elf*): New target; use mipsb-elf32.
5058 * scripttempl/elf.sc: Only use OTHER_READONLY_SECTIONS and
5059 OTHER_READWRITE_SECTIONS if relocating. Shell variables are not
5060 expanded within them.
5061 * config/mipsb-elf32.mt: New file.
5062 * emulparams/elf32mipb.sh: New file.
5063 * Makefile.in (em_elf32mipb.c): New target.
5067 * ldgram.y: In input_list, change lang_input_file_is_file_enum to
5068 lang_input_file_is_search_file_enum so objects brought in using
5069 INPUT() do a path lookup.
5073 * configure.in: Change Lynx ld_target to be {i386,m68k}-lynx
5074 instead of {i386,m68k}-coff.
5075 * Makefile.in (em_i386lynx.c, em_m68klynx.c): New targets.
5076 * config/i386-lynx.mt: New file.
5077 * config/m68k-lynx.mt: New file.
5078 * emulparams/i386lynx.sh: New file.
5079 * emulparams/m68klynx.sh: New file.
5081 * scripttempl/i386coff.sc: Make ENTRY get its value from ${ENTRY},
5082 but defaulting to _start.
5084 * ldemul.c, ldfile.c, ldlang.c, ldmain.c, ldmisc.c, ldmisc.h,
5085 ldsym.c, ldwarn.c: Rename info to info_msg, to avoid conflict with
5090 * config/solaris2.mh: New file. Define HOSTING_CRT0 and
5091 HOSTING_LIBS for testing.
5095 Finish up support for i386-sysv4 (without shared libraries):
5096 * ld.h (flag_is_weak): Define.
5097 * ldlang.c (print_symbol): Mention whether symbol is weak.
5098 (print_input_section): Print weak symbols as globals.
5099 * ldmain.c (refize): Do not zero out BSF_WEAK flag.
5100 (enter_global_ref): Do not warn if a weak symbol redefines a
5101 global symbol. Do not let a weak symbol redefine a common symbol.
5102 (enter_file_symbols): Treat weak symbols as global symbols.
5103 (subfile_wanted_p): Do not pull in an object file from a archive
5104 just to resolve an undefined weak symbol.
5105 * ldmisc.c (vfinfo): Don't needlessly malloc space after a fatal
5106 error; the error might be that malloc has run out of space.
5107 * ldsym.c (write_file_locals): Treat weak symbols as global.
5108 * configure.in (i[34]86-*-sysv4*, i[34]86-*-elf*): New targets;
5110 * config/i386v4.mh: New file; set NATIVE_LIB_DIRS to /usr/ccs/lib.
5111 * config/i386-elf.mt: New file; set EMUL to elf_i386.
5112 * emulparams/elf_i386.sh: New file.
5113 * scripttempl/elf.sc: Use ${NOP} as filler (defaults to 0).
5114 * Makefile.in (NATIVE_LIB_DIRS): Define to be empty.
5115 (ALL_EMULATIONS): Add em_elf_i386.o.
5116 (GENSCRIPTS): Pass NATIVE_LIB_DIRS as sixth argument.
5117 (em_elf_i386.c): New target, like other em_*.c targets.
5118 ($(LD_PROG)): Pass $(CFLAGS) to $(CC).
5119 * genscripts.sh: Accept NATIVE_LIB_DIRS as sixth argument. If
5120 nonempty, and configured for native, add it to LIB_PATH.
5124 * scripttempl/{h8300.sc,h8500.sc,i386coff.sc,m68kcoff.sc,sh.sc}:
5125 Added statements to pass stab and stabstr sections through and
5126 mark them as NOLOAD, which makes GDB happier.
5130 * configure.in: Accept m68k-lynx-lynxos config.
5132 * Makefile.in: Use $(SHELL) to run genscripts.sh.
5136 * config/coff-h8300.mt: Add EMUL=h8300h.
5138 * ldmain.c (main): Call set_scripts_dir after argv has been processed.
5142 * Makefile.in: Changed CXX back to g++.
5146 * Makefile.in: Fixed RUNTEST* CXX CXXFLAGS macros and check rule.
5150 * Makefile.in (TAGS): Use shell wildcards.
5154 * Makefile.in: add TEXINPUTS variable and use it in ld.dvi target
5158 * ld.texinfo: re-enable included config file; conditionalize doc
5159 for -oformat to interact properly with SingleFormat doc config
5160 var; rename @up/@down to @raisesections/@lowersections.
5164 * configure.in: recognize m88110.
5169 * emultempl/hppaosf.em (ld_hppaosf_emulation): Correct name for PA
5170 ELF emulation is "elf32-hppa" not "elf-big".
5171 (hppaosf_before_parse): Remove unneeded processing of environment
5173 * scripttempl/hppaosf.sc: Include .hppa_linker_stubs sections in
5174 .text segment of output file.
5175 * emulparams/hppaosf.sh (OUTPUT_FORMAT): Use elf32-hppa.
5179 * ld.h: define BYTE_SIZE, SHORT_SIZE, and LONG_SIZE which are no
5182 * ldlang.c, ld.h: updated copyright.
5186 * ldlang.c (open_output, lang_check): Check return value of
5191 * scripttempl/h8500.sc: Start all sections in a different segment.
5192 * scripttempl/z8ksim.sc: Handle constructors
5196 * Makefile.in: revert earlier changes back to execute runtest
5197 with make check. cdtest and bootstrap now function as they
5198 did within the Makefile.
5202 * Makefile.in: Update dependencies.
5204 * configure.in: Set EMULATION_OFILES in Makefile based on
5205 --with-targets option.
5209 * Makefile.in: check targets reimplemented to old way.
5213 * config/i386v.mh, config/irix4.mh: Use gcc
5214 -print-libgcc-file-name rather than $(libdir)/libgcc.a.
5215 * config/i386sco.mh: New file; copy of i386v.mh to correspond to
5216 bfd/configure.host change.
5220 * scripttempl/elf.sc: Handle .line and .debug* sections.
5222 * ldlex.l: Use bfd_scan_vma, not strtoul.
5226 * ldexp.c, ldfile.c, ldlang.c, lexsup.c, ldmain.c, ldemul.c:
5227 Remove inital caps in some error messages, change "can't" to
5228 "cannot", add missing colons.
5229 * ldmisc.c (vfinfo): Print "%%" as a single %.
5230 For '%' followed by unrecognized character, print them both
5231 verbatim instead of expecting a char * arg.
5232 For '%C', don't put the function name in parens.
5234 * ldexp.c (invalid): Pass "%%", not "% ".
5238 * scripttempl/mips.sc: Always define _ftext, _fdata, _fbss.
5239 (BSS_VAR): Removed; now always define _fbss.
5240 * emulparams/mipsidt.sh, emulparams/mipsidtl.sh (BSS_VAR):
5245 * configure.in: z8k-coff is the same as z8k-sim
5249 * testsuite/lib/ld.exp: new file
5250 * testsuite/config/unix-ld.exp: new file
5251 * testsuite/ld.bootstrap/bootstrap.exp: new file
5252 * Makefile.in: add dejagnu support for make check
5256 * ldlex.l (comment): Add missing newline in message.
5257 * ldindr.c (add_indirect): Ditto.
5258 * ldexp.c (exp_fold_tree): Ditto.
5262 * ldgram.y, ldlex.l, mri.c, ldwrite.c: Change multiple commons
5265 * ldmisc.c (multiple_warn): New function.
5266 * ldmisc.h: Declare it.
5267 * ldmain.c (enter_global_ref): Call it.
5268 * ld.h (ld_config_type): Add warn_common.
5269 * ldlex.l, ldgram.y: Set it with -warn-common option.
5270 * ldver.c (help): Document it.
5274 * scripttempl/elf.sc: Add hooks for .sdata, .sbss, and
5275 target-specific sections, and for changing data section vma.
5279 * ldgram.y (OPTION_Qy, OPTION_Y, OPTION_dn, OPTION_YP): New
5280 terminals, for Solaris.
5281 (dirlist_ptr): New static variable.
5282 (command_line_option): Accept new options.
5284 * ldlex.l: Accept command-line options "-Qy", "-dn", "-Y", and
5287 * config/sun4sol2.mt: Pass emulation name without ".sh".
5289 * emulparams/elf32_sparc.c: Renamed from elf32-sparc.c.
5290 * config/sun4sol2.mt (em_elf32_sparc.c): Adjusted accordingly.
5294 * scripttempl/elf.sc: Add support for .init, .fini, .ctors,
5295 .dtors, .data1, .rodata1 sections, instead of combining them into
5296 other sections. For `-r', set all section start addresses to
5299 * emulparams/elf32-sparc.sh (TEXT_START_ADDR,
5300 NONPAGED_TEXT_START_ADDR): Value should be 0x10100.
5301 (MAXPAGESIZE): Renamed from PAGE_SIZE.
5305 * genscripts.sh: If this is the default emulation, set
5307 * emultempl/*.em: Use it to determine whether to compile in the
5310 * Makefile.in (GENSCRIPTS): Pass the default emulation name to
5311 genscripts.sh. Pass the current emulation name without ".sh" on
5313 * genscripts.sh: Take an default emulation arg.
5314 Use the current emulation name as EMULATION_NAME.
5315 Make default lib path for cross-compiling ':', not null.
5316 * emulparams/*.sh: Don't set EMULATION_NAME.
5317 * ldemul.c (ldemul_get_script): Take isfile arg.
5318 Pass it to emulation's get_script function.
5319 * ldemul.h: Adjust get_script prototypes.
5320 * ldfile.c (ldfile_find_command_file): Renamed from find_a_name.
5322 * ldfile.h: Declare it.
5323 * ldgram.y: Accept a script on the command line again,
5324 for parsing compiled-in scripts.
5325 * ldmain.c (main): If ld script is a file, parse it as a -T
5326 option, otherwise parse it directly.
5327 * emultempl/*.em (*get_script): Return the scripts themselves if
5328 this is the default emulation; otherwise return their file names.
5329 * emultempl/m88kbcs.em: New file, to take m88kbcs #ifdef out of
5331 * emulparams/m88kbcs.sh: Use it.
5333 * ld.h (ld_config_type::unix_relocate): Remove unused element.
5337 * Makefile.in (ALL_EMULATIONS): Delete em_i386linux.o (for which
5338 there's no change log entry yet, tsk tsk) from the list of
5339 emulations compiled in until Mark gets around to checking in
5340 emulparams/i386linux.sh.
5341 (ldemul-list.h): Depend on Makefile, so if EMULATION_OFILES is
5342 changed, this file gets updated.
5346 * ldgram.y (OPTION_Lfile): New token.
5347 (command_line_option): Accept OPTION_L NAME (whitespace after -L).
5348 * ldlex.l (<COMMAND>): Accept -L without FILENAME.
5352 * configure.in: h8/300h support needs own .mt file.
5353 config/coff-h8300h.mt: New file.
5357 * ldmain.c: Don't include sys/stat.h; it already got included
5358 somewhere along the way.
5362 * Makefile.in: Add h8300h support.
5363 emulparams/h8300h.sh: New file.
5364 scripttempl/h8300h.sc: New file.
5368 * ldfile.c (ldfile_open_file): In error message, use the name the
5369 user gave (e.g., "-lc"), rather than the base file name.
5371 * ldexp.c (exp_fold_tree): Don't assign an int to an enum.
5373 * ldmain.[ch]: Remove initial Q_ from function names.
5374 * ldexp.c, ldindr.c, ldlang.c: Change callers.
5376 * ldfile.c, ldmain.c, ldgram.y: Rename option_v to trace_file_tries.
5378 * ldlang.c (lang_process): Move loading of default script from
5379 here to main. Add a "/" to start of script name to prevent
5380 finding it in "." first.
5382 * ldmain.c (set_scripts_dir): Don't look in "." first.
5384 * ldgram.y, ldlang.c, ldsym.c: Remove traces of unused var
5389 * Makefile.in (em_m88kbcs.c): Correct dependency.
5390 * scripttempl/m88kbcs.sc: It's ARCH, not arch. Removed TARGET
5391 statement. Changed OUTPUT_FORMAT to use ${OUTPUT_FORMAT}.
5392 * emulparams/m88kbcs.sh: It's coff-m88kbcs, not m88kbcs.
5396 * ldfile.c (ldlang_open_file, ldfile_open_command_file),
5397 main.c (main): Print the errno string in the error message.
5401 * configure.in: Accept h8300h for target cpu.
5403 * ldmisc.c (vfinfo): Have demangle remove leading underscore if
5404 present (demangle is smart enough to know whether to do it or not).
5408 * ldmain.c (set_scripts_dir): Check . and <ld bin dir>/../lib for
5409 ldscripts, as well as <ld bin dir> and SCRIPTDIR.
5411 * ldlang.c (lang_process): Use sizeof instead of magic constant.
5413 * ldmain.c (get_emulation, check_for_scripts_dir,
5414 set_scripts_dir): New functions.
5419 * scripttempl/elf.sc: Include .init, .fini, .rodata sections.
5420 Create symbol "end" instead of "__end". Comment out some parts
5421 that may not be needed (yet) for elf.
5423 * configure.in: Accept sparc-elf and sparc-solaris2 configs.
5427 * Makefile.in (ALL_EMULATIONS): Include $(OTHER_EMULATIONS).
5429 * ldmisc.h (einfo, minfo, info): Don't bother with PARAMS macro
5430 when no prototype is being supplied.
5431 (ldmalloc, ldrealloc): Size argument is now size_t.
5433 * ldmisc.c (finfo): New function, accepts FILE* argument.
5434 (vfinfo, case 'v'): New format character; displays bfd_vma in hex
5435 without leading zeros.
5436 (vfinfo, cases 'R' and 'C'): Use finfo(%v) when displaying a
5437 bfd_vma value, instead of fprintf(%x) which won't hold a long long
5439 (concat, buystring): String lengths are size_t.
5440 (ldmalloc, ldrealloc, xrealloc): Size argument is now size_t.
5442 * ldlang.c (new_statement): Size argument is now size_t. Added
5443 forward declaration with prototype.
5447 * ldgram.y (OPTION_v): Don't turn on verbose output.
5451 * ldlex.l: Get rid of local typedef for bfd_vma! Get it from
5456 * Makefile.in (install): Don't install as $(tooldir)/bin/gld;
5457 collect2 doesn't look for gld any more anyhow.
5461 * ldlang.c (lang_relocate_globals): Skip indirect symbols, which
5462 now have a non NULL srefs_chain.
5464 * config/hp300hpux.mt: Use emulation hp3hpux rather than
5465 hp300hpux, since the latter does not exist.
5469 * genscripts.sh: Put the scripts in the ldscripts directory, not
5471 * configure.in (ldscripts): Make, instead of emulations.
5472 * Makefile.in (scriptdir): Take off the "ld" part.
5473 (install, clean, distclean): Use ldscripts, not emulations.
5474 In tests, don't pass -Lemulations.
5475 Don't pass tooldir/lib to genscripts.sh.
5476 * genscripts.sh: Don't take tooldir/lib arg.
5477 * ldlang.c (lang_process): Add "ldscripts/" to the name of the
5478 default script file.
5482 * scripttempl/h8300.sc: Add .tors section for constructor/destructors.
5486 * config/coff-h8300.mt: EMUL=h8300hms -> h8300.
5490 * Makefile.in (.y.c): skip default .y.c rules. gnu make can now
5491 run in parallel without colliding on yacc's static file names.
5492 Without the stub rule, make will try to start two yacc's
5493 concurrently which fails because of yacc's static file names.
5497 * ldmain.c (subfile_wanted_p): Don't dump core if there are no
5502 * genscripts.sh (LIB_PATH): Only add /usr/local/lib if it's
5503 different from libdir.
5505 * Makefile.in (scriptdir): Base on tooldir, not datadir.
5509 * ldver.c (help): New function.
5510 * ldver.h: Declare it.
5511 * ldlex.l, ldgram.y: Recognize new options --help and --version.
5515 * Makefile.in (INCLUDES): Don't need ../include any more.
5519 * ldlex.l, ldgram.y: Support new -oformat option.
5520 Remove attempt at supporting script fragments on the command line.
5521 * ldlang.c (lang_add_output_format): Take new arg, FROM_SCRIPT.
5522 * mri.c (mri_format), ldgram.y: Change callers.
5523 * ldlang.h: Change prototype.
5527 * Makefile.in: canonicalize install.sh; for use within
5528 this directory (and subdirs)
5532 * ldgram.y: Tweak grammar to make reporting of invalid options work.
5534 * Makefile.in (.cc.o): Restore .SUFFIXES entry for .cc
5539 * ldfile.c (ldfile_open_command): Don't try .ld extension.
5540 It wasn't documented (or likely used) and wastes time.
5541 (try_open): If EXTEN is empty, don't try it.
5543 * ldctor.c, lderror.c, ldexp.c, ldfile.c, ldindr.c, ldlang.c,
5544 ldlex.l, ldmain.c, ldmisc.c, ldsym.c, ldver.c, ldwarn.c,
5545 ldwrite.c, lexsup.c, mri.c, relax.c: Replace DEFUN macro calls
5546 with normal function declarations.
5548 * Move *.em to emultempl/*.em. Move *.sh to emulparams/*.sh.
5549 Move *.sc-sh to scripttempl/*.sc.
5550 * {emultempl,emulparams,scripttempl}/README: New files.
5551 * sh.em, st2000.em, z8ksim.em, h8300hms.em, h8500hms.em: Files
5552 removed, replaced with generic.em.
5553 * h8300.sh, h8500.sh, h8300.sc, h8500.sc: Renamed from
5554 h8[35]00hms.s[ch]. Change their contents to omit the "hms".
5556 * *.em (*_get_script): Return script name instead of script contents.
5557 * ldlang.c (lang_process): Change caller.
5559 * ldlex.l, ldgram.y: Recognize -m option.
5560 Check for input files after *all* options in grammar.
5561 * ldmain.c (main): Check for -m options. Add default directory
5564 * mkscript.c: File removed.
5565 * genscripts.sh: Take two more parameters, tooldirlib and libdir,
5566 to add to the default LIB_PATH.
5567 Look for input files in the new subdirectories.
5568 Create the scripts in emulations subdirectory and don't filter
5569 them through mkscript.
5570 * configure.in: Make the emulations subdirectory.
5572 * Makefile.in: Account for all of the above changes.
5573 Remove unused .SUFFIXES. Get libgcc.a path with gcc
5574 -print-libgcc-file-name instead of $(libdir)/libgcc.a.
5575 Put CFLAGS last in the compilation rules.
5576 Add -I../bfd to INCLUDES so sysdep.h is found.
5580 * Makefile.in (INCLUDES): Look in ../include, not ../bfd.
5582 * aout.sc-sh: Add SHLIB_PATH like STACKZERO. Make STACKZERO
5583 dependent on RELOCATING, not RELOCATION.
5584 * hp3hpux.sh (SHLIB_PATH): Define it.
5588 * ldfile.c (try_open): If opening without the extension fails,
5589 try with the extension even if -v or -V was given.
5590 had_script is imported (from ldgram.y), not exported.
5592 Mon Jun 14 16:26:10 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
5594 * Makefile.in: remove parentdir support, use INSTALL_XFORM
5598 * ldexp.c (exp_fold_tree): Don't lose the old flag bits.
5599 * ldgram.y (statement_list_opt): New nonterminal, either empty or
5601 (section): Use statement_list_opt, not statement_list.
5602 * m68kcoff.sc-sh: Gather constructors and destructors and define
5603 __CTOR_LIST__ and __DTOR_LIST__ appropriately.
5604 * sa29200.sc-sh: Gather constructors and destructors and define
5605 ___CTOR_LIST__ and ___DTOR_LIST__ appropriately.
5609 * Makefile.in (INCLUDES): Add -I../bfd for sysdep.h and bfd.h.
5610 * configure.in: No longer need to configure to get sysdep.h.
5612 Fri Jun 4 16:18:24 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
5614 * Makefile.in: remove install:all and install-info:info
5615 dependencies (these cause some spurious rebuilds at 'make install'
5620 * configure.in (mips-idt-ecoffl*): New target; use mips-idtl.
5621 (mips-idt-ecoff*): Added trailing '*'.
5622 * config/mips-idtl.mt: New file; use EMUL of mipsidtl.
5623 * mipsidtl.sh: New file; like mipsidt.sh, but little endian.
5624 * Makefile.in (ALL_EMULATIONS): Added em_mipsidtl.o.
5626 * config/sun3.mh (HOSTING_LIBS, HOSTING_EMU): Removed obsolete and
5627 incorrect definitions.
5631 * ldsym.c (write_file_locals): Write BSF_CONSTRUCTOR
5632 symbols, unless stripping.
5636 * Makefile.in: configure looks for ####, so remove lines with many
5638 * config/irix4.mh, config/i386v.mh: New files; set HOSTING_CRT0
5639 and HOSTING_LIBS correctly so that ``make check'' will work.
5643 * mips.sc-sh: Define _etext, _edata, and _end, in addition
5644 to etext, edata, and end. Needed for IRIX 4.0.5F.
5647 * Version 2.2.1 released.
5651 * mipsbsd.sc-sh: Renamed from aout-mipsbsd.sc-sh.
5652 * mipsbsd.sh (EMULATION_NAME): Use new file name.
5656 * Makefile.in (LDDISTSTUFF): Remove ld.mm since we can't build it
5659 * Version 2.2 released.
5663 * ldver.c (ldversion): Bump version number to 2.2.
5671 * mips.sc-sh: Don't define BSS_VAR unless relocating.
5675 * Makefile.in (mkscript.o, mkscript): Build mkscript via
5676 mkscript.o, rather than directly from mkscript.c.
5680 * configure.in: Look for ${target_makefile_frag} relative to
5681 ${srcdir}, not relative to build directory.
5683 * hppaosf.em, hppaosf.sc-sh, hppaosf.sh: New files.
5684 * configure.in: Recognize hppa*-hp-osf.
5685 * Makefile.in (ALL_EMULATIONS): Include hppaosf emulation.
5686 (em_hppaosf.c): Build it.
5687 * config/hppaosf.mh, hppaosf.mt: New files.
5689 * ld.h (ALIGN_N): Renamed from ALIGN, because that conflicted with
5690 some system header files. All uses changed.
5692 * configure.in: Recognize i386-aix configurations as i386-coff
5695 * configure.in: Recognize m68*-*-hpux.
5696 * aout.sc-sh: If STACKZERO and RELOCATING are both defined, output
5697 the value of STACKZERO.
5698 * Makefile.in (ALL_EMULATIONS): Include hp300-hpux emulation.
5699 (em_hp3hpux.c): Build it.
5700 * hp3hpux.sh, config/hp300hpux.mt: New files.
5704 * mips.sc-sh: Put constructors in the .data section.
5705 * Makefile.in (cdtest): Added dependency on ld.new.
5709 * Makefile.in: Change definition of $(tooldir) to match FSF.
5710 * vax.sh, config/vax.mt, configure.in, Makefile.in:
5711 Support VAX Ultrix and BSD.
5715 * sh.em, sh.sh, sh.sc-sh: New files supporting Hitachi SH.
5719 * ldlang.h (struct memory_region): Change `length' and
5720 `old_length' fields to bfd_size_type. Eliminate use of bfd_offset.
5721 * ldlang.c, mri.c: Corresponding changes, plus lint.
5725 * configure.in: For all i386 targets, accept i486 as well.
5729 * ldlang.c (wild_doit): Preserve all flags for a
5730 SEC_SHARED_LIBRARY section.
5731 (size_input_section): Consider any SEC_HAS_CONTENTS section when
5732 computing largest_section.
5736 * ldlang.c (lang_output_section_statement_lookup): Initialize all
5737 fields of newly created structure.
5741 * ldmain.c (g_switch_value): New variable.
5742 * ldgram.y (OPTION_G, OPTION_Gval): New tokens.
5743 (command_line_option): Accept -G and set g_switch_value.
5744 * ldlex.l (COMMAND): Accept -G.
5745 * ldlang.c (open_output): Call bfd_set_gp_size on new BFD.
5749 Support for linking and loading at different places:
5751 * ldlex.l: Add "AT" keyword.
5752 * ldgram.y: Cleanup, and parse AT.
5753 * ldlang.c (print_output_section_statement): Print output address
5754 of section in map. (lang_size_sections): Fill sections' lma with
5756 * ldlang.h (lang_output_section_statement_type): Add load_base
5759 * ldindr.c (add_indirect): Keep more information in the alias
5761 * ldlang.c (wild_doit): Don't inherit NEVER_LOAD section
5762 attribute from an input section.
5763 * ldmain.c (Q_enter_file_symbols): Common section is NEVER_LOAD by
5764 default. (Q_enter_file_symbos): Indirect symbols now are known by
5765 their section, not a special symbol flag.
5766 * ldsym.c (write_file_locals): Indirect symbols aren't local.
5767 (write_file_globals): Write the mapping for an indirect symbol.
5768 * relax.c (build_it): When forced to write a NEVER_LOAD section,
5773 * ld.texinfo: changes for q1
5775 Tue Mar 23 00:13:29 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
5777 * Makefile.in: add dvi target, define & use TEXI2DVI, add installcheck
5779 Mon Mar 8 20:30:35 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
5781 * Makefile.in: rename HOST_CC to CC_FOR_BUILD
5785 * mips.sc-sh: Added variables which may be overridden by a
5787 * mipsidt.sh: New file; emulation for IDT MIPS board.
5788 * Makefile.in (ALL_EMULATIONS): Added em_mipsidt.o.
5789 (em_mipsidt.c): New target. Uses mipsidt.sh and mips.sc-sh.
5790 * config/mips-idt.mt: New file; sets EMUL to mipsidt.
5791 * configure.in (mips-idt-ecoff): New target; uses mips-idt.
5795 * aout-mipsbsd.sc-sh, mipsbsd.sh: New files from Ralph Campbell,
5797 * i386bsd.sh, config/i386bsd.mt: New files.
5798 * configure.in, Makefile.in: Added support for mipsbsd and 386bsd.
5802 * mri.c: Add extern declaration of strdup.
5803 * ldsym.c (KEEP macro): Add spaces around '=' for the
5804 sake of old (e.g. PCC) compilers.
5808 * ldver.c: Bump to version 2.1.
5812 * ldgram.y: allow section types without address expressions.
5813 * ldlang.c (lang_relocate_globals): avoid possible hang with
5814 undefined but unreferenced symbols.
5815 * relax.c (relax_section): don't complain if the script file isn't
5816 relaxable but -relax is set
5818 Thu Feb 18 17:58:45 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
5820 * configure.in: go32 is the 3rd part of the triple, not the 2nd
5824 * mipsbig.sh: New file. Big endian MIPS emulation.
5825 * config/mips-big.mt: New file. Use mipsbig emulation.
5826 * configure.in (mips-sgi-irix*): Use target mips-big.
5827 * Makefile.in (ALL_EMULATIONS): Added em_mipsbig.o.
5828 (em_mipsbig.c): New target. Uses mipsbig.sh.
5832 * mips.sc-sh: Put .scommon sections into .sbss section.
5834 * ldmain.c (subfile_wanted_p): Preserve section of common symbols,
5835 rather than always putting them in bfd_com_section.
5836 * ldlang.c (lang_common): If a common symbol is not in
5837 bfd_com_section, put in a section of the same name, rather than
5838 always putting it in section COMMON.
5842 * ldmain.c (subfile_wanted_p): If we already have a common
5843 definition of a symbol, don't necessarily pull in an object file
5844 that provides a non-common definition.
5846 * ldlex.l (COMMAND): Accept -EB and -EL command line arguments,
5847 returning OPTION_EB and OPTION_EL. gcc passes these to a MIPS
5849 * ldgram.y (OPTION_EB, OPTION_EL): New tokens.
5850 (command_line_option): Accept and ignore OPTION_EB and OPTION_EL.
5854 * Makefile.in (install): Remove $(tooldir)/bin/gld before creating
5859 * ldmain.c, ldsym.c: Use new bfd_is_com_section macro rather than
5860 checking for equality to bfd_com_section.
5864 * mips.sc-sh: New file. Ultrix, and hopefully other MIPS ECOFF
5865 targets, linker script.
5866 * mipslit.sh: New file. Little endian MIPS emulation.
5867 * config/mips-lit.mt: New file. Use mipslit emulation.
5868 * configure.in (mips-dec-ultrix*): Use target mips-lit.
5869 * Makefile.in (ALL_EMULATIONS): Added em_mipslit.o.
5870 (em_mipslit.c): New target. Uses mipslit.sh.
5874 * Makefile.in (install): Install ld as both $(tooldir)/bin/ld and
5875 $(tooldir)/bin/gld, so that gcc can find it with or without
5880 * ldwrite.c: Removed perform_relocation, copy_and_relocate, and
5881 write_norel. All linking is now done via write_relax. Call
5882 ldsym_write before calling write_relax.
5883 * relax.c: Added copyright.
5884 (write_relax): Renamed from write_relaxnorel. Added relocateable
5885 argument. seclet_dump renamed to bfd_seclet_link.
5886 * relax.h: Added copyright.
5890 * ldmain.c (decode_library_subfile): Patch from
5893 Fri Jan 8 18:04:33 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
5895 * config/vxworks960.mt renamed to config/i960.mt
5897 * configure.in: sparc-aout emulates a sun4, as does
5898 sparc*-vxworks, i960-nindy uses gld960 emulation
5902 Fix support for NOLOAD, add INCLUDE
5903 * ldfile.c (ldfile_open_command_file): pass file name to
5905 * ldlex.l, ldgram.y: tidy up, parse INCLUDE and NOLOAD
5906 * ldlang.c (wild_doit): make output sections inherit NEVER_LOAD
5909 Thu Jan 7 10:22:19 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
5911 * Makefile.in, config.h: no more default emulation. Make the lack
5912 of emulation a compile time error
5914 Wed Jan 6 01:08:37 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
5916 * configure.in: recognise all sparclite variants, not just 'sparclite'
5920 * m68kcoff.sc-sh: define _end as well as end, for consistency with
5923 * configure.in: accept *-ericsson-ose for any m68k CPU.
5925 * ldwrite.c (write_rel): don't always set SEC_HAS_CONTENTS flag
5926 for each output section.
5930 * ldexp.c, ldlang.c, ldmain.c, ldsym.c, ldwarn.c: Use new
5931 macro bfd_asymbol_bfd as appropriate.
5932 * Makefile.in: Un-duplicate ldlex.c dependency.
5933 * condigure.in: Replace my_host case table by sourcing
5934 ../bfd/configure.host. Allow std-host as the default.
5935 * ldmisc.c: Change logic for C++ name demangling: There is
5936 no initial '_' to remove from stab-derived function names.
5940 * ldlang.c (lang_init_script_file): don't attach the output file
5941 sections to the script file.
5944 * ldlang.c (wild): run expansion loop over command line bfd too.
5945 (lang_ini_script_file): initialize more parts of the command line
5947 * ldlex.l: fix DEFINED start states.
5951 * ld.texinfo: new doc.
5952 * ldgram.y, ldlex.l: understand -y<symbol>
5953 * ldmain.c (Q_enter_file_symbols): if had -y, lookup symbol and
5954 print info. (add_ysym): new function.
5955 * ldsym.h: (ldsym_type): new define SYM_Y.
5959 * ldctor.h, lderror.h, ldexp.h, ldfile.h, ldindr.h, ldlang.c,
5960 ldlang.h, ldlex.h, ldmain.h, ldmisc.h, ldsym.h, ldver.h, ldwarn.h,
5961 ldwrite.h, relax.h: Replace all uses of EXFUN and PROTO ansi-glue
5962 macros with PARAMS. Recreational cleanup. Update copyrights.
5964 Tue Nov 10 00:23:37 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
5966 * Makefile.in: pass down the bfd source directory for includes
5970 * ldlang.c (lang_size_sections): don't change size and address for
5971 SEC_SHARED_LIBRARY sections rather than for SEC_NEVER_LOAD
5976 * relax.c (build_it): re-enable the processing of data_statements
5977 in scripts, makes counted contructor lists work again.
5981 * ldemul.h: Remove uses of SDEF and PROTO macros (use PARAMS).
5985 * m68kcoff.sc-sh: don't use initial underscores for etext, edata
5990 * Support for i386-sysv.
5991 configure.in: check for i386-*-sysv* and i386-*-sco*.
5992 i386coff.sc-sh: rewrote to support SVR3 by default.
5993 ldctor.c (find_constructors): preserve stat_ptr.
5994 ldlang.c (wild_doit): initialize vma and size of new output
5995 section to corresponding input section. This is required for
5996 shared library support.
5997 (lang_size_sections): don't modify vma and size of sections which
5998 are never loaded (for shared libraries).
5999 ldwrite.c (copy_and_relocate): copy the contents of any section
6000 which has contents, not just sections which are loaded (for shared
6005 * ldlang.c (size_input_section): count the sizes of all sections
6010 * ldmisc.c (demangle,vfinfo): use the new underscore in bfd to
6011 to demangle symbols better
6015 * ldlang.c (lang_finish): don't warn if -e start symbol does not
6016 exist when linking with -r.
6020 * aout.sc-sh, m68kcoff.sc-sh: set __bss_start to the start of the
6025 * ldmain.c (linear_library): don't even think about processing
6026 an object file if it's already been done
6028 Thu Oct 1 23:14:59 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
6030 * configure.in: the hp9000/300 config file is now hp300
6034 * config/z8ksim.mt: new file
6038 * Makefile.in (ldexp.o, ldctor.o, ldlang.o, ldmain.o, ldwrite.o,
6039 lexsup.o, mri.o, relax.o): Indicate dependence on ldgram.h.
6041 * ld.h (strip_symbols_type): Add value STRIP_SOME.
6042 * ldgram.y (OPTION_RETAIN_SYMBOLS_FILE): New terminal token.
6043 * ldlang.c (lang_add_keepsyms_file): New function.
6044 * ldlex.l: Handle "-retain-symbols-file".
6045 * ldsym.c (keepsyms_file, kept_syms): New vars.
6046 (process_keepsyms): New functihon; reads file, marks symbols for
6048 (write_file_locals): File symbols should always be kept.
6049 (ldsym_write): Warn about "-retain-symbols-file" overriding "-S"
6050 and "-s". Process retain-symbols file before setting symtab.
6051 * ldsym.h (SYM_KEEP): New flag for ldsym_type flags.
6052 (keepsyms_file, kept_syms): Declare them.
6054 * ldmain.c (main): Non-fatal errors should still cause non-zero
6055 exit status even with -r.
6059 Added initial support for the z8k
6060 * z8ksim.em, z8ksim.sc-sh, z8ksim.sh: new files
6061 * configure.in, Makefile.in: modified to reflect above
6063 * ldlang.c (lang_check): when linking conflicting architectures,
6064 make the output file reflect at least one of the bad inputs.
6068 * Makefile.in (install): if $(tooldir) exists, install ld in
6073 * Makefile.in, configure.in: modified to support i386-coff
6074 * i386coff.sh: new file
6078 * Makefile.in, m68kcoff.sh, m68kcoff.sc-sh, config/m68k-coff.mt:
6079 added m68k-coff emulation mode, stolen from a29k emulation.
6080 Almost certainly wrong, but perhaps better than sun3.
6084 * Makefile.in, Makefile.dos, generic.em, genscripts.sh,
6085 gld960.em, h8300hms.em, h8300xray.em, lnk960.em, st2000.em,
6086 vanilla.em: Rename all (generated) ld__*.c files to em_.c.
6087 This is one character shorter, and lets people build on
6088 SVR3 system. (ld__h8300xray.[co] was the killer there;
6089 h8300xray.sc-sh is also overlong, but seems harmless.)
6090 Based on a patch from Jonathan Ryshpan <hitachi!amito!jon>.
6091 * Makefile.in (clean): Fix typo mostclean -> mostlyclean.
6092 * configure.in: Add host isc.
6094 * ldver.c: Call it version 2.0.
6098 * ldver.c: Bump to version 0.98.
6101 * Makefile.in: Added mostlyclean, distclean, realclean rules.
6105 * ldmisc.c (xrealloc): New (needed by ../libiberty/cplus.dem.c).
6106 * ldlex.l: Moved comment() to end, since some compilers
6107 otherwise have problems with input() used before it is defined.
6109 Tue Sep 1 17:45:51 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
6111 * configure.in: added Solaris 2 and Irix 4 host support.
6113 Mon Aug 31 19:27:11 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
6115 * Makefile.in: remove -S flag from the FLEX definition
6117 * configure.in: rewrote, using new style case statement. use
6118 m68k.mt for m68k-aout systems
6122 * Makefile.in: map "ld" through program_transform_name when
6127 * cplus-dem.c: Removed. Use the version in libiberty now.
6128 * ldmisc.c: Use new libiberty version of cplus_demangle().
6132 * gld960.em (gld960_choose_target): default to little endian, not
6137 * ldlang.c (lang_process): don't pass null pointers when
6138 abs_output_section is what is required.
6139 * ldwrite.c (ldwrite): use malloc to allocate the largest space
6140 used, and pass that down.
6141 * relax.c,relax.h (write_relaxnorel): use the passed malloc area rather
6146 * configure.in, config/ose68.mt: renamed OSE to ose.
6150 * ldsym.c (write_file_locals): Reorder check for common or
6151 undefined symbols so that it works.
6155 * configure.in: accept all m68K family members.
6157 * Makefile.in: always create installation directories.
6161 * ldlex.l: now parses comment correctly, added ~ to acceptable
6164 * ldexp.c (exp_unop): pass down abs_output_section - now can have
6165 unary -ve constants.
6167 * ldlang.c (lang_finish): warn when an entry symbol supplied on
6168 the command line can't be found.
6172 * ldlang.h: add new field "loadable" to output_section_statement.
6173 * ldlang.c (lang_output_section_statement_lookup): initilize new
6174 field. (wild_doit): if new field is not set, then stop output
6175 section from being loadable.
6176 (lang_enter_output_section_statement): set the field from the
6178 * ldgram.y: new synax for NOLOAD. Removes a shift/reduce too.
6179 * h8300hms.sc-sh, h8300hms.em: get -r right.
6183 * ldint.texinfo: New internals manual (beginnings thereof).
6184 * PORTING: Removed, merged into ldint.texinfo.
6188 * cdtest-main.cc, cdtest-func.cc, cdtest-foo.h, cdtest-foo.cc,
6189 cdtest.exp: A test program (copied from libg++/test-install)
6190 that tests that constructor and destructors are handled
6193 Mon Aug 3 14:58:19 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
6195 * Makefile.in (install): install from ld.new, renaming during the
6196 copy, or else the next 'make install' needs to re-link ld.
6200 * configure.in: generalise hp recognition (from sef).
6202 Sat Jul 18 14:46:04 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
6204 * configure.in: recognize bsd and hpux hppa configurations.
6205 error messages echo to stderr, not stdout
6209 * Makefile.dos, gld.1, ld.texinfo, ldemul.c, ldfile.c, ldlang.c,
6210 ldmisc.c: removed rcsid's.
6214 * ldlang.c (lang_map): print changes in sizes due to relaxing
6215 (size_input_section): maintain the delta information.
6216 * ldlang.h: add new field to struct to contain delta info.
6217 * relax.c (relax_section): complain if input not relaxable.
6218 * ldlex.l : add '_', ',' and '$' to chars which can appear at the
6223 * ldmain.c(main): prevent -r and -relax from being on at the same
6228 * ldmain.c (Q_enter_global_ref), ldindr.c (add_indirect): fix for
6234 * h8300hms.em, h8300hms.sc-sh: do the right thing for -r
6236 * ldlang.c(open_output): set the target arch and machine as soon
6237 as we can. (lang_size_sections): use new macros for setting vma
6242 * configure.in (my_target): Accept m680?0 for wrs as vxworks68.
6243 Also deleted an unreachable path to wrs.
6247 * Makefile.in (install): use -d test for $tooldir before
6248 installing ld there so that $tooldir can be inherited from
6253 * ldlang.c: Two non-substantial changes for the sake of
6254 the old Portable C Compiler.
6258 * ldgram.y, ldlex.l: parse ABSOLUTE
6259 * ldexp.c: add support for ABSOLUTE
6263 * Makefile.in: Added default definitions for HOSTING_CRT0,
6264 HOSTING_LIBS, and HOSTING_EMU, based on those in config/*.mh.
6265 * config/*.mh: Miscellaneous clean-up: Removed definitions
6266 of YACC (since it is not longer used in the Makefile).
6267 Remove HOSTING_* definitions that are subsumed by the
6268 ones added to Makefile.in. Removed most definitions of CC.
6269 * config/{sparc,news,hp300bsd,decstation}.mh: Removed;
6270 These are no longer needed.
6274 * Makefile.in: Use srcdir instead of VPATH in ldgram/ldlex
6275 rules, since these are used when building a distribution.
6276 * Makefile.in (ldlex.c): Don't re-direct output, since that
6277 leaves a bogus output files if it fails.
6279 * config/sparc.mh: Fix HOSTING_LIBS so it has a chance of working.
6280 * ldlex.c: Fix some unnecessary flex-specific-isms.
6284 * ldgram.y: move spurious semicolon
6285 * ldexp.h: fix prototype
6289 * ld.texinfo: references to linker now say "ld" not "gld".
6293 changed calling convention for Q_enter_global_ref
6294 * ldexp.c, ldlang.c, ldmain.c: reflect this
6295 * ldver.c: bump version to 1.97.1
6296 * ldindr.c (add_indirect): when an edict declaring an indirect
6297 symbol is found, make sure that any ideas about the symbol being
6298 common are changed if it now known to be defined.
6299 * ldmain.c (linear_library): complain once if archive isn't
6301 * ldlang.h, ldlang.c: make room for and initialize the complain
6306 * Makefile.in: use flex & bison from ../ if they exist.
6310 * relax.c (build_it): don't allocate space in the output file for
6311 stuff if -R flag applys to it.
6312 * ldfile.c: merge in VMS filename support
6313 * ldmain.c (main): take out ./ from library path, and close file
6314 before unlinking. Make multiple defs of a symbol create an
6316 * ldmisc.c: fatal errosrs delete output file
6320 * ldver.c: Increase version number to 1.97, for consistency
6325 * Makefile.in: FLEX -> LEX.
6327 * ld.texinfo: {} -> @{@}.
6331 * ld.texinfo: describe alternate, MRI-compatible linker scripts
6332 (and associated change in -c option, now used for these scripts)
6336 * ldver.c: Bumped version to 1.96 - new release, resync with the
6338 * ldexp.c, ldlang.c: now build memory shape tree in obstacks
6339 rather than with raw malloc, makes it easier to track where memory
6341 * ldsym.h, ldsym.c: create obstack for all global symbols too.
6342 * ldwrite.c (ldwrite): moved malloc so only used when needed.
6343 * sa29200-sc.sh: added support for .lit, data1 and data2 sections.
6348 * config/sparc.mh: use ../gcc/libgcc.a on check if it exists.
6350 * Makefile.in: use bootstrap for check.
6354 * ldgram.y, ldlex.c, mri.c: added more compatible words; BASE, ALIAS and
6356 * Makefile.in: now use flex, not lex
6357 * ldlex.l, ldlang.c, ldctor.c: lint
6361 * ldlex.l: added CMDFILENAMECHAR state so that you can lex
6362 different sorts of filenames on the command line than in a script.
6366 * Makefile.in: rework CFLAGS so that they can be passed on the
6367 make command line. Remove MINUS_G. Default CFLAGS to -g.
6371 * relax.c: added handling for new "padding" seclet type, used to
6372 fill out gaps between section.
6373 * ldgram.y, ldlex.l: now -defsym on the command line is done
6378 * Makefile.in: the tooldir copy of ld goes directly in tooldir.
6382 * mri.c, ldgram.y, ldlex.l: added support for minimal strange link
6387 * Makefile.in (install): Install second copy in $(tooldir)/bin
6388 without $(program_prefix), since that's what gcc expects.
6392 * ldlex.l, ldgram.y, ldlex.h: Rewrote lexer. Now it's much nicer.
6393 * h8300*: fix bit rot and add support for h8300xray target
6394 * go32.sh: target emulation for go32.
6398 * gld960.em, i960.sc-sh. Fix i960 bit rot
6402 * Makefile.in: install man page.
6406 * config/mt-<foo> renamed to <foo>.mt
6407 * config/mh-<foo> renamed to <foo>.mt
6408 * configure.in changed to reflect this
6409 * genscripts.sh now make .xbn files rather than .xN files
6413 * ldver.h: fix decl of ldversion.
6417 * Makefile.in: added check target.
6421 * ldmain.c (Q_enter_file_symbols): now aliases work again
6425 * Makefile.in: added clean-info target.
6429 * ldexp.c (exp_print_tree): don't try and follow null pointers
6431 * ldgram.y: remove 11 shift reduce errors
6435 * Makefile.in: added tooldir and program_prefix.
6437 Fri Feb 28 08:17:45 1992 Steve Chamberlain (sac at thepub.cygnus.com)
6439 * ldlang.c (size_input_section): don't move absolute sections
6443 Thu Feb 27 09:20:41 1992 Steve Chamberlain (sac at thepub.cygnus.com)
6445 * cplus-dem.c: yet another copy of this - maybe it should go into
6447 * ldgram.y: now -V and -v have different actions
6448 * ldver.c: if -V, prints list of emulations compiled in
6449 * ldmisc.c: support for cplus demangling
6454 * Makefile.in, configure.in: removed traces of namesubdir,
6455 -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced
6456 copyrights to '92, changed some from Cygnus to FSF.
6458 Thu Feb 20 17:43:46 1992 Per Bothner (bothner at cygnus.com)
6460 * Makefile.in: Change mkscript rule into one for ./mkscript
6461 (for the sake of makes that don't realize they're the same).
6462 * PORTING: Add more details.
6463 * genscripts.sh: Add more tailorability of DATA_ALIGNMENT.
6465 Mon Feb 17 12:04:36 1992 Per Bothner (bothner at cygnus.com)
6467 * Makefile.in, and new files hp300bsd.sh, config/mh-hp300bsd,
6468 config/mt-hp300bsd: New port to hp300 running BSD.
6470 Sat Feb 15 13:59:54 1992 Per Bothner (bothner at cygnus.com)
6472 Major rewrite of how ld is configured. The major idea
6473 is to use shell scripts to generate everything.
6474 * generic.em replaces ldtemplate.
6475 * Other *.em files replace various *.c files.
6476 A *.em file is a shell script that generates the corresponding
6477 ld__*.c file that implements an emulation. This is usually
6478 a straight 'cat' of a here-document, possibly with substitutions.
6479 * Script files (*.sc) are places by *.sc-sh scripts.
6480 Again, these are simple shell scripts that 'cat'
6481 here-documents, usually with some substitutions.
6482 The output a *.sc-sh is a script file.
6483 * Each emulation is defined by a short shell script with
6484 extension *.sh that specifies the emulation-specific
6485 parameters (such as the name of the *.sh-sc and *.em
6487 * genscript.sh is the master shell script used to generate
6488 an emulation. It is passed various argument, including
6489 the name a the emulation-speciic *.sh file that it
6490 "sources" to set variables to emulation-specifc parameters.
6491 * config/mt-foo: Changed EMUL=GLDFOO_EMULATION_NAME
6492 to EMUL=foo. (The GLDFOO_EMULATION_NAMEs have bee removed.)
6493 * config/mh-foo: Rename LDEMULATION names as appropriate
6494 (usually 'gldfoo' -> plain 'foo').
6495 * ldwrite.c: Fixed a typo in a comment.
6496 * Makefile.in: Major changes. Removed some the sed
6497 magic to converts scripts, since that is now handled
6498 by genscripts.sh and the *.sc-sh scipt generators.
6499 * config.h: Remove a bunch of macros defining emulations
6500 and targets. This becomes one less file to edit when
6501 adding emulations or targets.
6502 * ldemul.h (struct ld_emulation_xfer_struct): Add
6503 emulation_name and target_name fields.
6504 * ldemul.c, ldemul.h: Define some default functions used
6505 by most emulations (and remove from the *.em scripts).
6506 * ldemul.c (ldemul_choose_target): Search the new
6507 ld_emulations array using a loop (instead of a hardwired
6508 nested if statement).
6509 Define the ld_emulation from the automatically-geenrated
6510 ldemul-list.h. This means you no longer have to edit ldemul.c
6511 to add a new emulation.
6512 * ldmain.c: Replace {GLD,LNK}960_EMULATION_NAME by
6513 their expansions, since the former no longer exist.
6514 * PORTING: A very rough first draft of a porting guide.
6516 * ldgram.y, ldlex.l, lexsup.c: Changes to allow an assignment
6517 to be terminated by a new-line (instead of requiring a semicolon).
6519 Mon Feb 10 16:21:02 1992 Steve Chamberlain (sac at rtl.cygnus.com)
6521 * ldexp.c, ldlang.c: added new idea "abs_output_section", removes
6522 tests for NULL pointers all over the place.
6523 * ldlang.c (lang_process): remember to relocate global symbols
6524 *after* relaxing has done it stuff.
6526 Thu Feb 6 11:40:15 1992 Steve Chamberlain (sac at rtl.cygnus.com)
6528 * config/mt-coff-h8300: use EMUL like everything else
6529 * ldlang.c: (print_padding_statement): print the right address.
6530 * Makefile.in, config.h, ldemul.c: renamed h8300hds to h8300hms
6533 Tue Feb 4 15:28:01 1992 Steve Chamberlain (sac at rtl.cygnus.com)
6535 * ldlex.l: Put pack -noinhibit-exec and -sort-common
6536 * ldlang.c (print_data_statement): print the right address.
6538 Thu Jan 30 17:51:53 1992 Per Bothner (bothner at cygnus.com)
6540 * Makefile.in: The rule for testing ld by re-linking itself
6541 via an intermediate -r link was moved to the ld1 rule
6542 instead of the ld2 rule. This allows ld2 and ld3 to be identical,
6543 which allows the bootstrap rule to work.
6544 * ldctor.c (find_constructors): Don't create a constructor
6545 list if it is already defined (as would happen if ld is
6546 invoked by collect).
6548 Wed Jan 29 08:35:39 1992 Steve Chamberlain (sac at rtl.cygnus.com)
6550 * config/mh-sparc.h: now uses libgcc.a
6551 * ldmain.c: quit using exit
6552 * *sc: use *(COMMON) rather than [COMMON]
6553 * ldlex.l, lexsup.c: much thinking moved from .l and put into .c,
6554 to allow preprocessing of .l file.
6555 * Makefile.in: New ldlex.l mangling
6556 * ldexp.c (fold_binary): perform expressions with % and / in
6558 * ldfile.c (open_a): open archives on VMS in a special way
6561 Tue Jan 28 10:18:16 1992 Steve Chamberlain (sac at rtl.cygnus.com)
6563 * ldgram.y: map -M behave in the same way as -Map (sets file name
6565 * ldsym.c, ldlang.c: remember that size of a section is dependent on
6566 whether or not relaxing has been done.
6567 * ldmain.c: don't open a map file if it doesn't have a name
6568 * relax.c: all the brains have moved into bfd.
6569 * ldwrite.c: ammend comment
6571 Fri Jan 24 14:23:46 1992 Steve Chamberlain (sac at rtl.cygnus.com)
6573 * Makefile.in: added relax, also made three stage go through a
6576 * config.h: if GNU960 defined, then default emulation mode is
6578 * ldexp.h, ldexp.c: map to file hooks
6579 * ldlang.c: map to file hooks
6580 * ldgram.y: added -Map -relax
6581 * ldlex.l: added -relax, -Map
6582 * ldmain.c: open map file
6583 * ldmisc.c: support for map file
6584 * ldwrite.c: new relax magic
6586 Thu Dec 19 18:49:51 1991 John Gilmore (gnu at cygnus.com)
6588 * Makefile.in, config/tm-*.h: Clean up make output, only
6589 pass DEFAULT_EMULATION to ldmain.c.
6591 Wed Dec 18 15:02:47 1991 Per Bothner (bothner at cygnus.com)
6593 * ldver.c: Bump to version 1.94.
6595 Tue Dec 10 04:07:23 1991 K. Richard Pixley (rich at rtl.cygnus.com)
6597 * Makefile.in: infodir belongs in datadir.
6599 Mon Dec 9 16:26:43 1991 Per Bothner (bothner at cygnus.com)
6601 * Makefile.in: Pass -y to bison. (Again;
6602 accidentally deleted by Rich.)
6603 * news.sc, ldgld68k.sc: Define __end as well as _end.
6605 Sat Dec 7 17:19:26 1991 Steve Chamberlain (sac at rtl.cygnus.com)
6607 * ldindr.h: added to contain prototypes of ldindr.c
6608 * ldfile.c: include ctype.h
6609 * ldmain.c: include the requried prototype headers
6610 * ldwrite.c: get_reloc_upper_bound has been renamed
6611 bfd_get_reloc_upper_bound
6613 Fri Dec 6 23:29:26 1991 K. Richard Pixley (rich at rtl.cygnus.com)
6615 * Makefile.in: punt "fundamental" mode because it breaks my emacs
6616 macros. install using INSTALL_PROGRAM and INSTALL_DATA. remove
6617 spaces following hyphens, bsd make can't cope. added
6618 standards.text support and made it look like all the other
6621 * configure.in: configure now runs entirely in objdir so make file
6622 existence checks against ${srcdir}. Mark this directory as
6625 Thu Dec 5 22:46:16 1991 K. Richard Pixley (rich at rtl.cygnus.com)
6627 * Makefile.in: idestdir and ddestdir go away. Added copyrights
6628 and shift gpl to v2. Added ChangeLog if it didn't exist. docdir
6629 and mandir now keyed off datadir by default.
6631 Wed Dec 4 23:36:55 1991 Per Bothner (bothner at cygnus.com)
6633 * ldver.c: Bumped version to 1.93.
6634 * Makefile.in: Pass -y to bison.
6636 Mon Nov 25 18:28:40 1991 Steve Chamberlain (sac at cygnus.com)
6638 * config.h: h8 is now coff, not ieee
6639 * h8300hds.sc: reflect the same
6641 Thu Nov 14 19:55:09 1991 Per Bothner (bothner at cygnus.com)
6643 * ldver.c (ldversion()): Update to 1.92.
6644 * ldctor.c: There are two places constructor sets
6645 can be defined. One of them checked for an existing
6646 duplicate, the other didn't. Unfortunately, the latter
6647 was called after the former ...
6648 So, factor out code for inserting a new element into
6649 constructor_name_list (after checking for a duplicate)
6650 into a new function add_constructor_name, and call
6651 it from both aforementioned places (ldlang_add_constructor
6652 and ldlang_check_for_constructors).
6654 Wed Nov 13 15:17:43 1991 Per Bothner (bothner at cygnus.com)
6656 * Makefile.in: Rename .c files generated from ldtemplate
6657 to have names starting with ld__. This helps 'make clean'.
6659 Tue Nov 12 18:36:50 1991 Steve Chamberlain (sac at cygnus.com)
6661 * Makefile.in: Take out the version number for install
6662 * m88kbcs.sc: put in contructor blocks.
6664 Mon Nov 11 18:47:33 1991 Per Bothner (bothner at cygnus.com)
6666 * ldmisc.c, ldmisc.h: Re-write info() to take a filename
6667 parameter, a format, and an arg pointer, and rename it to
6668 vfinfo(). Write info() in terms of new vfinfo().
6669 New einfo() is the same as info(), except it writes to stderr.
6670 * ldemul.c, ldexp.c, ldlang.c, ldlnk960.c, ldmain.c, ldwrite.c,
6671 ldmisc.c: Replace "error" calls to info() by new einfo().
6673 Mon Nov 11 09:57:32 1991 Steve Chamberlain (steve at cygnus.com)
6675 * ldlex.l ldgram.y: made -V option do same as -v
6676 * Makefile.in: Added $(MINUS_G) flag so debugging can be
6679 Sun Nov 3 16:37:37 1991 Steve Chamberlain (steve at cygnus.com)
6680 i386 aout changes from Bob Kukura
6681 * Makefile.in, config.h: added i386aout support
6682 * configure.in: fixed /h-{myhost} typo
6683 * ldgram.y: -MM now gives more boring map.
6684 * ldlang.c: now does D_PAGED flag the right way.
6685 * ldsym.c: -MM flags does the right thing.
6687 Sun Nov 3 15:00:03 1991 Per Bothner (bothner at cygnus.com)
6689 * configure.in: Fixed typo. Also, a fix for hp300bsd.
6690 * ldlang.c (init_os): Compensate for BFD change,
6691 where bfd_make_section now returns NULL for a duplicate
6692 section request, instead of the old section.
6694 Thu Oct 17 15:27:13 1991 Per Bothner (bothner at cygnus.com)
6696 * ldver.c: Bump to version 1.91 (consistent with binutils).
6698 Wed Oct 16 12:27:08 1991 Per Bothner (bothner at cygnus.com)
6700 * Makefile.in, config.h, ld.h, ldemul.c, ldexp.c, ldexp.h,
6701 ldgram.y, ldlex.l, ldlnk960.c, ldmain.c, ldmisc.c, ldmisc.h,
6702 ldsym.c, ldsym.h, ldtemplate, ldvanilla.c, ldver.c, ldver.h,
6703 ldwarn.c, ldwarn.h, ldwrite.c, ldwrite.h, mkscript.c:
6704 Add or update copyright notices.
6706 Mon Oct 14 23:55:27 1991 Per Bothner (bothner at cygnus.com)
6709 * Makefile.in: Changed installation directory name scheme
6710 to be consistent with gcc. Also changed 'install'.
6712 Mon Oct 14 17:30:02 1991 Roland H. Pesch (pesch at cygnus.com)
6714 * Makefile.in: new targets ld.mm, ld.me
6716 Mon Oct 14 17:27:24 1991 Per Bothner (bothner at cygnus.com)
6718 * Makefile.in, ldtemplate: Need to use separate scripts
6719 for -n and -N options. Yet more complication.
6721 Fri Oct 11 22:40:46 1991 John Gilmore (gnu at cygnus.com)
6723 * Makefile.in: Avoid using $< in explicit Make rules (it doesn't
6724 work). Add some lines to avoid Sun Make VPATH bugs.
6726 Fri Oct 11 16:42:22 1991 Per Bothner (bothner at cygnus.com)
6728 * news.sc: Add alignment for data segment.
6729 * ldtemplate: Add (yet another) script to get for -n or -N
6730 options. (These need different alignment than ZMAGIC files.)
6731 * Makefile.in: Add stuff for new foo.xn scripts.
6732 These are generated by replacing "ALIGN(0x...00)" by ".".
6734 Fri Oct 11 15:43:04 1991 Roland H. Pesch (pesch at cygnus.com)
6736 * Makefile.in: new targets ld.ms, ld-index.ms
6737 ld.texinfo: remove tabs, other cleanups for texi2roff
6739 Fri Oct 11 13:51:54 1991 Per Bothner (bothner at cygnus.com)
6741 * ldmain.c (main): Make config.magic_demand_paged be true
6742 by default. Don't the WP_TEXT and D_PAGED flags of
6743 output_bfd here; it's too late, so set it when output_bfd
6744 is created (in ldlang.c). Also fix setting of EXEC_P flag
6745 * ldlang.c (ldlang_open_output): Set output_bfd->flags here.
6746 * ldlang.c: Remove some duplicate extern declarations.
6747 * ldgram.y: Fixes to -N and -n options.
6748 * Makefile.in: Recognize upper case letters in sed script
6749 to remove assignments from script files.
6750 * ldtemplate: Don't assukme that -N or -n options
6751 imply use of -r script.
6752 * mkscript.c: Tweaking to correctly handle \n and \\ in input.
6754 Fri Oct 11 10:29:27 1991 Steve Chamberlain (steve at cygnus.com)
6756 * ldtemplate: include bfd.h before sysdep.h.
6758 Fri Oct 11 04:24:45 1991 John Gilmore (gnu at cygnus.com)
6760 Restructure configuration scheme for bfd, binutils, ld.
6762 * include/sys/h-*.h: Move to bfd/hosts/h-*.h.
6763 * configure.in: Revise to symlink sysdep.h to ../bfd/hosts/h-xxx.h.
6764 Change some config names to match other dirs.
6765 * *.c: Include bfd.h before sysdep.h, so ansidecl and PROTO()
6767 * config/: Rename some config files to match up h-*.h names.
6768 Remove all the HOST_SYS definitions from the config files.
6770 Tue Oct 8 16:00:57 1991 Per Bothner (bothner at cygnus.com)
6772 * ldexp.h, ldlang.h: Change enum boolean -> enum bfd_boolean.
6773 * ldtemplate: Remove ldfile_add_library_path calls;
6774 just use the SEARCH_DIR commands in the script files.
6775 * Makefile.in: Add LIB_PATH macro, which if set is used to replace
6776 the SEARCH_DIR commands in the scripts (using ugly sed magic).
6777 This is primarily intended for cross-linking, where you would
6778 place libaries in a different place than native libraries.
6779 Also, emulations made from ldtemplate now use $(srcdir).
6780 * ldglda29k.sc: Change SEARCH_DIR commands to a conventional
6781 form; people can use the Makefile's LIB_PATH to override.
6783 Tue Oct 8 14:51:21 1991 Roland H. Pesch (pesch at cygnus.com)
6785 * Makefile.in: fix target ld.dvi, add target ld.info
6786 ld.texinfo: make info filename ld.info
6788 Fri Oct 4 21:51:58 1991 John Gilmore (gnu at cygnus.com)
6790 * Makefile.in: Avoid using $< in non-suffix rules (breaks on Sun
6792 * ldfile.c, ldlang.c, ldmain.c, ldwrite.c: Cope with renames of a
6793 few BFD types & enums.
6800 version-control: never