3 * configure.tgt: Add NATIVE_LIB_DIRS for cygwin target back after
4 apparent accidental removal on 2003-01-06.
8 * Makefile.am: Add new devices x1122 x1132 emulation
9 * configure.tgt: Likewise.
10 * Makefile.in: Regenerate.
11 * emulparams/msp430x1122.sh: New file.
12 * emulparams/msp430x1132.sh: New file.
16 * ldmain.c (set_scripts_dir): Look for relative to TOOLBINDIR as
19 * ldfile.h (struct search_dirs): Added sysrooted field.
20 * ldlang.h (struct lang_input_statement_struct): Likewise.
21 * ldfile.c (ldfile_add_library_path): Mark sysrooted paths.
22 (ldfile_open_file_search): Look for sysrooted filename starting
23 with / in ld_sysroot instead of in the current directory. Clear
24 sysrooted flag if it's found in the current directory. Set it
25 from the search directory's sysrooted flag where it is found
27 * ldlang.c (ldlang_sysrooted_script): New static variable.
28 (new_afile): Mark search_file_enums as sysrooted if
29 ldlang_sysrooted_script.
30 (load_symbols): Set ldlang_sysrooted_script according to the
31 script's sysrooted field while processing it.
32 * ld.texinfo: Document INPUT behavior in sysroot.
36 * scripttempl/pe.sc: Use PROVIDE with etext, end, _end,
40 * emulparams/elf64alpha.sh (EXTRA_EM_FILE): Define.
41 (PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_LONGOPTS,
42 PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES,
43 PARSE_AND_LIST_EPILOGUE): Don't define.
44 * emultempl/alphaelf.em: New file.
48 * ldemul.c: Include getopt.h.
49 * emultempl/elf32.em: Include getopt.h earlier.
50 * emultempl/ticoff.em: Likewise.
54 * emultempl/elf32.em (gld${EMULATION_NAME}_get_script): Add combreloc
55 support when scripts read from files.
59 * ldemul.c (ldemul_parse_args): Return FALSE by default.
60 * ldemul.h (struct ld_emulation_xfer_struct): Update parse_args
63 * ldemul.c (ldemul_add_options, ldemul_handle_option): New functions.
64 (ldemul_parse_args): Return bfd_boolean. Formatting.
65 * ldemul.h (ldemul_add_options, ldemul_handle_option): Declare.
66 (ldemul_parse_args): Adjust.
67 (struct ld_emulation_xfer_struct): Add add_options and handle_option.
68 Return bfd_boolean from parse_args.
69 * lexsup.c (parse_args): Malloc shortopts, longopts and
70 really_longopts. Call ldemul_add_options and ldemul_handle_option.
71 * emultempl/aix.em (gld${EMULATION_NAME}_add_options): Split out from
72 gld${EMULATION_NAME}_parse_args.
73 (gld${EMULATION_NAME}_handle_option): Likewise.
74 (ld_${EMULATION_NAME}_emulation): Adjust initializer.
75 * emultempl/armcoff.em: As for aix.em, but remove parse_args.
76 * emultempl/beos.em: Likewise.
77 * emultempl/pe.em: Likewise.
78 * emultempl/ticoff.em: Likewise.
79 * emultempl/elf32.em: Likewise. Don't duplicate long options either.
80 (gld${EMULATION_NAME}_add_sysroot): Prototype.
81 * emultempl/armelf.em (PARSE_AND_LIST_LONGOPTS): Don't duplicate
83 * emultempl/hppaelf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
84 * emultempl/ppc32elf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
85 * emultempl/ppc64elf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
86 * emultempl/armelf_oabi.em (ld_${EMULATION_NAME}_emulation): Adjust
88 * emultempl/generic.em: Likewise.
89 * emultempl/gld960.em: Likewise.
90 * emultempl/gld960c.em: Likewise.
91 * emultempl/linux.em: Likewise.
92 * emultempl/lnk960.em: Likewise.
93 * emultempl/m68kcoff.em: Likewise.
94 * emultempl/mipsecoff.em: Likewise.
95 * emultempl/sunos.em: Likewise.
96 * emultempl/vanilla.em: Likewise.
97 * emultempl/netbsd.em (gldnetbsd_before_parse): Prototype.
101 * emultempl/elf32.em (gld${EMULATION_NAME}_add_sysroot): Fix
102 memory allocation error.
104 * Makefile.am (ldmain.o): Define TOOLBINDIR.
105 * Makefile.in: Rebuilt.
106 * ldmain.c (ld_sysroot): Try to set from TOOLBINDIR too.
110 * ldlang.c (lang_size_sections_1): Add CHECK_REGIONS argument and only
111 call os_region_check when it is set.
112 (lang_size_sections): Add CHECK_REGIONS argument and pass it through to
113 lang_size_sections_1.
114 (lang_process): Change lang_size_sections calls to set CHECK_REGIONS
115 only for the last call, not on every relaxation iteration.
116 * ldlang.h (lang_size_sections): Update prototype.
117 * pe-dll.c (pe_dll_fill_sections): Set CHECK_REGIONS argument in calls
118 to lang_size_sections.
119 (pe_exe_fill_sections): Likewise.
120 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Likewise.
121 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
122 * emultempl/ppc64elf.em (ppc_before_allocation): Likewise.
123 (ppc_layout_sections_again): Likewise.
127 * gen-doc.texi: Set ARM and HPPA variables.
128 * ld.texinfo: Fix typos and obvious texinfo mistakes. Make section
129 title capitalization more consistent. Add missing menu entries for
130 machine-specific sections and conditionalize them consistently.
131 Conditionalize text that is irrelevant when SingleFormat is set.
132 Add @group divisions to improve page breaks in long examples.
133 Use @iftex/@ifnottex instead of @iftex/@ifinfo so that HTML output
134 is correct. Remove "FIXME" comment about not using
135 @raisesections/@lowersections. Use @raisesections/@lowersections
136 consistently for machine-specific sections. Change to be more polite
137 about poor bug reports. Replace FDL appendix with include of fdl.texi.
138 Move WIN32 node to match its order in the menus.
139 * fdl.texi: New file.
143 * configure.in (TARGET_SYSTEM_ROOT): Set default to
144 ${exec_prefix}/${target_alias}/sys-root. Match explicit
145 '${exec_prefix}' (in addition to the expansion thereof) as
147 * configure: Rebuilt.
151 * ldgram.y (vers_defns): Also recurse with 'EXTERN NAME' patterns.
155 * ldgram.y (vers_defns): Allow optional trailing semicolon in
160 * emultempl/ppc32elf.em: New file.
161 * emulparams/elf32ppc.sh (EXTRA_EM_FILE): Define.
162 * Makefile.am (eelf32lppc.c): Depend on emultempl/ppc32elf.em.
163 (eelf32lppcnto.c): Likewise.
164 (eelf32lppcsim.c): Likewise.
165 (eelf32ppcnto.c): Likewise.
166 (eelf32ppc.c): Likewise.
167 (eelf32ppc_fbsd.c): Likewise.
168 (eelf32ppcsim.c): Likewise.
169 (eelf32ppclinux.c): Likewise.
170 * Makefile.in: Regenerate.
174 * ld.texinfo: Remove spaces between @samp and opening brace.
178 * emultempl/ppc64elf.em (ppc_create_output_section_statements): Check
180 (ppc_before_allocation): Don't do optimizations if wrong hash table.
181 (gld${EMULATION_NAME}_finish): Ditto.
185 * ldmain.c (main) Default allow_shlib_undefined to true.
186 * lexsup.c (ld_options): Add --no-allow-shlib-undefined.
187 (parse_args): Parse the new switch.
188 * ld.texinfo: Document new switch and default behaviour of
189 allowing undefined symbols in shared libraries.
193 * scripttempl/elf32msp430.sc: Add new data anchors definitions.
194 * scripttempl/elf32msp430_3.sc: Likewise.
198 * configure.tgt: Add support for kaOS as cross build target
203 * hppaelf.em (group_size): Change default back to 1.
207 * emultempl/ppc64elf.em: Add "no-tls-optimize" option and support code.
211 * hppaelf.em (group_size): Change default to -1.
215 * emultempl/armelf.em (PARSE_AND_LIST_SHORTOPTS): Remove 'n' short
217 (PARSE_AND_LIST_LONGOPTS): Add duplicate entry for
218 no-pipeline-knowledge. This will prevent the getopt package from
219 thinking that there are any shorter abbreviations for
220 --no-pipeline-knowledge.
224 * genscripts.sh (LIB_PATH): Don't append LIBPATH_SUFFIX to paths
225 which already have it. Avoid duplicates.
229 * emulparams/elf64_s390.sh (LIBPATH_SUFFIX): Set to 64.
230 * emulparams/elf_x86_64.sh (LIBPATH_SUFFIX): Likewise.
231 * emulparams/elf64_sparc.sh (LIBPATH_SUFFIX): Set instead of suffix.
235 * emultempl/ppc64elf.em (ppc_before_allocation): Size sections then
236 call ppc64_elf_tls_optimize.
240 * emultempl/elf32.em: Move gld${EMULATION_NAME}_add_sysroot
241 outside of GNU/Linux conditional.
245 * deffilep.y (def_get_module): New function: locate an already
247 * deffile.h (def_get_module): New prototype.
248 * pe-dll.c (pe_implied_import_dll): Add code to prevent importing
249 a dll multiple times.
253 * emultempl/sh64elf.em: Include elf32-sh64.h.
254 (sh64_elf_${EMULATION_NAME}_before_allocation): Adjust for changed
255 sh64_elf_section_data.
256 (sh64_elf_${EMULATION_NAME}_after_allocation): Likewise.
260 * ld.texinfo: Remove an extra "i" in --dll-search-prefix.
261 * emultempl/pe.em (gld_${EMULATION_NAME}_list_options): Move a
262 cross-80th-column-margin "an" to the next line.
266 * emulparams/tic3xcoff-onchip.sh: Rename to ...z
267 * emulparams/tic3xcoff_onchip.sh: ...this.
268 * Makefile.am (etic3xcoff_onchip.c): Fix name of generated C file.
269 * Makefile.in: Regenerate.
273 * configure.tgt: Handle i[3456]86-*-aros*
277 * Makefile.am: Added etic3xcoff.o and etic4xcoff_onchip.o
278 * Makefile.in: Regenerate
279 * configure.tgt: Added extra target emulations
280 * emulparams/tic3xcoff.sh: Remove old settings
281 * emulparams/tic4xcoff.sh: Ditto
282 * emulparams/tic3xcoff-onchip.sh: Added new
283 * scripttempl/tic4xcoff.sc: Revise and combine both c3x and c4x
284 * scripttempl/tic3xcoff.sc: Remove
288 * emultempl/elf32.em (gld${EMULATION_NAME}_add_sysroot): Do not
293 * Makefile.in: Regenerate.
297 * ld/ld.texinfo (node WIN32): Some clarifications
298 and formatting fixups.
302 * ldmain.c (get_emulation): Sort -mipsNN checks in the usual
303 order, and handle (ignore) -mips32r2.
307 * ldmain.c (main): Make sure ld_sysroot is initialized.
311 * Makefile.am (eelf32iq10.c): Fix tab/whitespace mixup.
313 * Makefile.am (ldmain.o): Add @TARGET_SYSTEM_ROOT_DEFINE@.
314 (GENSCRIPTS): Add @use_sysroot@.
315 * Makefile.in: Regenerated.
316 * configure.host: Move setting of NATIVE_LIB_DIRS to...
317 * configure.tgt: ... here. Use ${target} instead of ${host}
319 * configure.in: Add --with-sysroot.
320 * configure: Regenerated.
321 * genscripts.sh: Accept use_sysroot option. Set new variables
322 NATIVE and USE_LIBPATH. Prepend "=" to directory names if
323 $use_sysroot. Don't search $tool_lib if $use_sysroot.
324 * ldfile.c (ldfile_add_library_path): Handle leading '='.
325 * ldmain.c (TARGET_SYSTEM_ROOT): Define if not defined.
326 (ld_sysroot): New variable.
327 (main): Initialize ld_sysroot.
328 * ldmain.h (ld_sysroot): New extern.
329 * emultempl/elf32.em: Use NATIVE and USE_LIBPATH instead of
330 searching $EMULATION_LIBPATH.
331 (gld${EMULATION_NAME}_add_sysroot): New function.
332 (gld${EMULATION_NAME}_check_ld_so_conf): Use it. Honor ld_sysroot.
333 (gld${EMULATION_NAME}_after_open): Likewise. Only search
334 environment variables if $NATIVE.
335 * ld.texinfo (Options): Mention "=" prefix in the description of -L.
336 * NEWS: Mention --with-sysroot.
338 * emulparams/elf32bmipn32-defs.sh: Set NATIVE and LIBPATH_SUFFIX
339 instead of setting LIB_PATH.
340 * emulparams/elf32ppc.sh: Likewise.
341 * emulparams/elf64_s390.sh: Likewise.
342 * emulparams/elf64_sparc.sh: Likewise.
343 * emulparams/elf64ppc.sh: Likewise.
344 * emulparams/elf_x86_64.sh: Likewise.
346 * emulparams/elf64_aix.sh: Add "=" prefixes to LIB_PATH.
347 * emulparams/elf64hppa.sh: Add "=" prefixes to LIB_PATH.
351 * ld/pe-dll.c (autofilter_symbollist): Add cygwin_crt0.
355 * Makefile.am (ldmain.o): Pass BINDIR.
356 * Makefile.in: Regenerated.
357 * ldmain.c (set_scripts_dir): Use make_relative_prefix for the first
362 * Makefile.am (ALL_EMULATIONS): Add eelf32iq2000.o.
363 (eelf32iq2000.c): New target.
364 * Makefile.in: Regenerate.
365 * configure.tgt: Handle iq2000-*-elf.
366 * emulparams/elf32iq10.sh: New file.
367 * emulparams/elf32iq2000.sh: New file.
368 * scripttempl/iq2000.sc: New file.
372 * pe-dll.c (autofilter_symbollist): Add do_pseudo_reloc
373 and _pei386_runtime_relocator to the exclude list.
377 * ldfile.c: Fix comment typos.
378 * ldlang.c: Likewise.
380 * pe-dll.c: Likewise.
385 * Makefile.am (ld.1): Depend on configdoc.texi
387 * Makefile.in: Regenerated.
391 * Makefile.am: Add msp430 target.
392 * configure.tgt: Likewise.
393 * Makefile.in: Regenerate.
394 * emulparams/msp430x???.sh: New files. Linker script parameters
395 for various msp430 configurations.
396 * gen-doc.texi: Enable msp430 documenation.
397 * ld.texinfo: Document msp430 sections.
398 * scripttempl/elf32msp430.sc: New file. Linker script for msp430.
399 * scripttempl/elf32msp430_3.sc: New file. Linker script for msp430.
404 * ld/config.in (HAVE_REALPATH): New entry.
405 (HAVE_SYS_STAT_H, HAVE_SYS_TYPES_H): Removed: obsolete.
409 * ld.texinfo: New win32 topics: 'symbol aliasing' and 'export dll
414 * ldmain.c (main): Init "strip_discarded".
415 * lexsup.c (OPTION_STRIP_DISCARDED): Define.
416 (OPTION_NO_STRIP_DISCARDED): Define.
417 (ld_options): Add "strip-discarded" and "no-strip-discarded".
418 (parse_args): Handle them.
422 * ld.h (struct args_type): Add new field
423 'accept_unknown_input_architecture'.
424 * ldmain.c (main): Initialise 'accept_unknown_input_architecture'
426 * ldlang.c (lang_check): Pass accept_unknown_input_architecture to
427 bfd_arch_get_compatible.
428 * ldfile.c (ldfile_try_open_bfd): Likewise.
429 * lexsup.c (ld_options): Add new command line switch
430 --accept-unknown-input-architecture and its inverse.
431 (parse_args): Handle --accept-unknown-input-architecture.
432 * ld.texinfo: Document new linker option.
433 * NEWS: Mention new linker option.
437 * ldmain.c (main): Re-order link_info initialization. Init all
442 * ld.texinfo: Clarify and extend the documentation
443 in the Machine Dependent, WIN32 section.
447 * ld.texinfo: Add win32 machine depending section.
448 * gen-doc.texi: Enable win32 machine depending section.
450 * configure.host: Add win32 library search path.
454 * ld/emultempl/pe.em (pe_find_data_imports): Don't search for data
455 import when auto-import is disabled.
459 * emultempl/pe.em (..._recognized_file): Use LD_PATHMAX+1 to
460 account for trailing '\0'.
464 * emultempl/pe.em (longopts): Duplicate entry for --compact-implib
465 so that it is not confused with -c.
470 * configure.in: Add check for realpath function.
471 * configure: Regenerate.
472 * config.in: Regenerate.
473 * aclocal.m4: Regenerate.
474 * deffile.h: Add .data field to def_file_import
476 * pe-dll.c (pe_proces_import_defs): Use .data field of
477 def_file_import structure to initialize flag_data field of
478 def_file_export structure.
479 (pe_implied_import_dll): New variables exp_funcbase and
480 [data|bss]_[start|end]. Use DLL's internal name to set dll_name,
481 not filename (which may be a symlink). Scan the sections and
482 initialize [data|bss]_[start|end]. When scanning the export
483 table, skip _nm_ symbols, and mark any symbols whose rva indicates
484 that it is in the .bss or .data sections as data.
485 * sysdep.h: Include limits.h and sys/param.h, and define
486 LD_PATHMAX as appropriate. Also define REALPATH as realpath if it
487 exists, NULL otherwise.
488 * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Call
489 pe_process_import_defs before pe_find_data_imports, so that
490 auto-import will check the virtual implib as well as "real"
492 (gld_${EMULATION_NAME}_recognized_file): Use REALPATH to follow
493 symlinks to their target; check that the target's extension is
494 .dll before calling pe_implied_import_dll(), not the filename
495 itself (which may be a symlink).
499 * emultempl/elf32.em (struct orphan_save): Add os_tail field.
500 (gld${EMULATION_NAME}_place_orphan): Re-order output_section_statement
505 * ldlang.h: Formatting.
509 * ldlang.c (init_os): Ensure sections mentioned in load_base
514 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Set
515 load_base for orphans that follow a section with load_base set.
519 * ld.texinfo: Remove the extra `;' in sample version script.
523 * configure.host: Correct dynamic-linker for powerpc64 hosts.
525 * Makefile.am (eelf32ppcwindiss.c): Correct dependencies.
526 * Makefile.in: Regenerate.
528 * ld.h, ldcref.c, ldctor.c, ldctor.h, ldemul.c, ldemul.h, ldexp.c,
529 ldexp.h, ldfile.c, ldfile.h, ldgram.y, ldlang.c, ldlang.h, ldmain.c,
530 ldmain.h, ldmisc.c, ldwrite.c, lexsup.c, mri.c, pe-dll.c, pe-dll.h,
531 emulparams/elf32b4300.sh, emultempl/aix.em, emultempl/armcoff.em,
532 emultempl/armelf.em, emultempl/armelf_oabi.em, emultempl/beos.em,
533 emultempl/elf32.em, emultempl/generic.em, emultempl/gld960.em,
534 emultempl/gld960c.em, emultempl/hppaelf.em, emultempl/linux.em,
535 emultempl/lnk960.em, emultempl/m68kcoff.em, emultempl/mipsecoff.em,
536 emultempl/mmix-elfnmmo.em, emultempl/mmixelf.em, emultempl/mmo.em,
537 emultempl/needrelax.em, emultempl/pe.em, emultempl/ppc64elf.em,
538 emultempl/sh64elf.em, emultempl/sunos.em, emultempl/ticoff.em: Replace
539 boolean with bfd_boolean, true with TRUE, false with FALSE. Simplify
540 comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
544 * configure.host: Fix generic FreeBSD configuration entry.
548 * ld.texinfo: Add the missing `;' to sample version scripts.
552 * emulparams/elf64ppc.sh (SEGMENT_SIZE): Don't define.
556 * ldmain.c (main): Make runtime relocs disabled by default. Remove
557 assignment which has no effect.
558 * pe-dll.h (pe_create_import_fixup): Change prototype.
559 * pe-dll.c (make_runtime_pseudo_reloc): New function.
560 (pe_create_runtime_relocator_reference): Ditto.
561 (pe_create_import_fixup): Handle relocations with non-zero addends.
562 * emultempl/pe.em: Add options --enable-runtime-pseudo-reloc and
563 --disable-runtime-pseudo-reloc.
564 (make_import_fixup): Handle relocations with non-zero addends. Create
565 an external reference to _pei386_runtime_relocator symbol if at least
566 one pseudo reloc was created.
567 * ld.texinfo: Document --enable-runtime-pseudo-reloc and
568 --disable-runtime-pseudo-reloc options.
572 * ldlang.c (lang_add_section): Discard debugging sections that have
573 been marked SEC_EXCLUDE.
577 * configure.in (ALL_LINGUAS): Add da.
578 * configure: Regenerate.
579 * po/da.po: New Danish translation.
583 * emultempl/ppc64elf.em (ppc_before_allocation): New function.
584 (LDEMUL_BEFORE_ALLOCATION): Define.
585 (gld${EMULATION_NAME}_finish): Run discard_info for relocatable
587 * emultemp/hppaelf.em ((gld${EMULATION_NAME}_finish): Likewise.
591 * configure.tgt (LIB_PATH): Default to searching w32api directory under
596 * pe-dll.c (autofilter_liblist): add libmingwex and libgcj to the list
597 of restricted auto-export libs.
601 * pe-dll.c (autofilter_liblist): Generalize library names to catch more
602 creative library naming instances like, e.g., libstdc++-2.a.
606 * emulparams/elf32btsmipn32.sh (TEXT_DYNAMIC): Define.
607 * emulparams/elf64btsmip.sh (TEXT_DYNAMIC): Likewise.
611 * deffilep.y (def_lex): Handle '@' as first character of an ID.
612 * pe-dll.c (auto-export): Filter on "_imp_" prefix, not "_imp__".
613 (make_one): Don't prefix decorated fastcall symbols with '_'.
614 (pe_process_import_defs): Likewise.
615 * emultempl/pe.em (pe_fixup_stdcalls): Don't fixup fastcall
616 symbols to cdecl names or vise-versa.
620 * pe-dll.c (process_def_file): Handle fastcall symbols when
621 generating undecorated aliases. Don't prefix decorated fastcall
623 (fill_exported_offsets): Don't prefix decorated fastcall symbols
628 * emultempl/aix.em: Use include <> for generated headers.
629 * emultempl/beos.em: Likewise.
630 * emultempl/elf32.em: Likewise.
631 * emultempl/pe.em: Likewise.
632 * ldctor.c: Likewise.
634 * ldfile.c: Likewise.
635 * ldlang.c: Likewise.
638 * ldmain.c: Likewise.
639 * ldmisc.c: Likewise.
640 * ldwrite.c: Likewise.
641 * lexsup.c: Likewise.
643 * pe-dll.c: Likewise.
647 * emultempl/elf32.em (place_orphan): Don't put non-allocated .rel*
648 sections into .rel{,a}.dyn.
652 * lexsup.c (OPTION_NO_OMAGIC): Define.
653 (ld_options): Add "no-omagic" option.
654 (parse_args): Parse --no-omagic.
655 * ld.texinfo: Document --no-omagic.
656 * NEWS: Mention new option.
660 * scripttempl/pe.sc (__RUNTIME_PSEUDO_RELOC_LIST__,
661 __RUNTIME_PSEUDO_RELOC_LIST_END__): Add only when relocating.
665 * emulparams/elf32bmipn32-defs.sh: Set ELFSIZE according to
666 emulation name. Set LIB_PATH only for native tools, and
667 search the ABI-specific versions of NATIVE_LIB_DIRS before the
668 .../lib variants, not instead of them. Mostly copied from...
669 * emulparams/elf32ppc.sh: ... here. Fixed typo.
670 * emulparams/elf64bmip-defs.sh: Backed out.
671 * emulparams/elf64bmip.sh: Import elf32bmipn32-defs.sh again.
672 * emulparams/elf64btsmip.sh: Likewise.
673 (DATA_ADDR, NONPAGED_TEXT_START_ADDR, SHLIB_TEXT_START_ADDR,
674 TEXT_DYNAMIC): Removed.
678 * emulparams/elf32bmipn32-defs.sh (LIB_PATH): Set to /usr/lib32.
679 (GENERATE_SHLIB_SCRIPT): Set to yes.
680 (EXECUTABLE_SYMBOLS, WRITABLE_RODATA): Moved to...
681 * emulparams/elf32bmipn32.sh: here.
682 (GENERATE_SHLIB_SCRIPT): Deleted as redundant.
683 * emulparams/elf32btsmipn32.sh: Delete redundant unsets.
684 * emulparams/elf64bmip-defs.sh: New file. Extend
685 elf32bmipn32-defs.sh by overiding ELFSIZE and LIB_PATH.
686 * emulparams/elf64bmip.sh: Bring in definitions from
688 (ELFSIZE, GENERATE_SHLIB_SCRIPT, LIB_PATH): Delete redundant
690 (WRITABLE_RODATA): Moved from elf32bmipn32-defs.sh.
691 * emulparams/elf64btsmip.sh: Bring in definitions from
693 (ELFSIZE, GENERATE_SHLIB_SCRIPT): Delete, redundant.
694 (EXECUTABLE_SYMBOLS, WRITABLE_RODATA): Delete redundant unsets.
698 * configure.tgt (s390x-*-linux*): Add elf_s390 emulation.
699 (s390-*-linux*): Add elf64_s390 emulation if want64.
700 * emulparams/elf64_sparc.sh (LIB_PATH): Update to match 2002-05-22
701 genscript.sh changes.
702 * emulparams/elf_x86_64.sh (LIB_PATH): Likewise.
703 * emulparams/elf64_s390.sh (LIB_PATH): Set up native 64 bit dirs.
707 * ldlang.c (load_symbols): Revert last change.
711 * ldlang.c (load_symbols): Don't call bfd_link_add_symbols when
713 (lang_reasonable_defaults): Don't compare against false.
714 (size_input_section): Likewise.
715 (lang_size_sections_1): Likewise.
716 (lang_do_assignments): Likewise.
717 (lang_add_output): Likewise.
719 * Makefile.am: Run "make dep-am".
720 * Makefile.in: Regenerate.
721 * ldver.c: #include "bfdver.h".
725 * scripttempl/elfm68hc11.sc: Use KEEP for .vectors, .installN,
727 * scripttempl/elfm68hc12.sc: Likewise.
731 * pe-dll.c (make_import_fixup_mark): Avoid type-punned pointer.
733 * ldgram.y (memory_spec): Provide empty action.
734 (section <NAME>): Likewise.
738 * ldfile.c (ldfile_try_open_bfd): When searching skip linker scripts if
739 they have OUTPUT_FORMAT not matching actual output format.
740 * ldlang.c (lang_get_output_target): New function.
741 (open_output): Use it.
742 * ldlang.h (lang_get_output_target): New prototype.
746 * emultempl/elf32.em (output_rel_find): Prefer .rel script sections
747 when orphan is .rel, .rela when orphan is .rela.
748 (gld${EMULATION_NAME}_place_orphan): Handle combreloc .rel* case
749 first. Remove outsecname var.
754 * Makefile.am: Add eshelf32_linux.o and
755 eshlelf32_linux.o, new emulations for sh64 Linux.
756 * Makefile.in: Regenerate.
757 * configure.tgt: Add sh64eb-*-linux* and sh64-*-linux* emulations.
758 * emulparams/shelf32_linux.sh: New file.
759 * emulparams/shlelf32_linux.sh: New file.
763 * ldlang.c (lang_file_exist): Removed.
764 (new_afile): Revert the last change.
765 * ldlang.h (lang_file_exist): Removed.
766 * lexsup.c (parse_args): Revert the last change.
770 * pe-dll.cc (autofilter_symbolprefixlist): Don't re-export
772 (make_one): Create _nm_<symbol> for data only.
776 * ldlang.c (lang_file_exist): New function.
777 (new_afile): Abort if the filename to be added matches the linker
779 * ldlang.h: Add prototype for lang_file_exist.
780 * lexsup.c (parse_args): Abort if the output filename matches
781 one of the input filenames.
785 * emulparams/elf64ppc.sh (MAXPAGESIZE): Set to 0x10000.
789 * scripttempl/elfd30v.sc: Order reloc sections placing .plt last.
790 * scripttempl/elfm68hc11.sc: Likewise.
791 * scripttempl/elfm68hc12.sc: Likewise.
793 * emultempl/elf32.em (output_rel_find): Always place orphan loadable
794 reloc sections just before .rel.plt/.rela.plt.
795 (gld${EMULATION_NAME}_place_orphan <.rel>): Remove combreloc code.
796 Only put loadable reloc sections in hold_rel.
800 * emulparams/elf32ppc.sh (OTHER_GOT_RELOC_SECTIONS): New.
805 * scripttempl/sh.sc: Handle .eh_frame* and .gcc_exc*
810 * genscripts.sh (SEGMENT_SIZE): Use MAXPAGESIZE before
812 * scripttempl/elf.sc (DATA_SEGMENT_ALIGN): Incorporate
813 SEGMENT_SIZE alignment.
814 * emulparams/elf64ppc.sh (DATA_ADDR): Delete.
815 (SEGMENT_SIZE): Define.
817 * ldexp.c (fold_unary): New. Split out from exp_fold_tree.
818 (fold_binary): Correct abs - non-abs case.
819 (fold_trinary): New. Split out from exp_fold_tree.
823 * emulparams/elf64ppc.sh (DATA_ADDR): Define.
824 * emulparams/elf64_aix.sh (DATA_ADDR): Don't use a fixed address
825 for start of .data, instead align up to 256M boundary.
826 * scripttempl/aix.sc: Likewise.
830 * scripttempl/i386go32.sc: Handle bss unique sections.
834 * ldmisc.c (vfinfo <%C,%D,%G>): Always output bfd, section and offset.
838 * emulparams/elf32bmipn32-defs.sh: New file.
839 * emulparams/elf32bmipn32.sh: Use elf32bmipn32-defs.sh.
840 * emulparams/elf32btsmipn32.sh: Likewise.
841 * emulparams/elf64bmip.sh: Likewise.
842 * emulparams/elf64btsmip.sh: Likewise.
846 * emulparams/elf_i386_fbsd.sh: Set OUTPUT_FORMAT to
848 * emulparams/elf64alpha_fbsd.sh: Set OUTPUT_FORMAT to
853 * NEWS: New TI port supports both C4x and C3x series of DSPs.
855 * po/tr.po: Updated Turkish translation.
859 * configure.tgt (h8300-*-hms*, h8500-*-hms*): Restore.
863 * scripttempl/v850.sc: Add EXTERN references to __ctbpm __gp and
865 * emulparams/v850.sh (TEMPLATE_NAME): Define.
869 * scripttempl/elfd10v.sc (MEMORY): Remove UNIFIED, it is not
870 used. Change INSN to start at 0x01000000 and extend for
871 256K (ignoring holes). Start the STACK on a word aligned
873 (.rodata): Start it at the READONLY_START_ADDR.
877 * emulparams/elf32ppc.sh (ARCH): Set to "powerpc:common".
881 * Makefile.am: Add etic4xcoff.o in ALL_EMULATIONS list and
882 added makefile targets for this file.
883 * Makefile.in: Regenerate.
884 * configure.tgt: Added tic4x-coff and c4x-coff emulations.
885 * NEWS: Mention new port.
889 * emulparams/tic3xcoff.sh: New file.
890 * emulparams/tic4xcoff.sh: New file.
891 * scripttempl/tic3xcoff.sc: New file.
892 * scripttempl/tic4xcoff.sc: New file.
896 * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Replace strtoll,
897 strtoul and strtoull with bfd_scan_vma.
898 (gld${EMULATION_NAME}_read_file): Likewise.
902 * configure.tgt: Remove h8[35]00-*-hms*. Add h8500-*-rtems*.
906 * scripttempl/pe.sc: Handle .rdata_runtime_pseudo_reloc sections.
907 Add symbols for application to access them.
911 * emultempl/armelf.em: Revert this patch, it is not needed.
917 * configure.in: added --with-lib-path argument to ld's configure
919 * ld/NEWS: Document new switch.
920 * ld/README: Mention new switch.
921 * configure: Regenerate.
922 * Makefile.in: Regenerate.
927 * Makefile.in (LIB_PATH): Make configurable.
928 (GENSCRIPTS): Set LIB_PATH in environment.
929 * configure.in: Substitute LIB_PATH.
933 * emultempl/armelf.em: Include elf-bfd.h and elf/arm.h.
934 (arm_elf_finish): Set the last bit of DT_INIT and DT_FINI
935 depending on the type of the function.
936 (arm_elf_convert_thumb_symbol_to_address): New function.
940 * Makefile.am: Add esh{l}elf_nto.o files.
941 * Makefile.in: Regenerate.
942 * configure.tgt: Add support for sh-**-nto* targets.
943 * emulparams/shelf_nto.sh: New file.
944 * emulparams/shlelf_nto.sh: New file.
948 * ldlang.c (offsetof): Define if not defined.
952 * configure.tgt: Always enable 64bit emulations for 32bit
957 * emulparams/elf32_dlx.sh (TARGET_PAGE_SIZE): Set to 1.
958 (MAXPAGESIZE): Set to 1.
960 * ld.h (ALIGN_N): Delete.
961 * ldexp.h (align_n): Declare.
962 * ldexp.c (align_n): New function.
963 (fold_binary): Use align_n instead of ALIGN_N.
964 (exp_fold_tree): Likewise.
965 * ldlang.c (lang_size_sections_1): Likewise.
966 (lang_one_common): Likewise.
967 * ld.texinfo (ALIGN): Remove power of 2 restriction.
971 * configure.tgt: Add support for powerpc{le}-*-nto* targets.
972 * Makefile.am: Add eelf32{l}ppcnto.o files.
973 * Makefile.in: Regenerate.
974 * emulparams/elf32lppcnto.sh: New file.
975 * emulparams/elf32ppcnto.sh: New file.
979 * ld.texinfo: Document --no-undefined-version.
981 * ldlang.c (lang_new_vers_pattern): Set the `symver' and
982 `script.' fields to 0.
984 * ldmain.c (main): Initialize the allow_undefined_version to
987 * lexsup.c (OPTION_NO_UNDEFINED_VERSION): New.
988 (ld_options): Add --no-undefined-version.
989 (parse_args): Support OPTION_NO_UNDEFINED_VERSION.
993 * emultempl/armelf.em (arm_elf_before_allocation): Only search for
994 an interworking bfd if there are input bfds. (107501)
998 * emultempl/aix.em (gld*_before_parse): Set default arch. Reverts
1003 * emulparams/armelf.sh: Revert previous delta.
1004 * scripttempl/elf.sc: Revert previous delta.
1008 * configure.tgt (powerpc*-*-linux*): Enable elf64ppc for
1009 --enable-64-bit-bfd.
1013 * configure.tgt: Enable x86-64 emulation for Linux/i386 if
1014 64bit BFD is selected.
1018 * configure.tgt: Enable 64bit emulations for 32bit Linux/mips
1019 if 64bit BFD is selected.
1023 * emultempl/netbsd.em (LDEMUL_BEFORE_PARSE): New file to custom set
1024 link_info.common_skip_ar_aymbols.
1025 * emulparams/ns32knbsd.sh (EXTRA_EM_FILE): Refer to extra file.
1027 * ldmain.c (main): Initialize new field
1028 link_info.common_skip_ar_aymbols.
1032 * emulparams/armelf.sh (OTHER_PLT_SECTIONS): New variable. Set it
1034 * scripttempl/elf.sc: Comment it. Use the same way as ${PLT} is
1039 * NEWS: Retroactively add entry for Lars Brinkhoff's contribution
1040 of the PDP-11 and 2.11BSD a.out support.
1044 * Makefile.am (eelf32btsmipn32.o, eelf32ltsmipn32.o): New emulations
1045 for n32 ABI support.
1046 * Makefile.in: Regenerate.
1047 * configure.tgt (mips64*el-*-linux-gnu*,mips64*-*-linux-gnu*): Add
1048 n32 ABI emulations for these 64 bit targets.
1049 * emulparams/elf32bmipn32.sh: Expand comment.
1050 * emulparams/elf32btsmipn32.sh: New file, for traditional big endian
1052 * emulparams/elf32ltsmipn32.sh: Likewise for little endian.
1056 * configure.tgt: Add support for arm-*-nto target.
1057 * Makefile.am: Add earmnto.o file.
1058 * Makefile.in: Regenerate.
1059 * NEWS: Mention port of ARM support to QNX.
1060 * emulparams/armnto.sh: New file.
1064 * ldlang.c (lang_add_section): Don't turn .tbss into normal sections
1065 for relocatable link.
1066 (lang_size_sections_1): Don't make .tbss zero size for relocatable
1071 * emulparams/elf32frv.sh (OTHER_RELOCATING_SECTIONS): Delete.
1076 * po/sv.po: Updated Swedish translation.
1077 * po/es.po: Updated Spanish translation.
1078 * po/fr.po: Updated French translation.
1082 * po/sv.po: Updated Swedish translation.
1083 * po/es.po: Updated Spanish translation.
1087 * po/fr.po: Updated French translation.
1091 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
1092 bomb on /DISCARD/ input section.
1093 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
1094 * emultempl/mmo.em (mmo_place_orphan): Likewise.
1098 * emultempl/mmo.em (mmo_place_orphan): Handle case of no .text
1106 * configure.tgt: Add support for ip2k-elf.
1107 * Makefile.am: Add support for ip2k-elf.
1108 * Makefile.in: Regenerate.
1109 * emulparams/elf32ip2k.sh: New file.
1110 * scripttempl/ip2k.sc: New file
1111 * NEWS: Mention support for new port.
1115 * NEWS: Add 'Changes in 2.13'.
1119 * ld.texinfo: Document a .symver takes precedence over a
1124 * emulparams/elf64ppc.sh (ARCH): Set to powerpc:common64.
1125 (COMMONPAGESIZE): Define.
1129 * emulparams/hppanbsd.sh: Remark that hppaobsd.sh references this file.
1133 * configure.tgt: Add support for alpha-*-openbsd*, hppa-*-openbsd*,
1134 powerpc-*-openbsd* and sparc64-*-openbsd*.
1135 * Makefile.am (ALL_EMULATIONS): Add ehppaobsd.o.
1136 * Makefile.in: Regenerate.
1137 * emulparams/hppaobsd.sh: New file.
1141 * ldlang.c (print_wild_statement): Fix output formatting.
1145 * ldlang.c: (strip_excluded_output_sections): New function.
1146 (lang_process): Call it.
1147 (lang_size_sections_1): Revert 2002-06-10 change.
1151 * Makefile.am (check-DEJAGNU): Revert 2002-06-25 change.
1153 * Makefile.in: Regenerate.
1157 * ldfile.c (ldfile_try_open_bfd): Formatting.
1159 * ldmisc.c (demangle): Move so that it doesn't intrude between
1160 vfinfo comment and body. Add comment.
1164 * emulparams/vax.sh (OUTPUT_FORMAT): Use a.out-vax-bsd format.
1168 * ldlang.h (entry_sym): Make it a struct bfd_sym_chain.
1169 * ldlang.c (entry_sym): Likewise.
1170 (ldlang_undef_chain_list_type): Likewise.
1171 (lang_finish): Adjust references to entry_symbol.
1172 (lang_add_entry): Likewise.
1173 (lang_gc_sections): Use link_info.gc_sym_list.
1174 (lang_process): Set link_info.gc_sym_list.
1175 * ldlex.l: Include bfdlink.h.
1176 * ldmain.c (main): Init link_info.gc_sym_list.
1177 * emultempl/aix.em: Adjust references to entry_symbol.
1178 * emultempl/armcoff.em: Likewise.
1179 * emultempl/armelf.em: Likewise.
1180 * emultempl/pe.em: Likewise.
1181 * emultempl/ppc64elf.em (ppc_after_open): New function.
1182 (LDEMUL_AFTER_OPEN): Define.
1183 * emulparams/elf64ppc.sh: KEEP .opd sections.
1187 * emulparams/m68hc12elfb.sh (EEPROM_MEMORY): Define.
1188 * emulparams/m68hc11elfb.sh (EEPROM_MEMORY): Define.
1189 * emulparams/m68hc11elf.sh (EEPROM_SIZE): Define.
1190 (EEPROM_START_ADDR): Define.
1191 (EEPROM_MEMORY): Define.
1192 * emulparams/m68hc12elf.sh: Likewise.
1193 * scripttempl/elfm68hc11.sc: Handle .eeprom section; handle .softregs
1194 section to put soft registers in .page0.
1195 * scripttempl/elfm68hc12.sc: Likewise but put soft registers in bss.
1199 * emulparams/hppa64linux.sh (OTHER_GOT_RELOC_SECTIONS): Add rela.opd
1200 section. Add ${RELOCATING-0}.
1204 * emulparams/shelf.sh (STACK_ADDR): Don't define.
1205 (OTHER_SECTIONS): Define.
1206 * emulparams/shelf_nbsd.sh ((STACK_ADDR): Don't undef.
1207 (OTHER_SECTIONS): Undef.
1211 * ldmisc.c (demangle): Restore dots stripped from sym name.
1215 * Makefile.am (check-DEJAGNU): Set LC_ALL=C and export it.
1216 * Makefile.in: Regenerated.
1220 * ld.texinfo (Bug Reporting): Update text to suggest a limit on
1221 the size of attached object files, to allow make the object files
1222 available via FTP or HTTP and to mention that the mail will be
1223 sent to a mailing list.
1227 * ld/configure.host (romp): Drop support.
1231 * emultempl/mipself.em (mips_elf${ELFSIZE}_check_sections): Check
1232 section flags for SEC_DATA, rather than for SEC_CODE being unset.
1236 * emultempl/mipself.em (mips_elf${ELFSIZE}_check_sections): Fix
1237 format specifier used to print BFD name.
1241 From Catherine Moore, Michael Meissner, Jim Blandy:
1242 * emulparams/elf32frv.sh: New file.
1243 * configure.tgt: Support frv-*-*.
1244 * Makefile.am (ALL_EMULATIONS): Add eelf32frv.o.
1245 (eelf32frv.c): New target.
1249 * emultempl/elf32.em: gld*_get_script: Check for
1250 GENERATE_COMBRELOC_SCRIPT.
1251 * scripttempl/elfd10v.sc : Fix STACK and INSN.
1252 * emulparams/d10velf.sh : Fix TEXT_START_ADDR.
1256 * configure.tgt: Add support for sh[1234]*le*-*-elf, sh[1234]*-*-elf.
1260 * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Return
1261 false if xvec doesn't match.
1265 * ldlang.c (lang_size_sections_1): Skip removed output sections.
1269 * ldexp.c: Replace CONST with const.
1270 * ldfile.c: Likewise.
1271 * ldfile.h: Likewise.
1272 * ldlex.l: Likewise.
1274 * pe-dll.h: Likewise.
1278 * emultempl/ppc64elf.em (new_vers_pattern): Warning fix.
1282 * ld/ldmain.c (main): initialize link_info.pei386_auto_import
1283 to -1 == implicit enable.
1284 * ld/emultempl/pe.em (gld_${EMULATION_NAME}_before_parse):
1285 initialize link_info.pei386_auto_import to -1 == implicit
1287 (gld_${EMULATION_NAME}_parse_args): When processing
1288 --enable-auto-import and --disable-auto-import options, use
1289 '1' and '0' instead of 'true' and 'false'.
1290 (pe_find_data_imports): Only issue message about auto-import
1291 when the feature is implicitly enabled. Downgrade message to
1292 informational instead of warning.
1296 * scripttempl/elf.sc (.tbss): Fix mismatched parentheses/braces.
1300 * configure.host (hppa*64*-*-hpux11*): Define NATIVE_LIB_DIRS,
1301 HOSTING_CRT0 and HOSTING_LIBS.
1305 * configure.tgt (shle*-*-elf*, sh64le-*-elf*): New configurations.
1309 * emulparams/ns32knbsd.sh (EXECUTABLE_SYMBOLS): Set _DYNAMIC to 0.
1310 (NONPAGED_TEXT_START_ADDR): Set to 0x1000.
1314 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Place
1315 SEC_EXCLUDE sections when doing a relocatable link.
1319 * Makefile.am (ALL_EMULATIONS): Add eshelf32_nbsd.o,
1320 eshlelf32_nbsd.o, eshelf64_nbsd.o, and eshlelf64_nbsd.o.
1321 (eshelf32_nbsd.c, eshelf64_nbsd.c, eshlelf32_nbsd.c)
1322 (eshlelf64_nbsd.c): New rules.
1323 * Makefile.in: Regenerate.
1324 * configure.tgt (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
1325 (sh64-*-netbsd*): New targets.
1326 * emulparams/shelf32_nbsd.sh: New file.
1327 * emulparams/shelf64_nbsd.sh: New file.
1328 * emulparams/shlelf32_nbsd.sh: New file.
1329 * emulparams/shlelf64_nbsd.sh: New file.
1333 * ldlang.c (section_already_linked): Call bfd_discard_group. Typo fix.
1337 * scripttempl/avr.sc: Changes to support current GCC and avr-libc,
1338 C++ constructors/destructors, loosely based on the m68hc11 port.
1342 * Makefile.in: Regenerate.
1343 * aclocal.m4: Regenerate.
1344 * config.in: Regenerate.
1345 * configure: Regenerate.
1349 * Makefile.am (ALL_EMULATIONS): Add ei386nto.o.
1350 (ei386nto.c): Add rule.
1351 * Makefile.in: Regenerate.
1352 * configure.tgt: Add i[3456]86-*-nto-qnx*.
1353 * emulparams/i386nto.sh: New file.
1357 * NEWS: Add entry for VAX ELF support.
1362 * Makefile.am (ALL_EMULATIONS): Add eelf32vax.o and evaxnbsd.o.
1364 (evaxnbsd.c): New rules.
1365 * Makefile.in: Regenerate.
1366 * configure.tgt (vax-*-netbsdelf*)
1368 (vax-*-netbsd*): New targets.
1369 * emulparams/elf32vax.sh: New file.
1370 * emulparams/vaxnbsd.sh: New file.
1374 * emultempl/armelf.em (arm_elf_after_open): Don't determine
1375 bfd_for_interwork, instead add glue sections to each input bfd.
1376 (bfd_for_interwork): New global.
1377 (arm_elf_set_bfd_for_interworking): New function.
1378 (arm_elf_before_allocation): Use it.
1382 * Makefile.am: Add DLX make target.
1383 * configure.tgt: Add DLX configuration.
1384 * Makefile.in: Regenerate.
1385 * emulparams/elf32_dlx.sh: New file
1386 * scripttempl/dlx.sc: New file
1390 * Makefile.am (eelf_i386_chaos): Use elf_chaos.sc script.
1391 * Makefile.in: Regenerate.
1392 * emulparams/elf_chaos.sh: Use elf_chaos script.
1393 * scripttempl/elf_chaos.sc: New file.
1397 * ldlang.c (lang_size_sections_1): Move check for conflicting load
1398 addresses and regions from here...
1399 (lang_get_regions): ...to this new function.
1400 (lang_leave_output_section_statement): Use lang_get_regions.
1401 (lang_leave_overlay): Likewise.
1402 * mri.c (mri_draw_tree): Pass null as last argument to
1403 lang_leave_output_section_statement.
1404 * emultempl/elf32.em (gld*_place_orphan): Likewise.
1405 * emultempl/mmo.em (mmo_place_orphan): Likewise.
1406 * emultempl/pe.em (gld*_place_orphan): Likewise.
1410 * configure.tgt: Use ns32k-*-netbsd* instead of ns32k-pc532-netbsd*.
1414 * ldemul.c: Fix formatting.
1415 * ldfile.c: Likewise.
1416 * pe-dll.c: Likewise.
1417 * pe-dll.h: Likewise.
1421 * ldlang.c (lang_process): Formatting, grammar.
1423 * ldlex.l: Use #include "" instead of <> for local header files.
1427 * configure.tgt: Add a target for i386-netbsdpe.
1431 * scripttempl/elf.sc: Add .rel{,a}.t{bss,data}, .tdata and .tbss.
1432 * ldlang.c (lang_add_section): Set SEC_THREAD_LOCAL for
1433 output section if necessary. Handle .tbss.
1434 (lang_size_sections): Clear _raw_size for .tbss section
1435 (it allocates space in PT_TLS segment only).
1436 * ldwrite.c (build_link_order): Build link order for .tbss too.
1440 * configure.in: Correct spelling of AC_PREREQ.
1444 * pe-dll.c (autofilter_liblist): Add more system libs excluded by
1446 (autofilter_objlist): Add crtbegin.o, crtend.o.
1450 * emultempl/pe.em (OPTION_EXCLUDE_LIBS): Add new define.
1451 (longopts): Add new option --exclude-libs.
1452 (gld_${EMULATION_NAME}_list_options): Give quick help about it.
1453 (gld_${EMULATION_NAME}_parse_args): Use it.
1454 * pe-dll.h (pe_dll_add_excludes): Add second param to prototype.
1455 * pe-dll.c (exclude_list_struct): Add field type to distinguish symbols
1456 from whole archives.
1457 (pe_dll_add_excludes): Set excludes->type.
1458 (auto_export): Add new variable libname and set to archive basename if
1459 abfd. Use it when filtering default and user-specified libarary
1460 excludes. Let string "ALL" mean all libs when filtering user-specified
1462 * ld.texinfo: Document --exclude-libs.
1466 * ldemul.c (ldemul_new_vers_pattern): New function.
1467 * ldemul.h (ldemul_new_vers_pattern): Declare.
1468 (struct ld_emulation_xfer_struct): Add new_vers_pattern.
1469 * ldlang.c (lang_new_vers_pattern): Call ldemul_new_vers_pattern.
1470 * emultempl/ppc64elf.em (dotsyms): New static var.
1471 (gld${EMULATION_NAME}_new_vers_pattern): New function.
1472 (LDEMUL_NEW_VERS_PATTERN): Define.
1473 (PARSE_AND_LIST_PROLOGUE): Add OPTION_DOTSYMS, OPTION_NO_DOTSYMS.
1474 (PARSE_AND_LIST_LONGOPTS): Likewise.
1475 (PARSE_AND_LIST_ARGS_CASES): Handle them.
1476 * emultempl/aix.em (ld_${EMULATION_NAME}_emulation): Update
1478 * emultempl/armcoff.em: Likewise.
1479 * emultempl/armelf_oabi.em: Likewise.
1480 * emultempl/beos.em: Likewise.
1481 * emultempl/elf32.em: Likewise.
1482 * emultempl/generic.em: Likewise.
1483 * emultempl/gld960.em: Likewise.
1484 * emultempl/gld960c.em: Likewise.
1485 * emultempl/linux.em: Likewise.
1486 * emultempl/lnk960.em: Likewise.
1487 * emultempl/m68kcoff.em: Likewise.
1488 * emultempl/mipsecoff.em: Likewise.
1489 * emultempl/pe.em: Likewise.
1490 * emultempl/sunos.em: Likewise.
1491 * emultempl/ticoff.em: Likewise.
1492 * emultempl/vanilla.em: Likewise.
1496 * genscripts.sh (LIB_PATH): For native targets, concatenate $libdir
1497 and $NATIVE_LIB_DIRS. Add $tool_lib before other libs.
1498 (LIB_SEARCH_DIRS): No need to use "tr".
1499 (COMPILE_IN): Only set for native targets.
1500 * configure.host (NATIVE_LIB_DIRS): Specify all native search dirs
1501 here, rather than adding lib:/usr/lib:/usr/local/lib in genscripts.sh.
1502 * configure.tgt (powerpc*): Set tdir_*.
1503 (powerpcle*): Correct targ_extra_emuls.
1504 * emulparams/elf32ppc.sh (LIB_PATH): Set up native 64 bit dirs.
1505 * emulparams/elf64ppc.sh (LIB_PATH): Likewise.
1509 * emultempl/pe.em (set_pe_subsystem): Don't set "cmdline" when
1510 calling lang_add_entry.
1514 * emultempl/elf32.em (gld${EMULATION_NAME}_parse_args): Handle
1516 (gld${EMULATION_NAME}_list_options): Add "-z muldefs".
1518 * ld.texinfo: Updated for --allow-multiple-definition and
1521 * ldmain.c (main): Initialize the allow_multiple_definition
1524 * lexsup.c (OPTION_ALLOW_MULTIPLE_DEFINITION): New.
1525 (ld_options): Add --allow-multiple-definition.
1526 (parse_args): Support OPTION_ALLOW_MULTIPLE_DEFINITION.
1530 * Makefile.am (ALL_EMULATIONS): Add earmelfb_nbsd.o.
1531 (earmelfb_nbsd.c): New rule.
1532 * Makefile.in: Regenerate.
1533 * configure.tgt (armeb-*-netbsdelf*): New target.
1534 (arm-*-netbsdelf*): Add armelfb_nbsd to targ_extra_emuls.
1535 (arm-*-netbsd*): Likewise.
1536 * emulparams/armelfb_nbsd.sh: New file.
1540 * emultempl/aix.em (gld*_parse_args): Add -bnortl and -bnortllib
1545 * Makefile.am: Add new emulations avr1, avr2, avr3, avr4, avr5.
1546 * Makefile.in: Regenerate.
1547 * configure.tgt (avr-*-*): Add avr[1-5] to targ_extra_emuls.
1551 * emulparams/avr1.sh: New file.
1552 * emulparams/avr2.sh: New file.
1553 * emulparams/avr3.sh: New file.
1554 * emulparams/avr4.sh: New file.
1555 * emulparams/avr5.sh: New file.
1556 * scripttempl/avr.sc: New file.
1560 * ldlang.c (section_already_linked): Call bfd_link_just_syms.
1561 (lang_place_orphans): Abort if just_syms_flag.
1565 * emultempl/aix.em: (gld*_set_output_arch): New function. Use
1566 architecture and machine information in the output bfd.
1567 (gld*_before_parse): Remove old arch and machine code.
1568 (choose_target): Rename to gld*_choose_target.
1569 (rtld): Change type to int.
1570 * ldfile.c (ldfile_try_open_bfd): Disable compatiblity check for
1571 objects in XCOFF archives.
1572 * ldfile.h: Update copyright date.
1576 * ldmain.c (main): Enable -z combreloc by default.
1580 * Makefile.am: Honour DESTDIR.
1581 * Makefile.in: Regenerate.
1585 * ldlang.h (lang_output_section_statement_type): Add update_dot_tree.
1586 (lang_enter_overlay): Remove the last two parameters.
1587 (lang_leave_overlay): Take them here instead.
1588 * ldgram.y (memspec_at_opt): Set $$ to null if no region is given.
1589 (section): Pass LMA and crossref flag to lang_leave_overlay rather
1590 than lang_enter_overlay.
1591 * ldlang.c (lang_memory_region_lookup): Return null for null names.
1592 (lang_output_section_statement_lookup): Initialize update_dot_tree.
1593 (lang_size_sections_1): Evaluate it.
1594 (lang_leave_output_section_statement): Rework LMA lookup.
1595 (overlay_lma, overlay_nocrossrefs): Remove.
1596 (lang_enter_overlay): Remove LMA and crossref arguments.
1597 (lang_enter_overlay_section): Don't set the LMA here.
1598 (lang_leave_overlay): Take LMA and crossref arguments. Move the '.'
1599 assignment to the last section's update_dot_tree. Unconditionally
1600 use the load and run-time regions specified in the OVERLAY statement.
1601 Likewise the first section's LMA. Only set the other sections' LMAs
1602 when no load region is given.
1606 * po/sv.po: New translation.
1610 * emultempl/hppaelf.em (build_section_lists): New function.
1611 (gld${EMULATION_NAME}_finish): Call elf32_hppa_setup_section_lists
1612 and build_section_lists.
1616 * ld.h: Fix formatting.
1617 * ldexp.c: Likewise.
1618 * ldfile.c: Likewise.
1619 * ldlang.c: Likewise.
1620 * ldmain.c: Likewise.
1621 * lexsup.c: Likewise.
1622 * pe-dll.c: Likewise.
1626 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation):
1627 Adjust for ppc64_elf_set_toc change. #include libbfd.h.
1628 (build_section_lists): Do output_section tests here.
1632 * emultempl/aix.em : (gld*_parse_arge): Formatting changes.
1636 Long branch stubs, multiple stub sections.
1637 * emultempl/ppc64elf.em: Include ldctor.h.
1638 (stub_file): New var.
1639 (group_size): New var.
1640 (ppc_create_output_section_statements): New function.
1641 (struct hook_stub_info): New.
1642 (hook_in_stub): New function.
1643 (ppc_add_stub_section): New function.
1644 (ppc_layout_sections_again): New function.
1645 (build_section_lists): New function.
1646 (gld${EMULATION_NAME}_finish): Rewrite.
1647 (real_func): New var.
1648 (ppc_for_each_input_file_wrapper): New function.
1649 (ppc_lang_for_each_input_file): New function.
1650 (lang_for_each_input_file): Define.
1651 (PARSE_AND_LIST_PROLOGUE): Define.
1652 (PARSE_AND_LIST_LONGOPTS): Define.
1653 (PARSE_AND_LIST_OPTIONS): Define.
1654 (PARSE_AND_LIST_ARGS_CASES): Define.
1655 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
1659 * emultempl/aix.em (gld*_parse_arge, gld*_before_allocation): Add
1660 -blibpath, -bnolibpath support.
1664 * Makefile.am (ALL_EMULATIONS): Add elf32ppcwindiss.o.
1665 (eelf32ppcwindiss.c): New target.
1666 * Makefile.in: Regenerated.
1667 * configure.tgt: Add support for powerpc-*-windiss.
1668 * emulparams/elf32ppcwindiss.sh: New file.
1672 * ldlang.c (print_assignment): Update print_dot for assignments to ".".
1673 * ldexp.c (exp_print_token): Add "infix_p" argument.
1674 (exp_print_tree): Update accordingly.
1678 * Makefile.am (mpw): New maintainer mode rule to make mpw-*.c files.
1679 * Makefile.in: Regenerate.
1680 * mpw-elfmips.c: Delete.
1681 * mpw-eppcmac.c: Delete.
1682 * mpw-esh.c: Delete.
1683 * mpw-idtmips.c: Delete.
1687 * emulparams/shelf32.sh (MACHINE): Now sh5.
1691 * ldgram.y: Fix syntax warning.
1695 * emultempl/armelf.em (PARSE_AND_LIST_SHORTOPTS): Add 'n' in order
1696 to prevent "-n" from being taken as an abbreviation for
1697 "--no-pipeline-knowledge".
1701 * ldlang.c (lang_size_sections_1): Don't complain about
1702 SEC_NEVER_LOAD sections having no memory region specified.
1704 * ld.texinfo (Format Commands <OUTPUT_FORMAT>): Typo fix.
1708 * ld/configure.host (*-*-netbsd*): Add support for NetBSD/ELF.
1712 * dep-in.sed: Cope with absolute paths.
1713 * Makefile.am (dep.sed): Subst TOPDIR and BFDDIR.
1715 * Makefile.in: Regenerate.
1719 * emulparams/elf64btsmip.sh: n64 replaces .reginfo with .MIPS.options.
1723 * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: If common page size
1724 is smaller than maximum, round dot up to common page boundary.
1728 * configure.host: Set up for generic hosts first, then tweak as
1729 necessary in more specific targets.
1730 (HOSTING_LIBS): Include libgcc_eh.a if found.
1734 * emulparams/elf_x86_64.sh (COMMONPAGESIZE): Set it.
1738 * Makefile.am: Run "make dep-am".
1739 * Makefile.in: Regenerate.
1743 * genscripts.sh (LIB_SEARCH_DIRS): Quote path.
1747 * ldlang.c (ldlang_add_undef): If the output bfd has been opened,
1748 add the symbol to the linker hash table immediately.
1749 (lang_place_undefineds): Split symbol creation out..
1750 (insert_undefined): ..to here.
1754 * emultempl/elf32.em: Use lbasename vs. basename to fix problem where
1755 the contents of the buffer returned from basename function will are
1756 getting overwritten while still being used.
1762 * configure.tgt (x86_64-*-linux-gnu*): Configure i386 as native.
1763 * elf_x86_64.sh (ARCH): Set to i386:x86-64
1764 set libraries to default to lib64 paths.
1768 * Makefile.am : Add eaix5ppc and eaix5rs6, AIX 5 support.
1769 * configure.tgt : Same.
1770 * emulparms/aix5ppc.sh : New file. For eaix5ppc.
1771 * emulparms/aix5rs6.sh : New file. For eaix5rs6.
1772 * emulparms/aixppc.sh : OUPUT_FORMAT_32BIT and OUTPUT_FORMAT_64BIT
1773 emulation parameters for better -b32, -b64 support.
1774 * emulparms/aixrs6.sh : Same.
1775 * emulparms/ppcmacos.sh : Same.
1776 * emultempl/aix.em (choose_target) : Use new emulation parameters
1777 OUTPUT_FORMAT_32BIT and OUTPUT_FORMAT_64BIT.
1778 * Makefile.in : Regenerate.
1782 * po/fr.po: Updated version.
1786 * ldmain.c (main): Move .text readonly flag fudges from here..
1787 * ldlang.c (lang_process): ..to here.
1791 * ldlang.c (lang_check): Remove the word size check added in last
1792 change. Treat emitrelocations case as for relocatable links.
1796 * po/fr.po: Updated version.
1800 * ldlang.c (lang_check): Do relocatable link checks first, so that
1801 warn_mismatch can't override. Check compatible and word size too.
1805 * ld.texinfo: Wrap @menu in @ifnottex, not @ifinfo.
1809 * scripttempl/elf.sc: Only use DATA_SEGMENT_END() together with
1814 * scripttempl/elf.sc: Put .preinit_array, .init_array and
1815 .fini_array in the data segment.
1819 * scripttempl/elf.sc: Correct syntax errors in 2002-03-01 commit.
1823 * scripttempl/elf.sc (SECTIONS): Add entries for .preinit_array,
1824 .init_array, and .fini_array.
1828 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't fold
1829 .IA64_unwind* in a relocatable link.
1833 * NEWS: Mark 2.12 branch.
1837 * emulparams/elf64_s390.sh (ARCH): Change to "s390:64-bit".
1838 * emulparams/elf_s390.sh (ARCH): Change to "s390:31-bit".
1842 * emultempl/aix.em (gld*_parse_args): Add -brtl support.
1843 (gld*_before_allocation): Same.
1844 (gld*_create_output_section_statements): Generate
1845 __rtinit if run time linking. Add librtl.a to the link.
1846 (gld*_read_file): Clean.
1850 * emulparams/elf64ppc.sh (OTHER_TEXT_SECTIONS): Define.
1854 * Makefile.am: Add new files earmelf_fbsd, eelf32ppc_fbsd,
1855 eelf_i386_fbsd, eelf64_ia64_fbsd, eelf_x86_64_fbsd, eelf64_sparc_fbsd,
1856 and eelf64alpha_fbsd.
1857 * Makefile.in: Regenerate.
1858 * configure.tgt(sparc64-*-freebsd, ia64-*-freebsd, i[3456]86-*-freebsd,
1859 x86_64-*-freebsd, arm-*-freebsd, alpha*-*-freebsd, powerpc-*-freebsd):
1860 use a FreeBSD-specific emulation rather than the psABI one.
1861 * emulparams/elf_fbsd.sh (ELF_INTERPRETER_NAME): Set appropriate value
1862 for all FreeBSD ELF systems.
1863 * emulparams/armelf_fbsd.sh: Bridge elf_fbsd.sh and the "native" psABI
1865 * emulparams/elf32ppc_fbsd.sh: Likewise.
1866 * emulparams/elf64_ia64_fbsd.sh: Likewise.
1867 * emulparams/elf64_sparc_fbsd.sh: Likewise.
1868 * emulparams/elf64alpha_fbsd.sh: Likewise.
1869 * emulparams/elf_i386_fbsd.sh: Likewise.
1870 * emulparams/elf_x86_64_fbsd.sh: Likewise.
1874 * po/tr.po: Updated version.
1878 * ld.texinfo (Output Section Fill): Fix amateur texinfo.
1883 * emultempl/mmo.em (mmo_after_open): Don't call
1884 _bfd_mmix_check_all_relocs when producing ELF output.
1888 * emulparams/elf64alpha.sh (NOP): Adjust for big-endian
1889 definition. Emit a unop+nop pair.
1893 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Also check
1894 for presence of .MMIX.reg_contents.linker_allocated before early
1897 * NEWS: Mention support for MMIX.
1901 Support arbitrary length fill patterns.
1902 * ld.texinfo (Output Section Fill): Describe fill expressions.
1903 (FILL): Refer to the above.
1904 * ldexp.h (etree_value_type): Add "str" field.
1905 (union etree_union): Add "str" to "value" struct.
1906 (exp_bigintop): Declare.
1907 (exp_get_fill): Declare.
1908 * ldexp.c: Include "safe-ctype.h".
1909 (exp_intop): Set value.str to NULL.
1910 (exp_bigintop): New function.
1911 (new_rel): Pass in "str", and set new.str from it.
1912 (new_rel_from_section): Set new.str to NULL.
1913 (fold_name): Adjust calls to new_rel.
1914 (exp_fold_tree): Likewise.
1915 (exp_get_fill): New function.
1916 * ldgram.y (struct big_int bigint, fill_type *fill): New.
1917 (INT): Returns a "bigint". Adjust all code handling INTs.
1918 (fill_opt): Returns a "fill".
1919 (fill_exp): Split out of fill_opt, use for FILL.
1920 * ldlang.h (struct _fill_type): New.
1921 (fill_type): Move typedef to ldexp.h.
1922 (lang_output_section_statement_type): "fill" is now a pointer.
1923 (lang_fill_statement_type): Likewise.
1924 (lang_padding_statement_type): Likewise.
1925 (lang_add_fill): Now takes a "fill_type *" param.
1926 (lang_leave_output_section_statement): Likewise.
1927 (lang_do_assignments): Likewise.
1928 (lang_size_sections): Likewise.
1929 (lang_leave_overlay_section): Likewise.
1930 (lang_leave_overlay): Likewise.
1931 * ldlang.c: Include ldgram.h after ldexp.h.
1932 (lang_output_section_statement_lookup): Adjust for fill_type change.
1933 (print_fill_statement): Likewise.
1934 (print_padding_statement): Likewise.
1935 (insert_pad): Now takes a "fill_type *" arg.
1936 (size_input_section): Likewise.
1937 (lang_size_sections_1): Likewise.
1938 (lang_size_sections): Likewise.
1939 (lang_do_assignments): Likewise.
1940 (lang_add_fill): Likewise.
1941 (lang_leave_output_section_statement): Likewise.
1942 (lang_leave_overlay_section): Likewise.
1943 (lang_leave_overlay): Likewise.
1944 Adjust all callers of the above function.
1945 * ldlex.l: Include ldgram.h after ldexp.h. Allow hex numbers
1946 starting with "0X" as well as "0x". Return bigint.str for hex
1947 numbers starting with "0x" or "0X", zero bigint.str otherwise.
1948 Always use base 16 for numbers starting with "$".
1949 * ldmain.c: Include ldgram.h after ldexp.h.
1950 * ldwrite.c (build_link_order): Use bfd_data_link_order in place
1951 of bfd_fill_link_order.
1952 * pe-dll.c: Adjust lang_do_assignments calls.
1953 * emultempl/elf32.em: Likewise.
1954 * emultempl/hppaelf.em: Likewise.
1955 * emultempl/ppc64elf.em: Likewise.
1956 * emultempl/beos.em: Include ldgram.h after ldexp.h, adjust
1957 lang_add_assignment call.
1958 * emultempl/pe.em: Likewise.
1962 * ld.texinfo (VERSION scripts): Symbol names are globbing patterns.
1963 * ldgram.y (lang_new_vers_regex): Rename to lang_new_vers_pattern;
1964 the pattern in question is not a regexp.
1965 * ldlang.c: Likewise.
1966 * ldlang.h: Likewise.
1967 * ldlex.l (V_IDENTIFIER): Allow '[', ']', '-', '!', and '^' also.
1971 * ldlex.l (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
1972 * ldgram.y (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
1973 (exp): Add DATA_SEGMENT_ALIGN (exp, exp) and DATA_SEGMENT_END (exp).
1974 * ldexp.c (exp_data_seg): New variable.
1975 (exp_print_token): Handle DATA_SEGMENT_ALIGN and DATA_SEGMENT_END.
1976 (fold_binary): Handle DATA_SEGMENT_ALIGN.
1977 (exp_fold_tree): Handle DATA_SEGMENT_END.
1978 Pass allocation_done when recursing instead of hardcoding
1979 lang_allocating_phase_enum.
1980 * ldexp.h (exp_data_seg): New.
1981 * ldlang.c (lang_size_sections_1): Renamed from lang_size_sections.
1982 (lang_size_sections): New.
1983 * ld.texinfo (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): Document.
1984 * scripttempl/elf.sc: Use DATA_SEGMENT_ALIGN and DATA_SEGMENT_END
1985 if COMMONPAGESIZE is defined.
1986 * emulparams/elf_i386.sh (COMMONPAGESIZE): Set to 4K.
1987 * emulparams/elf32_sparc.sh (COMMONPAGESIZE): Set to 8K.
1988 * emulparams/elf64_sparc.sh (COMMONPAGESIZE): Set to 8K.
1989 * emulparams/elf64alpha.sh (COMMONPAGESIZE): Set to 8K.
1990 * emulparams/elf64_ia64.sh (COMMONPAGESIZE): Set to 16K for shared
1995 * Makefile.in: Regenerate.
1999 * lexsup.c: Remove strtoul declaration.
2003 * ldmain.c: Add prototype for main ().
2004 * lexsup.c: Guard declaration of strtoul with HAVE_STDLIB_H.
2005 * emultempl/lnk960.em (lnk960_choose_target): Function should
2010 * ldlang.c (entry_section): New initialised variable.
2011 (lang_finish): Use it.
2012 * ldlang.h (entry_section): Declare.
2013 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Set
2014 entry_section to ".opd".
2018 * ld.texinfo (Options): Add back in -nostdlib documentation,
2019 which had been inadvertently removed.
2023 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Adjust
2024 register section vma to a sane value after emitting error. Make
2025 fatal conditions cause program exit when emitting message.
2029 * configure.tgt: Add or32-*-rtems target.
2033 Contribute sh64-elf.
2035 * emulparams/shelf32.sh (STACK_ADDR): Define as formerly defined
2036 in OTHER_RELOCATABLE_SECTIONS.
2038 * emulparams/shelf32.sh (STACK_ADDR): Define.
2039 (OTHER_RELOCATABLE_SECTIONS): Renamed to...
2040 (OTHER_SECTIONS): this. Removed stack settings.
2041 * emulparams/shelf64.sh (OTHER_RELOCATABLE_SECTIONS): Do not set.
2042 (OTHER_SECTIONS): Reset after sourcing shelf32.sh.
2044 * emultempl/sh64elf.em (sh64_elf_$_before_allocation): Disable
2045 relaxing if any shmedia or mixed sections are found.
2047 * emultempl/sh64elf.em (sh64_elf_before_allocation): Pass f to
2048 einfo. Gracefully decline to output to non-elf formats.
2050 * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS) <.stack>:
2051 Default to _end aligned to next multiple of 0x40000, plus 0x40000.
2052 * emulparams/shelf32.sh: Ditto.
2054 * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Tweak
2057 * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Avoid
2058 non-portable shell constructs. From Hans-Peter Nilsson.
2060 * emulparams/shelf64.sh (EXTRA_EM_FILE): Define empty.
2061 * Makefile.am (eshelf64.c, eshlelf64.c, eshlelf32.c): Adjust
2062 dependencies to the shell script include chain.
2063 * Makefile.in: Regenerate.
2065 * emultempl/sh64elf.em: Update and tweak comments.
2066 (sh64_elf_${EMULATION_NAME}_after_allocation): Always allocate and
2067 make a .cranges section SEC_IN_MEMORY.
2069 * emultempl/sh64elf.em
2070 (sh64_elf_${EMULATION_NAME}_before_allocation): Don't stop when
2071 .cranges section found to be necessary; continue and set stored
2072 section contents flags for sections with non-mixed contents.
2073 Use a struct sh64_section_data container and sh64_elf_section_data
2074 to store contents-type flags.
2075 Remove unused update of "isec".
2076 (sh64_elf_${EMULATION_NAME}_after_allocation): Only process
2077 sections marked SHF_SH5_ISA32_MIXED. Use sh64_elf_section_data to
2078 access contents-type flags. Assert that the associated container
2079 is initialized. Use that container, not elf_gp_size, to hold size
2080 of linker-generated cranges contents.
2082 * emultempl/sh64elf.em
2083 (sh64_elf_${EMULATION_NAME}_before_allocation): Exit early if
2084 there's already a .cranges section. When section flag difference
2085 is found, don't NULL-check cranges a second time. Tweak comments.
2086 (sh64_elf_${EMULATION_NAME}_after_allocation): Use size after
2087 merging, not max size, as size of ld-generated .cranges contents.
2088 Don't set ELF section flags in output section. When checking for
2089 needed .cranges descriptors, don't use a variable; compare
2090 incoming ELF section flags directly to SHF_SH5_ISA32_MIXED. Tweak
2093 * emultempl/sh64elf.em: New file.
2094 * Makefile.am (eshelf32.c, eshlelf32.c): Adjust dependencies.
2095 * Makefile.in: Regenerate.
2096 * emulparams/shelf32.sh (OUTPUT_FORMAT): Only set if not set.
2097 (OTHER_RELOCATING_SECTIONS): Ditto.
2098 (EXTRA_EM_FILE): New, set to sh64elf if not set.
2099 * emulparams/shlelf32.sh: Stub out all settings except
2100 OUTPUT_FORMAT. Source shelf32.sh.
2101 * emulparams/shelf64.sh: Similar, but also keep ELF_SIZE and
2102 OTHER_RELOCATING_SECTIONS.
2103 (OTHER_RELOCATING_SECTIONS): Remove .cranges.
2104 * emulparams/shlelf64.sh: Stub out all settings except
2105 OUTPUT_FORMAT. Source shelf64.sh.
2107 * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS): Include
2109 (DATA_START_SYMBOLS): Define, provide ___data.
2110 (OTHER_READONLY_SYMBOLS): Define, provide ___rodata and align to 8
2111 for consecutive .data section.
2112 (OTHER_GOT_SECTIONS): Define, align to 8 for consecutive .bss
2113 section after .data section.
2114 * emulparams/shlelf64.sh: Ditto.
2115 * emulparams/shelf32.sh: Ditto.
2116 (ALIGNMENT): Define to 8.
2117 * emulparams/shelf32.sh: Ditto.
2119 * configure.tgt (sh64-*-elf*): Assign targ_extra_libpath to get
2120 built-in linker scripts.
2122 * emulparams/shlelf64.sh: New.
2123 * emulparams/shelf64.sh: New.
2124 * configure.tgt (sh64-*-elf*): Add shelf64 and shlelf64 to
2126 * Makefile.am: Add support for shlelf64 and shelf64.
2127 * Makefile.in: Regenerate.
2129 * configure.tgt (sh64-*-elf*): Add shelf as default.
2130 Add shlelf to targ_extra_emuls.
2132 * emulparams/shelf32.sh: New file.
2133 * emulparams/shlelf32.sh: New file.
2134 * Makefile.am: Add support for shlelf32 and shelf32.
2135 * configure.tgt: Map sh64-*-elf* to shlelf32 and shelf32.
2136 * Makefile.in: Regenerate.
2140 * ldlang.c (lang_reset_memory_regions): Rename from
2141 reset_memory_regions. Change all callers. Make public.
2142 * ldlang.h (lang_reset_memory_regions): Prototype.
2143 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Call
2144 lang_reset_memory_regions before lang_size_sections.
2145 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
2146 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Likewise.
2150 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Use signed
2151 arithmetic when checking for too many global registers.
2155 * Makefile.am (ALL_EMULATIONS): Add ehppanbsd.o.
2156 (ehppanbsd.c): New rule.
2157 * Makefile.in: Regenerate.
2158 * configure.tgt (hppa*-*-netbsd*): New target.
2159 * emulparams/hppalinux.sh: Add comment to check other files
2160 that source this file it is modified, and list which
2162 * emulparams/hppanbsd.sh: New file.
2166 * scripttempl/xstormy16.sc: Don't allocate extra space for the
2171 Support on-demand global register allocation from
2172 R_MMIX_BASE_PLUS_OFFSET relocs.
2173 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Rename from
2174 mmix_set_reg_section_vma. Call
2175 _bfd_mmix_finalize_linker_allocated_gregs.
2176 (mmix_before_allocation): New function.
2177 (LDEMUL_AFTER_ALLOCATION): Set to mmix_after_allocation.
2178 (LDEMUL_BEFORE_ALLOCATION): Define to mmix_before_allocation.
2179 * scripttempl/mmo.sc (.text): Mark .init, .fini as KEEP.
2180 (.MMIX.reg_contents): Add .MMIX.reg_contents.linker_allocated
2181 before .MMIX.reg_contents.
2182 * emultempl/mmo.em (gldmmo_before_allocation): Define to default.
2183 (mmo_after_open): New function.
2184 (LDEMUL_AFTER_OPEN): Define to mmo_after_open.
2185 * emulparams/elf64mmix.sh (OTHER_SECTIONS): Tweak formatting. Add
2186 .MMIX.reg_contents.linker_allocated before .MMIX.reg_contents.
2190 * emulparams/or32.sh: New file.
2191 * emulparams/or32elf.sh: New file.
2192 * scripttempl/or32.sc: New file.
2193 * configure.tgt : Add support for or32.
2194 * configure: Regenerate
2195 * Makefile.am: Add support for or32.
2196 * Makefile.in: Regenerate.
2197 * NEWS: Mention support for or32.
2198 * po/ld.pot: Regenerate.
2203 * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Define to be mipself.
2204 * emultempl/mipself.em: New file to handle MIPS ELF embedded
2205 reloc creation (ld --embedded-relocs).
2209 * configure: Regenerated.
2213 * Makefile.am (install): Depend on install-info.
2214 * Makefile.in: Regenerate.
2218 * ldmain.c (main): Use full sentences to ease translation.
2222 * po/fr.po: Updated version.
2226 * po/es.po: Updated version.
2230 * ldlex.l (yy_input): Correct error check.
2234 * ldmisc.c (demangle): Put back dots when string not demangled.
2238 * emulparams/elf64alpha.sh (NOP): Use unop.
2242 * ldlex.l: Use fread instead of read.
2246 * configure.tgt (ia64-*-netbsd*): New target.
2250 * emulparams/elf32btsmip.sh (SHLIB_TEXT_START_ADDR): Change to
2252 * emulparams/elf64btsmip.sh (SHLIB_TEXT_START_ADDR): Likewise.
2256 * ldver.c (ldversion): Update year.
2260 * po/ld.pot: Regenerate.
2264 * Makefile.am (eelf64ppc.c, eelf64lppc.c): Depend on ppc64elf.em.
2265 * Makefile.in: Regenerate.
2266 * emulparams/elf64ppc.sh (EXTRA_EM_FILE): Define.
2267 * emultempl/ppc64elf.em: New file.
2271 * scripttempl/pe.sc: Add support for constructor priorities.
2275 * emulparams/avr1200.sh (DATA_START): Define as 0x60.
2276 * emulparams/avr23xx.sh: Likewise.
2277 * emulparams/avr4433.sh: Likewise.
2278 * emulparams/avr44x4.sh: Likewise.
2279 * emulparams/avr85xx.sh: Likewise.
2280 * emulparams/avrmega103.sh: Likewise.
2281 * emulparams/avrmega161.sh: Likewise.
2282 * emulparams/avrmega603.sh: Likewise.
2283 * scripttempl/elf32avr.sc: Use DATA_START instead of 0x60.
2287 * ldlang.c (walk_wild_section): Exclude object file if enclosing
2288 archive is excluded.
2292 * Makefile.am (ALL_EMULATIONS): Add eshelf_nbsd.o and eshlelf_nbsd.o.
2293 (eshelf_nbsd.c): New rule.
2294 (eshlelf_nbsd.c): New rule.
2295 * Makefile.in: Regenerate.
2296 * configure.tgt (sh*le-*-netbsdelf*): New target.
2297 (sh*-*-netbsdelf*): New target.
2298 * emulparams/shelf.sh: Document that shelf_nbsd.sh sources this file.
2299 * ld/emulparams/shelf_nbsd.sh: New emulation.
2300 * ld/emulparams/shlelf_nbsd.sh: New emulation.
2304 * po/es.po: New file: Spanish translation.
2305 * configure.in (ALL_LINGUAS): Add es.
2306 * configure: Regenerate.
2310 * ld.texinfo: Note that --emit-relocs is currently only
2311 implemented for ELF.
2315 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Make use
2316 of bfd_section_list_remove and bfd_section_list_insert macros.
2317 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
2318 * emultempl/mmo.em (mmo_place_orphan): Likewise.
2322 * configure.tgt (x86_64-*-netbsd*): New target.
2326 (gld*_create_output_section_statements): New function.
2327 For -binitfini support.
2328 * emultempl/aix.em (gld*_before_parse): Fix comment.
2329 * emultempl/aix.em (gld*_parse_args): Fix comment.
2333 * configure.tgt (mips*-dec-netbsd*): Delete alias for
2335 (sparc64-*-netbsd*): Add elf32_sparc to targ_extra_emuls.
2337 * configure.tgt (arm-*-netbsdelf*): Add target.
2338 (arm-*-netbsd*): Add armelf and armelf_nbsd to targ_extra_emuls.
2339 * emulparams/armelf_nbsd.sh: Added.
2340 * Makefile.am: Add rules for earmelf_nbsd.
2341 * Makefile.in: Regenerate.
2346 * configure.host: Add rules for x86_64-*linux-gnu. Change
2347 s390x-linux entry to use gcc to report configuration, replace gcc
2348 with $CC in s390-linux
2352 * ld.texinfo (VERSION): Fix markup.
2356 * Makefile.am (ALL_EMULATIONS): Add m68kelfnbsd.o.
2357 (m68kelfnbsd.c): New rule.
2358 * Makefile.in: Regenerate.
2359 * configure.tgt (m68*-hp-netbsd*): Renamed to ..
2360 (m68*-*-netbsd*4k*): .. this.
2361 (m68*-*-netbsdelf*): New target.
2362 (m68*-*-netbsd*): Also include ELF support.
2363 (m68*-*-netbsdaout*): New alias for m68*-*-netbsd*.
2364 * emulparams/m68kelfnbsd.sh: New emulation.
2368 * ldgram.y (vers_node): Support anonymous version tags.
2369 * ldlang.c (lang_register_vers_node): Ensure anonymous version
2370 tag is not defined together with non-anonymous versions.
2371 * ld.texinfo: Document it.
2375 * po/tr.po: New file: Turkish translation.
2376 * configure.in (ALL_LINGUAS): Add tr.
2377 * configure: Regenerate.
2381 * Makefile.am: Add rules for eelf64alpha_nbsd.
2382 * Makefile.in: Regenerate.
2383 * configure.tgt (alpha*-*-netbsd*): Set
2384 targ_emul to elf64alpha_nbsd.
2385 * emulparams/elf64alpha_nbsd.sh: Added.
2389 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust
2390 section_tail when fiddling with section list.
2391 (gld${EMULATION_NAME}_list_options): Ensure sentences aren't
2392 broken into separate strings to make translation easier.
2393 * emultempl/mmo.em (mmo_place_orphan): Adjust section_tail when
2394 fiddling with section list.
2395 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
2399 * scripttempl/mmo.sc: Add .debug_ranges to listed sections.
2403 * ldmain.c (main): Initialise link_info.eh_frame_hdr.
2407 * emultempl/elf32.em (finish): Supply output_bfd
2408 to bfd_elf*_discard_info.
2409 (OPTION_EH_FRAME_HDR): Define.
2410 (longopts): Add --eh-frame-hdr.
2411 (parse_args): Handle it.
2412 (list_options): Add --eh-frame-hdr to help.
2413 * emultempl/hppaelf.em (finish): Supply output_bfd
2414 to bfd_elf*_discard_info.
2415 * scripttempl/elf.sc (.eh_frame_hdr): Add.
2419 * lexsup.c (parse_args): Don't pass shortopts to second call to
2420 getopt functions. Restore optind rather than decrementing before
2421 second call. Remove errind as it now duplicates last_optind.
2425 * emultempl/pe.em (gld_${EMULATION_NAME}_list_options): Fix typo.
2430 * Makefile.am: Add support for xstormy16.
2431 * configure.tgt: Add support for xstormy16.
2432 * Makefile.in: Regenerate.
2433 * emulparams/elf32xstormy16.sh: New file.
2434 * scripttempl/xstormy16.sc: New file.
2438 * Makefile.in (LIB_PATH): Make configurable.
2439 (GENSCRIPTS): Set LIB_PATH in environment.
2440 * configure.in: Substitute LIB_PATH.
2441 * configure: Regenerate.
2442 * configure.tgt (*cygwin): Set LIB_PATH for cross build.
2443 * configure.host (*cygwin): Add /usr/lib/w32api to NATIVE_LIB_DIRS.
2447 * lexsup.c (ld_options): Insert 'PROGRAM' into the text string
2448 describing the -N option so that it is easier to translate into
2453 * emultempl/pe.em (..._list_options): Replace multiple fprintf
2454 statements describing a single option with a single, newline
2455 escaped fprintf. This allows better translation into other
2458 * ldmain.c (add_archive_element): Combine multiple strings
2459 into a single string to permit better translation into other
2464 * Makefile.am: Remove eaixppc64.
2465 * Makefile.in: Regenerate.
2469 * emultempl/aix.em (choose_target): Change default target to
2470 OUTPUT_FORMAT for ppcmacos. Add braces to remove compiler
2472 (gld*_read_file): Fix typo.
2473 (change_symbol_mode): Add prototype.
2476 * emulparams/aixppc.sh (SYSCALL_MASK, SYMBOL_MODE_MASK): Delete.
2477 * emulparams/aixrs6.sh : Same.
2478 * emulparams/ppcmacos.sh : Same.
2479 * emulparams/aixppc64.sh : Delete file.
2480 * emultempl/aix.em : Formatting changes.
2484 * emulparams/criself.sh (NO_SMALL_DATA): Set, to yes.
2485 (OTHER_BSS_END_SYMBOLS): Don't refer to .sbss when setting
2487 (OTHER_END_SYMBOLS): Fix formatting.
2488 * emulparams/crislinux.sh (NO_SMALL_DATA): Set, to yes.
2489 (OTHER_END_SYMBOLS): Fix formatting.
2493 * ldexp.c (exp_print_token): Correct "table" entry for RSHIFT.
2497 * configure.tgt : Remove eaixppc64 emulations.
2498 * Makefile.in : Remove eaixppc64.c
2499 * ldemul.c (ldemul_choose_target): New parameters argc, argv.
2500 (ldemul_default_target): Same.
2501 * emultempl/gld960.em (gld960_choose_target): Same.
2502 * emultempl/gld960c.em (gld960_choose_target): Same.
2503 * scripttempl/aix.sc: Remove OUTPUT_FORMAT.
2504 * emultempl/aix.em (is_syscall): syscall_mask now a variable.
2505 * emultempl/aix.em (gld*_read_file): symbol_mode_mask now a variable.
2506 * emultempl/aix.em (gld*_parse_args): Handle -b32 -b64 emulation.
2507 * emultempl/aix.em (choose_target): New function. Handle emulation of
2512 * emulparams/elf_i386.sh (NO_SMALL_DATA): Set to yes.
2513 * emulparams/elf_i386_be.sh (NO_SMALL_DATA): Likewise.
2514 * emulparams/elf_i386_chaos.sh (NO_SMALL_DATA): Likewise.
2515 * emulparams/elf_i386_ldso.sh (NO_SMALL_DATA): Likewise.
2516 * emulparams/elf_x86_64.sh (NO_SMALL_DATA): Likewise.
2517 * emulparams/m68kelf.sh (NO_SMALL_DATA): Likewise.
2518 * emulparams/elf32_sparc.sh (NO_SMALL_DATA): Likewise.
2519 * emulparams/elf64_sparc.sh (NO_SMALL_DATA): Likewise.
2521 * scripttempl/elf.sc (SBSS): New. Define if ${NO_SMALL_DATA}
2524 (REL_SDATA): Likewise.
2525 (REL_SBSS): Likewise.
2526 (REL_SDATA2): Likewise.
2527 (REL_SBSS2): Likewise.
2528 (SBSS2): Define if ${NO_SMALL_DATA} is not empty.
2533 * scripttempl/elfm68hc11.sc (CTOR, DTOR): Put constructor and
2535 * scripttempl/elfm68hc12.sc (CTOR, DTOR): Likewise.
2539 * Makefile.in: Regenerated with automake based on automake
2540 1.4-8 in RedHat 7.1.
2544 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Define.
2545 (config.status): Delete rule.
2546 Add extra dependencies to cover sourced emulparams files.
2547 * Makefile.in: Regenerate.
2549 * scripttempl/elf.sc: Order <section>, <section>.* and
2550 corresponding linkonce sections as seen in input files.
2551 Formatting fixes. Zero vma of all sections if not relocating.
2552 (STACK): Define and insert if STACK_ADDR defined.
2553 (OTHER_RELOCATING_SECTIONS): Delete.
2554 (OTHER_END_SYMBOLS): Define.
2555 (OTHER_READONLY_SECTIONS): Always insert, not just when relocating.
2556 (OTHER_READWRITE_SECTIONS): Likewise.
2557 (OTHER_GOT_SECTIONS): Likewise.
2558 (OTHER_SDATA_SECTIONS): Likewise.
2559 (OTHER_BSS_SECTIONS): Likewise.
2560 * scripttempl/elfi370.sc (OTHER_READONLY_SECTIONS): Likewise.
2561 (OTHER_READWRITE_SECTIONS): Likewise.
2562 * scripttempl/nw.sc (OTHER_READONLY_SECTIONS): Likewise.
2563 (OTHER_READWRITE_SECTIONS): Likewise
2565 * emulparams/armelf.sh (OTHER_RELOCATING_SECTIONS): Delete.
2566 (STACK_ADDR): Define.
2567 * emulparams/armelf_oabi.sh: As for armelf.sh.
2568 * emulparams/elf32mcore.sh: As for armelf.sh.
2569 * emulparams/h8300elf.sh: As for armelf.sh.
2570 * emulparams/mn10200.sh: As for armelf.sh.
2571 * emulparams/shelf.sh: As for armelf.sh.
2573 * emulparams/elf32fr30.sh (OTHER_RELOCATING_SECTIONS): Delete.
2574 (OTHER_END_SYMBOLS): Define.
2575 * emulparams/m32relf.sh: As for elf32fr30.sh.
2576 * emulparams/h8300helf.sh: As for elf32fr30.sh.
2577 * emulparams/h8300self.sh: As for elf32fr30.sh.
2579 * emulparams/criself.sh (OTHER_READONLY_SECTIONS): Protect symbol
2580 defines with RELOCATING test.
2581 (OTHER_SDATA_SECTIONS): Likewise.
2582 (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
2583 (OTHER_END_SYMBOLS): ..this.
2584 * emulparams/crislinux.sh: As for criself.sh.
2586 * emulparams/elf32bmipn32.sh (OTHER_SDATA_SECTIONS): Zero vma
2588 (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
2589 (OTHER_SECTIONS): ..this. Zero vma if not relocating. Order
2590 normal and linkonce sections as seen in input files.
2591 * emulparams/elf32bmip.sh (DATA_ADDR): Don't define if EMBEDDED.
2592 (TEXT_DYNAMIC): Likewise.
2593 (INITIAL_READONLY_SECTIONS): Zero vma if not relocating.
2594 (OTHER_SDATA_SECTIONS): Likewise.
2595 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
2596 * emulparams/shlelf_linux.sh (OTHER_READWRITE_SECTIONS): Likewise.
2597 * emulparams/elf64alpha.sh (OTHER_READONLY_SECTIONS): Likewise.
2598 * emulparams/hppalinux.sh (OTHER_READONLY_SECTIONS): Likewise.
2599 * emulparams/elf64_aix.sh (OTHER_GOT_SECTIONS): Likewise.
2600 (OTHER_PLT_RELOC_SECTIONS): Likewise.
2601 (OTHER_READONLY_SECTIONS): Likewise. Order normal and linkonce
2602 sections as seen in input files.
2603 * emulparams/elf64_ia64.sh: As for emulparams/elf64_aix.sh.
2604 * emulparams/hppa64linux.sh (OTHER_READONLY_SECTIONS): Zero vma
2606 (OTHER_READWRITE_SECTIONS, OTHER_BSS_SECTIONS): Likewise.
2607 (OTHER_BSS_END_SYMBOLS): Merge from elf64hppa.sh.
2608 * emulparams/elf64mmix.sh (OTHER_RELOCATING_SECTIONS): Delete.
2609 (OTHER_SECTIONS): Instead, use this..
2610 (OTHER_END_SYMBOLS): ..and this.
2612 * emulparams/elf32b4300.sh: Source elf32bmip.sh, remove duplicates.
2613 * emulparams/elf32bsmip.sh: Likewise.
2614 * emulparams/elf32btsmip.sh: Likewise.
2615 * emulparams/elf32ebmip.sh: Likewise.
2616 * emulparams/elf32lmip.sh: Likewise.
2617 * emulparams/elf32elmip.sh: Source elf32lmip.sh, remove duplicates.
2618 * emulparams/elf32lsmip.sh: Likewise.
2619 * emulparams/elf32ltsmip.sh: Source elf32btsmip.sh, remove duplicates.
2620 * emulparams/elf32l4300.sh: Source elf32b4300.sh, remove duplicates.
2621 * emulparams/elf64bmip.sh: Source elf32bmipn32.sh, remove duplicates.
2622 * emulparams/elf64btsmip.sh: Likewise.
2623 * emulparams/elf64ltsmip.sh: Source elf64btsmip.sh, remove duplicates.
2624 * emulparams/elf32lppc.sh: Source elf32ppc.sh, remove duplicates.
2625 * emulparams/elf32ppclinux.sh: Likewise.
2626 * emulparams/elf32ppcsim.sh: Likewise.
2627 * emulparams/elf32lppcsim.sh: Source elf32lppc.sh, remove duplicates.
2628 * emulparams/elf64hppa.sh: Source hppa64linux.sh, remove duplicates.
2629 * emulparams/h8300helf.sh: Source h8300elf.sh, remove duplicates.
2630 * emulparams/h8300self.sh: Likewise.
2631 * emulparams/mn10300.sh: Source mn10200.sh, remove duplicates.
2632 * emulparams/sh.sh: Comment.
2633 * emulparams/shl.sh: Source sh.sh, remove duplicates.
2634 * emulparams/shlelf.sh: Source shelf.sh, remove duplicates.
2635 * emulparams/shelf_linux.sh: Source shlelf_linux.sh, remove duplicates.
2640 * ldlang.c (map_input_to_output_sections): Replace "break"
2641 accidentally removed with 2001-08-03 change.
2642 (lang_gc_sections_1): Likewise.
2646 * ldlang.c (walk_wild_section): Move sec == NULL case out of loop.
2650 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Use NULL instead
2651 of false when calling lang_size_sections.
2652 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
2656 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Only emit this
2657 function when LDEMUL_FINISH isn't set to the same name. Don't
2658 call ${LDEMUL_FINISH}.
2659 (ld_${EMULATION_NAME}_emulation): Call $LDEMUL_FINISH if defined.
2660 * emultempl/armelf.em (arm_elf_finish): Call
2661 gld${EMULATION_NAME}_finish.
2662 * emultempl/hppaelf.em (hppaelf_finish): Rename to
2663 gld${EMULATION_NAME}_finish. Call bfd_elf32_discard_info and
2664 hppaelf_layout_sections_again if necessary.
2665 (need_laying_out): New var.
2666 (hppaelf_layaout_sections_again): Rename to
2667 hppaelf_layout_sections_again. Clear need_laying_out.
2668 (PARSE_AND_LIST_OPTIONS): Format text.
2672 * emultempl/armelf.em (arm_elf_finish): Renamed from
2673 gld${EMULATION_NAME}_finish.
2674 (LDEMUL_FINISH): Set to arm_elf_finish.
2678 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): New.
2679 (struct ld_emulation_xfer_struct): Use it.
2683 * emulparams/elf64hppa.sh (OTHER_BSS_END_SYMBOLS): Add
2684 additional symbols referenced by newer crt0.o files from HP.
2688 * emulparams/armelf.sh (DATA_START_SYMBOLS): New symbol.
2692 * Makefile.am (GENSCRIPTS): Quote ${exec_prefix}.
2693 * Makefile.in: Regenerate.
2697 * ld.texinfo: Use @command for commands, @option for options.
2698 * Makefile.am (POD2MAN): Use 'GNU Development Tools' for
2700 * Makefile.in: Rebuild.
2704 * configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
2705 Add support for targets.
2709 * configure.in (ALL_LINGUAS): Add "fr" and "sv"
2710 * configure: Regernate.
2711 * po/fr.po: New file.
2712 * po/sv.po: New file.
2716 * configure.tgt (sh-*-linux): Set targ_emul, targ_extra_emuls
2717 as little endian default and to support big endian.
2721 * ld.texinfo (Options): Document new option, -nostdlib.
2722 * lexsup.c (OPTION_NOSTDLIB): New definition.
2723 (ld_options): Add entry for "nostdlib".
2724 (parse_args): Handle OPTIONS_NOSTDLIB.
2725 * ldfile.c (ldfile_add_library_path): Don't add directories
2726 to the search path if they weren't specified on the command line
2727 and -nostdlib was specified.
2728 * ld.h (ld_config_type): New member only_cmd_line_lib_dirs.
2732 * lexsup.c (parse_args): Prevent infinite parsing loop when
2733 "-rpath.a" is specified on the command line.
2734 Replace calls to fprintf with calls to einfo.
2738 * ld.texinfo: A historical requirement that MEMORY and SECTIONS
2739 appear only once across all the linker scripts involved in a link
2740 invocation no longer applies. Make the documentation reflect
2745 * configure.tgt: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
2747 (sh-*-linux*): Added targ_extra_libpath.
2751 * ldlang.c (lang_size_sections): Keep a valid output_offset field
2752 for padding statements.
2756 * configure.tgt (mmix-*-*): New target.
2757 * Makefile.am (ALL_EMULATIONS): Add eelf64mmix.o and emmo.o.
2758 Add dependencies to match.
2759 * emulparams/mmo.sh, emulparams/elf64mmix.sh, emultempl/mmo.em,
2760 emultempl/mmix-elfnmmo.em, emultempl/mmixelf.em,
2761 scripttempl/mmo.sc: New files.
2762 * gen-doc.texi: @set MMIX.
2763 * ld.texinfo: Ditto.
2764 [MMIX] Add MMIX node.
2765 * Makefile.in: Regenerate.
2769 * ldlang.c: Fix a comment typo.
2773 * configure.host: Move alpha*-*-linux-gnu* entry to generic
2774 entries, and match *-*-linux*.
2778 * ldgram.y (mri_script_command): Surround processing of INCLUDE
2779 with ldlex_script, ldlex_popstate.
2780 (ifile_p1): Likewise.
2781 * ldlex.l (EOF): Don't BEGIN(SCRIPT). Restore lineno from the
2783 (lex_push_file): Save current lineno to lineno_stack. Set lineno
2784 to 1. Don't BEGIN(SCRIPT).
2785 (lex_redirect): Similarly.
2786 * ldmain.c (main): Set yydebug non-zero if YYDEBUG.
2790 * scripttempl/armcoff.sc: Define __EH_FRAME_BEGIN__ and
2791 __EH_FRAME_END__ and accept eh frames into data section.
2792 Add ctor and dtor sections.
2796 * pe-dll.c (autofilter_objectlist): Add gcrt0.o.
2797 (auto-export): Fix indentation.
2801 * pe-dll.c (autofilter_objectlist): Add startup objects
2803 (auto-export): Constify char * p.
2804 Extract file basename and use strcmp rather than ststr
2809 * ldmain.c (get_emulation): Improve comment about the handling
2814 * po/POTFILES.in: Regenerate.
2818 * emultempl/elf32.em (gld*_list_options): Remove extra '\t' from
2819 -z nocopyreloc and -z nocombreloc usage strings.
2823 * emultempl/elf32.em (gld*_list_options): Include -z nocopyreloc
2828 * scripttempl/armaout.sc: Place .bss section after end of aligned
2829 data section to match behaviour of aout code in constructrion of
2834 * pe-dll.c (autofilter_entry_type autofilter_liblist: Add
2835 startup files for mingw32 dlls to list.
2839 * emultempl/elf32.em: Fix shell 'if' usage for portability.
2843 * configure.tgt (targ): Add arm9e-*-elf.
2847 * genscripts.sh: Fix a typo in the last change.
2851 * emultempl/elf32.em (gld_*_list_options): Include -z combreloc and
2852 -z nocombreloc in usage.
2856 * genscripts.sh: Include a comment at the top of each generated
2857 script, explaining its purpose.
2861 * emultempl/elf32.em (parse_args): Handle -z nocopyreloc.
2862 * NEWS: Mention -z nocopyreloc.
2863 * ld.texinfo (Options): Describe nocopyreloc.
2867 * configure: Regenerate.
2871 * ldver.h (ld_program_version): Remove declaration.
2872 * lexsup.c (parse_args): Move printing of copyright message..
2873 * ldver.c (ldversion): .. to here.
2874 Use BFD_VERSION_STRING in place of BFD_VERSION.
2875 (ld_program_version): Remove.
2876 * Makefile.am (Makefile): Depend on bfd/configure.in.
2878 * Makefile.in: Regenerate.
2882 * Makefile.am: Update dependencies with "make dep-am".
2883 * Makefile.in: Regenerate.
2887 * ldlang.c (lang_common): Conditionally inhibit Common allocation.
2888 * lexsup.c: Add --no-define-common commandline option.
2889 * ldgram.y: Add INHIBIT_COMMON_ALLOCATION script command.
2890 * ldlex.l: Likewise.
2891 * ld.h: Add command_line.inhibit_common_definition.
2892 * ldmain.c (main): Initialize.
2893 * ld.texinfo: Document.
2897 * ldlang.c (section_already_linked): Remove assignment to kept_section.
2901 * ldmisc.c (USE_STDARG): Remove.
2902 (info_msg): Define using VPARAMS, VA_OPEN, VA_FIXEDARG, VA_CLOSE.
2907 * ldmisc.h: Remove #ifdef ANSI_PROTOTYPES and non-ansi
2908 declarations. Update copyright.
2912 * pe-dll.c: Remove obsoleted declaration of
2913 pe_get_data_import_dll_name.
2914 (pe_create_import_fixup): Fix thinko.
2916 * ld.texinfo(enable-auto-import): Clarify the explanation.
2920 * pe-dll.c (pe_create_import_fixup): Revert previous patch.
2921 * emultemp/pe.em (pe_data_import_dll): Move definition outside of
2922 DLL_SUPPORT controlled code.
2926 * emultempl/pe.em(pe_data_import_dll): Make static.
2927 (pe_get_data_import_dll_name): New accessor function.
2928 * pe-dll.c(pe_create_import_fixup): call
2929 pe_get_data_import_dll_name() from pe.em, instead of
2930 directly accessing pe_data_import_dll variable from pe.em.
2934 * deffilep.y: Include "safe-ctype.h" instead of <ctype.h>.
2935 (def_file_add_directive): Use ISSPACE instead of isspace.
2936 (def_lex): Use ISDIGIT/ISXDIGIT/ISALPHA/ISALNUM instead of
2937 isdigit/isxdigit/isalpha/isalnum.
2938 * emultempl/aix.em: Include "safe-ctype.h" instead of <ctype.h>.
2939 (gld${EMULATION_NAME}_read_file): Use ISSPACE instead of isspace.
2940 * emultempl/elf32.em: Include "safe-ctype.h" instead of <ctype.h>.
2941 (gld${EMULATION_NAME}_place_orphan): Use ISALNUM instead of
2943 * emultempl/gld960c.em: Include "safe-ctype.h" instead of <ctype.h>.
2944 (gld960_set_output_arch): Use ISUPPER/TOLOWER instead of
2946 * emultempl/sunos.em: Include "safe-ctype.h" instead of <ctype.h>.
2947 (gld${EMULATION_NAME}_search_dir): Use ISDIGIT instead of isdigit.
2948 * ldctor.c: Include "safe-ctype.h" instead of <ctype.h>.
2949 (ctor_prio): Use ISDIGIT instead of isdigit.
2950 * ldfile.c: Include "safe-ctype.h" instead of <ctype.h>.
2951 (ldfile_open_file_search): Use ISALPHA instead of isalpha.
2952 (ldfile_add_arch): Use ISUPPER/TOLOWER instead of
2954 * ldlang.c: Include "safe-ctype.h" instead of <ctype.h>.
2955 (stricpy): Use TOLOWER instead of isupper/tolower.
2956 (lang_leave_overlay_section): Use ISALNUM instead of isalnum.
2957 * ldlex.l: Include "safe-ctype.h" instead of <ctype.h>.
2958 (lex_warn_invalid): Use ISPRINT instead of isprint.
2959 * ldmain.c: Include "safe-ctype.h" instead of <ctype.h>.
2960 (main): For gettext, also set the LC_CTYPE locate facet.
2961 (add_keepsyms_file): Use ISSPACE instead of isspace.
2962 * lexsup.c: Include "safe-ctype.h" instead of <ctype.h>.
2963 (is_num, parse_args): Use ISDIGIT instead of isdigit.
2964 * mpw-elfmips.c: Include "safe-ctype.h" instead of <ctype.h>.
2965 (gldelf32ebmip_place_orphan): Use ISALNUM instead of isalnum.
2966 * mpw-eppcmac.c: Include "safe-ctype.h" instead of <ctype.h>.
2967 (gldppcmacos_read_file): Use ISSPACE instead of isspace.
2968 * pe-dll.c: Include "safe-ctype.h" instead of <ctype.h>.
2969 (quoteput): Use ISSPACE instead of isspace.
2970 (pe_dll_generate_implib, pe_process_import_defs): Use ISALNUM
2975 * deffilep.y (def_stash_module): Constify "name" param.
2977 * pe-dll.c: Replace CONST with const throughout.
2978 (quick_symbol): Constify "n1", "n2", "n3" params.
2979 (make_singleton_name_thunk): Constify "import" param. Make
2980 "buffer_len" a size_t.
2981 (make_import_fixup_entry): Constify "name", "fixup_name",
2982 "dll_symname" params.
2983 (pe_get16): Cast args of bfd_seek. Replace bfd_read with bfd_bread.
2984 (pe_get32): Likewise.
2985 (pe_implied_import_dll): Likewise.
2987 * emultempl/beos.em (sort_by_file_name): Constify "ra", "rb".
2988 (sort_by_section_name): Likewise.
2990 * emultempl/pe.em: Move defines for arm_epoc_pe before bfd.h included.
2991 (make_import_fixup): Cast printf arg, rel->address to long rather
2993 (gld_${EMULATION_NAME}_after_open): Don't compare NULL against int.
2997 * ldmain.c (main): Rename BufferSize to ld_bufsz because HPUX
2998 defines BufferSize. Increase buffer size by one.
3002 * pe-dll.c (pe_walk_relocs_of_symbol): Fix memory leak.
3006 * configure.tgt: Add arm-openbsd target.
3010 * Makefile.am (ALL_EMULATIONS): Move eelf64ppc.o and
3012 (ALL_64_EMULATIONS): Here.
3013 * Makefile.in: Regenerated.
3017 * emultempl/pe.em(make_import_fixup): change signature to
3018 take asection as well as arelec; we need this for proper
3019 error reporting. Only call pe_create_import_fixup() if
3020 there is no attempt to add a constant addend to the reloc;
3021 otherwise, report error condition.
3022 * pe-dll.c(pe_walk_relocs_of_symbol): change signature,
3023 since final argument is a pointer to make_import_fixup().
3024 Change call to cb() to match make_import_fixup() signature.
3025 (make_import_fixup_mark): make buffer_len unsigned.
3026 * pe-dll.h: change signature of pe_walk_relocs_of_symbol.
3030 * ld.texinfo: add verbose documentation for auto-import
3031 direct-addressing workaround, to compliment the terse
3036 * scripttempl/v850.sc: Add gcc_except_table sections.
3040 * emulparams/h8300helf.sh: Move stack to a much higher memory address.
3041 * emulparams/h8300self.sh: Similarly.
3045 * ld.texinfo (Options, --stack): Correct default value for stack
3050 * emultempl/aix.em : Handle import file XMC_XO and syscall symbols.
3054 * emultempl/beos.em: Declare prototypes for comparions functions,
3059 * emultempl/aix.em: Add missing prototype.
3060 * emultempl/lnk960.em: Likewise.
3061 * emultempl/vanilla.em: Likewise.
3062 * emultempl/armcoff.em: Likewise.
3063 * emultempl/armelf_oabi.em: Likewise.
3064 * emultempl/beos.em: Likewise.
3065 * emultempl/gld960c.em: Likewise.
3066 * emultempl/gld960.em: Likewise.
3068 * emulparams/elf64alpha.sh (PARSE_AND_LIST_PROLOGUE): Add parameter
3069 for prototype declaration.
3074 * ldmain.c (get_emulation): Add support for -mips32 and -mips64.
3078 * emultempl/pe.em: Add missing prototypes.
3079 (gld_${EMULATION_NAME}_after_open): Remove extra args to
3080 pe_find_data_imports.
3081 (pr_sym): Add unused attribute.
3085 * configure.tgt (i[3456]86-*-rtems*, m68*-*-rtems*): Change
3086 default from coff to elf.
3090 * emulparams/h8300helf.sh: Resync with h8300elf.sh. Update
3092 * emulparams/h8300self.sh: Similarly.
3096 * Makefile.am (ALL_EMULATIONS): Add eh8300elf.o, eh8300elf.o and
3098 (eh8300elf.c, eh8300helf.c, eh8300self.c): New targets.
3099 * configure.tgt (h8300-*-elf*): New case.
3100 * emulparams/h8300elf.sh, emulparams/h8300helf.sh: New files.
3101 * emulparams/h8300self.sh: New file.
3102 * Makefile.in: Regenerated.
3106 * ldmain.c (main): Rename BSIZE to BufferSize to avoid collision
3112 * Makefile.am (ALL_EMULATIONS): Add eelf64ppc.o and eelf64lppc.o.
3113 (eelf64ppc.c, eelf64lppc.c): Add make targets.
3115 * Makefile.in: Regenerate.
3116 * configure.tgt: Add powerpc64 support. Move pdp11, pjl, pj
3117 entries to correct alphabetical position.
3118 * emulparams/elf64ppc.sh: New.
3119 * emulparams/elf64lppc.sh: New.
3123 * ldmain.c (main): Declare BSIZE as static.
3127 * emultempl/elf32.em (place_orphan): Place orphan .rel* sections
3128 into .rel.dyn resp. .rela.dyn if combreloc.
3129 (get_script): If .x linker script is equal to .xn, only put it
3130 once into the binary.
3131 Add .xc and .xsc scripts.
3132 (parse_args): Handle -z combreloc and -z nocombreloc.
3133 * scripttempl/elf.sc (.rela.sbss): Fix a typo.
3134 For .xc and .xsc scripts put all .rel* or .rela* input sections
3135 but .rel*.plt and PLT-like sections into .rel.dyn resp. .rela.dyn.
3136 * genscripts.sh (GENERATE_COMBRELOC_SCRIPT): Set if SCRIPT_NAME
3138 Strip trailing whitespace from script.
3139 Generate .xc and .xsc scripts if requested.
3140 * ldmain.c (main): Initialize link_info.combreloc and
3141 link_info.spare_dynamic_tags.
3142 * lexsup.c (OPTION_SPARE_DYNAMIC_TAGS): Define.
3143 (ld_options): Add --spare-dynamic-tags option.
3144 (parse_args): Likewise.
3145 * ld.texinfo: Document -z combreloc and -z nocombreloc.
3146 * ldint.texinfo: Document .xc and .xsc linker scripts.
3147 * NEWS: Add notes about -z combreloc and SHF_MERGE.
3151 * emulparams/elf32fr30.sh: Add a newline.
3155 * deffilep.y: Add missing prototypes.
3156 * pe-dll.c: Likewise.
3160 * ldlang.c (insert_pad): Fix typos in last patch.
3162 * ldlang.c: When traversing lang_statement_union_type lists,
3163 consistently use "header.next" rather than "next".
3164 * mpw-eppcmac.c: Likewise.
3165 * emultempl/beos.em: Likewise.
3166 * emultempl/hppaelf.em: Likewise.
3167 * emultempl/pe.em: Likewise.
3168 * ldlang.h (union lang_statement_union): Remove "next" field.
3170 * ldlang.c (insert_pad): Use offsetof macro.
3171 (lang_size_sections): Always neuter padding statements.
3172 * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Delete.
3174 * pe-dll.c (pe_dll_fill_sections): Correct type of "relax" param
3175 passed to lang_size_sections.
3176 (pe_exe_fill_sections): Likewise.
3177 * emultempl/pe.em (output_prev_sec_find): Copied from elf32.em.
3178 (gld_${EMULATION_NAME}_place_orphan): Merge from elf32.em.
3182 * emultempl/aix.em: Formatting fixes.
3186 * ldlang.c (insert_pad): Make use of an existing pad statement if
3187 available. Move code calculating alignment, adjusting section
3188 alignment power, and adjusting dot to ..
3189 (size_input_section): .. here. Remove unused relax param.
3190 (lang_size_sections): Change boolean `relax' param to boolean *.
3191 Adjust call to size_input_section. Make use of insert_pad to
3192 place pad after the assignment statement. If relaxing, zap
3194 (reset_memory_regions): Reset output_bfd section sizes too.
3195 (relax_again): Move to..
3196 (lang_process): ..here. Adjust call to lang_size_sections, and
3197 remove duplicated code.
3198 * ldlang.h (lang_size_sections): Change `relax' param to boolean *.
3202 * ld.texinfo: Document that fill values now use the four least
3204 * emulparams/elf32fr30.sh (NOP): Update.
3205 * emulparams/elf32mcore.sh: Likewise.
3206 * emulparams/elf64_s390.sh: Likewise.
3207 * emulparams/elf_i386.sh: Likewise.
3208 * emulparams/elf_i386_be.sh: Likewise.
3209 * emulparams/elf_i386_chaos.sh: Likewise.
3210 * emulparams/elf_i386_ldso.sh: Likewise.
3211 * emulparams/elf_s390.sh: Likewise.
3212 * emulparams/elf_x86_64.sh: Likewise.
3213 * emulparams/i386moss.sh: Likewise.
3214 * emulparams/i386nw.sh: Likewise.
3215 * emulparams/m68kelf.sh: Likewise.
3216 * scripttempl/elf.sc: Update NOP comment.
3217 * scripttempl/elfi370.sc: Likewise.
3218 * scripttempl/elfm68hc11.sc: Likewise.
3219 * scripttempl/elfm68hc12.sc: Likewise.
3220 * scripttempl/nw.sc: Likewise.
3224 * ldgram.y (saved_script_handle): Initialize to NULL.
3225 * ldmain.c (main): Change check on saved_script_handle.
3229 * emultempl/elf32.em: Formatting fixes.
3230 (output_prev_sec_find): Test for bfd_ind_section too; do so by
3231 looking at sec->owner.
3232 (output_rel_find): Move function inside LDEMUL_PLACE_ORPHAN test.
3233 (gld${EMULATION_NAME}_place_orphan): Add a few comments. Remove
3234 unused code, and reorganize orphan section placement code.
3236 * ldlang.c (wild_doit): Rename to lang_add_section.
3237 * ldlang.h: Here too.
3238 * mpw-elfmips.c: And here.
3239 * emultempl/beos.em: And here.
3240 * emultempl/elf32.em: And here.
3241 * emultempl/hppaelf.em: And here.
3242 * emultempl/pe.em: And here.
3246 * emultempl/needrelax.em: New file.
3247 * emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Reference it.
3248 * Makefile.am (eelf64_ia64.c): Depend on it.
3249 * Makefile.in: Rebuild.
3253 * emultempl/elf32.em: For SEC_EXCLUDE sections, ensure that
3254 output_section is set non-NULL.
3256 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Return
3257 `true' for SEC_EXCLUDE sections so that the generic code doesn't
3258 needlessly create an output_section_statement. Treat a correctly
3259 named output_section_statement with NULL bfd_section as compatible.
3263 * emultempl/generic.em: Support EXTRA_EM_FILE.
3264 (ld_${EMULATION_NAME}_emulation): Support emulation parameters
3265 LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
3266 LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
3267 LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
3268 LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
3269 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
3270 LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
3271 LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
3272 LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
3273 LDEMUL_FIND_POTENTIAL_LIBRARIES.
3277 * scripttempl/elf.sc, scripttempl/elfd30v.sc,
3278 scripttempl/elfm68hc11.sc, scripttempl/elfm68hc12.sc,
3279 scripttempl/v850.sc: Keep .jcr data.
3285 * ldgram.y (had_script): Change name to saved_script_handle.
3286 Change type to file handle.
3287 * ld.h (had_script): Rename and retype.
3288 * ldfile.c (ldfile_open_command_file): Save the file handle
3289 used in saved_script_handle.
3290 * lexsup.c (parse_args): Do not allow -c option to alter
3291 saved_script_handle.
3292 * ldmain.c (main): Print out the linker script used if
3293 --verbose is given. Check saved_script_handle to obtain the
3294 external linker script used, or if NULL, dump the builtin
3296 * ld.texinfo: Document that --verbose now dumps the linker
3297 script used, regardless of whether it was an internal or an
3302 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
3304 * configure: Regenerate.
3308 * emultempl/elf32.em (output_prev_sec_find): Add missing prototype.
3310 * scripttempl/elf.sc: Move non-text .dynamic section before
3311 .plt/.got/.sdata* group.
3312 (OTHER_GOT_SECTIONS): Move to immediately after .got.
3313 (OTHER_SDATA_SECTIONS): Add.
3314 * emulparams/criself.sh: Use OTHER_SDATA_SECTIONS rather than
3316 * emulparams/crislinux.sh: Likewise.
3317 * emulparams/elf32b4300.sh: Likewise.
3318 * emulparams/elf32bmip.sh: Likewise.
3319 * emulparams/elf32bmipn32.sh: Likewise.
3320 * emulparams/elf32bsmip.sh: Likewise.
3321 * emulparams/elf32btsmip.sh: Likewise.
3322 * emulparams/elf32ebmip.sh: Likewise.
3323 * emulparams/elf32elmip.sh: Likewise.
3324 * emulparams/elf32l4300.sh: Likewise.
3325 * emulparams/elf32lmip.sh: Likewise.
3326 * emulparams/elf32lsmip.sh: Likewise.
3327 * emulparams/elf32ltsmip.sh: Likewise.
3328 * emulparams/elf64bmip.sh: Likewise.
3329 * emulparams/elf64btsmip.sh: Likewise.
3330 * emulparams/elf64ltsmip.sh: Likewise.
3334 * genscripts.sh: Source the emulparams script before each output
3335 script is generated so that variables like `RELOCATING' may affect
3336 variables defined in the emulparams script.
3340 * emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this
3343 * emultempl/beos.em (sort_sections): Modify for 2001-08-03 change,
3344 ie. iterate over wild_statement.section_list.
3345 (gld${EMULATION_NAME}_place_orphan): Likewise.
3349 * scripttempl/elfm68hc12.sc (FINISH_CODE, FINISH_RELOC): New to handle
3350 .fini[0-4] sections used by _exit
3351 (CTOR, DTOR): Export ctor/dtor symbols; move them to ROM.
3352 (*.text,*.data,*.bss): Take into account .text.*, .data.*, .bss.*.
3353 * scripttempl/elfm68hc11.sc: Likewise.
3357 * emultempl/beos.em (init): Add the missing initialization.
3361 * ld.texinfo (Input Section Basics): Clarify ordering of output
3363 * ldlang.c (callback_t): Add wildcard_list param.
3364 (walk_wild_section): Remove "section" param. Rewrite for
3365 lang_wild_statement_type change. Remove unique_section_p test.
3366 (walk_wild_file): Remove "section" param.
3367 (walk_wild): Remove "section" and "file" params.
3368 (lang_gc_wild): Likewise.
3369 (wild): Likewise. Modify for lang_wild_statement_type change.
3370 (wild_sort): Likewise. Add "sec" param.
3371 (gc_section_callback): Likewise.
3372 (output_section_callback): Likewise. Do unique_section_p test.
3373 (map_input_to_output_sections): Modify call to wild.
3374 (lang_gc_sections_1): Likewise.
3375 (print_wild_statement): Modify for lang_wild_statement_type
3377 (lang_add_wild): Replace filename, filenames_sorted param with
3378 filespec. Replace section_name, sections_sorted,
3379 exclude_filename_list with section_list.
3380 * ldlang.h (lang_add_wild): Here too.
3381 (lang_wild_statement_type): Replace section_name, sections_sorted,
3382 and exclude_filename_list with section_list.
3383 * ldgram.y (current_file): Delete.
3384 (%union): Add wildcard_list.
3385 (file_NAME_list): Set type to wildcard_list. Build a linked list
3386 rather than calling lang_add_wild for each entry.
3387 (input_section_spec_no_keep): Call lang_add_wild here instead.
3388 * ld.h (struct wildcard_list): Declare.
3389 * mri.c (mri_draw_tree): Modify to suit new lang_add_wild.
3393 * ldmain.c (main): initialize link_info.pei386_auto_import
3394 * pe-dll.c: new tables for auto-export filtering
3395 (auto_export): change API, pass abfd for contextual filtering.
3396 Loop thru tables of excluded symbols instead of comparing
3401 * pe-dll.c: new variable pe_dll_enable_extra_debug. New
3402 static variable current_sec (static struct sec *). Add
3403 forward declaration for add_bfd_to_link.
3404 (process_def_file): Don't export undefined symbols. Do not
3405 export symbols starting with "_imp__". Call auto_export()
3407 (pe_walk_relocs_of_symbol): New function.
3408 (generate_reloc): add optional extra debugging
3409 (pe_dll_generate_def_file): eliminate extraneous initial blank
3411 (make_one): enlarge symtab to make room for __nm__ symbols
3412 (DATA auto-import support).
3413 (make_singleton_name_thunk): New function.
3414 (make_import_fixup_mark): New function.
3415 (make_import_fixup_entry): New function.
3416 (pe_create_import_fixup): New function.
3417 (add_bfd_to_link): Specify that 'name' argument is a CONST
3419 * pe-dll.h: declare new variable pe_dll_extra_pe_debug;
3420 declare new functions pe_walk_relocs_of_symbol and
3421 pe_create_import_fixup.
3422 * emultempl/pe.em: add new options --enable-auto-import,
3423 --disable-auto-import, and --enable-extra-pe-debug.
3424 (make_import_fixup): New function.
3425 (pe_find_data_imports): New function.
3426 (pr_sym): New function.
3427 (gld_${EMULATION_NAME}_after_open): Add optional extra pe
3428 debugging. Call pe_find_data_imports. Mark .idata as DATA, not
3433 * ld.texinfo: add additional documentation for
3434 --export-all-symbols. Document --out-implib,
3435 --enable-auto-image-base, --disable-auto-image-base,
3436 --dll-search-prefix, --enable-auto-import, and
3437 --disable-auto-import.
3438 * ldint.texinfo: Add detailed documentation on auto-import
3443 * ld.texinfo (Simple Assignments): Fix computation in SECTIONS
3448 * Makefile.am: Update dependencies with "make dep-am".
3449 * Makefile.in: Regenerate
3453 * ldcref.c (check_section_sym_xref): New function.
3454 (check_nocrossrefs): Call it.
3455 (check_nocrossref): Interate over h->refs here instead of..
3456 (check_refs): ..here. Pass in the symbol name, section, and bfd
3457 rather than hash_entry pointers.
3458 (struct check_refs_info): Keep symbol name rather than hash entry.
3460 (check_reloc_refs): Tweak for above changes in check_refs_info.
3461 Only report references to section syms when symname is NULL to
3462 prevent duplicate messages for the same reloc.
3466 * ldexp.c (exp_print_tree): Use stderr if config.map_file is not
3467 available. Do not print NULL trees.
3468 (exp_print_token): Print unknown tokens with values > 126 as
3469 decimal values not ASCII characters.
3471 * ldlang.c (lang_leave_overlay): If a region is specified assign
3472 it to all sections inside the overlay unless they have been
3473 assigned to the own, non-default, memory region.
3475 * README: Add header for consistency with other README files.
3479 * emultempl/elf32.em (output_prev_sec_find): Never return
3480 bfd_abs_section_ptr, bfd_com_section_ptr nor
3481 bfd_und_section_ptr.
3485 * Makefile.am (em32relf.c): Change dependency from generic.em to
3487 * Makefile.in: Regenerate.
3491 * configure.tgt (i386-*-netbsdelf*): New target.
3492 (i386-*-netbsd*): Set targ_extra_emuls to `elf_i386'
3496 * emultempl/elf32.em (output_prev_sec_find): New.
3497 (place_orphan): Use it.
3501 * ldmain.c (main): Fix typos in the last change.
3505 * ldmain.c (main): Disallow -F and -f without -shared.
3509 * emultempl/pe.em (after_open): Check for the output_bfd not
3510 having any coff_data structure allocated to it.
3514 * emultempl/elf32.em: Do not assuming that contents of the buffer
3515 returned from basename function will remain unchanged accross other
3520 * scripttempl/elf.sc (DYNAMIC_PAD): Revert the change made on
3521 2001-07-03. It creates dynamic entries even for static binaries.
3525 * scripttempl/elf.sc (DYNAMIC_PAD): New variable.
3526 (DYNAMIC): Use it to reserve few dynamic entries for
3531 * emulparams/hppa64linux.sh: New file.
3532 * configure.tgt: hppa*64*-*-linux* uses hppa64linux.sh
3533 * Makefile.am (ALL_64_EMULATIONS): Add ehppa64linux.o
3534 (ehppa64linux.c): Add rule to make it.
3536 * Makefile.in: Regenerate.
3540 * ld.texinfo (Options, -r): Mention restrictions when using
3541 different object formats.
3545 * ldlang.c (lang_check): Emit fatal error if relocatable link
3546 between different object flavours with relocations in input.
3550 * ld.texinfo (-E, --export-dynamic): Mention --version-script.
3551 (--version-script): Mention the language support.
3555 * ldlang.c (lang_check): Revert the change mode on 2001-06-15.
3559 * Makefile.am (ld.1): Remove the prefix `$(srcdir)/'.
3560 (diststuff): Add $(MANS).
3561 * Makefile.in: Regenerated.
3567 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
3568 Update for API change in bfd_elf${ELFSIZE}_size_dynamic_sections.
3569 * mpw-elfmips.c (gldelf32ebmip_before_allocation): Ditto.
3570 * ld.h (args_type): Remove member export_dynamic. All users
3571 changed to use struct bfd_link_info member.
3573 * Makefile.am (ecriself.c, ed10velf.c, ei386moss.c): Depend on
3574 $(srcdir)/emultempl/elf32.em, not $(srcdir)/emultempl/generic.em.
3575 * Makefile.in: Regenerate.
3579 * ldlang.c (init_os): Add the newline to the einfo call.
3580 (lang_check): Likewise.
3581 (lang_do_version_exports_section): Likewise.
3585 * lexsup.c (parse_args); Save optind to report unrecognized
3590 * ldlang.c (lang_check): Emit fatal error if relocatable link
3591 between different object flavours.
3593 * lexsup.c (parse_args) <case OPTION_EXPORT_DYNAMIC, case 'E'>:
3594 Set new link_info member export_dynamic.
3595 * ldmain.c (main): Initialize new link_info member export_dynamic.
3599 * ldlang.c (walk_wild): Only call walk_wild_file if
3600 lookup_name returns something.
3601 (lookup_name): If load_symbols fails, return NULL.
3602 (load_symbols): Change to a boolean function.
3603 (open_input_bfds): If load_symbols fails then do not make the
3608 * ldlang.c (record_bfd_errors): Remove.
3610 * emultempl/aix.em: Fix copyright dates.
3614 * elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase.
3615 (TEXT_START_ADDR): Likewise.
3619 * configure.host: Set HOSTING_CRT0/HOSTING_LIBS correctly for s/390.
3623 * emultempl/pe.em (init): Reduce default stack reserve to 0x200000.
3627 * ldlang.c (open_input_bfds): Don't change the bfd error
3628 handler whilst loading symbols.
3632 * configure.tgt: Remove i370-mvs architecture, it is not currently
3637 * emulparams/ppcmacos.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
3638 like emulparams/aixppc.sh.
3642 * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Move
3643 setting of output_filename after bfd_scan_arch.
3644 * emultempl/pe.em: Likewise.
3648 * emulparams/aixrs6.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
3649 like emulparams/aixppc.sh.
3651 * emultempl/aix.em (sc): Use ${srcdir}/emultempl/ostring.sed
3652 instead of ${srcdir}/emultempl/stringify.sed.
3656 * emulparams/elf64_aix.sh: Change settings to match IBM linker
3661 * configure.host: Replace linuxoldld with linux*oldld.
3662 * configure.tgt: Likewise.
3666 * emultempl/stringify.sed: Removed again.
3670 * emultempl/aix.em (OUTPUT_ARCH): Defined.
3671 (gld${EMULATION_NAME}_before_parse): Initialize
3672 ldfile_output_architecture, ldfile_output_machine and
3673 ldfile_output_machine_name from ${OUTPUT_ARCH} if possible.
3674 * emultempl/beos.em: Likewise.
3675 * emultempl/elf32.em: Likewise.
3676 * emultempl/linux.em: Likewise.
3677 * emultempl/mipsecoff.em: Likewise.
3678 * emultempl/pe.em: Likewise.
3679 * emultempl/sunos.em: Likewise.
3683 * emultempl/aix.em : (gld${EMULATION_NAME}_read_file)
3684 udate import file format.
3685 (change_symbol_mode) New, same
3686 (is_syscall) New, same
3687 * emulparams/aixppc.sh : add SYSCALL_MASK and SYMBOL_MODE_MASK
3688 * emulparams/aixppc64.sh : same
3689 * emulparams/aixrs6.sh : same
3690 * emulparams/ppcmacos.sh : same
3691 * emultempl/aix.em : use strtoull to parse options
3692 * Makefile.am : add eaixppc64 emulation for xcoff64
3693 * Makefile.in : same
3694 * configure.tgt : same
3696 * scripttempl/aix.sc : default text section offset to 0x10000000
3697 default data section offset to 0x20000000
3698 add .sv3264 and .sv64 pseudo sections
3699 loader and debug sections use the currect section offset.
3701 * emultempl/aix.em : Add xcoff64 support
3702 Add -binitfini support
3703 (gld${EMULATION_NAME}_before_parse) -binitfini
3704 (gld${EMULATION_NAME}_parse_args) same
3705 (gld${EMULATION_NAME}_before_allocation) format change for special
3708 * emulparams/aixppc64.sh : New file for xcoff64 support
3712 * emultempl/elf32.em (ELF_INTERPRETER_SET_DEFAULT): Use this new
3713 variable to avoid non-portable shell construct.
3717 * ldmain.c (get_emulation): Add -mips5 command line argument.
3721 * emulparams/elf_i386_ldso.sh: New, copied from elf_i386.sh.
3722 (ELF_INTERPRETER_NAME): Define it.
3723 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Use
3725 * configure.tgt (targ_emul, targ_extra_emuls)
3726 [i[3456]86-*-solaris2*, i[3456]86-*-solaris*]: Use elf_i386_ldso
3727 as primary, elf_i386 as extra.
3728 * Makefile.am (ALL_EMULATIONS): Added eelf_i386_ldso.o.
3729 (eelf_i386_ldso.c): New rule.
3730 * Makefile.in: Rebuilt.
3734 * lexsup.c (ld_options): Allow -I to be an alias for
3735 --dynamic-linker. This is for Solaris compatability.
3736 * ld.texinfo: Document that -I can be used.
3741 * ldlang.c (wild_doit): Use linker_has_input to reliably determine
3742 whether an input section is the first one assigned to an output
3744 Assorted formatting fixes.
3748 * Makefile.am (ld.dvi): Search bfd/doc for texinfo files.
3749 * Makefile.in: Ditto.
3753 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Put
3754 .gnu.linkonce.ia64unw{,i} sections into corresponding .IA_64.unwind*
3756 * emulparams/elf64_aix.sh (OTHER_READONLY_SECTIONS): Likewise.
3760 * ldlang.c (lang_process): Call bfd_merge_sections.
3764 * ldgram.y: Fix typo.
3768 * emultempl/elf32.em: Include "libiberty.h".
3769 (gld${EMULATION_NAME}_vercheck): Call basename () to get the
3770 basename of the bfd filename.
3771 (gld${EMULATION_NAME}_stat_needed): Likewise.
3772 (gld${EMULATION_NAME}_try_needed): Likewise.
3773 (gld${EMULATION_NAME}_open_dynamic_archive): Likewise.
3777 * emultempl/pe.em: Include <ctype.h>.
3781 * emulparams/elf32openrisc.sh: New file.
3783 * Makefile.am: Add OpenRISC target.
3784 * Makefile.in: Regenerated.
3786 * configure.tgt: Add openrisc-*-* mapping.
3790 * emultempl/aix.em: Replace buystring with xstrdup.
3791 * emultempl/beos.em: Replace buystring with xstrdup.
3795 * ldfile.c: Include "libiberty.h".
3796 * ldlex.l: Likewise.
3798 * ldmisc.c (buystring): Removed.
3799 * ldmisc.h: Likewise.
3801 * ldfile.c: Replace buystring with xstrdup.
3802 * ldlang.c: Likewise.
3803 * ldlex.l: Likewise.
3804 * ldmain.c: Likewise.
3805 * ldmisc.c: Likewise.
3806 * lexsup.c: Likewise.
3807 * mpw-eppcmac.c: Likewise.
3811 * emulparms/elf_x86_64.sh (MAXPAGESIZE): Fix value.
3815 * ldlang.c (load_symbols): Give emulation a chance
3816 to process unrecognized file before fatal error is
3817 reported, not after.
3821 * configure.tgt: Add arm-vxworks target.
3822 * scripttempl/armcoff.sc: Support .text or .data as a section name
3828 * ld.texinfo: Document --fatal-warnings.
3831 * ldmisc.c (vfinfo): Set flag to inhibit making executable if
3832 warnings have been turned into errors.
3833 * lexsup.c (OPTION_WARN_FATAL): Define.
3834 (ld_options): Entry for --fatal-warnings.
3835 (parse_args): Handle OPTION_WARN_FATAL.
3836 * ld.h (ld_config_type): Add fatal_warnings field.
3840 * ldmain.c (main): Default to discard_sec_merge.
3841 * lexsup.c (OPTION_DISCARD_NONE): Define.
3842 (ld_options): Add --discard-none.
3843 (parse_args): Handle OPTION_DISCARD_NONE.
3844 * ldlang.c (wild_doit): SEC_MERGE should be set in the output
3845 section only if SEC_MERGE and SEC_STRINGS flags and entsize of
3846 all its input sections match.
3850 * Makefile.am (ALL_EMULATIONS): Add eelf32ltsmip.o.
3851 (ALL_64_EMULATIONS): Add eelf64btsmip.o and eelf64ltsmip.o.
3852 (eelf32ltsmip.c): New target.
3853 (eelf64btsmip.c): Likewise.
3854 (eelf64ltsmip.c): Likewise.
3855 * Makefile.in: Regenerated.
3857 * configure.tgt (mips*el-*-linux-gnu): Uses traditional MIPS
3859 (mips*-*-linux-gnu*): Likewise.
3861 * emulparams/elf32ltsmip.sh: New. Traditional little endian
3863 * emulparams/elf64btsmip.sh: New. Traditional 64bit big endian
3865 * emulparams/elf64ltsmip.sh: New. Traditional 64bit little
3870 * emulparams/criself.sh (EXECUTABLE_SYMBOLS): Cannot provide
3871 correct value of __Stext here.
3872 (TEXT_START_SYMBOLS): Define; always define __Stext, to start of
3875 * emulparams/crislinux.sh: Remove FIXME.
3879 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 64k.
3880 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Likewise.
3884 * configure.tgt (cris-*-*): Change default emulation to criself.
3885 (cris-*-*aout*): New rule.
3889 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 0x4000.
3890 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
3894 * ld.texinfo (Overview): Fix syntax in texi code.
3898 * ld.texinfo: Put @c man indications to generate the ld man page.
3899 When generating man, define all the variables. Define SEEALSO
3900 and SYNOPSIS. Re-organize some lines to avoid the cross references.
3901 * Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variables.
3902 (ld.1): Generate from ld.texinfo.
3903 * Makefile.in: Regenerate.
3907 * scripttempl/i386go32.sc: Support the GCC flags '-ffunction-sections'
3908 and '-fdata-sections'. Set the VMA of STABS sections to zero.
3912 * emultmpl/elf32.em (gld${EMULATION_NAME}_search_needed): If NAME
3913 is an absolute path look only for this file and not along the path.
3917 * emultempl/elf32.em (OPTION_GROUP): New macro.
3918 Add new option Bgroup to longopts.
3919 (gld*_parse_args): Handle GROUP_OPTION and recognize -z defs.
3920 (gld*_list_options): Add -Bgroup and -z defs.
3921 * ld.1: Document -Bgroup and -z defs.
3922 * ld.texinfo: Likewise.
3926 * scripttempl/elfd10v.sc (.rodata,.rodata1,.data1,.sdata): Deal
3927 with sections created by -fdata-sections.
3928 (.dynbss,.bss): Ditto.
3932 * emultempl/m68kelf.em (m68k_elf_after_allocation): Call
3933 after_allocation_default, not gld..._before_allocation.
3937 * configure.in (BFD_VERSION): New.
3938 (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
3939 * configure: Regenerate.
3940 * Makefile.am: Run "make dep-am"
3941 * Makefile.in: Regenerate.
3945 * emulparams/elf64_aix.sh: Add additional read-only sections;
3946 uncomment lines which are now required.
3950 * ldlang.c (open_input_bfds): Set the bfd error handler so
3951 that problems can be caught whilst loading symbols.
3952 (record_bfd_errors): New function: Report BFD errors and mark
3953 the executable output as being invalid.
3957 * configure.host: Add configuration for ia64-*-aix*.
3958 * Makefile.am (ALL_64_EMULATIONS): Add emulation for ia64-*-aix*.
3959 Add dependencies for eelf64_aix.c.
3960 * Makefile.in: Regenerate.
3961 * configure.tgt: Add ia64-*-aix* mapping.
3962 * emulparams/elf64_aix.sh: Add settings for elf64 on aix5.
3966 * ldfile.c (ldfile_open_file): Set entry->search_dirs_flag to
3967 false if we found the file.
3971 * configure.tgt: Add FreeBSD/Alpha, FreeBSD/x86-64, FreeBSD/ia64,
3972 FreeBSD/PowerPC, FreeBSD/arm, and FreeBSD/sparc64 entries.
3976 * Makefile.am: Add PDP-11 target.
3977 * configure.tgt: Likewise.
3978 * emulparams/pdp11.sh: New file.
3982 * configure.host: Add a generic FreeBSD configuration entry such that
3983 all [modern] FreeBSD systems on all platforms will look the same.
3987 * configure.tgt: Remove mention of earmelf_linux26.
3991 * emulparams/elf64_ia64.sh (OTHER_GOT_SYMBOLS): Remove.
3995 * ldexp.h (node_type): Add etree_provided.
3996 * ldexp.c (exp_fold_tree): Handle etree_provided. Set the node
3997 type to etree_provided if defined by PROVIDE. Allow updating
3999 (exp_print_tree): Handle etree_provided.
4000 * mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle
4005 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add
4006 .IA_64.unwind.* pattern to unwind table section and
4007 .IA_64.unwind_info* pattern to unwind info section.
4011 * Makefile.am: Add linux target for S/390.
4012 * Makefile.in: Likewise.
4013 * configure.host: Likewise.
4014 * configure.tgt: Likewise.
4015 * emulparams/elf64_s390.sh: New file.
4016 * emulparams/elf_s390.sh: New file.
4020 * configure.tgt (sparc64-*-linux-gnu*): Add elf32_sparc into
4022 (sparc-*-linux-gnu*): Add elf64_sparc into targ_extra_libpath.
4026 * Makefile.am: Remove mention of earmelf_linux26.
4027 * Makefile.in: Regenerate.
4031 * emulparams/armelf_linux.sh (TEXT_START_ADDR): Set to 0x8000.
4032 * emulparams/armelf_linux26.sh: Delete.
4033 * configure.tgt: Remove mention of armelf_linux26 emulation.
4037 * ld.1: Replace occurances of -oformat with --oformat.
4041 * ldlang.c (lang_leave_overlay): Don't set lma_region when
4042 load_base is specified.
4046 * emultempl/elf32.em: Correct spelling in comments and listed
4051 * ldlang.c (lang_leave_overlay): Only set lma_region from the
4052 default for the first section of a group of overlay sections.
4056 * Makefile.am (GENSCRIPTS): Pass exec_prefix.
4057 * Makefile.in: Regenerate.
4058 * genscripts.sh: Use exec_prefix parameter to specify tool lib.
4059 Check for null tool_dir.
4063 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add IA_64.unwind
4064 and IA_64.unwind.info.
4068 * ldlang.c (lang_check): Merge the private data only if the
4069 input file has contents.
4073 * emulparams/hppalinux.sh (OUTPUT_FORMAT): Set to elf32-hppa-linux.
4075 * emultempl/hppaelf.em (hppaelf_after_parse): New function,
4076 enabling search for libmilli. On a relocatable link, make .text
4078 (LDEMUL_AFTER_PARSE): Define.
4079 (hppaelf_finish): Correct spelling of relocatable in comments.
4081 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
4082 rummage through the script for sections on the unique list.
4083 Correct length of strncmp for ".note".
4084 (gld${EMULATION_NAME}_check_needed): Rearrange function.
4086 * ldlang.c (unique_section_list): New var.
4087 (unique_section_p): New function.
4088 (walk_wild_section): Don't match sections on unique_section_list.
4089 (lang_add_unique): New function.
4090 Correct spelling of relocatable in comments.
4092 * ldlang.h (struct unique_sections): Declare.
4093 (unique_section_list): Declare.
4094 (unique_section_p): Declare.
4095 (lang_add_unique): Declare.
4097 * lexsup.c (ld_options): Allow --unique to take an optional arg.
4098 (parse_args [OPTION_UNIQUE]): Call lang_add_unique.
4100 * ld.texinfo (--unique): Update.
4104 * lexsup.c (parse_args): Remove spurious white space.
4108 * lexsup.c (parse_args): Update copyright date.
4112 * configure.host: Set HOSTING_LIBS appropriately for ix86-cygwin.
4116 * scripttempl/h8300.sc: Fix formatting. Fix a comment typo.
4117 * scripttempl/h8300h.sc: Fix formatting.
4118 * scripttempl/h8300s.sc: Likewise.
4119 * scripttempl/h8500.sc: Likewise.
4120 * scripttempl/h8500b.sc: Likewise.
4121 * scripttempl/h8500c.sc: Likewise.
4122 * scripttempl/h8500m.sc: Likewise.
4123 * scripttempl/h8500s.sc: Likewise.
4127 * emultempl/elf32.em: Only perform Linux ld hints processing when
4132 * ld.texinfo (Bug Reporting): Update email address for reports.
4136 * lexsup.c (parse_args): Set opterr to 0 and detect unparsed long
4137 options by checking for a return value of '?' not -1.
4141 * lexsup.c (struct ld_option): Add new enum value:
4143 (ld_options[]): Change -omagic, -output and -oformat options
4144 to be EXACTLY_TWO_DASHES.
4145 (OUTPUT_COUNT): Use ARRAY_SIZE.
4146 (parse_args): Change parameter 'argc' to unsigned.
4147 Place EXACTLY_TWO_DASHES options into new really_longopts
4149 If getopt_long_only fails, try calling getopt_long using the
4150 really_longopts array.
4151 (help): Print a double dash for both EXACTLY_TWO_DASHES and
4154 * ldlex.h: Fix prototype of parse_args.
4156 * ld.texinfo: Document that long options starting with 'o'
4157 must be preceeded by two dashes. Change example of a single
4158 dashed long option from -oformat to -trace-symbol.
4162 * emultempl/pe.em (OPTION_NO_DEFAULT_EXCLUDES): Define.
4163 (longopts[]): New --no-default-excludes option.
4164 (gld_${EMULATION_NAME}_list_options): Document.
4165 (gld_${EMULATION_NAME}_parse_args): Handle.
4169 * ldlang.c (new_stat): Revert the last beautification with "innocent"
4170 whitespace, it breaks the K&R C preprocessor.
4174 * ld.texinfo: Add notes about --whole-archive and gcc.
4178 * lexsup.c (OPTION_ALLOW_SHLIB_UNDEFINED): Define.
4179 (ld_options): Entry for --allow-shlib-undefined.
4180 (parse_args): Handle OPTION_ALLOW_SHLIB_UNDEFINED.
4181 * ldmain.c (main): Initialize link_info.allow_shlib_undefined
4183 * ld.texinfo: Document new command line switch.
4187 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS):
4188 .fixup is actually read/write.
4189 * emulparams/elf32lppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
4190 * emulparams/elf32ppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
4191 * emulparams/elf32lppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
4195 * NEWS: Add note about x86_64 architecture.
4199 * scripttempl/i386go32.sc: Use PROVIDE with _etext, _edata, _end.
4200 Set DWARF2 sections to a VMA of zero.
4204 * configure.tgt (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
4206 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
4207 (sparc*-*-rtems*): Switched from a.out to ELF.
4211 * Makefile.am (ALL_EMULATIONS): Add eelf_x86_64.o
4212 (eelf_x86_64.c): New.
4213 * Makefile.in: Regenerate.
4214 * configure.tgt: Add support for x86_64-*-linux-gnu*.
4215 * emulparams/elf_x86_64.sh: New.
4219 * emulparams/crislinux.sh (ENTRY): Change back to _start.
4220 (TEXT_START_SYMBOLS): Remove conditional setting of __start.
4222 * scripttempl/crisaout.sc: Change all RELOCATING not related to
4223 merging non-a.out sections into CONSTRUCTING.
4227 * ld.1 (COPYING): Mention that the GNU Free Documentation
4228 License is present in the sources, but not the output, and
4229 also available from the GNU website.
4230 (GNU Free Documentation License): Comment out this section.
4234 * emulparams/elf64alpha.sh (ENTRY): Remove leading underscore as ELF
4239 * ld.1: Remove old date so it does not give the impression the manpage
4244 * configure.tgt (xscale-coff): Add target.
4245 (xscale-elf): Add target.
4249 * ldmain.c (main): Remove redundant init of config.make_executable
4254 * emulparams/elf64alpha.sh (MAXPAGESIZE): Typo -- 64k, not 1M.
4258 * scripttempl/h8300.sc: Fix formatting.
4259 * scripttempl/h8300h.sc: Likewise.
4260 * scripttempl/h8300s.sc: Likewise.
4264 * scripttempl/elf32avr.sc: Fix bug in .eeprom segment.
4268 * emultempl/pe.em: Define ___start_SECNAME and ___stop_SECNAME
4269 around orphan sections whose names can be represented in C.
4273 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): New local
4274 hold_sdata. If SEC_SMALL_DATA set, set place to hold_sdata.
4278 * ld.texinfo: Add GNU Free Documentation License.
4279 * ldint.texinfo: Add GNU Free Documentation License.
4280 * ld.1: Add GNU Free Documentation License.
4284 * ldlex.l (yy_create_string_buffer): Init yy_is_our_buffer,
4285 yy_is_interactive, yy_at_bol, and yy_fill_buffer.
4287 * Makefile.am (DISTCLEANFILES): Add stringify.sed.
4288 Move 2000-11-02 Makefile.in changes to this file.
4289 * Makefile.in: Regenerate.
4293 * scripttempl/h8300.sc: Use ${CONSTRUCTING...} to enclose
4294 constructors and destructors.
4295 * scripttempl/h8300h.sc: Ditto.
4296 * scripttempl/h8300s.sc: Ditto.
4297 * scripttempl/h8500.sc: Ditto.
4298 * scripttempl/h8500b.sc: Ditto.
4299 * scripttempl/h8500c.sc: Ditto.
4300 * scripttempl/h8500m.sc: Ditto.
4301 * scripttempl/h8500s.sc: Ditto.
4302 * scripttempl/v850.sc: Ditto.
4303 * scripttempl/w65.sc: Ditto.
4304 * scripttempl/z8000.sc: Ditto.
4308 * Makefile.in (e_i386_chaos.c): New rule.
4309 (ALL_EMULATIONS): Added e_i386_chaos.o.
4310 * emulparams/elf_i386_chaos.sh: New file.
4311 * configure.tgt: Recognise i[3456]86-chaosdev-storm-chaos.
4315 * emulparams/elf64_sparc.sh (TEXT_START_ADDR,
4316 NONPAGED_TEXT_START_ADDR): Set to 4GB for Solaris targets.
4317 Fix sed invocation, so that it coped with '/' in Solaris 64bit
4318 library path suffix.
4323 * scripttempl/crisaout.sc (.text, .data): Pad, with ALIGN (32),
4324 for consecutive sections.
4328 * lexsup.c: New option OPTION_TARGET_HELP. Prints all target specific
4330 * ld.texinfo: Added notes about this new option.
4334 * emultempl/pe.em (_after_open): Add tests of return values from
4335 bfd functions. Emit appropriate error messages if necessary.
4339 * emultempl/pe.em (_after_open): Delete 'is2' and 'nsyms'
4340 local variables - they are not used, but leave in the call to
4341 bfd_canonicalize_symtab.
4342 (_open_dynamic_archive): Add #ifdef DLL_SUPPORT around use of
4343 pe_dll_search_prefix.
4347 * emultempl/pe.em (pe_dll_search_prefix): New variable,
4348 (longopts): New --dll-search-prefix option.
4349 (gld_${EMULATION_NAME}_list_options): Document.
4350 (gld_${EMULATION_NAME}_parse_args): Handle.
4351 (gld_${EMULATION_NAME}_open_dynamic_archive): When linking
4352 dynamically, search for a dll named '<prefix><basename>.dll'
4353 in preference to 'lib<basename>.dll' if --dll-search-prefix
4358 * ldlang.c (section_already_linked): Set kept_section instead of
4363 * deffile.h: Fix formatting.
4364 * lexsup.c: Likewise.
4369 * pe-dll.c (make_one): Do not generate code thunk for DATA
4371 (process_def_file): deduce DATA flag for auto-export sumbols.
4375 * ld.h: Fix formatting.
4376 * ldcref.c: Likewise.
4377 * ldctor.h: Likewise.
4378 * ldemul.c: Likewise.
4379 * ldemul.h: Likewise.
4380 * ldexp.c: Likewise.
4381 * ldexp.h: Likewise.
4382 * ldfile.c: Likewise.
4383 * ldfile.h: Likewise.
4384 * ldlang.c: Likewise.
4385 * ldlang.h: Likewise.
4386 * ldmain.c: Likewise.
4387 * pe-dll.c: Likewise.
4389 * pe-dll.c: Revert some formatting fixes.
4393 * pe-dll.c: Fix formatting.
4397 * ldlang.c: Fix formatting.
4401 * pe-dll.c (fill_edata): initialize entire block
4402 (make_one): fill in correct section.
4406 * ldexp.c: Fix formatting.
4410 * emultempl/pe.em (gld_*_after_open): detect case where there two
4411 import libraries for same dll; rename one to ensure proper link
4414 * pe-dll.c (process_def_file): compare ordinals to -1, not 0; fix
4416 (generate_edata): fix typo
4420 * scripttempl/crisaout.sc (ENTRY): Now __start.
4421 (.text): Add default setting for __start.
4422 Remove CONSTRUCTORS handling.
4423 (/DISCARD/): Add .gnu.warning.*.
4424 * emulparams/crislinux.sh (ENTRY): Now __start.
4425 (TEXT_START_SYMBOLS): New; provide __Stext and __start default.
4426 * emulparams/criself.sh (OUTPUT_FORMAT): Now elf32-us-cris.
4427 (ENTRY): Now __start.
4428 (INITIAL_READONLY_SECTIONS): Add KEEP for .startup.
4429 (EXECUTABLE_SYMBOLS): Add default setting for __start.
4433 * deffile.h: Fix formatting.
4435 * ldcref.c: Likewise.
4436 * ldctor.c: Likewise.
4437 * ldctor.h: Likewise.
4438 * ldemul.c: Likewise.
4439 * ldemul.h: Likewise.
4440 * ldexp.c: Likewise.
4441 * ldexp.h: Likewise.
4442 * ldfile.c: Likewise.
4443 * ldfile.h: Likewise.
4444 * ldlang.c: Likewise.
4445 * ldlang.h: Likewise.
4446 * lexsup.c: Likewise.
4448 * pe-dll.c: Likewise.
4452 * pe-dll.c (process_def_file): Uninitialized data wasn't
4453 exported with --export-all-symbols switch.
4457 * pe-dll.c (fill_edata): rearrange the data so that ordinals and
4458 noname work properly.
4462 * ld.texinfo (HPPA ELF32): New section.
4464 * emultempl/hppaelf.em (group_size): New.
4465 (hppaelf_finish): Pass group_size to elf32_hppa_size_stubs.
4466 (PARSE_AND_LIST_PROLOGUE): Add OPTION_STUBGROUP_SIZE.
4467 (PARSE_AND_LIST_LONGOPTS): Add --stub-group-size. Duplicate
4468 options to prevent abbreviations matching.
4469 (PARSE_AND_LIST_OPTIONS): Describe the above. Reformat.
4470 (PARSE_AND_LIST_ARGS_CASES): Handle it.
4474 * emultempl/m68kelf.em: Conditionalise the embedded relocs feature
4475 on the m68*-*-elf target. Make it support COFF input objects.
4479 * ldmain.c: Fix formatting.
4480 * ldmisc.c: Likewise.
4481 * ldver.c: Likewise.
4482 * ldwrite.c: Likewise.
4486 * ldwrite.c (clone_section): Silence gcc warnings.
4490 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Handle
4491 out of memory failure.
4493 * ldwrite.c (ldwrite): Remove unnecessary einfo arg.
4494 (clone_section): Handle out of memory failures. Rename var to
4495 avoid c++ reserved word.
4499 * emultempl/hppaelf.em (hppaelf_add_stub_section): Rename
4500 stub_name param to stub_sec_name.
4501 (hppaelf_finish): Modify call to elf32_hppa_size_stubs.
4505 * emultempl/m68kelf.em: New file.
4506 * emulparams/m68kelf.sh (EXTRA_EM_FILE): Use it.
4507 * Makefile.am (em68kelf.c): Add dependency on m68kelf.em.
4508 * Makefile.in: Regenerate.
4512 * emulparams/hppalinux.sh (DATA_START_SYMBOLS): Provide $global$
4517 * ldmain.c (multiple_definition): Disable relaxation if
4518 multiple symbol definitions are encountered - otherwise the
4519 linker could abort with an assertion failure.
4523 * mri.c: Fix formatting.
4527 * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
4528 * configure: Rebuild.
4532 * Makefile.am (lexsup.o): Also depend on $(INCDIR)/demangle.h.
4533 * Makefile.in: Rebuild.
4537 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Fix
4538 broken list handling. Create __start_SECNAME and __stop_SECNAME
4539 when no place-holder. Add some comments. Test both SEC_CODE and
4540 SEC_READONLY for hold_text to prevent .rodata orphan poisoning.
4541 Handle case where no output section statement created.
4545 * configure.tgt (sh-*-linux*): Added.
4546 * Makefile.am: Added eshelf_linux and eshlelf_linux.
4547 * Makefile.in: Rebuilt.
4548 * emulparams/shelf_linux.sh: New file.
4549 * emulparams/shlelf_linux.sh: New file.
4553 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
4554 try shuffling sections when the orphan happens to be the place
4555 holder. Keep count of unique section names generated so we speed
4556 the search for a new name.
4560 * configure: Rebuilt with new libtool.m4.
4564 * Makefile.in: Regenerate.
4565 * aclocal.m4: Regenerate.
4566 * configure: Regenerate.
4567 * config.in: Regenerate.
4568 * po/ld.pot: Regenerate.
4570 * ldint.texinfo: Remove CVS revision marker - it foils local
4573 * emultempl/ticoff.em: Remove extraneous comma.
4577 * emultempl/hppaelf.em (hppaelf_add_stub_section): Add SEC_RELOC
4578 to stub section flags.
4579 (hppa_for_each_input_file_wrapper): New.
4580 (hppa_lang_for_each_input_file): New.
4581 (lang_for_each_input_file): Define to call above.
4582 (multi_subspace): New.
4583 (hppaelf_finish): Pass multi_subspace to elf32_hppa_size_stubs.
4584 (PARSE_AND_LIST_PROLOGUE): Define.
4585 (PARSE_AND_LIST_LONGOPTS): Define.
4586 (PARSE_AND_LIST_OPTIONS): Define.
4587 (PARSE_AND_LIST_ARGS_CASES): Define.
4588 (hppaelf_finish): Call elf32_hppa_set_gp.
4589 (hppaelf_set_output_arch): Remove.
4590 (LDEMUL_SET_OUTPUT_ARCH): Remove.
4592 * emulparams/hppalinux.sh (ELFSIZE): Define.
4594 (OTHER_READONLY_SECTIONS): Define.
4596 (GENERATE_SHLIB_SCRIPT): Define.
4598 * ldlang.c: Add missing prototypes, and tidy others. Change CONST
4599 to const throughout. Change `void *' to `PTR' throughout.
4600 (lang_memory_default): Function is local to file, add `static'.
4602 * Makefile.am (ehppaelf.c): Depend on emultempl/elf32.em.
4603 (ehppalinux.c): Likewise.
4604 (earmelf.c): Likewise.
4605 (earmelf_linux.c): Likewise.
4606 (earmelf_linux26.c): Likewise.
4607 * Makefile.in: Regenerate.
4609 * ld.h (ld_config_type): Add unique_orphan_sections.
4610 * lexsup.c (OPTION_UNIQUE): Define.
4611 (ld_options): Add "--unique".
4612 (parse_args): Handle it.
4613 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
4614 search for an existing output section if unique_orphan_sections is
4615 set. Make use of bfd_get_unique_section_name rather than
4616 duplicating code here.
4617 * ld.texinfo: Describe --unique.
4619 * lexsup.c (ld_options): Make split-by-reloc arg optional. Add
4620 optional arg to split-by-file.
4621 (parse_args): Handle them.
4622 * ld.texinfo: Update description of these options.
4623 * ldwrite.c (clone_section): Pass in the section name. Replace
4624 local code with bfd_get_unique_section_name.
4625 (split_sections): Tidy code and comments. Use a list traversal
4626 more appropriate to the list construction. Handle cooked section
4627 sizes. Split when split_by_reloc reached rather than exceeded.
4628 Track section size and split when split_by_file reached. Fix
4629 link_order_tail (even though it's not used).
4630 (ldwrite): Modify condition for calling split_sections to suit
4631 changed split_by_reloc and split_by_file.
4632 * ldmain.c (main): Init config.split_by_reloc and
4633 config.split_by_file to -1.
4634 * ld.h (ld_config_type): Change split_by_reloc to unsigned.
4635 Change split_by_file to bfd_size_type.
4639 * configure.in: Increase version number to 2.10.91.
4640 * NEWS: Mention new ability to support removal of duplicate DWARF2
4642 * configure: Regenerate.
4643 * aclocal.m4: Regenerate.
4644 * config.in: Regenerate.
4648 * scripttempl/elf.sc: Add .gnu.linkonce.wi.* to .debug_info
4650 * scripttempl/elf32avr.sc: Ditto.
4651 * scripttempl/elfd10v.sc: Ditto.
4652 * scripttempl/elfd30v.sc: Ditto.
4653 * scripttempl/elfi370.sc: Ditto.
4654 * scripttempl/elfm68hc11.sc: Ditto.
4655 * scripttempl/elfm68hc12.sc: Ditto.
4656 * scripttempl/elfi386beos.sc: Ditto.
4657 * scripttempl/v850.sc: Ditto.
4661 * acinclude.m4: Include libtool and gettext macros from the
4663 * aclocal.m4, configure: Rebuilt.
4667 * ldlang.c (open_output): When choosing the target for a
4668 particular endianness, do nothing if the target is not
4673 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
4674 check -rpath nor LD_RUN_PATH for cross link.
4675 * ld.texinfo: Document the change.
4679 * NEWS: Mention support for CRIS.
4683 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Get
4684 the current runpath list from bfd_elf_get_runpath_list ()
4689 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search
4690 the DT_RPATH/DT_RUNPATH entries for DT_NEEDED after
4691 LD_LIBRARY_PATH for native linker. Display the needed DSO if
4692 trace_file_tries is non-zero.
4693 (gld${EMULATION_NAME}_try_needed): Report the needed DSO found
4694 if trace_file_tries is non-zero.
4696 * ld.texinfo: Document the usage of DT_RPATH/DT_RUNPATH.
4701 * NEWS: Mention i860 support.
4705 * scripttempl/elf.sc: Fix last change to use correct comment
4710 * scripttempl/elf.sc: Add a comment giving the correspondence
4711 between sections, per-datum sections, and linkonce sections. Make
4712 the comment true even for .bss, .sdata, .sdata2, .sbss, and
4717 * emulparams/elf32_i860.sh: New file.
4718 * configure.tgt: Recognize new target i860-stardent-{sysv4*|elf*}.
4719 * Makefile.am (ALL_EMULATIONS): Add eelf32_i860.o.
4720 (eelf32_i860.c): New rule.
4721 * Makefile.in: Regenerate.
4725 * emulparams/mipspe.sh (ENTRY): Add definition.
4729 * emultempl/elf32.em (_after_close): Refer to -rpath not --rpath
4734 * scripttempl/elfm68hc11.sc: Define __bss_size symbol to indicate
4735 the final size of .bss section.
4736 * scripttempl/elfm68hc12.sc: Likewise.
4740 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Rename to
4741 gld${EMULATION_NAME}_parse_args for consistency. Combine
4742 lastoptind and prevoptind vars, and keep track of last optind.
4743 (gld_${EMULATION_NAME}_list_options): Rename to
4744 gld${EMULATION_NAME}_list_options.
4748 * configure.tgt: Select targ_emul=elf_i386 for Unixware 7
4749 (i586-sco-sysv5uw7.1.0).
4753 * emulparams/elf64alpha.sh (PARSE_AND_LIST_ARGS): Removed.
4754 (PARSE_AND_LIST_PROLOGUE): New.
4755 (PARSE_AND_LIST_LONGOPTS): Likewise.
4756 (PARSE_AND_LIST_OPTIONS): Likewise.
4757 (PARSE_AND_LIST_ARGS_CASES): Likewise.
4758 (PARSE_AND_LIST_EPILOGUE): Likewise.
4762 * emultempl/armelf.em: Elide functions common to elf32.em,
4763 ie. most of the file.
4764 (arm_elf_after_open): New. Do arm specific things then call
4765 gld${EMULATION_NAME}_after_open.
4766 (arm_elf_before_allocation): New. Call
4767 gld${EMULATION_NAME}_before_allocation then do arm specifics.
4768 (PARSE_AND_LIST_PROLOGUE): Define.
4769 (PARSE_AND_LIST_SHORTOPTS): Define.
4770 (PARSE_AND_LIST_LONGOPTS): Define.
4771 (PARSE_AND_LIST_OPTIONS): Define.
4772 (PARSE_AND_LIST_ARGS_CASES): Define.
4773 (LDEMUL_AFTER_OPEN): Define.
4774 (LDEMUL_BEFORE_ALLOCATION): Define.
4775 (LDEMUL_BEFORE_PARSE): Define.
4776 (LDEMUL_FINISH): Define.
4778 * emultempl/hppaelf.em: Similarly zap most of this file.
4779 (hppaelf_add_stub_section): Prototype.
4780 (hppaelf_layaout_sections_again): Prototype.
4781 (hook_in_stub): Prototype.
4782 (LDEMUL_SET_OUTPUT_ARCH): Define.
4783 (LDEMUL_FINISH): Define.
4784 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
4786 * emulparams/armelf.sh (TEMPLATE_NAME): Use elf32.
4787 (EXTRA_EM_FILE): New.
4788 * emulparams/armelf_linux.sh: Likewise.
4789 * emulparams/armelf_linux26.sh: Likewise.
4790 * emulparams/hppalinux.sh: Likewise.
4791 * emulparams/hppaelf.sh: Likewise.
4794 * emultempl/elf32.em: Fix formatting.
4795 (EXTRA_EM_FILE): Source it.
4796 (LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
4797 LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
4798 LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
4799 LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
4800 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
4801 LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
4802 LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
4803 LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
4804 LDEMUL_FIND_POTENTIAL_LIBRARIES): New shell vars. Add code to
4805 allow functions in this file to be overridden.
4806 (PARSE_AND_LIST_SHORTOPTS): Handle it.
4808 * emultempl/m68kcoff.em: Include ldfile.h before ldemul.h.
4810 * emultempl/elf32.em: Reorganize file.
4814 * emulparams/elf64alpha.sh: Implement "-taso" emulation
4815 specific option to fit 64-bit executable in the lower
4816 31-bit address range. This is done by changing start
4817 address of .interp (the very first section of executable)
4818 and then setting EF_ALPHA_32BIT elf header flag.
4822 * emultempl/m68kcoff.em: New file.
4823 * emulparams/m68kcoff.sh (TEMPLATE_NAME): Use m68kcoff template.
4824 * Makefile.am (em68kcoff.c): Depend on m68kcoff.em rather than
4826 * Makefile.in: Regenerate.
4830 * emultempl/elf32.em (longopts): Duplicate "disable-new-dtags"
4831 and "disable-new-dtags" to stop getopt from treating -d/-e as
4832 abbreviations for these options.
4836 * ld.texinfo: Add documentation for --disable-new-dtags and
4839 * ldmain.c (main): Initialize link_info.new_dtags to false.
4841 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Add
4842 --disable-new-dtags and --enable-new-dtags.
4843 (gld_${EMULATION_NAME}_list_options): Likewise.
4847 * lexsup.c: Add optional style to demangle switch
4848 * ld.texinfo: Document optional style to demangle switch.
4852 * Makefile.am (ALL_EMULATIONS): Add ecrisaout.o, ecriself.o,
4854 (ecrisaout.c, ecriself.c, ecrislinux.c): New rules.
4855 Regenerate dependencies.
4856 * Makefile.in: Rebuild.
4857 * configure.tgt (cris-*-*): New target.
4858 * emulparams/crisaout.sh, emulparams/criself.sh,
4859 emulparams/crislinux.sh, scripttempl/crisaout.sc: New files.
4860 * po/POTFILES.in, po/ld.pot: Regenerate.
4864 * emultempl/elf32.em (gld_${EMULATION_NAME}_list_options):
4865 Print out ignored -z options.
4869 * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Removed.
4870 (PARSE_AND_LIST_PROLOGUE): New.
4871 (PARSE_AND_LIST_LONGOPTS): Likewise.
4872 (PARSE_AND_LIST_OPTIONS): Likewise.
4873 (PARSE_AND_LIST_ARGS_CASES): Likewise.
4875 * ldmain.c (main): Clear link_info.flags and link_info.flags_1.
4877 * lexsup.c (ld_options): Comment out 'z'.
4878 (parse_args): Likewise.
4880 * emultempl/elf32.em: Include "elf/common.h".
4881 (gld_${EMULATION_NAME}_parse_args): Defined. Handle some -z
4883 (gld_${EMULATION_NAME}_list_options): Likewise.
4885 * ld.texinfo: Add documentation for the recognized -z options.
4889 * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call
4890 bfd_elf_set_dt_needed_soname ().
4894 * pe-dll.c (pe_dll_id_target): check object target name also
4898 * scripttempl/elf.sc (.init): Only do ${INIT_START} and
4899 ${INIT_END} if relocating.
4900 (.fini): Likewise ${FINI_START} and ${FINI_END}.
4904 * emultempl/pe.em (gld_*_open_dynamic_archive): New search
4905 order for dynamic library '-lfoo' on pei386: libfoo.dll.a,
4906 foo.dll.a, libfoo.a, libfoo.dll, foo.dll. This fixes compatibility
4907 errors introduced by the old dynamic lib search order.
4911 * pe-dll.c (process_def_file): auto-export data items also
4912 (pe_process_import_defs): also see if _imp_ form needed
4916 * pe-dll.c (make_one): fix a typo in the __imp_ name decoration
4917 for dll import libraries
4921 * scripttempl/i386go32.sc: Support the g++ attribute init_priority in
4922 gcc 2.95.2 and later.
4926 * ldfile.c (ldfile_try_open_bfd): Output '\n' after an error
4931 * ldemul.h (struct lang_input_statement_struct): Remove forward
4933 (struct search_dirs): Likewise.
4934 * ldfile.h (struct lang_input_statement_struct): Likewise.
4935 Protect file from multiple inclusion.
4936 * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Move file_chain
4937 declaration from macro to file scope.
4939 * ldemul.c: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this order.
4940 * ldgram.y: Likewise here.
4941 * ldlang.c: And here.
4942 * ldmain.c: And here.
4943 * mpw-elfmips.c: And here.
4944 * mpw-eppcmac.c: And here.
4945 * emultempl/aix.em: And here.
4946 * emultempl/armcoff.em: And here.
4947 * emultempl/armelf.em: And here.
4948 * emultempl/armelf_oabi.em: And here.
4949 * emultempl/beos.em: And here.
4950 * emultempl/elf32.em: And here.
4951 * emultempl/hppaelf.em: And here.
4952 * emultempl/linux.em: And here.
4953 * emultempl/lnk960.em: And here.
4954 * emultempl/pe.em: And here.
4955 * emultempl/sunos.em: And here.
4956 * mpw-esh.c: And here. Include ldexp.h and ldlang.h too.
4957 * mpw-idtmips.c: Ditto.
4958 * emultempl/generic.em: Ditto.
4959 * emultempl/gld960.em: Ditto.
4960 * emultempl/gld960c.em: Ditto.
4961 * emultempl/mipsecoff.em: Ditto.
4962 * emultempl/ticoff.em: Ditto.
4963 * emultempl/vanilla.em: Ditto.
4965 * pe-dll.c: Include ldfile.h
4966 * ldver.c: Include ldexp.h, ldlang.h, ldfile.h
4968 * mpw-elfmips.c: (gldelf32ebmip_before_allocation): Add missing
4969 arguments to bfd_elf32_size_dynamic_sections call.
4970 (gldelf32ebmip_place_orphan): Add missing arguments to
4971 lang_leave_output_section_statement call.
4975 * emultempl/pe.em (pe_enable_stdcall_fixup): Protect with
4977 (strhash): Likewise.
4978 (compute_dll_image_base): Likewise.
4979 (pe_undef_found_sym): Likewise.
4980 (pe_undef_cdecl_match): Likewise.
4981 (gld_${EMULATION_NAME}_open_dynamic_archive): Mark the
4982 argument "arch" with ATTRIBUTE_UNUSED.
4986 * configure.tgt: Remove extraneous hppa*-*-linux-gnu*.
4989 * ldwrite.c (SSIZE): Remove to cure macro redefinition warning.
4993 Changes to create multiple linker stubs, positioned immediately
4994 before the section where they are required.
4995 * emultempl/hppaelf.em: Include elf32-hppa.h.
4996 (stub_sec, file_chain): Delete.
4997 (hppaelf_create_output_section_statements): Don't make a stub
4999 (hook_stub_info): New struct.
5000 (hook_in_stub): New function.
5001 (hppaelf_add_stub_section): New function.
5002 (hppaelf_finish): Do nothing for relocateable links. Modify the
5003 call to elf32_hppa_size_stubs. Move code for updating section
5005 (hppaelf_layaout_sections_again): ..to here, a new function.
5007 * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Fix
5008 broken list handling. Pass in a pointer to the list.
5009 (hppaelf_finish): Update call to hppaelf_delete_padding_statements
5011 (hppaelf_before_parse): Prototype.
5012 (hppaelf_set_output_arch): Prototype.
5013 (hppaelf_create_output_section_statements): Prototype.
5014 (hppaelf_delete_padding_statements): Prototype.
5015 (hppaelf_finish): Prototype.
5018 * emultempl/hppaelf.em: Include ctype.h.
5019 (struct orphan_save): New.
5020 (gld${EMULATION_NAME}_place_orphan): New.
5021 (output_rel_find): New.
5022 (hppaelf_get_script): Update from elf32.em.
5023 (ld_hppaelf_emulation): Rename to ld_${EMULATION_NAME}_emulation.
5024 Change emulation_name field to "${EMULATION_NAME}". Add
5025 gld${EMULATION_NAME}_place_orphan.
5027 * Makefile.am (ALL_EMULATIONS): Reinstate ehppaelf.o, add
5028 ehppalinux.o, sort it. Regenerate dependencies.
5029 (ehppalinux.c): Depend on hppaelf.em
5030 * Makefile.in: Regenerate.
5032 * configure.tgt: targ_emul=hppalinux for hppa*linux
5034 * emulparams/hppalinux.sh: New.
5035 * emulparams/hppaelf.sh (TARGET_PAGE_SIZE): Write in hex.
5039 * lexsup.c (parse_args): Copy section name.
5043 * emultempl/pe.em: institute the following search order for
5044 dynamic libraries on pei386: libfoo.dll.a, foo.dll.a (import
5045 libs), libfoo.dll, foo.dll (link direct to dll). Fall back to
5046 static lib (libfoo.a) if none of the above are found.
5050 * emultempl/pe.em (pe_enable_auto_image_base): New variable.
5051 (longopts): New --{enable,disable}-auto-image-base options.
5052 (gld_${EMULATION_NAME}_list_options): Document.
5053 (gld_${EMULATION_NAME}_parse): Handle.
5054 (strhash): New static function.
5055 (compute_dll_image_base): New static function.
5056 (gld_${EMULATION_NAME}_set_symbols): Use.
5064 * configure.tgt: Add traditional mips (mips*-*-sysv4*) target.
5065 * emulparams/elf32btsmip.sh: New file.
5066 * Makefile.am: Add traditional mips target.
5067 * Makefile.in: Rebuild.
5071 * Makefile.am (EXTRA_ld_new_SOURCES): Set to deffilep.y for
5072 automake to use YLWRAP.
5073 * Makefile.in: Rebuild.
5077 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
5078 (CLEANFILES): Add DEPA.
5079 * Makefile.in: Regenerate.
5081 2000-06-30 Timothy Wall <twall@ppc>
5083 * scripttempl/tic54xcoff.sc: PAGE N is not implemented, so encode
5084 the page in the upper octet of the address.
5088 * emulparams/avrmega161.sh (ARCH): Change to avr:5.
5092 * NEWS: arm-elf does --gc-sections too.
5096 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
5098 * Makefile.in: Regenerate.
5102 * Makefile.am: Rebuild dependency.
5103 * Makefile.in: Rebuild.
5107 * Makefile.am: Rebuild dependency.
5108 * Makefile.in: Rebuild.
5112 * scripttempl/tic54xcoff.sc: New.
5113 * ldlang.c (wild_doit): Propagate SEC_BLOCK flag.
5114 * gen-doc.texi: Add flag for TI COFF.
5115 * ld.texinfo: Add documentation for TI COFF handling switches.
5116 * emultempl/ticoff.em: New. TI COFF handling.
5117 * configure.tgt: Add tic54x target.
5118 * Makefile.am: Add tic54x target.
5119 * Makefile.in: Ditto.
5123 * ldmain.c (set_scripts_dir): Correct pointer comparison when
5124 checking for backslashes.
5128 * NEWS: Move entries not in 2.10 above "Changes in version 2.10".
5132 * NEWS: Update list of targets supporting --gc-sections.
5134 * scripttempl/elf.sc: KEEP .eh_frame contents.
5135 * scripttempl/elfd30v.sc: Same here.
5139 * Makefile.am (ALL_EMULATIONS): Added new emulation for m68hc12
5141 * Makefile.in: Rebuild.
5142 * configure.tgt: Recognize m68hc12 and m68hc11.
5143 * scripttempl/elfm68hc12.sc: New file.
5144 * emulparams/m68hc12elfb: New emulation.
5145 * emulparams/m68hc12elf: New emulation.
5146 * emulparams/m68hc11elfb.sh: New file. User configurable emulation
5147 (includes a memory.x script to define the ROM and RAM banks).
5148 * scripttempl/elfm68hc11.sc, emulparams/m68hc11elf.sh:
5149 New configuration files for support of Motorola 68hc11
5153 * ldmain.c (main): Only change SEC_READONLY for final link.
5157 * configure: Regenerate.
5161 * configure.in (VERSION): Update to show this is the CVS mainline.
5165 * emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all
5166 input objects to be ECOFF.
5167 (check_sections): einfo takes %B, not %P, to print a BFD name.
5171 * ldgram.y (vers_defns): Handle 'extern "C++" { ... }' in
5174 * ldlex.l (V_IDENTIFIER): Accept `::' in symbols.
5178 * emulparams/avr1200.sh (STACK): Define as 0.
5179 * emulparams/avr23xx.sh (STACK): Define as last internal SRAM address.
5180 * emulparams/avr4433.sh (STACK): Likewise.
5181 * emulparams/avr44x4.sh (STACK): Likewise.
5182 * emulparams/avr85xx.sh (STACK): Likewise.
5183 * emulparams/avrmega103.sh (STACK): Likewise.
5184 * emulparams/avrmega161.sh (STACK): Likewise.
5185 * emulparams/avrmega603.sh (STACK): Likewise.
5186 * scripttempl/elf32avr.sc (__data_start): Define for gcrt1.
5187 (__stack): Define from ${STACK} for main().
5191 * Makefile.am: Update dependencies with "make dep-am"
5192 * Makefile.in: Regenerate.
5196 * ldmain.c: Include filenames.h.
5197 (set_scripts_dir): Support backslashes in program name.
5201 * ldmain.c (main): When deciding if ".text" section should be
5202 read-only, don't forget to reset SEC_READONLY because it
5203 could be already set.
5207 * ld.1: Add documentation for new command line option:
5208 --section-start <sectionname>=<sectionorg>
5209 This is a generic version of -Ttext etc. which accepts
5210 any section name as a parameter instead of just text/data/
5212 * ld.texinfo: More docs.
5214 * lexsup.c: (parse_args): Recognize new command line option.
5215 (ld_options): Add new option.
5219 * lexsup.c (parse_args): `i' == `r', not `q'.
5223 * configure.tgt (hppa*64*-*-*): Enable PA64 target.
5228 Add support for '-q' == '--emit-relocs' switch.
5229 * ldmain.c (main): Default to false.
5230 * lexsup.c (parse_args): Turn on emitrelocations flag if set.
5231 * NEWS: Describe the emitrelocations switch.
5232 * ld.texinfo: Describe the emitrelocations switch.
5236 * emultempl/pe.em (_open_dynamic_archive): New function: Search
5237 the library path for "foo.dll" and "libfoo.dll" dynamic libraries
5238 before searching for 'libfoo.a' in response to a '-Bdynamic -lfoo'
5243 * lexsup.c (parse_args): Update the year in the copyright notice.
5247 * ld.h (gettext, dgettext, dcgettext, textdomain, bindtextdomain):
5248 Replace defines with those from intl/libgettext.h to quieten gcc
5253 * ldlang.c (open_input_bfds): Don't load the same file within
5254 a group again if the whole archive has been loaded already.
5259 * lexsup.c (set_section_start): Use bfd_scan_vma rather than
5264 * configure.host (ia64-*-linux-gnu*): Change gcc to ${CC}.
5266 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
5267 host "ia64-*-linux-gnu*".
5271 * ld.h: Correctly check GCC version.
5275 * Makefile.am: Add PA64 support. Add missing dependencies for
5277 * Makefile.in: Rebuilt.
5278 * configure.tgt: Add PA64 support (currently disabled).
5282 * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Delete.
5283 (output_rel_find): New function.
5284 (hold_section, hold_use): Delete.
5285 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
5286 hold_interp): Make local to place_orphan.
5287 (gld${EMULATION_NAME}_place_orphan): Use lang_output_section_find
5288 rather than place_section to find possible previous use of orphan.
5289 Similarly find the place-holder output sections. Use returned
5290 value from lang_enter_output_section_statement rather than calling
5291 lang_output_section_statement_lookup.
5292 * emultempl/armelf.em: Same here.
5293 * emultempl/pe.em: Similar to above, but no need for output_rel_find.
5295 * ldlang.c (lang_enter_output_section_statement): Return output
5297 * ldlang.h (lang_enter_output_section_statement): Change
5300 * ldlang.h (lang_output_section_statement): Export it.
5301 * ldlang.c (lang_output_section_statement): Ditto.
5305 * ld.texinfo (Output Section Data): Add note that section data
5306 commands cannot appear outside of section directives.
5310 * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support.
5315 * Makefile.am (ALL_64_EMULATIONS): Add eelf64_ia64.o.
5316 (eelf64_ia64.c): New rule.
5317 * Makefile.in: Rebuild.
5318 * configure.tgt (ia64-*-elf*, ia64-*-linux*): New targets.
5319 * emulparams/elf64_ia64.sh: New file.
5323 * scripttempl/elfd30v.sc: Place .gcc_except_table.
5327 * dep-in.sed: Match space at start of file name, not at end.
5331 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
5332 lang_leave_output_section_statement () after calling
5333 lang_enter_output_section_statement ().
5334 * emultempl/armelf.em: Likewise.
5338 * emultempl/elf32.em (struct orphan_save): Add section field.
5339 (gld${EMULATION_NAME}_place_orphan): Use above to keep sections in
5340 better order, and place first orphan section as we did before the
5341 2000-04-12 patch. Ignore ~SEC_ALLOC sections when choosing place.
5342 Don't call make_bfd_section here, let wild_doit do the job for us.
5343 Don't build a statement list when we'll only throw it away.
5344 * emultempl/armelf.em: Ditto.
5345 * emultempl/pe.em: Similarly.
5349 * scripttempl/elfppc.sc: Remove.
5350 * emulparams/elf32ppc.sh: Use elf.sc.
5351 * emulparams/elf32lppc.sh: Use elf.sc.
5352 * emulparams/elf32ppclinux.sh: Use elf.sc.
5353 * emulparams/elf32ppcsim.sh: New file.
5354 * emulparams/elf32lppcsim.sh: New file.
5355 * Makefile.am: Update dependencies. Add elf32ppcsim ad elf32lppcsim.
5356 (ALL_EMULATIONS): Add elf32ppcsim ad elf32lppcsim.
5357 * Makefile.in: Regenerate.
5358 * configure.tgt (powerpc-*): Add elf32ppcsim and elf32lppcsim.
5362 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Process
5363 ~SEC_ALLOC sections too. Init start address of debug sections.
5364 * emultempl/armelf.em (gld${EMULATION_NAME}_place_orphan): Ditto.
5365 * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Ditto.
5366 Also set all relocateable section start addresses.
5370 * scripttempl/elf.sc: Add support for .sbss2 and .sdata2 sections.
5371 Add new BSS_PLT variable for when .plt need not be contained in
5372 the file. Move _etext so that it is also after .fini, and provide
5373 both etext and _etext with a leading underscore. Mark the start
5378 * emultempl/elf32.em (struct orphan_save): New.
5379 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
5380 hold_interp): Make them struct orphan_save.
5381 (gld${EMULATION_NAME}_place_section): Modify for new hold_*.
5382 (gld${EMULATION_NAME}_place_orphan): Add new orphan sections to
5383 the end of the relevant section list. Also add associated section
5384 statements to the end of any previous orphan statements.
5385 * emultempl/armelf.em: Similarly.
5386 * emultempl/pe.em: Similarly.
5390 * ld.texinfo (Simple Example): Remove extraneous paragraph.
5394 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
5395 --enable-build-warnings option.
5396 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
5397 * Makefile.in, configure: Re-generate.
5401 * po/ld.pot: Regenerate.
5403 * lexsup.c (help): Restore translated part of bug string.
5405 * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
5406 (DEP): Quote when passing vars to sub-make. Add warning message
5408 (DEP1): Rewrite for "gcc -MM".
5409 (CLEANFILES): Add DEP2.
5410 Update dependencies.
5411 * Makefile.in: Regenerate.
5415 * ld.h: #include "bin-bugs.h"
5416 * lexsup.c (help): Use REPORT_BUGS_TO.
5420 * configure.tgt (avr-*-*): New target support.
5421 * Makefile.am: Likewise.
5422 * scripttempl/elf32avr.sc: New script file.
5423 * emulparams/avr1200.sh: New file.
5424 * emulparams/avr23xx.sh: New file.
5425 * emulparams/avr4433.sh New file.
5426 * emulparams/avr44x4.sh New file.
5427 * emulparams/avr85xx.sh New file.
5428 * emulparams/avrmega103.sh New file.
5429 * emulparams/avrmega161.sh New file.
5430 * emulparams/avrmega603.sh New file.
5431 * Makefile.in: Regenerate.
5435 * Makefile.am (check-DEJAGNU): Also unset LANG.
5436 * Makefile.in: Rebuild.
5440 * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
5445 * emulparams/elf32mcore.sh: Include "getopt.h".
5449 * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware.
5453 * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR.
5454 * emulparams/shpe.sh: Likewise.
5458 * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED
5459 to unused parameters.
5461 * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static
5462 functions only used by DLL code.
5463 (_place_orphan): Initialise 'dollar'.
5467 * ldmain.c (undefined_symbol): Take one more arg, fatal, to
5468 indicate if the undefined symbol is a fatal error or not.
5469 Don't delete the output file if "fatal" is false.
5473 * Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)".
5474 Set LC_COLLATE and LC_ALL to null and export them. It is for
5475 sort which expects the C locale.
5476 Add $(LIBS) to all $(HOSTING_LIBS).
5477 * Makefile.in: Rebuild.
5481 * emultempl/{aix.em, armcoff.em, armelf.em, armelf_oabi.em,
5482 beos.em, elf32.em, generic.em, gld960.em, gld960c.em, hppaelf.em,
5483 linux.em, lnk960.em, mipsecoff.em, sunos.em, vanilla.em}
5484 (ld_emulation_xfer_struct): Add missing NULL initialiser for
5485 find_potential_libraries.
5489 * ldgram.y (exclude_name_list): Don't require a comma to separate
5490 list entries; the lexer considers commas to be valid part of a
5491 filename, so in something like `foo, bar' the comma is considered
5492 part of the first filename, `foo,'.
5493 * ld.texinfo: Update section on EXCLUDE_FILE lists.
5497 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
5498 host "i[3456]86-*-freebsdelf*".
5502 * scripttempl/i386go32.sc: Move misplaced semicolons.
5506 * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o.
5507 (ALL_64_EMULATIONS): Remove eelf64hppa.o.
5508 (eelf64hppa.c, ehppaelf.c): Remove targets.
5509 * Makefile.in: Rebuild.
5513 * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on
5514 GNU/Linux/sparc, but keep the default as 32.
5516 * configure.tgt: Enable elf64_sparc on Solaris7+/sparc. And make
5517 it default if sparcv9 or sparc64.
5521 * Makefile.am: Add rules to build emipspe.o and earmpe.o.
5522 * Makefile.in: Regenerate.
5523 * configure.tgt: Add targets for arm-wince, sh-pe and mips-pe.
5525 * ldemul.h (ld_emulation_xfer_struct): Add new field:
5526 find_potential_libraries.
5527 * ldemul.c (ldemul_find_potential_libraries): New function.
5529 * ldfile.c (ldfile_open_file_search): Allow function to be
5531 (ldfile_open_file): Call ldemul_find_potential_libraries.
5532 * ldfile.h: Add prototype for ldfile_open_file_search.
5534 * pe-dll.c: Add support for ARM, MIPS and SH targets.
5536 * emulparams/mipspe.sh: New file. Parameters for mips-pe target.
5537 * emulparams/shpe.sh: New file. Parameters for sh-pe target.
5539 * emultempl/pe.em: Add support for ARM, MIPS and SH DLLs.
5540 (gld_X_find_potential_libraries): New function. Search for
5541 libraries called "*.lib".
5543 * scripttempl/pe.sc: Add .pdata section.
5547 * scripttempl/elfd10v.sc: Remove dynamic linking hooks.
5548 Add and use memory regions.
5552 * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New.
5554 * Makefile.am: Add support for Linux/IBM 370.
5555 * configure.tgt: Likewise.
5557 * Makefile.in: Regenerate.
5561 * ldlang.c (print_input_section, print_data_statement,
5562 print_reloc_statement, print_padding_statement, insert_pad,
5563 size_input_section, lang_check_section_addresses,
5564 lang_size_sections, lang_do_assignments, lang_set_startof,
5565 lang_one_common): Change `opb' to unsigned.
5566 (lang_do_assignments): Also change `size' to unsigned.
5570 * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION.
5574 * mri.c (mri_draw_tree): Add default LMA region argument to call
5575 to lang_leave_output_section_statement.
5576 * ldlang.h: Update prototypes with LMA region arguments.
5577 * ldlang.c (lang_size_sections): Encapsulate region bounds
5578 checking in os_check_region call.
5579 (os_check_region): New function.
5580 (lang_output_section_statement_lookup): Initialize lma_region.
5581 (lang_leave_output_section_statement): Add LMA region argument.
5582 (lang_leave_overlay): Ditto.
5583 * ldgram.y: Handle LMA region syntax.
5584 * ld.texinfo (Output Section Description): Describe LMA region usage.
5585 * emultempl/armelf.em (gld$place_orphan): Add default value for
5586 lma region in call to lang_leave_output_section_statement.
5587 * emultempl/elf32.em (gld$place_orphan): Add default value for
5588 lma region in call to lang_leave_output_section_statement.
5589 * emultempl/pe.em (gld$place_orphan): Add default value for
5590 lma region in call to lang_leave_output_section_statement.
5595 * ldlang.c (lang_check_section_addresses): Use bytes instead of
5596 octets when calculating section end addresses.
5600 * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation.
5604 * ldexp.c (fold_name): Make SIZEOF operator return byte count, not
5606 * ldlang.c (print_input_section, print_data_statement,
5607 print_reloc_statement, print_padding_statement): Print target
5608 address values and section sizes as bytes, not octets.
5609 (insert_pad) Calculate padding size in octets, and adjust "dot"
5611 (size_input_section) Always adjust "dot" by bytes, not octets.
5612 (lang_check_section_addresses, lang_do_assignments) Adjust
5613 "dot" by bytes, not octets. Use the larger of the directive size
5614 or octets_per_byte for the number of octets actually allocated in
5616 (lang_set_startof) Make sure STARTOF returns a target address.
5617 (lang_one_common) Record size changes in octets.
5618 (lang_abs_symbol_at_end_of) Section end symbol's value is
5619 recorded in target bytes.
5620 * ld.texinfo: Updated description of BYTE, SHORT, LONG, etc.
5621 to be clear about behavior when an octet is smaller than one byte.
5625 * ldcref.c (output_cref): Don't pass message strings to printf
5629 * ldmisc.c (vfinfo): Same here.
5634 * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em,
5635 generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em,
5636 mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct):
5637 Add missing NULL initialisers, and comments.
5641 * ldlang.c (lang_size_sections): Fix typo in comment.
5645 * ldlang.c (lang_size_sections): Also update the current
5646 address of a region if the SEC_NEVER_LOAD bit is not set.
5650 * configure.tgt (arm*-*-conix*): New target.
5654 * ld.texinfo (Options): Remind users to preceed linker command
5655 line switches with -Wl, (or whatever is appropriate) if it is
5656 being invoked by a comnpiler driver program.
5657 Fix description of the behaviour of the -n command line switch.
5661 * ld.h (wildcard_spec): Change exclude_name to exclude_name_list.
5663 * ld.texinfo (EXCLUDE_FILE): Update documentation.
5664 * ldgram.y (wildcard_spec): Support a list of excluded_files.
5665 (exclude_name_list): New.
5666 ldlang.c (walk_wild_section): Support list of excluded files.
5667 (print_wild_statement): Likewise.
5668 (lang_add_wild): Likewise.
5669 * ldlang.h (lang_wild_statement_type): Likewise.
5670 * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support.
5674 * pe-dll.c (pe_dll_warn_dup_exports): New variable.
5675 (process_def_file): Use.
5676 (pe_dll_compat_implib): New variable.
5679 * pe-dll.h: Add exports of pe_dll_warn_dup_exports and
5680 pe_dll_compat_implib.
5682 * emultempl/pe.em (longopts): Add warn-duplicate-exports and
5683 compat-implib options.
5684 (gld_${EMULATION_NAME}_list_options): List new options.
5685 (gld_${EMULATION_NAME}_parse_args): Handle.
5687 * pe-dll.c (pe_dll_generate_implib): Use the correct name for output
5690 * deffilep.y (opt_name): Allow "." in name.
5692 For older changes see ChangeLog-9899
5698 version-control: never