3 * lexsup.c (parse_args) <case OPTION_EXPORT_DYNAMIC, case 'E'>:
4 Set new link_info member export_dynamic.
5 * ldmain.c (main): Initialize new link_info member export_dynamic.
9 * ldlang.c (walk_wild): Only call walk_wild_file if
10 lookup_name returns something.
11 (lookup_name): If load_symbols fails, return NULL.
12 (load_symbols): Chnage to a boolean function.
13 (open_input_bfds): If load_symbols fails then do not make the
18 * ldlang.c (record_bfd_errors): Remove.
20 * emultempl/aix.em: Fix copyright dates.
24 * elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase.
25 (TEXT_START_ADDR): Likewise.
29 * configure.host: Set HOSTING_CRT0/HOSTING_LIBS correctly for s/390.
33 * emultempl/pe.em (init): Reduce default stack reserve to 0x200000.
37 * ldlang.c (open_input_bfds): Don't change the bfd error
38 handler whilst loading symbols.
42 * configure.tgt: Remove i370-mvs architecture, it is not currently
47 * emulparams/ppcmacos.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
48 like emulparams/aixppc.sh.
52 * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Move
53 setting of output_filename after bfd_scan_arch.
54 * emultempl/pe.em: Likewise.
58 * emulparams/aixrs6.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
59 like emulparams/aixppc.sh.
61 * emultempl/aix.em (sc): Use ${srcdir}/emultempl/ostring.sed
62 instead of ${srcdir}/emultempl/stringify.sed.
66 * emulparams/elf64_aix.sh: Change settings to match IBM linker
71 * configure.host: Replace linuxoldld with linux*oldld.
72 * configure.tgt: Likewise.
76 * emultempl/stringify.sed: Removed again.
80 * emultempl/aix.em (OUTPUT_ARCH): Defined.
81 (gld${EMULATION_NAME}_before_parse): Initialize
82 ldfile_output_architecture, ldfile_output_machine and
83 ldfile_output_machine_name from ${OUTPUT_ARCH} if possible.
84 * emultempl/beos.em: Likewise.
85 * emultempl/elf32.em: Likewise.
86 * emultempl/linux.em: Likewise.
87 * emultempl/mipsecoff.em: Likewise.
88 * emultempl/pe.em: Likewise.
89 * emultempl/sunos.em: Likewise.
93 * emultempl/aix.em : (gld${EMULATION_NAME}_read_file)
94 udate import file format.
95 (change_symbol_mode) New, same
96 (is_syscall) New, same
97 * emulparams/aixppc.sh : add SYSCALL_MASK and SYMBOL_MODE_MASK
98 * emulparams/aixppc64.sh : same
99 * emulparams/aixrs6.sh : same
100 * emulparams/ppcmacos.sh : same
101 * emultempl/aix.em : use strtoull to parse options
102 * Makefile.am : add eaixppc64 emulation for xcoff64
104 * configure.tgt : same
106 * scripttempl/aix.sc : default text section offset to 0x10000000
107 default data section offset to 0x20000000
108 add .sv3264 and .sv64 pseudo sections
109 loader and debug sections use the currect section offset.
111 * emultempl/aix.em : Add xcoff64 support
112 Add -binitfini support
113 (gld${EMULATION_NAME}_before_parse) -binitfini
114 (gld${EMULATION_NAME}_parse_args) same
115 (gld${EMULATION_NAME}_before_allocation) format change for special
118 * emulparams/aixppc64.sh : New file for xcoff64 support
122 * emultempl/elf32.em (ELF_INTERPRETER_SET_DEFAULT): Use this new
123 variable to avoid non-portable shell construct.
127 * ldmain.c (get_emulation): Add -mips5 command line argument.
131 * emulparams/elf_i386_ldso.sh: New, copied from elf_i386.sh.
132 (ELF_INTERPRETER_NAME): Define it.
133 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Use
135 * configure.tgt (targ_emul, targ_extra_emuls)
136 [i[3456]86-*-solaris2*, i[3456]86-*-solaris*]: Use elf_i386_ldso
137 as primary, elf_i386 as extra.
138 * Makefile.am (ALL_EMULATIONS): Added eelf_i386_ldso.o.
139 (eelf_i386_ldso.c): New rule.
140 * Makefile.in: Rebuilt.
144 * lexsup.c (ld_options): Allow -I to be an alias for
145 --dynamic-linker. This is for Solaris compatability.
146 * ld.texinfo: Document that -I can be used.
151 * ldlang.c (wild_doit): Use linker_has_input to reliably determine
152 whether an input section is the first one assigned to an output
154 Assorted formatting fixes.
158 * Makefile.am (ld.dvi): Search bfd/doc for texinfo files.
159 * Makefile.in: Ditto.
163 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Put
164 .gnu.linkonce.ia64unw{,i} sections into corresponding .IA_64.unwind*
166 * emulparams/elf64_aix.sh (OTHER_READONLY_SECTIONS): Likewise.
170 * ldlang.c (lang_process): Call bfd_merge_sections.
174 * ldgram.y: Fix typo.
178 * emultempl/elf32.em: Include "libiberty.h".
179 (gld${EMULATION_NAME}_vercheck): Call basename () to get the
180 basename of the bfd filename.
181 (gld${EMULATION_NAME}_stat_needed): Likewise.
182 (gld${EMULATION_NAME}_try_needed): Likewise.
183 (gld${EMULATION_NAME}_open_dynamic_archive): Likewise.
187 * emultempl/pe.em: Include <ctype.h>.
191 * emulparams/elf32openrisc.sh: New file.
193 * Makefile.am: Add OpenRISC target.
194 * Makefile.in: Regenerated.
196 * configure.tgt: Add openrisc-*-* mapping.
200 * emultempl/aix.em: Replace buystring with xstrdup.
201 * emultempl/beos.em: Replace buystring with xstrdup.
205 * ldfile.c: Include "libiberty.h".
208 * ldmisc.c (buystring): Removed.
209 * ldmisc.h: Likewise.
211 * ldfile.c: Replace buystring with xstrdup.
212 * ldlang.c: Likewise.
214 * ldmain.c: Likewise.
215 * ldmisc.c: Likewise.
216 * lexsup.c: Likewise.
217 * mpw-eppcmac.c: Likewise.
221 * emulparms/elf_x86_64.sh (MAXPAGESIZE): Fix value.
225 * ldlang.c (load_symbols): Give emulation a chance
226 to process unrecognized file before fatal error is
231 * configure.tgt: Add arm-vxworks target.
232 * scripttempl/armcoff.sc: Support .text or .data as a section name
238 * ld.texinfo: Document --fatal-warnings.
241 * ldmisc.c (vfinfo): Set flag to inhibit making executable if
242 warnings have been turned into errors.
243 * lexsup.c (OPTION_WARN_FATAL): Define.
244 (ld_options): Entry for --fatal-warnings.
245 (parse_args): Handle OPTION_WARN_FATAL.
246 * ld.h (ld_config_type): Add fatal_warnings field.
250 * ldmain.c (main): Default to discard_sec_merge.
251 * lexsup.c (OPTION_DISCARD_NONE): Define.
252 (ld_options): Add --discard-none.
253 (parse_args): Handle OPTION_DISCARD_NONE.
254 * ldlang.c (wild_doit): SEC_MERGE should be set in the output
255 section only if SEC_MERGE and SEC_STRINGS flags and entsize of
256 all its input sections match.
260 * Makefile.am (ALL_EMULATIONS): Add eelf32ltsmip.o.
261 (ALL_64_EMULATIONS): Add eelf64btsmip.o and eelf64ltsmip.o.
262 (eelf32ltsmip.c): New target.
263 (eelf64btsmip.c): Likewise.
264 (eelf64ltsmip.c): Likewise.
265 * Makefile.in: Regenerated.
267 * configure.tgt (mips*el-*-linux-gnu): Uses traditional MIPS
269 (mips*-*-linux-gnu*): Likewise.
271 * emulparams/elf32ltsmip.sh: New. Traditional little endian
273 * emulparams/elf64btsmip.sh: New. Traditional 64bit big endian
275 * emulparams/elf64ltsmip.sh: New. Traditional 64bit little
280 * emulparams/criself.sh (EXECUTABLE_SYMBOLS): Cannot provide
281 correct value of __Stext here.
282 (TEXT_START_SYMBOLS): Define; always define __Stext, to start of
285 * emulparams/crislinux.sh: Remove FIXME.
289 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 64k.
290 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Likewise.
294 * configure.tgt (cris-*-*): Change default emulation to criself.
295 (cris-*-*aout*): New rule.
299 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 0x4000.
300 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
304 * ld.texinfo (Overview): Fix syntax in texi code.
308 * ld.texinfo: Put @c man indications to generate the ld man page.
309 When generating man, define all the variables. Define SEEALSO
310 and SYNOPSIS. Re-organize some lines to avoid the cross references.
311 * Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variables.
312 (ld.1): Generate from ld.texinfo.
313 * Makefile.in: Regenerate.
317 * scripttempl/i386go32.sc: Support the GCC flags '-ffunction-sections'
318 and '-fdata-sections'. Set the VMA of STABS sections to zero.
322 * emultmpl/elf32.em (gld${EMULATION_NAME}_search_needed): If NAME
323 is an absolute path look only for this file and not along the path.
327 * emultempl/elf32.em (OPTION_GROUP): New macro.
328 Add new option Bgroup to longopts.
329 (gld*_parse_args): Handle GROUP_OPTION and recognize -z defs.
330 (gld*_list_options): Add -Bgroup and -z defs.
331 * ld.1: Document -Bgroup and -z defs.
332 * ld.texinfo: Likewise.
336 * scripttempl/elfd10v.sc (.rodata,.rodata1,.data1,.sdata): Deal
337 with sections created by -fdata-sections.
338 (.dynbss,.bss): Ditto.
342 * emultempl/m68kelf.em (m68k_elf_after_allocation): Call
343 after_allocation_default, not gld..._before_allocation.
347 * configure.in (BFD_VERSION): New.
348 (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
349 * configure: Regenerate.
350 * Makefile.am: Run "make dep-am"
351 * Makefile.in: Regenerate.
355 * emulparams/elf64_aix.sh: Add additional read-only sections;
356 uncomment lines which are now required.
360 * ldlang.c (open_input_bfds): Set the bfd error handler so
361 that problems can be caught whilst loading symbols.
362 (record_bfd_errors): New function: Report BFD errors and mark
363 the executable output as being invalid.
367 * configure.host: Add configuration for ia64-*-aix*.
368 * Makefile.am (ALL_64_EMULATIONS): Add emulation for ia64-*-aix*.
369 Add dependencies for eelf64_aix.c.
370 * Makefile.in: Regenerate.
371 * configure.tgt: Add ia64-*-aix* mapping.
372 * emulparams/elf64_aix.sh: Add settings for elf64 on aix5.
373 * testsuite/ld-bootstrap/bootstrap.exp: Exclude ia64 flavor from
378 * ldfile.c (ldfile_open_file): Set entry->search_dirs_flag to
379 false if we found the file.
383 * configure.tgt: Add FreeBSD/Alpha, FreeBSD/x86-64, FreeBSD/ia64,
384 FreeBSD/PowerPC, FreeBSD/arm, and FreeBSD/sparc64 entries.
388 * Makefile.am: Add PDP-11 target.
389 * configure.tgt: Likewise.
390 * emulparams/pdp11.sh: New file.
394 * configure.host: Add a generic FreeBSD configuration entry such that
395 all [modern] FreeBSD systems on all platforms will look the same.
399 * configure.tgt: Remove mention of earmelf_linux26.
403 * emulparams/elf64_ia64.sh (OTHER_GOT_SYMBOLS): Remove.
407 * ldexp.h (node_type): Add etree_provided.
408 * ldexp.c (exp_fold_tree): Handle etree_provided. Set the node
409 type to etree_provided if defined by PROVIDE. Allow updating
411 (exp_print_tree): Handle etree_provided.
412 * mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle
417 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add
418 .IA_64.unwind.* pattern to unwind table section and
419 .IA_64.unwind_info* pattern to unwind info section.
423 * Makefile.am: Add linux target for S/390.
424 * Makefile.in: Likewise.
425 * configure.host: Likewise.
426 * configure.tgt: Likewise.
427 * emulparams/elf64_s390.sh: New file.
428 * emulparams/elf_s390.sh: New file.
432 * configure.tgt (sparc64-*-linux-gnu*): Add elf32_sparc into
434 (sparc-*-linux-gnu*): Add elf64_sparc into targ_extra_libpath.
438 * Makefile.am: Remove mention of earmelf_linux26.
439 * Makefile.in: Regenerate.
443 * emulparams/armelf_linux.sh (TEXT_START_ADDR): Set to 0x8000.
444 * emulparams/armelf_linux26.sh: Delete.
445 * configure.tgt: Remove mention of armelf_linux26 emulation.
449 * ld.1: Replace occurances of -oformat with --oformat.
453 * ldlang.c (lang_leave_overlay): Don't set lma_region when
454 load_base is specified.
458 * emultempl/elf32.em: Correct spelling in comments and listed
463 * ldlang.c (lang_leave_overlay): Only set lma_region from the
464 default for the first section of a group of overlay sections.
468 * Makefile.am (GENSCRIPTS): Pass exec_prefix.
469 * Makefile.in: Regenerate.
470 * genscripts.sh: Use exec_prefix parameter to specify tool lib.
471 Check for null tool_dir.
475 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add IA_64.unwind
476 and IA_64.unwind.info.
480 * ldlang.c (lang_check): Merge the private data only if the
481 input file has contents.
485 * emulparams/hppalinux.sh (OUTPUT_FORMAT): Set to elf32-hppa-linux.
487 * emultempl/hppaelf.em (hppaelf_after_parse): New function,
488 enabling search for libmilli. On a relocatable link, make .text
490 (LDEMUL_AFTER_PARSE): Define.
491 (hppaelf_finish): Correct spelling of relocatable in comments.
493 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
494 rummage through the script for sections on the unique list.
495 Correct length of strncmp for ".note".
496 (gld${EMULATION_NAME}_check_needed): Rearrange function.
498 * ldlang.c (unique_section_list): New var.
499 (unique_section_p): New function.
500 (walk_wild_section): Don't match sections on unique_section_list.
501 (lang_add_unique): New function.
502 Correct spelling of relocatable in comments.
504 * ldlang.h (struct unique_sections): Declare.
505 (unique_section_list): Declare.
506 (unique_section_p): Declare.
507 (lang_add_unique): Declare.
509 * lexsup.c (ld_options): Allow --unique to take an optional arg.
510 (parse_args [OPTION_UNIQUE]): Call lang_add_unique.
512 * ld.texinfo (--unique): Update.
516 * lexsup.c (parse_args): Remove spurious white space.
520 * lexsup.c (parse_args): Update copyright date.
524 * configure.host: Set HOSTING_LIBS appropriately for ix86-cygwin.
528 * scripttempl/h8300.sc: Fix formatting. Fix a comment typo.
529 * scripttempl/h8300h.sc: Fix formatting.
530 * scripttempl/h8300s.sc: Likewise.
531 * scripttempl/h8500.sc: Likewise.
532 * scripttempl/h8500b.sc: Likewise.
533 * scripttempl/h8500c.sc: Likewise.
534 * scripttempl/h8500m.sc: Likewise.
535 * scripttempl/h8500s.sc: Likewise.
539 * emultempl/elf32.em: Only perform Linux ld hints processing when
544 * ld.texinfo (Bug Reporting): Update email address for reports.
548 * lexsup.c (parse_args): Set opterr to 0 and detect unparsed long
549 options by checking for a return value of '?' not -1.
553 * lexsup.c (struct ld_option): Add new enum value:
555 (ld_options[]): Change -omagic, -output and -oformat options
556 to be EXACTLY_TWO_DASHES.
557 (OUTPUT_COUNT): Use ARRAY_SIZE.
558 (parse_args): Change parameter 'argc' to unsigned.
559 Place EXACTLY_TWO_DASHES options into new really_longopts
561 If getopt_long_only fails, try calling getopt_long using the
562 really_longopts array.
563 (help): Print a double dash for both EXACTLY_TWO_DASHES and
566 * ldlex.h: Fix prototype of parse_args.
568 * ld.texinfo: Document that long options starting with 'o'
569 must be preceeded by two dashes. Change example of a single
570 dashed long option from -oformat to -trace-symbol.
574 * emultempl/pe.em (OPTION_NO_DEFAULT_EXCLUDES): Define.
575 (longopts[]): New --no-default-excludes option.
576 (gld_${EMULATION_NAME}_list_options): Document.
577 (gld_${EMULATION_NAME}_parse_args): Handle.
581 * ldlang.c (new_stat): Revert the last beautification with "innocent"
582 whitespace, it breaks the K&R C preprocessor.
586 * ld.texinfo: Add notes about --whole-archive and gcc.
590 * lexsup.c (OPTION_ALLOW_SHLIB_UNDEFINED): Define.
591 (ld_options): Entry for --allow-shlib-undefined.
592 (parse_args): Handle OPTION_ALLOW_SHLIB_UNDEFINED.
593 * ldmain.c (main): Initialize link_info.allow_shlib_undefined
595 * ld.texinfo: Document new command line switch.
599 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS):
600 .fixup is actually read/write.
601 * emulparams/elf32lppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
602 * emulparams/elf32ppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
603 * emulparams/elf32lppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
607 * NEWS: Add note about x86_64 architecture.
611 * scripttempl/i386go32.sc: Use PROVIDE with _etext, _edata, _end.
612 Set DWARF2 sections to a VMA of zero.
616 * configure.tgt (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
618 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
619 (sparc*-*-rtems*): Switched from a.out to ELF.
623 * Makefile.am (ALL_EMULATIONS): Add eelf_x86_64.o
624 (eelf_x86_64.c): New.
625 * Makefile.in: Regenerate.
626 * configure.tgt: Add support for x86_64-*-linux-gnu*.
627 * emulparams/elf_x86_64.sh: New.
631 * emulparams/crislinux.sh (ENTRY): Change back to _start.
632 (TEXT_START_SYMBOLS): Remove conditional setting of __start.
634 * scripttempl/crisaout.sc: Change all RELOCATING not related to
635 merging non-a.out sections into CONSTRUCTING.
639 * ld.1 (COPYING): Mention that the GNU Free Documentation
640 License is present in the sources, but not the output, and
641 also available from the GNU website.
642 (GNU Free Documentation License): Comment out this section.
646 * emulparams/elf64alpha.sh (ENTRY): Remove leading underscore as ELF
651 * ld.1: Remove old date so it does not give the impression the manpage
656 * configure.tgt (xscale-coff): Add target.
657 (xscale-elf): Add target.
661 * ldmain.c (main): Remove redundant init of config.make_executable
666 * emulparams/elf64alpha.sh (MAXPAGESIZE): Typo -- 64k, not 1M.
670 * scripttempl/h8300.sc: Fix formatting.
671 * scripttempl/h8300h.sc: Likewise.
672 * scripttempl/h8300s.sc: Likewise.
676 * scripttempl/elf32avr.sc: Fix bug in .eeprom segment.
680 * emultempl/pe.em: Define ___start_SECNAME and ___stop_SECNAME
681 around orphan sections whose names can be represented in C.
685 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): New local
686 hold_sdata. If SEC_SMALL_DATA set, set place to hold_sdata.
690 * ld.texinfo: Add GNU Free Documentation License.
691 * ldint.texinfo: Add GNU Free Documentation License.
692 * ld.1: Add GNU Free Documentation License.
696 * ldlex.l (yy_create_string_buffer): Init yy_is_our_buffer,
697 yy_is_interactive, yy_at_bol, and yy_fill_buffer.
699 * Makefile.am (DISTCLEANFILES): Add stringify.sed.
700 Move 2000-11-02 Makefile.in changes to this file.
701 * Makefile.in: Regenerate.
705 * scripttempl/h8300.sc: Use ${CONSTRUCTING...} to enclose
706 constructors and destructors.
707 * scripttempl/h8300h.sc: Ditto.
708 * scripttempl/h8300s.sc: Ditto.
709 * scripttempl/h8500.sc: Ditto.
710 * scripttempl/h8500b.sc: Ditto.
711 * scripttempl/h8500c.sc: Ditto.
712 * scripttempl/h8500m.sc: Ditto.
713 * scripttempl/h8500s.sc: Ditto.
714 * scripttempl/v850.sc: Ditto.
715 * scripttempl/w65.sc: Ditto.
716 * scripttempl/z8000.sc: Ditto.
720 * Makefile.in (e_i386_chaos.c): New rule.
721 (ALL_EMULATIONS): Added e_i386_chaos.o.
722 * emulparams/elf_i386_chaos.sh: New file.
723 * configure.tgt: Recognise i[3456]86-chaosdev-storm-chaos.
727 * emulparams/elf64_sparc.sh (TEXT_START_ADDR,
728 NONPAGED_TEXT_START_ADDR): Set to 4GB for Solaris targets.
729 Fix sed invocation, so that it coped with '/' in Solaris 64bit
735 * scripttempl/crisaout.sc (.text, .data): Pad, with ALIGN (32),
736 for consecutive sections.
740 * lexsup.c: New option OPTION_TARGET_HELP. Prints all target specific
742 * ld.texinfo: Added notes about this new option.
746 * emultempl/pe.em (_after_open): Add tests of return values from
747 bfd functions. Emit appropriate error messages if necessary.
751 * emultempl/pe.em (_after_open): Delete 'is2' and 'nsyms'
752 local variables - they are not used, but leave in the call to
753 bfd_canonicalize_symtab.
754 (_open_dynamic_archive): Add #ifdef DLL_SUPPORT around use of
755 pe_dll_search_prefix.
759 * emultempl/pe.em (pe_dll_search_prefix): New variable,
760 (longopts): New --dll-search-prefix option.
761 (gld_${EMULATION_NAME}_list_options): Document.
762 (gld_${EMULATION_NAME}_parse_args): Handle.
763 (gld_${EMULATION_NAME}_open_dynamic_archive): When linking
764 dynamically, search for a dll named '<prefix><basename>.dll'
765 in preference to 'lib<basename>.dll' if --dll-search-prefix
770 * ldlang.c (section_already_linked): Set kept_section instead of
775 * deffile.h: Fix formatting.
776 * lexsup.c: Likewise.
781 * pe-dll.c (make_one): Do not generate code thunk for DATA
783 (process_def_file): deduce DATA flag for auto-export sumbols.
787 * ld.h: Fix formatting.
788 * ldcref.c: Likewise.
789 * ldctor.h: Likewise.
790 * ldemul.c: Likewise.
791 * ldemul.h: Likewise.
794 * ldfile.c: Likewise.
795 * ldfile.h: Likewise.
796 * ldlang.c: Likewise.
797 * ldlang.h: Likewise.
798 * ldmain.c: Likewise.
799 * pe-dll.c: Likewise.
801 * pe-dll.c: Revert some formatting fixes.
805 * pe-dll.c: Fix formatting.
809 * ldlang.c: Fix formatting.
813 * pe-dll.c (fill_edata): initialize entire block
814 (make_one): fill in correct section.
818 * ldexp.c: Fix formatting.
822 * emultempl/pe.em (gld_*_after_open): detect case where there two
823 import libraries for same dll; rename one to ensure proper link
826 * pe-dll.c (process_def_file): compare ordinals to -1, not 0; fix
828 (generate_edata): fix typo
832 * scripttempl/crisaout.sc (ENTRY): Now __start.
833 (.text): Add default setting for __start.
834 Remove CONSTRUCTORS handling.
835 (/DISCARD/): Add .gnu.warning.*.
836 * emulparams/crislinux.sh (ENTRY): Now __start.
837 (TEXT_START_SYMBOLS): New; provide __Stext and __start default.
838 * emulparams/criself.sh (OUTPUT_FORMAT): Now elf32-us-cris.
839 (ENTRY): Now __start.
840 (INITIAL_READONLY_SECTIONS): Add KEEP for .startup.
841 (EXECUTABLE_SYMBOLS): Add default setting for __start.
845 * deffile.h: Fix formatting.
847 * ldcref.c: Likewise.
848 * ldctor.c: Likewise.
849 * ldctor.h: Likewise.
850 * ldemul.c: Likewise.
851 * ldemul.h: Likewise.
854 * ldfile.c: Likewise.
855 * ldfile.h: Likewise.
856 * ldlang.c: Likewise.
857 * ldlang.h: Likewise.
858 * lexsup.c: Likewise.
860 * pe-dll.c: Likewise.
864 * pe-dll.c (process_def_file): Uninitialized data wasn't
865 exported with --export-all-symbols switch.
869 * pe-dll.c (fill_edata): rearrange the data so that ordinals and
870 noname work properly.
874 * ld.texinfo (HPPA ELF32): New section.
876 * emultempl/hppaelf.em (group_size): New.
877 (hppaelf_finish): Pass group_size to elf32_hppa_size_stubs.
878 (PARSE_AND_LIST_PROLOGUE): Add OPTION_STUBGROUP_SIZE.
879 (PARSE_AND_LIST_LONGOPTS): Add --stub-group-size. Duplicate
880 options to prevent abbreviations matching.
881 (PARSE_AND_LIST_OPTIONS): Describe the above. Reformat.
882 (PARSE_AND_LIST_ARGS_CASES): Handle it.
886 * emultempl/m68kelf.em: Conditionalise the embedded relocs feature
887 on the m68*-*-elf target. Make it support COFF input objects.
891 * ldmain.c: Fix formatting.
892 * ldmisc.c: Likewise.
894 * ldwrite.c: Likewise.
898 * ldwrite.c (clone_section): Silence gcc warnings.
902 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Handle
903 out of memory failure.
905 * ldwrite.c (ldwrite): Remove unnecessary einfo arg.
906 (clone_section): Handle out of memory failures. Rename var to
907 avoid c++ reserved word.
911 * emultempl/hppaelf.em (hppaelf_add_stub_section): Rename
912 stub_name param to stub_sec_name.
913 (hppaelf_finish): Modify call to elf32_hppa_size_stubs.
917 * emultempl/m68kelf.em: New file.
918 * emulparams/m68kelf.sh (EXTRA_EM_FILE): Use it.
919 * Makefile.am (em68kelf.c): Add dependency on m68kelf.em.
920 * Makefile.in: Regenerate.
924 * emulparams/hppalinux.sh (DATA_START_SYMBOLS): Provide $global$
929 * ldmain.c (multiple_definition): Disable relaxation if
930 multiple symbol definitions are encountered - otherwise the
931 linker could abort with an assertion failure.
935 * mri.c: Fix formatting.
939 * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
940 * configure: Rebuild.
944 * Makefile.am (lexsup.o): Also depend on $(INCDIR)/demangle.h.
945 * Makefile.in: Rebuild.
949 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Fix
950 broken list handling. Create __start_SECNAME and __stop_SECNAME
951 when no place-holder. Add some comments. Test both SEC_CODE and
952 SEC_READONLY for hold_text to prevent .rodata orphan poisoning.
953 Handle case where no output section statement created.
957 * configure.tgt (sh-*-linux*): Added.
958 * Makefile.am: Added eshelf_linux and eshlelf_linux.
959 * Makefile.in: Rebuilt.
960 * emulparams/shelf_linux.sh: New file.
961 * emulparams/shlelf_linux.sh: New file.
965 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
966 try shuffling sections when the orphan happens to be the place
967 holder. Keep count of unique section names generated so we speed
968 the search for a new name.
972 * configure: Rebuilt with new libtool.m4.
976 * Makefile.in: Regenerate.
977 * aclocal.m4: Regenerate.
978 * configure: Regenerate.
979 * config.in: Regenerate.
980 * po/ld.pot: Regenerate.
982 * ldint.texinfo: Remove CVS revision marker - it foils local
985 * emultempl/ticoff.em: Remove extraneous comma.
989 * emultempl/hppaelf.em (hppaelf_add_stub_section): Add SEC_RELOC
990 to stub section flags.
991 (hppa_for_each_input_file_wrapper): New.
992 (hppa_lang_for_each_input_file): New.
993 (lang_for_each_input_file): Define to call above.
994 (multi_subspace): New.
995 (hppaelf_finish): Pass multi_subspace to elf32_hppa_size_stubs.
996 (PARSE_AND_LIST_PROLOGUE): Define.
997 (PARSE_AND_LIST_LONGOPTS): Define.
998 (PARSE_AND_LIST_OPTIONS): Define.
999 (PARSE_AND_LIST_ARGS_CASES): Define.
1000 (hppaelf_finish): Call elf32_hppa_set_gp.
1001 (hppaelf_set_output_arch): Remove.
1002 (LDEMUL_SET_OUTPUT_ARCH): Remove.
1004 * emulparams/hppalinux.sh (ELFSIZE): Define.
1006 (OTHER_READONLY_SECTIONS): Define.
1008 (GENERATE_SHLIB_SCRIPT): Define.
1010 * ldlang.c: Add missing prototypes, and tidy others. Change CONST
1011 to const throughout. Change `void *' to `PTR' throughout.
1012 (lang_memory_default): Function is local to file, add `static'.
1014 * Makefile.am (ehppaelf.c): Depend on emultempl/elf32.em.
1015 (ehppalinux.c): Likewise.
1016 (earmelf.c): Likewise.
1017 (earmelf_linux.c): Likewise.
1018 (earmelf_linux26.c): Likewise.
1019 * Makefile.in: Regenerate.
1021 * ld.h (ld_config_type): Add unique_orphan_sections.
1022 * lexsup.c (OPTION_UNIQUE): Define.
1023 (ld_options): Add "--unique".
1024 (parse_args): Handle it.
1025 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
1026 search for an existing output section if unique_orphan_sections is
1027 set. Make use of bfd_get_unique_section_name rather than
1028 duplicating code here.
1029 * ld.texinfo: Describe --unique.
1031 * lexsup.c (ld_options): Make split-by-reloc arg optional. Add
1032 optional arg to split-by-file.
1033 (parse_args): Handle them.
1034 * ld.texinfo: Update description of these options.
1035 * ldwrite.c (clone_section): Pass in the section name. Replace
1036 local code with bfd_get_unique_section_name.
1037 (split_sections): Tidy code and comments. Use a list traversal
1038 more appropriate to the list construction. Handle cooked section
1039 sizes. Split when split_by_reloc reached rather than exceeded.
1040 Track section size and split when split_by_file reached. Fix
1041 link_order_tail (even though it's not used).
1042 (ldwrite): Modify condition for calling split_sections to suit
1043 changed split_by_reloc and split_by_file.
1044 * ldmain.c (main): Init config.split_by_reloc and
1045 config.split_by_file to -1.
1046 * ld.h (ld_config_type): Change split_by_reloc to unsigned.
1047 Change split_by_file to bfd_size_type.
1051 * configure.in: Increase version number to 2.10.91.
1052 * NEWS: Mention new ability to support removal of duplicate DWARF2
1054 * configure: Regenerate.
1055 * aclocal.m4: Regenerate.
1056 * config.in: Regenerate.
1060 * scripttempl/elf.sc: Add .gnu.linkonce.wi.* to .debug_info
1062 * scripttempl/elf32avr.sc: Ditto.
1063 * scripttempl/elfd10v.sc: Ditto.
1064 * scripttempl/elfd30v.sc: Ditto.
1065 * scripttempl/elfi370.sc: Ditto.
1066 * scripttempl/elfm68hc11.sc: Ditto.
1067 * scripttempl/elfm68hc12.sc: Ditto.
1068 * scripttempl/elfi386beos.sc: Ditto.
1069 * scripttempl/v850.sc: Ditto.
1073 * acinclude.m4: Include libtool and gettext macros from the
1075 * aclocal.m4, configure: Rebuilt.
1079 * ldlang.c (open_output): When choosing the target for a
1080 particular endianness, do nothing if the target is not
1085 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
1086 check -rpath nor LD_RUN_PATH for cross link.
1087 * ld.texinfo: Document the change.
1091 * NEWS: Mention support for CRIS.
1095 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Get
1096 the current runpath list from bfd_elf_get_runpath_list ()
1101 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search
1102 the DT_RPATH/DT_RUNPATH entries for DT_NEEDED after
1103 LD_LIBRARY_PATH for native linker. Display the needed DSO if
1104 trace_file_tries is non-zero.
1105 (gld${EMULATION_NAME}_try_needed): Report the needed DSO found
1106 if trace_file_tries is non-zero.
1108 * ld.texinfo: Document the usage of DT_RPATH/DT_RUNPATH.
1113 * NEWS: Mention i860 support.
1117 * scripttempl/elf.sc: Fix last change to use correct comment
1122 * scripttempl/elf.sc: Add a comment giving the correspondence
1123 between sections, per-datum sections, and linkonce sections. Make
1124 the comment true even for .bss, .sdata, .sdata2, .sbss, and
1129 * emulparams/elf32_i860.sh: New file.
1130 * configure.tgt: Recognize new target i860-stardent-{sysv4*|elf*}.
1131 * Makefile.am (ALL_EMULATIONS): Add eelf32_i860.o.
1132 (eelf32_i860.c): New rule.
1133 * Makefile.in: Regenerate.
1137 * emulparams/mipspe.sh (ENTRY): Add definition.
1141 * emultempl/elf32.em (_after_close): Refer to -rpath not --rpath
1146 * scripttempl/elfm68hc11.sc: Define __bss_size symbol to indicate
1147 the final size of .bss section.
1148 * scripttempl/elfm68hc12.sc: Likewise.
1152 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Rename to
1153 gld${EMULATION_NAME}_parse_args for consistency. Combine
1154 lastoptind and prevoptind vars, and keep track of last optind.
1155 (gld_${EMULATION_NAME}_list_options): Rename to
1156 gld${EMULATION_NAME}_list_options.
1160 * configure.tgt: Select targ_emul=elf_i386 for Unixware 7
1161 (i586-sco-sysv5uw7.1.0).
1165 * emulparams/elf64alpha.sh (PARSE_AND_LIST_ARGS): Removed.
1166 (PARSE_AND_LIST_PROLOGUE): New.
1167 (PARSE_AND_LIST_LONGOPTS): Likewise.
1168 (PARSE_AND_LIST_OPTIONS): Likewise.
1169 (PARSE_AND_LIST_ARGS_CASES): Likewise.
1170 (PARSE_AND_LIST_EPILOGUE): Likewise.
1174 * emultempl/armelf.em: Elide functions common to elf32.em,
1175 ie. most of the file.
1176 (arm_elf_after_open): New. Do arm specific things then call
1177 gld${EMULATION_NAME}_after_open.
1178 (arm_elf_before_allocation): New. Call
1179 gld${EMULATION_NAME}_before_allocation then do arm specifics.
1180 (PARSE_AND_LIST_PROLOGUE): Define.
1181 (PARSE_AND_LIST_SHORTOPTS): Define.
1182 (PARSE_AND_LIST_LONGOPTS): Define.
1183 (PARSE_AND_LIST_OPTIONS): Define.
1184 (PARSE_AND_LIST_ARGS_CASES): Define.
1185 (LDEMUL_AFTER_OPEN): Define.
1186 (LDEMUL_BEFORE_ALLOCATION): Define.
1187 (LDEMUL_BEFORE_PARSE): Define.
1188 (LDEMUL_FINISH): Define.
1190 * emultempl/hppaelf.em: Similarly zap most of this file.
1191 (hppaelf_add_stub_section): Prototype.
1192 (hppaelf_layaout_sections_again): Prototype.
1193 (hook_in_stub): Prototype.
1194 (LDEMUL_SET_OUTPUT_ARCH): Define.
1195 (LDEMUL_FINISH): Define.
1196 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
1198 * emulparams/armelf.sh (TEMPLATE_NAME): Use elf32.
1199 (EXTRA_EM_FILE): New.
1200 * emulparams/armelf_linux.sh: Likewise.
1201 * emulparams/armelf_linux26.sh: Likewise.
1202 * emulparams/hppalinux.sh: Likewise.
1203 * emulparams/hppaelf.sh: Likewise.
1206 * emultempl/elf32.em: Fix formatting.
1207 (EXTRA_EM_FILE): Source it.
1208 (LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
1209 LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
1210 LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
1211 LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
1212 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
1213 LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
1214 LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
1215 LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
1216 LDEMUL_FIND_POTENTIAL_LIBRARIES): New shell vars. Add code to
1217 allow functions in this file to be overridden.
1218 (PARSE_AND_LIST_SHORTOPTS): Handle it.
1220 * emultempl/m68kcoff.em: Include ldfile.h before ldemul.h.
1222 * emultempl/elf32.em: Reorganize file.
1226 * emulparams/elf64alpha.sh: Implement "-taso" emulation
1227 specific option to fit 64-bit executable in the lower
1228 31-bit address range. This is done by changing start
1229 address of .interp (the very first section of executable)
1230 and then setting EF_ALPHA_32BIT elf header flag.
1234 * emultempl/m68kcoff.em: New file.
1235 * emulparams/m68kcoff.sh (TEMPLATE_NAME): Use m68kcoff template.
1236 * Makefile.am (em68kcoff.c): Depend on m68kcoff.em rather than
1238 * Makefile.in: Regenerate.
1242 * emultempl/elf32.em (longopts): Duplicate "disable-new-dtags"
1243 and "disable-new-dtags" to stop getopt from treating -d/-e as
1244 abbreviations for these options.
1248 * ld.texinfo: Add documentation for --disable-new-dtags and
1251 * ldmain.c (main): Initialize link_info.new_dtags to false.
1253 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Add
1254 --disable-new-dtags and --enable-new-dtags.
1255 (gld_${EMULATION_NAME}_list_options): Likewise.
1259 * lexsup.c: Add optional style to demangle switch
1260 * ld.texinfo: Document optional style to demangle switch.
1264 * Makefile.am (ALL_EMULATIONS): Add ecrisaout.o, ecriself.o,
1266 (ecrisaout.c, ecriself.c, ecrislinux.c): New rules.
1267 Regenerate dependencies.
1268 * Makefile.in: Rebuild.
1269 * configure.tgt (cris-*-*): New target.
1270 * emulparams/crisaout.sh, emulparams/criself.sh,
1271 emulparams/crislinux.sh, scripttempl/crisaout.sc: New files.
1272 * po/POTFILES.in, po/ld.pot: Regenerate.
1276 * emultempl/elf32.em (gld_${EMULATION_NAME}_list_options):
1277 Print out ignored -z options.
1281 * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Removed.
1282 (PARSE_AND_LIST_PROLOGUE): New.
1283 (PARSE_AND_LIST_LONGOPTS): Likewise.
1284 (PARSE_AND_LIST_OPTIONS): Likewise.
1285 (PARSE_AND_LIST_ARGS_CASES): Likewise.
1287 * ldmain.c (main): Clear link_info.flags and link_info.flags_1.
1289 * lexsup.c (ld_options): Comment out 'z'.
1290 (parse_args): Likewise.
1292 * emultempl/elf32.em: Include "elf/common.h".
1293 (gld_${EMULATION_NAME}_parse_args): Defined. Handle some -z
1295 (gld_${EMULATION_NAME}_list_options): Likewise.
1297 * ld.texinfo: Add documentation for the recognized -z options.
1301 * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call
1302 bfd_elf_set_dt_needed_soname ().
1306 * pe-dll.c (pe_dll_id_target): check object target name also
1310 * scripttempl/elf.sc (.init): Only do ${INIT_START} and
1311 ${INIT_END} if relocating.
1312 (.fini): Likewise ${FINI_START} and ${FINI_END}.
1316 * emultempl/pe.em (gld_*_open_dynamic_archive): New search
1317 order for dynamic library '-lfoo' on pei386: libfoo.dll.a,
1318 foo.dll.a, libfoo.a, libfoo.dll, foo.dll. This fixes compatibility
1319 errors introduced by the old dynamic lib search order.
1323 * pe-dll.c (process_def_file): auto-export data items also
1324 (pe_process_import_defs): also see if _imp_ form needed
1328 * pe-dll.c (make_one): fix a typo in the __imp_ name decoration
1329 for dll import libraries
1333 * scripttempl/i386go32.sc: Support the g++ attribute init_priority in
1334 gcc 2.95.2 and later.
1338 * ldfile.c (ldfile_try_open_bfd): Output '\n' after an error
1343 * ldemul.h (struct lang_input_statement_struct): Remove forward
1345 (struct search_dirs): Likewise.
1346 * ldfile.h (struct lang_input_statement_struct): Likewise.
1347 Protect file from multiple inclusion.
1348 * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Move file_chain
1349 declaration from macro to file scope.
1351 * ldemul.c: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this order.
1352 * ldgram.y: Likewise here.
1353 * ldlang.c: And here.
1354 * ldmain.c: And here.
1355 * mpw-elfmips.c: And here.
1356 * mpw-eppcmac.c: And here.
1357 * emultempl/aix.em: And here.
1358 * emultempl/armcoff.em: And here.
1359 * emultempl/armelf.em: And here.
1360 * emultempl/armelf_oabi.em: And here.
1361 * emultempl/beos.em: And here.
1362 * emultempl/elf32.em: And here.
1363 * emultempl/hppaelf.em: And here.
1364 * emultempl/linux.em: And here.
1365 * emultempl/lnk960.em: And here.
1366 * emultempl/pe.em: And here.
1367 * emultempl/sunos.em: And here.
1368 * mpw-esh.c: And here. Include ldexp.h and ldlang.h too.
1369 * mpw-idtmips.c: Ditto.
1370 * emultempl/generic.em: Ditto.
1371 * emultempl/gld960.em: Ditto.
1372 * emultempl/gld960c.em: Ditto.
1373 * emultempl/mipsecoff.em: Ditto.
1374 * emultempl/ticoff.em: Ditto.
1375 * emultempl/vanilla.em: Ditto.
1377 * pe-dll.c: Include ldfile.h
1378 * ldver.c: Include ldexp.h, ldlang.h, ldfile.h
1380 * mpw-elfmips.c: (gldelf32ebmip_before_allocation): Add missing
1381 arguments to bfd_elf32_size_dynamic_sections call.
1382 (gldelf32ebmip_place_orphan): Add missing arguments to
1383 lang_leave_output_section_statement call.
1387 * emultempl/pe.em (pe_enable_stdcall_fixup): Protect with
1389 (strhash): Likewise.
1390 (compute_dll_image_base): Likewise.
1391 (pe_undef_found_sym): Likewise.
1392 (pe_undef_cdecl_match): Likewise.
1393 (gld_${EMULATION_NAME}_open_dynamic_archive): Mark the
1394 argument "arch" with ATTRIBUTE_UNUSED.
1398 * configure.tgt: Remove extraneous hppa*-*-linux-gnu*.
1401 * ldwrite.c (SSIZE): Remove to cure macro redefinition warning.
1405 Changes to create multiple linker stubs, positioned immediately
1406 before the section where they are required.
1407 * emultempl/hppaelf.em: Include elf32-hppa.h.
1408 (stub_sec, file_chain): Delete.
1409 (hppaelf_create_output_section_statements): Don't make a stub
1411 (hook_stub_info): New struct.
1412 (hook_in_stub): New function.
1413 (hppaelf_add_stub_section): New function.
1414 (hppaelf_finish): Do nothing for relocateable links. Modify the
1415 call to elf32_hppa_size_stubs. Move code for updating section
1417 (hppaelf_layaout_sections_again): ..to here, a new function.
1419 * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Fix
1420 broken list handling. Pass in a pointer to the list.
1421 (hppaelf_finish): Update call to hppaelf_delete_padding_statements
1423 (hppaelf_before_parse): Prototype.
1424 (hppaelf_set_output_arch): Prototype.
1425 (hppaelf_create_output_section_statements): Prototype.
1426 (hppaelf_delete_padding_statements): Prototype.
1427 (hppaelf_finish): Prototype.
1430 * emultempl/hppaelf.em: Include ctype.h.
1431 (struct orphan_save): New.
1432 (gld${EMULATION_NAME}_place_orphan): New.
1433 (output_rel_find): New.
1434 (hppaelf_get_script): Update from elf32.em.
1435 (ld_hppaelf_emulation): Rename to ld_${EMULATION_NAME}_emulation.
1436 Change emulation_name field to "${EMULATION_NAME}". Add
1437 gld${EMULATION_NAME}_place_orphan.
1439 * Makefile.am (ALL_EMULATIONS): Reinstate ehppaelf.o, add
1440 ehppalinux.o, sort it. Regenerate dependencies.
1441 (ehppalinux.c): Depend on hppaelf.em
1442 * Makefile.in: Regenerate.
1444 * configure.tgt: targ_emul=hppalinux for hppa*linux
1446 * emulparams/hppalinux.sh: New.
1447 * emulparams/hppaelf.sh (TARGET_PAGE_SIZE): Write in hex.
1451 * lexsup.c (parse_args): Copy section name.
1455 * emultempl/pe.em: institute the following search order for
1456 dynamic libraries on pei386: libfoo.dll.a, foo.dll.a (import
1457 libs), libfoo.dll, foo.dll (link direct to dll). Fall back to
1458 static lib (libfoo.a) if none of the above are found.
1462 * emultempl/pe.em (pe_enable_auto_image_base): New variable.
1463 (longopts): New --{enable,disable}-auto-image-base options.
1464 (gld_${EMULATION_NAME}_list_options): Document.
1465 (gld_${EMULATION_NAME}_parse): Handle.
1466 (strhash): New static function.
1467 (compute_dll_image_base): New static function.
1468 (gld_${EMULATION_NAME}_set_symbols): Use.
1476 * configure.tgt: Add traditional mips (mips*-*-sysv4*) target.
1477 * emulparams/elf32btsmip.sh: New file.
1478 * Makefile.am: Add traditional mips target.
1479 * Makefile.in: Rebuild.
1483 * Makefile.am (EXTRA_ld_new_SOURCES): Set to deffilep.y for
1484 automake to use YLWRAP.
1485 * Makefile.in: Rebuild.
1489 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
1490 (CLEANFILES): Add DEPA.
1491 * Makefile.in: Regenerate.
1493 2000-06-30 Timothy Wall <twall@ppc>
1495 * scripttempl/tic54xcoff.sc: PAGE N is not implemented, so encode
1496 the page in the upper octet of the address.
1500 * emulparams/avrmega161.sh (ARCH): Change to avr:5.
1504 * NEWS: arm-elf does --gc-sections too.
1508 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
1510 * Makefile.in: Regenerate.
1514 * Makefile.am: Rebuild dependency.
1515 * Makefile.in: Rebuild.
1519 * Makefile.am: Rebuild dependency.
1520 * Makefile.in: Rebuild.
1524 * scripttempl/tic54xcoff.sc: New.
1525 * ldlang.c (wild_doit): Propagate SEC_BLOCK flag.
1526 * gen-doc.texi: Add flag for TI COFF.
1527 * ld.texinfo: Add documentation for TI COFF handling switches.
1528 * emultempl/ticoff.em: New. TI COFF handling.
1529 * configure.tgt: Add tic54x target.
1530 * Makefile.am: Add tic54x target.
1531 * Makefile.in: Ditto.
1535 * ldmain.c (set_scripts_dir): Correct pointer comparison when
1536 checking for backslashes.
1540 * NEWS: Move entries not in 2.10 above "Changes in version 2.10".
1544 * NEWS: Update list of targets supporting --gc-sections.
1546 * scripttempl/elf.sc: KEEP .eh_frame contents.
1547 * scripttempl/elfd30v.sc: Same here.
1551 * Makefile.am (ALL_EMULATIONS): Added new emulation for m68hc12
1553 * Makefile.in: Rebuild.
1554 * configure.tgt: Recognize m68hc12 and m68hc11.
1555 * scripttempl/elfm68hc12.sc: New file.
1556 * emulparams/m68hc12elfb: New emulation.
1557 * emulparams/m68hc12elf: New emulation.
1558 * emulparams/m68hc11elfb.sh: New file. User configurable emulation
1559 (includes a memory.x script to define the ROM and RAM banks).
1560 * scripttempl/elfm68hc11.sc, emulparams/m68hc11elf.sh:
1561 New configuration files for support of Motorola 68hc11
1565 * ldmain.c (main): Only change SEC_READONLY for final link.
1569 * configure: Regenerate.
1573 * configure.in (VERSION): Update to show this is the CVS mainline.
1577 * emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all
1578 input objects to be ECOFF.
1579 (check_sections): einfo takes %B, not %P, to print a BFD name.
1583 * ldgram.y (vers_defns): Handle 'extern "C++" { ... }' in
1586 * ldlex.l (V_IDENTIFIER): Accept `::' in symbols.
1590 * emulparams/avr1200.sh (STACK): Define as 0.
1591 * emulparams/avr23xx.sh (STACK): Define as last internal SRAM address.
1592 * emulparams/avr4433.sh (STACK): Likewise.
1593 * emulparams/avr44x4.sh (STACK): Likewise.
1594 * emulparams/avr85xx.sh (STACK): Likewise.
1595 * emulparams/avrmega103.sh (STACK): Likewise.
1596 * emulparams/avrmega161.sh (STACK): Likewise.
1597 * emulparams/avrmega603.sh (STACK): Likewise.
1598 * scripttempl/elf32avr.sc (__data_start): Define for gcrt1.
1599 (__stack): Define from ${STACK} for main().
1603 * Makefile.am: Update dependencies with "make dep-am"
1604 * Makefile.in: Regenerate.
1608 * ldmain.c: Include filenames.h.
1609 (set_scripts_dir): Support backslashes in program name.
1613 * ldmain.c (main): When deciding if ".text" section should be
1614 read-only, don't forget to reset SEC_READONLY because it
1615 could be already set.
1619 * ld.1: Add documentation for new command line option:
1620 --section-start <sectionname>=<sectionorg>
1621 This is a generic version of -Ttext etc. which accepts
1622 any section name as a parameter instead of just text/data/
1624 * ld.texinfo: More docs.
1626 * lexsup.c: (parse_args): Recognize new command line option.
1627 (ld_options): Add new option.
1631 * lexsup.c (parse_args): `i' == `r', not `q'.
1635 * configure.tgt (hppa*64*-*-*): Enable PA64 target.
1640 Add support for '-q' == '--emit-relocs' switch.
1641 * ldmain.c (main): Default to false.
1642 * lexsup.c (parse_args): Turn on emitrelocations flag if set.
1643 * NEWS: Describe the emitrelocations switch.
1644 * ld.texinfo: Describe the emitrelocations switch.
1648 * emultempl/pe.em (_open_dynamic_archive): New function: Search
1649 the library path for "foo.dll" and "libfoo.dll" dynamic libraries
1650 before searching for 'libfoo.a' in response to a '-Bdynamic -lfoo'
1655 * lexsup.c (parse_args): Update the year in the copyright notice.
1659 * ld.h (gettext, dgettext, dcgettext, textdomain, bindtextdomain):
1660 Replace defines with those from intl/libgettext.h to quieten gcc
1665 * ldlang.c (open_input_bfds): Don't load the same file within
1666 a group again if the whole archive has been loaded already.
1671 * lexsup.c (set_section_start): Use bfd_scan_vma rather than
1676 * configure.host (ia64-*-linux-gnu*): Change gcc to ${CC}.
1678 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
1679 host "ia64-*-linux-gnu*".
1683 * ld.h: Correctly check GCC version.
1687 * Makefile.am: Add PA64 support. Add missing dependencies for
1689 * Makefile.in: Rebuilt.
1690 * configure.tgt: Add PA64 support (currently disabled).
1694 * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Delete.
1695 (output_rel_find): New function.
1696 (hold_section, hold_use): Delete.
1697 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
1698 hold_interp): Make local to place_orphan.
1699 (gld${EMULATION_NAME}_place_orphan): Use lang_output_section_find
1700 rather than place_section to find possible previous use of orphan.
1701 Similarly find the place-holder output sections. Use returned
1702 value from lang_enter_output_section_statement rather than calling
1703 lang_output_section_statement_lookup.
1704 * emultempl/armelf.em: Same here.
1705 * emultempl/pe.em: Similar to above, but no need for output_rel_find.
1707 * ldlang.c (lang_enter_output_section_statement): Return output
1709 * ldlang.h (lang_enter_output_section_statement): Change
1712 * ldlang.h (lang_output_section_statement): Export it.
1713 * ldlang.c (lang_output_section_statement): Ditto.
1717 * ld.texinfo (Output Section Data): Add note that section data
1718 commands cannot appear outside of section directives.
1722 * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support.
1727 * Makefile.am (ALL_64_EMULATIONS): Add eelf64_ia64.o.
1728 (eelf64_ia64.c): New rule.
1729 * Makefile.in: Rebuild.
1730 * configure.tgt (ia64-*-elf*, ia64-*-linux*): New targets.
1731 * emulparams/elf64_ia64.sh: New file.
1735 * scripttempl/elfd30v.sc: Place .gcc_except_table.
1739 * dep-in.sed: Match space at start of file name, not at end.
1743 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
1744 lang_leave_output_section_statement () after calling
1745 lang_enter_output_section_statement ().
1746 * emultempl/armelf.em: Likewise.
1750 * emultempl/elf32.em (struct orphan_save): Add section field.
1751 (gld${EMULATION_NAME}_place_orphan): Use above to keep sections in
1752 better order, and place first orphan section as we did before the
1753 2000-04-12 patch. Ignore ~SEC_ALLOC sections when choosing place.
1754 Don't call make_bfd_section here, let wild_doit do the job for us.
1755 Don't build a statement list when we'll only throw it away.
1756 * emultempl/armelf.em: Ditto.
1757 * emultempl/pe.em: Similarly.
1761 * scripttempl/elfppc.sc: Remove.
1762 * emulparams/elf32ppc.sh: Use elf.sc.
1763 * emulparams/elf32lppc.sh: Use elf.sc.
1764 * emulparams/elf32ppclinux.sh: Use elf.sc.
1765 * emulparams/elf32ppcsim.sh: New file.
1766 * emulparams/elf32lppcsim.sh: New file.
1767 * Makefile.am: Update dependencies. Add elf32ppcsim ad elf32lppcsim.
1768 (ALL_EMULATIONS): Add elf32ppcsim ad elf32lppcsim.
1769 * Makefile.in: Regenerate.
1770 * configure.tgt (powerpc-*): Add elf32ppcsim and elf32lppcsim.
1774 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Process
1775 ~SEC_ALLOC sections too. Init start address of debug sections.
1776 * emultempl/armelf.em (gld${EMULATION_NAME}_place_orphan): Ditto.
1777 * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Ditto.
1778 Also set all relocateable section start addresses.
1782 * scripttempl/elf.sc: Add support for .sbss2 and .sdata2 sections.
1783 Add new BSS_PLT variable for when .plt need not be contained in
1784 the file. Move _etext so that it is also after .fini, and provide
1785 both etext and _etext with a leading underscore. Mark the start
1790 * emultempl/elf32.em (struct orphan_save): New.
1791 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
1792 hold_interp): Make them struct orphan_save.
1793 (gld${EMULATION_NAME}_place_section): Modify for new hold_*.
1794 (gld${EMULATION_NAME}_place_orphan): Add new orphan sections to
1795 the end of the relevant section list. Also add associated section
1796 statements to the end of any previous orphan statements.
1797 * emultempl/armelf.em: Similarly.
1798 * emultempl/pe.em: Similarly.
1802 * ld.texinfo (Simple Example): Remove extraneous paragraph.
1806 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
1807 --enable-build-warnings option.
1808 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
1809 * Makefile.in, configure: Re-generate.
1813 * po/ld.pot: Regenerate.
1815 * lexsup.c (help): Restore translated part of bug string.
1817 * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
1818 (DEP): Quote when passing vars to sub-make. Add warning message
1820 (DEP1): Rewrite for "gcc -MM".
1821 (CLEANFILES): Add DEP2.
1822 Update dependencies.
1823 * Makefile.in: Regenerate.
1827 * ld.h: #include "bin-bugs.h"
1828 * lexsup.c (help): Use REPORT_BUGS_TO.
1832 * configure.tgt (avr-*-*): New target support.
1833 * Makefile.am: Likewise.
1834 * scripttempl/elf32avr.sc: New script file.
1835 * emulparams/avr1200.sh: New file.
1836 * emulparams/avr23xx.sh: New file.
1837 * emulparams/avr4433.sh New file.
1838 * emulparams/avr44x4.sh New file.
1839 * emulparams/avr85xx.sh New file.
1840 * emulparams/avrmega103.sh New file.
1841 * emulparams/avrmega161.sh New file.
1842 * emulparams/avrmega603.sh New file.
1843 * Makefile.in: Regenerate.
1847 * Makefile.am (check-DEJAGNU): Also unset LANG.
1848 * Makefile.in: Rebuild.
1852 * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
1857 * emulparams/elf32mcore.sh: Include "getopt.h".
1861 * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware.
1865 * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR.
1866 * emulparams/shpe.sh: Likewise.
1870 * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED
1871 to unused parameters.
1873 * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static
1874 functions only used by DLL code.
1875 (_place_orphan): Initialise 'dollar'.
1879 * ldmain.c (undefined_symbol): Take one more arg, fatal, to
1880 indicate if the undefined symbol is a fatal error or not.
1881 Don't delete the output file if "fatal" is false.
1885 * Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)".
1886 Set LC_COLLATE and LC_ALL to null and export them. It is for
1887 sort which expects the C locale.
1888 Add $(LIBS) to all $(HOSTING_LIBS).
1889 * Makefile.in: Rebuild.
1893 * emultempl/{aix.em, armcoff.em, armelf.em, armelf_oabi.em,
1894 beos.em, elf32.em, generic.em, gld960.em, gld960c.em, hppaelf.em,
1895 linux.em, lnk960.em, mipsecoff.em, sunos.em, vanilla.em}
1896 (ld_emulation_xfer_struct): Add missing NULL initialiser for
1897 find_potential_libraries.
1901 * ldgram.y (exclude_name_list): Don't require a comma to separate
1902 list entries; the lexer considers commas to be valid part of a
1903 filename, so in something like `foo, bar' the comma is considered
1904 part of the first filename, `foo,'.
1905 * ld.texinfo: Update section on EXCLUDE_FILE lists.
1909 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
1910 host "i[3456]86-*-freebsdelf*".
1914 * scripttempl/i386go32.sc: Move misplaced semicolons.
1918 * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o.
1919 (ALL_64_EMULATIONS): Remove eelf64hppa.o.
1920 (eelf64hppa.c, ehppaelf.c): Remove targets.
1921 * Makefile.in: Rebuild.
1925 * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on
1926 GNU/Linux/sparc, but keep the default as 32.
1928 * configure.tgt: Enable elf64_sparc on Solaris7+/sparc. And make
1929 it default if sparcv9 or sparc64.
1933 * Makefile.am: Add rules to build emipspe.o and earmpe.o.
1934 * Makefile.in: Regenerate.
1935 * configure.tgt: Add targets for arm-wince, sh-pe and mips-pe.
1937 * ldemul.h (ld_emulation_xfer_struct): Add new field:
1938 find_potential_libraries.
1939 * ldemul.c (ldemul_find_potential_libraries): New function.
1941 * ldfile.c (ldfile_open_file_search): Allow function to be
1943 (ldfile_open_file): Call ldemul_find_potential_libraries.
1944 * ldfile.h: Add prototype for ldfile_open_file_search.
1946 * pe-dll.c: Add support for ARM, MIPS and SH targets.
1948 * emulparams/mipspe.sh: New file. Parameters for mips-pe target.
1949 * emulparams/shpe.sh: New file. Parameters for sh-pe target.
1951 * emultempl/pe.em: Add support for ARM, MIPS and SH DLLs.
1952 (gld_X_find_potential_libraries): New function. Search for
1953 libraries called "*.lib".
1955 * scripttempl/pe.sc: Add .pdata section.
1959 * scripttempl/elfd10v.sc: Remove dynamic linking hooks.
1960 Add and use memory regions.
1964 * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New.
1966 * Makefile.am: Add support for Linux/IBM 370.
1967 * configure.tgt: Likewise.
1969 * Makefile.in: Regenerate.
1973 * ldlang.c (print_input_section, print_data_statement,
1974 print_reloc_statement, print_padding_statement, insert_pad,
1975 size_input_section, lang_check_section_addresses,
1976 lang_size_sections, lang_do_assignments, lang_set_startof,
1977 lang_one_common): Change `opb' to unsigned.
1978 (lang_do_assignments): Also change `size' to unsigned.
1982 * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION.
1986 * mri.c (mri_draw_tree): Add default LMA region argument to call
1987 to lang_leave_output_section_statement.
1988 * ldlang.h: Update prototypes with LMA region arguments.
1989 * ldlang.c (lang_size_sections): Encapsulate region bounds
1990 checking in os_check_region call.
1991 (os_check_region): New function.
1992 (lang_output_section_statement_lookup): Initialize lma_region.
1993 (lang_leave_output_section_statement): Add LMA region argument.
1994 (lang_leave_overlay): Ditto.
1995 * ldgram.y: Handle LMA region syntax.
1996 * ld.texinfo (Output Section Description): Describe LMA region usage.
1997 * emultempl/armelf.em (gld$place_orphan): Add default value for
1998 lma region in call to lang_leave_output_section_statement.
1999 * emultempl/elf32.em (gld$place_orphan): Add default value for
2000 lma region in call to lang_leave_output_section_statement.
2001 * emultempl/pe.em (gld$place_orphan): Add default value for
2002 lma region in call to lang_leave_output_section_statement.
2007 * ldlang.c (lang_check_section_addresses): Use bytes instead of
2008 octets when calculating section end addresses.
2012 * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation.
2016 * ldexp.c (fold_name): Make SIZEOF operator return byte count, not
2018 * ldlang.c (print_input_section, print_data_statement,
2019 print_reloc_statement, print_padding_statement): Print target
2020 address values and section sizes as bytes, not octets.
2021 (insert_pad) Calculate padding size in octets, and adjust "dot"
2023 (size_input_section) Always adjust "dot" by bytes, not octets.
2024 (lang_check_section_addresses, lang_do_assignments) Adjust
2025 "dot" by bytes, not octets. Use the larger of the directive size
2026 or octets_per_byte for the number of octets actually allocated in
2028 (lang_set_startof) Make sure STARTOF returns a target address.
2029 (lang_one_common) Record size changes in octets.
2030 (lang_abs_symbol_at_end_of) Section end symbol's value is
2031 recorded in target bytes.
2032 * ld.texinfo: Updated description of BYTE, SHORT, LONG, etc.
2033 to be clear about behavior when an octet is smaller than one byte.
2037 * ldcref.c (output_cref): Don't pass message strings to printf
2041 * ldmisc.c (vfinfo): Same here.
2046 * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em,
2047 generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em,
2048 mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct):
2049 Add missing NULL initialisers, and comments.
2051 * testsuite/ld-srec/sr3.cc (__rethrow): New.
2055 * ldlang.c (lang_size_sections): Fix typo in comment.
2059 * ldlang.c (lang_size_sections): Also update the current
2060 address of a region if the SEC_NEVER_LOAD bit is not set.
2064 * configure.tgt (arm*-*-conix*): New target.
2068 * ld.texinfo (Options): Remind users to preceed linker command
2069 line switches with -Wl, (or whatever is appropriate) if it is
2070 being invoked by a comnpiler driver program.
2071 Fix description of the behaviour of the -n command line switch.
2075 * ld.h (wildcard_spec): Change exclude_name to exclude_name_list.
2077 * ld.texinfo (EXCLUDE_FILE): Update documentation.
2078 * ldgram.y (wildcard_spec): Support a list of excluded_files.
2079 (exclude_name_list): New.
2080 ldlang.c (walk_wild_section): Support list of excluded files.
2081 (print_wild_statement): Likewise.
2082 (lang_add_wild): Likewise.
2083 * ldlang.h (lang_wild_statement_type): Likewise.
2084 * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support.
2088 * pe-dll.c (pe_dll_warn_dup_exports): New variable.
2089 (process_def_file): Use.
2090 (pe_dll_compat_implib): New variable.
2093 * pe-dll.h: Add exports of pe_dll_warn_dup_exports and
2094 pe_dll_compat_implib.
2096 * emultempl/pe.em (longopts): Add warn-duplicate-exports and
2097 compat-implib options.
2098 (gld_${EMULATION_NAME}_list_options): List new options.
2099 (gld_${EMULATION_NAME}_parse_args): Handle.
2101 * pe-dll.c (pe_dll_generate_implib): Use the correct name for output
2104 * deffilep.y (opt_name): Allow "." in name.
2106 For older changes see ChangeLog-9899
2112 version-control: never