3 * emulparams/shlelf_linux.sh (GENERATE_PIE_SCRIPT): Set to yes.
4 * emulparams/shlelf32_linux.sh (GENERATE_PIE_SCRIPT): Likewize.
8 * pe-dll.c (fill_edata): Scan table pe_dll->exports, which is
9 sorted alphabetically, instead of exported_symbols, which is
15 * lexsup.c (OPTION_PIE): Define.
16 (ld_options): Add -pie and --pic-executable options.
17 (parse_args): Handle OPTION_PIE.
18 * ldmain.c (main): Initialize link_info.pie and
20 * genscripts.sh: Generate PIE scripts.
21 * ld.texinfo: Document -pie and --pic-executable options.
22 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open):
23 (gld${EMULATION_NAME}_place_orphan): Likewise.
24 (gld${EMULATION_NAME}_get_script): Include PIE scripts.
25 * scripttempl/elf.sc: In PIE scripts set . the same way as in
27 * emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Set to yes.
28 * emulparams/elf64_ia64.sh (GENERATE_PIE_SCRIPT): Likewise.
29 * emulparams/elf32ppc.sh (GENERATE_PIE_SCRIPT): Likewise.
30 * emulparams/elf64ppc.sh (GENERATE_PIE_SCRIPT): Likewise.
31 * emulparams/elf_x86_64.sh (GENERATE_PIE_SCRIPT): Likewise.
32 * emulparams/elf_s390.sh (GENERATE_PIE_SCRIPT): Likewise.
33 * emulparams/elf32_sparc.sh (GENERATE_PIE_SCRIPT): Likewise.
34 * emulparams/elf64_sparc.sh (GENERATE_PIE_SCRIPT): Likewise.
35 * emulparams/elf64alpha.sh (GENERATE_PIE_SCRIPT): Likewise.
36 * emulparams/elf64_s390.sh (GENERATE_PIE_SCRIPT): Likewise.
37 * emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Likewise.
41 * genscripts.sh: Create tmpdir/libpath.exp.
45 * emultempl/armelf.em (arm_elf_before_allocation): Replace ASSERT
46 with a test for a NULL bfd_for_interworking.
50 * configure.host (*-*-netbsd*): Set HOSTING_CRT0 and HOSTING_LIBS
51 correctly for more recent versions of NetBSD.
52 (alpha*-*-netbsd*): Remove.
53 (i[3-7]86-*-netbsd*): Remove.
57 * emultempl/pe.em: Include "safe-ctype.h" instead of <ctype.h>.
61 * emulparams/elf64btsmip.sh: Set TEXT_START_ADDR to 0x120000000 to
62 trap on pointer crops.
66 * configure.tgt: Check for a target triplet of shl-...-netbsdelf
67 as well as shle-...-netbsdelf.
71 * configure.host: Accept i[3-7]86 variants.
72 * configure.tgt: Likewise.
76 * emulparams/elf64_ia64.sh: Don't set COMMONPAGESIZE for now.
80 * Makefile.am (ALL_EMULATIONS): Add earmelfb.o and earmelfb_linux.o.
81 (earmelfb.c, earmelfb_linux.c): New rules.
82 * Makefile.in: Regenerated.
83 * emulparams/armelfb.sh, emulparams/armelfb_linux.sh: New files.
84 * configure.tgt: Add armeb-elf and arm*b-*-linux-gnu.
88 * ldlang.c (lang_size_sections_1): Default to generating a
89 fatal error message if a loadable section is not allocated
90 to a memory region when regions are defined.
94 * Makefile.am (em68hc11elf.c): Correct dependencies.
95 (em68hc11elfb.c, em68hc12elf.c, em68hc12elfb.c): Likewise.
96 * Makefile.in: Regenerate.
97 * emultempl/elf32.em (find_exp_assignment): Adjust for changed
98 bfd_elf_record_link_assignment name.
102 * ldmain.h (overflow_cutoff_limit): Declare.
103 * ldmain.c (overflow_cutoff_limit): Define, initialized to 10.
104 (reloc_overflow): Limit error messages based on it.
105 * lexsup.c (parse_args) <OPTION_VERBOSE>: Set cutoff to
110 * ldlex.l: Accept C style comments in version scripts.
114 * ldlang.c (lang_process): Add the relax finalize pass.
116 * ldmain.c (main): Initialize link_info.relax_finalizing to
121 * ldgram.y (phdr_type): Grok PT_TLS and PT_GNU_EH_FRAME names.
122 If a name string is unknown, give an error rather than crashing later.
126 * Makefile.am (ALL_EMULATIONS): Add eh8300hn.o, eh8300sn.o,
127 eh8300hnelf.o, eh8300snelf.o and respective rules.
128 * Makefile.in: Regenerate.
129 * configure.tgt: Add h8300hn, h8300sn, h8300hnelf, h8300snelf
130 * emulparams/h8300hn.sh: New
131 * emulparams/h8300sn.sh: New
132 * emulparams/h8300hnelf.sh: New
133 * emulparams/h8300snelf.sh: New
134 * scripttempl/h8300hn.sc: new
135 * scripttempl/h8300sn.sc: new
139 * ldmain.c (link_callbacks): Initialize error_handler.
141 * ldmisc.c (error_handler): New function.
143 * ldmisc.h (error_handler): New prototype.
147 * emulparams/m68hc11elf.sh: Use m68hc1xelf.em extra.
148 * emulparams/m68hc11elfb.sh: Likewise.
149 * emulparams/m68hc12elf.sh: Likewise.
150 * emulparams/m68hc12elfb.sh: Likewise.
154 * emultempl/m68hc1xelf.em: New file to generate far trampolines on
156 (LDEMUL_BEFORE_ALLOCATION): Override to gather the trampolines to
158 (LDEMUL_FINISH): Override to generate the trampolines after gc and
160 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Override to create the
161 stub file for trampolines.
162 (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_LONGOPTS): New options
163 --no-trampoline and --bank-window to control the memory bank window.
167 * ldfile.c (ldfile_add_library_path): Remove the unused
172 * scripttempl/xstormy16.sc (__data, __rdata): New.
176 * scripttempl/xstormy16.sc: Add .jcr section mapping.
182 * ldlex.l: Use YY_CURRENT_BUFFER instead of yy_current_buffer.
186 * h8-doc.texi: Replace occurrances of 'Hitachi' with 'Renesas'.
187 * ld.texinfo: Likewise.
192 * scripttempl/elf.sc (CTOR): Handle crtbeginS.o, crtendS.o and
193 other variants of crtbegin.o, crtend.o.
195 * scripttempl/crisaout.sc (ctors, dtors): Likewise.
196 * scripttempl/elf_chaos.sc (CTOR, DTOR): Likewise.
197 * scripttempl/elfd10v.sc (CTOR, DTOR): Likewise.
198 * scripttempl/elfd30v.sc (CTOR, DTOR): Likewise.
199 * scripttempl/elfxtensa.sc (CTOR, DTOR): Likewise.
200 * scripttempl/iq2000.sc (CTOR, DTOR): Likewise.
201 * scripttempl/mmo.sc (ctors, dtors): Likewise.
202 * scripttempl/xstormy16.sc (CTOR, DTOR): Likewise.
206 * scripttempl/elf32msp430.sc: Add initX, finiX, ctors, dtors
207 sections to respect C++ constructor/destructor. Add ctors/dtors
208 start/stop definitions.
209 * scripttempl/elf32msp430_3.sc: Likewise.
213 * ld.texinfo (Options): Add a reminder of the target specific
214 nature to the description of the i386 PE specific options, for
215 readers who have not read all the way through the manual.
219 * configure.tgt: Fixed bug in list of targ_extra_emuls.
220 * emulparams/tic3xcoff.sh (SCRIPT_NAME): Namespace
221 cleanup. Replace s/c4x/tic4x and s/c3x/tic3x/
222 * emulparams/tic3xcoff_onchip.sh: Ditto
223 * emulparams/tic4xcoff.sh: Ditto
224 * scripttempl/tic4xcoff.sc: Ditto
228 * NEWS: Mention support for Xtensa architecture.
232 * pe-dll.c (pe_detail_list): arm-pe targets use underscores.
236 * emultempl/pe.em (gld_${EMULATION_NAME}_after_open):
237 Don't call pe_dll_build_section() if link_info.relocateable.
238 (gld_${EMULATION_NAME}_finish): Don't call pe_dll_fill_sections()
239 if link_info.relocateable.
243 * pe-dll.c (process_def_file): Don't create an export
244 section if there are no exports and we're building an exe
245 (pe_dll_build_sections): Ditto
246 (pe_dll_fill_sections): Conditionalize setting
247 abfd->dll true on info->shared
248 * emultempl/pe.em (gld_${EMULATION_NAME}_after_open):
249 If i386pe or armpe, call pe_dll_build_section()
250 for both exe's and dll's, not just dll's.
251 (gld_${EMULATION_NAME}_finish): For all targets except
252 shpe and mipspe, call pe_dll_fill_sections() for both
253 exe's and dll's, not just dll's.
257 * emulparams/xtensa-config.sh: Remove comment indicating that this is
262 * Makefile.am (ALL_EMULATIONS): Add eelf32xtensa.o.
263 (eelf32xtensa.c): New target.
264 * Makefile.in: Regenerate.
265 * configure.tgt: Handle xtensa-*-*.
266 * gen-doc.texi: Set XTENSA variable.
267 * ld.texinfo: Set XTENSA variable. Add new Xtensa node.
268 * emulparams/elf32xtensa.sh: New file.
269 * emulparams/xtensa-config.sh: Likewise.
270 * emultempl/xtensaelf.em: Likewise.
271 * scripttempl/elfxtensa.sc: Likewise.
275 * configure.tgt (powerpc*-*-linux*): Add elf32ppc to ppc64
276 targ_extra_libpath. Add elf64ppc to ppc targ_extra_libpath
277 if --enable-64-bit-bfd.
281 * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Change name of
283 * emulparams/armelf_linux.sh (OTHER_READONLY_SECTIONS): Change
284 name of note section.
288 * ld.texinfo (-Tbss, -Tdata, -Ttext): Document in terms of
293 * ldfile.c (ldfile_add_library_path): Always allocate space for
295 * ldlang.c (lang_register_vers_node): Free the node if it cannot
297 * ldmain.c (set_scripts_dir): Always free the constructed
299 (add_keepsyms_file): Fix memory leak.
300 * ldmisc.c (vfinfo): Likewise.
301 * lexsup.c (parse_args): Likewise.
306 Contribute support for Intel's iWMMXt chip - an ARM variant:
308 * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Define.
309 * emulparams/armelf_linux.sh (OTHER_READONLY_SECTIONS): Define.
310 * scripttempl/armcoff.sc (.data): Ensure 8 byte alignment.
315 * ldmain.h (ld_canon_sysroot, ld_canon_sysroot_len): Declare.
316 * ldmain.c (ld_canon_sysroot, ld_canon_sysroot_len): Define.
317 (main): Initialize them.
318 * ldfile.c: Include pathnames.h.
319 (is_sysrooted_pathname): New.
320 (ldfile_add_library_path): Use it.
321 (ldfile_open_file_search): Likewise. Use IS_ABSOLUTE_PATH. Don't
322 search_dirs if given an absolute pathname.
323 (ldfile_open_file): Issue error message for sysrooted
325 * Makefile.am: Updated dependencies.
326 * Makefile.in: Rebuild.
330 * ld.texinfo: Rename all occurances of C54X to TIC54X.
334 * ldfile.c (ldfile_try_open_bfd): Pop lexer start condition after
339 * defilep.y (opt_base): If no number given, set to default
344 * deffilep.y (def_import): Use default extension of "dll"
345 if no extension provided in parsed IMPORT definition.
347 * deffilep.y (def_lex): Revert 2003-03-12 change.
348 (dot_name): New id type and rule.
349 (expline): Use instead of ID.
350 (opt_equal_name): Likewise.
354 * deffilep.y (def_lex): Accept '.' as valid non-lead char.
358 * configure.tgt: Add NATIVE_LIB_DIRS for cygwin target back after
359 apparent accidental removal on 2003-01-06.
363 * Makefile.am: Add new devices x1122 x1132 emulation
364 * configure.tgt: Likewise.
365 * Makefile.in: Regenerate.
366 * emulparams/msp430x1122.sh: New file.
367 * emulparams/msp430x1132.sh: New file.
371 * ldmain.c (set_scripts_dir): Look for relative to TOOLBINDIR as
374 * ldfile.h (struct search_dirs): Added sysrooted field.
375 * ldlang.h (struct lang_input_statement_struct): Likewise.
376 * ldfile.c (ldfile_add_library_path): Mark sysrooted paths.
377 (ldfile_open_file_search): Look for sysrooted filename starting
378 with / in ld_sysroot instead of in the current directory. Clear
379 sysrooted flag if it's found in the current directory. Set it
380 from the search directory's sysrooted flag where it is found
382 * ldlang.c (ldlang_sysrooted_script): New static variable.
383 (new_afile): Mark search_file_enums as sysrooted if
384 ldlang_sysrooted_script.
385 (load_symbols): Set ldlang_sysrooted_script according to the
386 script's sysrooted field while processing it.
387 * ld.texinfo: Document INPUT behavior in sysroot.
391 * scripttempl/pe.sc: Use PROVIDE with etext, end, _end,
395 * emulparams/elf64alpha.sh (EXTRA_EM_FILE): Define.
396 (PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_LONGOPTS,
397 PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES,
398 PARSE_AND_LIST_EPILOGUE): Don't define.
399 * emultempl/alphaelf.em: New file.
403 * ldemul.c: Include getopt.h.
404 * emultempl/elf32.em: Include getopt.h earlier.
405 * emultempl/ticoff.em: Likewise.
409 * emultempl/elf32.em (gld${EMULATION_NAME}_get_script): Add combreloc
410 support when scripts read from files.
414 * ldemul.c (ldemul_parse_args): Return FALSE by default.
415 * ldemul.h (struct ld_emulation_xfer_struct): Update parse_args
418 * ldemul.c (ldemul_add_options, ldemul_handle_option): New functions.
419 (ldemul_parse_args): Return bfd_boolean. Formatting.
420 * ldemul.h (ldemul_add_options, ldemul_handle_option): Declare.
421 (ldemul_parse_args): Adjust.
422 (struct ld_emulation_xfer_struct): Add add_options and handle_option.
423 Return bfd_boolean from parse_args.
424 * lexsup.c (parse_args): Malloc shortopts, longopts and
425 really_longopts. Call ldemul_add_options and ldemul_handle_option.
426 * emultempl/aix.em (gld${EMULATION_NAME}_add_options): Split out from
427 gld${EMULATION_NAME}_parse_args.
428 (gld${EMULATION_NAME}_handle_option): Likewise.
429 (ld_${EMULATION_NAME}_emulation): Adjust initializer.
430 * emultempl/armcoff.em: As for aix.em, but remove parse_args.
431 * emultempl/beos.em: Likewise.
432 * emultempl/pe.em: Likewise.
433 * emultempl/ticoff.em: Likewise.
434 * emultempl/elf32.em: Likewise. Don't duplicate long options either.
435 (gld${EMULATION_NAME}_add_sysroot): Prototype.
436 * emultempl/armelf.em (PARSE_AND_LIST_LONGOPTS): Don't duplicate
438 * emultempl/hppaelf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
439 * emultempl/ppc32elf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
440 * emultempl/ppc64elf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
441 * emultempl/armelf_oabi.em (ld_${EMULATION_NAME}_emulation): Adjust
443 * emultempl/generic.em: Likewise.
444 * emultempl/gld960.em: Likewise.
445 * emultempl/gld960c.em: Likewise.
446 * emultempl/linux.em: Likewise.
447 * emultempl/lnk960.em: Likewise.
448 * emultempl/m68kcoff.em: Likewise.
449 * emultempl/mipsecoff.em: Likewise.
450 * emultempl/sunos.em: Likewise.
451 * emultempl/vanilla.em: Likewise.
452 * emultempl/netbsd.em (gldnetbsd_before_parse): Prototype.
456 * emultempl/elf32.em (gld${EMULATION_NAME}_add_sysroot): Fix
457 memory allocation error.
459 * Makefile.am (ldmain.o): Define TOOLBINDIR.
460 * Makefile.in: Rebuilt.
461 * ldmain.c (ld_sysroot): Try to set from TOOLBINDIR too.
465 * ldlang.c (lang_size_sections_1): Add CHECK_REGIONS argument and only
466 call os_region_check when it is set.
467 (lang_size_sections): Add CHECK_REGIONS argument and pass it through to
468 lang_size_sections_1.
469 (lang_process): Change lang_size_sections calls to set CHECK_REGIONS
470 only for the last call, not on every relaxation iteration.
471 * ldlang.h (lang_size_sections): Update prototype.
472 * pe-dll.c (pe_dll_fill_sections): Set CHECK_REGIONS argument in calls
473 to lang_size_sections.
474 (pe_exe_fill_sections): Likewise.
475 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Likewise.
476 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
477 * emultempl/ppc64elf.em (ppc_before_allocation): Likewise.
478 (ppc_layout_sections_again): Likewise.
482 * gen-doc.texi: Set ARM and HPPA variables.
483 * ld.texinfo: Fix typos and obvious texinfo mistakes. Make section
484 title capitalization more consistent. Add missing menu entries for
485 machine-specific sections and conditionalize them consistently.
486 Conditionalize text that is irrelevant when SingleFormat is set.
487 Add @group divisions to improve page breaks in long examples.
488 Use @iftex/@ifnottex instead of @iftex/@ifinfo so that HTML output
489 is correct. Remove "FIXME" comment about not using
490 @raisesections/@lowersections. Use @raisesections/@lowersections
491 consistently for machine-specific sections. Change to be more polite
492 about poor bug reports. Replace FDL appendix with include of fdl.texi.
493 Move WIN32 node to match its order in the menus.
494 * fdl.texi: New file.
498 * configure.in (TARGET_SYSTEM_ROOT): Set default to
499 ${exec_prefix}/${target_alias}/sys-root. Match explicit
500 '${exec_prefix}' (in addition to the expansion thereof) as
502 * configure: Rebuilt.
506 * ldgram.y (vers_defns): Also recurse with 'EXTERN NAME' patterns.
510 * ldgram.y (vers_defns): Allow optional trailing semicolon in
515 * emultempl/ppc32elf.em: New file.
516 * emulparams/elf32ppc.sh (EXTRA_EM_FILE): Define.
517 * Makefile.am (eelf32lppc.c): Depend on emultempl/ppc32elf.em.
518 (eelf32lppcnto.c): Likewise.
519 (eelf32lppcsim.c): Likewise.
520 (eelf32ppcnto.c): Likewise.
521 (eelf32ppc.c): Likewise.
522 (eelf32ppc_fbsd.c): Likewise.
523 (eelf32ppcsim.c): Likewise.
524 (eelf32ppclinux.c): Likewise.
525 * Makefile.in: Regenerate.
529 * ld.texinfo: Remove spaces between @samp and opening brace.
533 * emultempl/ppc64elf.em (ppc_create_output_section_statements): Check
535 (ppc_before_allocation): Don't do optimizations if wrong hash table.
536 (gld${EMULATION_NAME}_finish): Ditto.
540 * ldmain.c (main) Default allow_shlib_undefined to true.
541 * lexsup.c (ld_options): Add --no-allow-shlib-undefined.
542 (parse_args): Parse the new switch.
543 * ld.texinfo: Document new switch and default behaviour of
544 allowing undefined symbols in shared libraries.
548 * scripttempl/elf32msp430.sc: Add new data anchors definitions.
549 * scripttempl/elf32msp430_3.sc: Likewise.
553 * configure.tgt: Add support for kaOS as cross build target
558 * hppaelf.em (group_size): Change default back to 1.
562 * emultempl/ppc64elf.em: Add "no-tls-optimize" option and support code.
566 * hppaelf.em (group_size): Change default to -1.
570 * emultempl/armelf.em (PARSE_AND_LIST_SHORTOPTS): Remove 'n' short
572 (PARSE_AND_LIST_LONGOPTS): Add duplicate entry for
573 no-pipeline-knowledge. This will prevent the getopt package from
574 thinking that there are any shorter abbreviations for
575 --no-pipeline-knowledge.
579 * genscripts.sh (LIB_PATH): Don't append LIBPATH_SUFFIX to paths
580 which already have it. Avoid duplicates.
584 * emulparams/elf64_s390.sh (LIBPATH_SUFFIX): Set to 64.
585 * emulparams/elf_x86_64.sh (LIBPATH_SUFFIX): Likewise.
586 * emulparams/elf64_sparc.sh (LIBPATH_SUFFIX): Set instead of suffix.
590 * emultempl/ppc64elf.em (ppc_before_allocation): Size sections then
591 call ppc64_elf_tls_optimize.
595 * emultempl/elf32.em: Move gld${EMULATION_NAME}_add_sysroot
596 outside of GNU/Linux conditional.
600 * deffilep.y (def_get_module): New function: locate an already
602 * deffile.h (def_get_module): New prototype.
603 * pe-dll.c (pe_implied_import_dll): Add code to prevent importing
604 a dll multiple times.
608 * emultempl/sh64elf.em: Include elf32-sh64.h.
609 (sh64_elf_${EMULATION_NAME}_before_allocation): Adjust for changed
610 sh64_elf_section_data.
611 (sh64_elf_${EMULATION_NAME}_after_allocation): Likewise.
615 * ld.texinfo: Remove an extra "i" in --dll-search-prefix.
616 * emultempl/pe.em (gld_${EMULATION_NAME}_list_options): Move a
617 cross-80th-column-margin "an" to the next line.
621 * emulparams/tic3xcoff-onchip.sh: Rename to ...z
622 * emulparams/tic3xcoff_onchip.sh: ...this.
623 * Makefile.am (etic3xcoff_onchip.c): Fix name of generated C file.
624 * Makefile.in: Regenerate.
628 * configure.tgt: Handle i[3456]86-*-aros*
632 * Makefile.am: Added etic3xcoff.o and etic4xcoff_onchip.o
633 * Makefile.in: Regenerate
634 * configure.tgt: Added extra target emulations
635 * emulparams/tic3xcoff.sh: Remove old settings
636 * emulparams/tic4xcoff.sh: Ditto
637 * emulparams/tic3xcoff-onchip.sh: Added new
638 * scripttempl/tic4xcoff.sc: Revise and combine both c3x and c4x
639 * scripttempl/tic3xcoff.sc: Remove
643 * emultempl/elf32.em (gld${EMULATION_NAME}_add_sysroot): Do not
648 * Makefile.in: Regenerate.
652 * ld/ld.texinfo (node WIN32): Some clarifications
653 and formatting fixups.
657 * ldmain.c (get_emulation): Sort -mipsNN checks in the usual
658 order, and handle (ignore) -mips32r2.
662 * ldmain.c (main): Make sure ld_sysroot is initialized.
666 * Makefile.am (eelf32iq10.c): Fix tab/whitespace mixup.
668 * Makefile.am (ldmain.o): Add @TARGET_SYSTEM_ROOT_DEFINE@.
669 (GENSCRIPTS): Add @use_sysroot@.
670 * Makefile.in: Regenerated.
671 * configure.host: Move setting of NATIVE_LIB_DIRS to...
672 * configure.tgt: ... here. Use ${target} instead of ${host}
674 * configure.in: Add --with-sysroot.
675 * configure: Regenerated.
676 * genscripts.sh: Accept use_sysroot option. Set new variables
677 NATIVE and USE_LIBPATH. Prepend "=" to directory names if
678 $use_sysroot. Don't search $tool_lib if $use_sysroot.
679 * ldfile.c (ldfile_add_library_path): Handle leading '='.
680 * ldmain.c (TARGET_SYSTEM_ROOT): Define if not defined.
681 (ld_sysroot): New variable.
682 (main): Initialize ld_sysroot.
683 * ldmain.h (ld_sysroot): New extern.
684 * emultempl/elf32.em: Use NATIVE and USE_LIBPATH instead of
685 searching $EMULATION_LIBPATH.
686 (gld${EMULATION_NAME}_add_sysroot): New function.
687 (gld${EMULATION_NAME}_check_ld_so_conf): Use it. Honor ld_sysroot.
688 (gld${EMULATION_NAME}_after_open): Likewise. Only search
689 environment variables if $NATIVE.
690 * ld.texinfo (Options): Mention "=" prefix in the description of -L.
691 * NEWS: Mention --with-sysroot.
693 * emulparams/elf32bmipn32-defs.sh: Set NATIVE and LIBPATH_SUFFIX
694 instead of setting LIB_PATH.
695 * emulparams/elf32ppc.sh: Likewise.
696 * emulparams/elf64_s390.sh: Likewise.
697 * emulparams/elf64_sparc.sh: Likewise.
698 * emulparams/elf64ppc.sh: Likewise.
699 * emulparams/elf_x86_64.sh: Likewise.
701 * emulparams/elf64_aix.sh: Add "=" prefixes to LIB_PATH.
702 * emulparams/elf64hppa.sh: Add "=" prefixes to LIB_PATH.
706 * ld/pe-dll.c (autofilter_symbollist): Add cygwin_crt0.
710 * Makefile.am (ldmain.o): Pass BINDIR.
711 * Makefile.in: Regenerated.
712 * ldmain.c (set_scripts_dir): Use make_relative_prefix for the first
717 * Makefile.am (ALL_EMULATIONS): Add eelf32iq2000.o.
718 (eelf32iq2000.c): New target.
719 * Makefile.in: Regenerate.
720 * configure.tgt: Handle iq2000-*-elf.
721 * emulparams/elf32iq10.sh: New file.
722 * emulparams/elf32iq2000.sh: New file.
723 * scripttempl/iq2000.sc: New file.
727 * pe-dll.c (autofilter_symbollist): Add do_pseudo_reloc
728 and _pei386_runtime_relocator to the exclude list.
732 * ldfile.c: Fix comment typos.
733 * ldlang.c: Likewise.
735 * pe-dll.c: Likewise.
740 * Makefile.am (ld.1): Depend on configdoc.texi
742 * Makefile.in: Regenerated.
746 * Makefile.am: Add msp430 target.
747 * configure.tgt: Likewise.
748 * Makefile.in: Regenerate.
749 * emulparams/msp430x???.sh: New files. Linker script parameters
750 for various msp430 configurations.
751 * gen-doc.texi: Enable msp430 documenation.
752 * ld.texinfo: Document msp430 sections.
753 * scripttempl/elf32msp430.sc: New file. Linker script for msp430.
754 * scripttempl/elf32msp430_3.sc: New file. Linker script for msp430.
759 * ld/config.in (HAVE_REALPATH): New entry.
760 (HAVE_SYS_STAT_H, HAVE_SYS_TYPES_H): Removed: obsolete.
764 * ld.texinfo: New win32 topics: 'symbol aliasing' and 'export dll
769 * ldmain.c (main): Init "strip_discarded".
770 * lexsup.c (OPTION_STRIP_DISCARDED): Define.
771 (OPTION_NO_STRIP_DISCARDED): Define.
772 (ld_options): Add "strip-discarded" and "no-strip-discarded".
773 (parse_args): Handle them.
777 * ld.h (struct args_type): Add new field
778 'accept_unknown_input_architecture'.
779 * ldmain.c (main): Initialise 'accept_unknown_input_architecture'
781 * ldlang.c (lang_check): Pass accept_unknown_input_architecture to
782 bfd_arch_get_compatible.
783 * ldfile.c (ldfile_try_open_bfd): Likewise.
784 * lexsup.c (ld_options): Add new command line switch
785 --accept-unknown-input-architecture and its inverse.
786 (parse_args): Handle --accept-unknown-input-architecture.
787 * ld.texinfo: Document new linker option.
788 * NEWS: Mention new linker option.
792 * ldmain.c (main): Re-order link_info initialization. Init all
797 * ld.texinfo: Clarify and extend the documentation
798 in the Machine Dependent, WIN32 section.
802 * ld.texinfo: Add win32 machine depending section.
803 * gen-doc.texi: Enable win32 machine depending section.
805 * configure.host: Add win32 library search path.
809 * ld/emultempl/pe.em (pe_find_data_imports): Don't search for data
810 import when auto-import is disabled.
814 * emultempl/pe.em (..._recognized_file): Use LD_PATHMAX+1 to
815 account for trailing '\0'.
819 * emultempl/pe.em (longopts): Duplicate entry for --compact-implib
820 so that it is not confused with -c.
825 * configure.in: Add check for realpath function.
826 * configure: Regenerate.
827 * config.in: Regenerate.
828 * aclocal.m4: Regenerate.
829 * deffile.h: Add .data field to def_file_import
831 * pe-dll.c (pe_proces_import_defs): Use .data field of
832 def_file_import structure to initialize flag_data field of
833 def_file_export structure.
834 (pe_implied_import_dll): New variables exp_funcbase and
835 [data|bss]_[start|end]. Use DLL's internal name to set dll_name,
836 not filename (which may be a symlink). Scan the sections and
837 initialize [data|bss]_[start|end]. When scanning the export
838 table, skip _nm_ symbols, and mark any symbols whose rva indicates
839 that it is in the .bss or .data sections as data.
840 * sysdep.h: Include limits.h and sys/param.h, and define
841 LD_PATHMAX as appropriate. Also define REALPATH as realpath if it
842 exists, NULL otherwise.
843 * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Call
844 pe_process_import_defs before pe_find_data_imports, so that
845 auto-import will check the virtual implib as well as "real"
847 (gld_${EMULATION_NAME}_recognized_file): Use REALPATH to follow
848 symlinks to their target; check that the target's extension is
849 .dll before calling pe_implied_import_dll(), not the filename
850 itself (which may be a symlink).
854 * emultempl/elf32.em (struct orphan_save): Add os_tail field.
855 (gld${EMULATION_NAME}_place_orphan): Re-order output_section_statement
860 * ldlang.h: Formatting.
864 * ldlang.c (init_os): Ensure sections mentioned in load_base
869 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Set
870 load_base for orphans that follow a section with load_base set.
874 * ld.texinfo: Remove the extra `;' in sample version script.
878 * configure.host: Correct dynamic-linker for powerpc64 hosts.
880 * Makefile.am (eelf32ppcwindiss.c): Correct dependencies.
881 * Makefile.in: Regenerate.
883 * ld.h, ldcref.c, ldctor.c, ldctor.h, ldemul.c, ldemul.h, ldexp.c,
884 ldexp.h, ldfile.c, ldfile.h, ldgram.y, ldlang.c, ldlang.h, ldmain.c,
885 ldmain.h, ldmisc.c, ldwrite.c, lexsup.c, mri.c, pe-dll.c, pe-dll.h,
886 emulparams/elf32b4300.sh, emultempl/aix.em, emultempl/armcoff.em,
887 emultempl/armelf.em, emultempl/armelf_oabi.em, emultempl/beos.em,
888 emultempl/elf32.em, emultempl/generic.em, emultempl/gld960.em,
889 emultempl/gld960c.em, emultempl/hppaelf.em, emultempl/linux.em,
890 emultempl/lnk960.em, emultempl/m68kcoff.em, emultempl/mipsecoff.em,
891 emultempl/mmix-elfnmmo.em, emultempl/mmixelf.em, emultempl/mmo.em,
892 emultempl/needrelax.em, emultempl/pe.em, emultempl/ppc64elf.em,
893 emultempl/sh64elf.em, emultempl/sunos.em, emultempl/ticoff.em: Replace
894 boolean with bfd_boolean, true with TRUE, false with FALSE. Simplify
895 comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
899 * configure.host: Fix generic FreeBSD configuration entry.
903 * ld.texinfo: Add the missing `;' to sample version scripts.
907 * emulparams/elf64ppc.sh (SEGMENT_SIZE): Don't define.
911 * ldmain.c (main): Make runtime relocs disabled by default. Remove
912 assignment which has no effect.
913 * pe-dll.h (pe_create_import_fixup): Change prototype.
914 * pe-dll.c (make_runtime_pseudo_reloc): New function.
915 (pe_create_runtime_relocator_reference): Ditto.
916 (pe_create_import_fixup): Handle relocations with non-zero addends.
917 * emultempl/pe.em: Add options --enable-runtime-pseudo-reloc and
918 --disable-runtime-pseudo-reloc.
919 (make_import_fixup): Handle relocations with non-zero addends. Create
920 an external reference to _pei386_runtime_relocator symbol if at least
921 one pseudo reloc was created.
922 * ld.texinfo: Document --enable-runtime-pseudo-reloc and
923 --disable-runtime-pseudo-reloc options.
927 * ldlang.c (lang_add_section): Discard debugging sections that have
928 been marked SEC_EXCLUDE.
932 * configure.in (ALL_LINGUAS): Add da.
933 * configure: Regenerate.
934 * po/da.po: New Danish translation.
938 * emultempl/ppc64elf.em (ppc_before_allocation): New function.
939 (LDEMUL_BEFORE_ALLOCATION): Define.
940 (gld${EMULATION_NAME}_finish): Run discard_info for relocatable
942 * emultemp/hppaelf.em ((gld${EMULATION_NAME}_finish): Likewise.
946 * configure.tgt (LIB_PATH): Default to searching w32api directory under
951 * pe-dll.c (autofilter_liblist): add libmingwex and libgcj to the list
952 of restricted auto-export libs.
956 * pe-dll.c (autofilter_liblist): Generalize library names to catch more
957 creative library naming instances like, e.g., libstdc++-2.a.
961 * emulparams/elf32btsmipn32.sh (TEXT_DYNAMIC): Define.
962 * emulparams/elf64btsmip.sh (TEXT_DYNAMIC): Likewise.
966 * deffilep.y (def_lex): Handle '@' as first character of an ID.
967 * pe-dll.c (auto-export): Filter on "_imp_" prefix, not "_imp__".
968 (make_one): Don't prefix decorated fastcall symbols with '_'.
969 (pe_process_import_defs): Likewise.
970 * emultempl/pe.em (pe_fixup_stdcalls): Don't fixup fastcall
971 symbols to cdecl names or vise-versa.
975 * pe-dll.c (process_def_file): Handle fastcall symbols when
976 generating undecorated aliases. Don't prefix decorated fastcall
978 (fill_exported_offsets): Don't prefix decorated fastcall symbols
983 * emultempl/aix.em: Use include <> for generated headers.
984 * emultempl/beos.em: Likewise.
985 * emultempl/elf32.em: Likewise.
986 * emultempl/pe.em: Likewise.
987 * ldctor.c: Likewise.
989 * ldfile.c: Likewise.
990 * ldlang.c: Likewise.
993 * ldmain.c: Likewise.
994 * ldmisc.c: Likewise.
995 * ldwrite.c: Likewise.
996 * lexsup.c: Likewise.
998 * pe-dll.c: Likewise.
1002 * emultempl/elf32.em (place_orphan): Don't put non-allocated .rel*
1003 sections into .rel{,a}.dyn.
1007 * lexsup.c (OPTION_NO_OMAGIC): Define.
1008 (ld_options): Add "no-omagic" option.
1009 (parse_args): Parse --no-omagic.
1010 * ld.texinfo: Document --no-omagic.
1011 * NEWS: Mention new option.
1015 * scripttempl/pe.sc (__RUNTIME_PSEUDO_RELOC_LIST__,
1016 __RUNTIME_PSEUDO_RELOC_LIST_END__): Add only when relocating.
1020 * emulparams/elf32bmipn32-defs.sh: Set ELFSIZE according to
1021 emulation name. Set LIB_PATH only for native tools, and
1022 search the ABI-specific versions of NATIVE_LIB_DIRS before the
1023 .../lib variants, not instead of them. Mostly copied from...
1024 * emulparams/elf32ppc.sh: ... here. Fixed typo.
1025 * emulparams/elf64bmip-defs.sh: Backed out.
1026 * emulparams/elf64bmip.sh: Import elf32bmipn32-defs.sh again.
1027 * emulparams/elf64btsmip.sh: Likewise.
1028 (DATA_ADDR, NONPAGED_TEXT_START_ADDR, SHLIB_TEXT_START_ADDR,
1029 TEXT_DYNAMIC): Removed.
1033 * emulparams/elf32bmipn32-defs.sh (LIB_PATH): Set to /usr/lib32.
1034 (GENERATE_SHLIB_SCRIPT): Set to yes.
1035 (EXECUTABLE_SYMBOLS, WRITABLE_RODATA): Moved to...
1036 * emulparams/elf32bmipn32.sh: here.
1037 (GENERATE_SHLIB_SCRIPT): Deleted as redundant.
1038 * emulparams/elf32btsmipn32.sh: Delete redundant unsets.
1039 * emulparams/elf64bmip-defs.sh: New file. Extend
1040 elf32bmipn32-defs.sh by overiding ELFSIZE and LIB_PATH.
1041 * emulparams/elf64bmip.sh: Bring in definitions from
1043 (ELFSIZE, GENERATE_SHLIB_SCRIPT, LIB_PATH): Delete redundant
1045 (WRITABLE_RODATA): Moved from elf32bmipn32-defs.sh.
1046 * emulparams/elf64btsmip.sh: Bring in definitions from
1048 (ELFSIZE, GENERATE_SHLIB_SCRIPT): Delete, redundant.
1049 (EXECUTABLE_SYMBOLS, WRITABLE_RODATA): Delete redundant unsets.
1053 * configure.tgt (s390x-*-linux*): Add elf_s390 emulation.
1054 (s390-*-linux*): Add elf64_s390 emulation if want64.
1055 * emulparams/elf64_sparc.sh (LIB_PATH): Update to match 2002-05-22
1056 genscript.sh changes.
1057 * emulparams/elf_x86_64.sh (LIB_PATH): Likewise.
1058 * emulparams/elf64_s390.sh (LIB_PATH): Set up native 64 bit dirs.
1062 * ldlang.c (load_symbols): Revert last change.
1066 * ldlang.c (load_symbols): Don't call bfd_link_add_symbols when
1068 (lang_reasonable_defaults): Don't compare against false.
1069 (size_input_section): Likewise.
1070 (lang_size_sections_1): Likewise.
1071 (lang_do_assignments): Likewise.
1072 (lang_add_output): Likewise.
1074 * Makefile.am: Run "make dep-am".
1075 * Makefile.in: Regenerate.
1076 * ldver.c: #include "bfdver.h".
1080 * scripttempl/elfm68hc11.sc: Use KEEP for .vectors, .installN,
1082 * scripttempl/elfm68hc12.sc: Likewise.
1086 * pe-dll.c (make_import_fixup_mark): Avoid type-punned pointer.
1088 * ldgram.y (memory_spec): Provide empty action.
1089 (section <NAME>): Likewise.
1093 * ldfile.c (ldfile_try_open_bfd): When searching skip linker scripts if
1094 they have OUTPUT_FORMAT not matching actual output format.
1095 * ldlang.c (lang_get_output_target): New function.
1096 (open_output): Use it.
1097 * ldlang.h (lang_get_output_target): New prototype.
1101 * emultempl/elf32.em (output_rel_find): Prefer .rel script sections
1102 when orphan is .rel, .rela when orphan is .rela.
1103 (gld${EMULATION_NAME}_place_orphan): Handle combreloc .rel* case
1104 first. Remove outsecname var.
1109 * Makefile.am: Add eshelf32_linux.o and
1110 eshlelf32_linux.o, new emulations for sh64 Linux.
1111 * Makefile.in: Regenerate.
1112 * configure.tgt: Add sh64eb-*-linux* and sh64-*-linux* emulations.
1113 * emulparams/shelf32_linux.sh: New file.
1114 * emulparams/shlelf32_linux.sh: New file.
1118 * ldlang.c (lang_file_exist): Removed.
1119 (new_afile): Revert the last change.
1120 * ldlang.h (lang_file_exist): Removed.
1121 * lexsup.c (parse_args): Revert the last change.
1125 * pe-dll.cc (autofilter_symbolprefixlist): Don't re-export
1126 auto-import symbols.
1127 (make_one): Create _nm_<symbol> for data only.
1131 * ldlang.c (lang_file_exist): New function.
1132 (new_afile): Abort if the filename to be added matches the linker
1134 * ldlang.h: Add prototype for lang_file_exist.
1135 * lexsup.c (parse_args): Abort if the output filename matches
1136 one of the input filenames.
1140 * emulparams/elf64ppc.sh (MAXPAGESIZE): Set to 0x10000.
1144 * scripttempl/elfd30v.sc: Order reloc sections placing .plt last.
1145 * scripttempl/elfm68hc11.sc: Likewise.
1146 * scripttempl/elfm68hc12.sc: Likewise.
1148 * emultempl/elf32.em (output_rel_find): Always place orphan loadable
1149 reloc sections just before .rel.plt/.rela.plt.
1150 (gld${EMULATION_NAME}_place_orphan <.rel>): Remove combreloc code.
1151 Only put loadable reloc sections in hold_rel.
1155 * emulparams/elf32ppc.sh (OTHER_GOT_RELOC_SECTIONS): New.
1160 * scripttempl/sh.sc: Handle .eh_frame* and .gcc_exc*
1165 * genscripts.sh (SEGMENT_SIZE): Use MAXPAGESIZE before
1167 * scripttempl/elf.sc (DATA_SEGMENT_ALIGN): Incorporate
1168 SEGMENT_SIZE alignment.
1169 * emulparams/elf64ppc.sh (DATA_ADDR): Delete.
1170 (SEGMENT_SIZE): Define.
1172 * ldexp.c (fold_unary): New. Split out from exp_fold_tree.
1173 (fold_binary): Correct abs - non-abs case.
1174 (fold_trinary): New. Split out from exp_fold_tree.
1178 * emulparams/elf64ppc.sh (DATA_ADDR): Define.
1179 * emulparams/elf64_aix.sh (DATA_ADDR): Don't use a fixed address
1180 for start of .data, instead align up to 256M boundary.
1181 * scripttempl/aix.sc: Likewise.
1185 * scripttempl/i386go32.sc: Handle bss unique sections.
1189 * ldmisc.c (vfinfo <%C,%D,%G>): Always output bfd, section and offset.
1193 * emulparams/elf32bmipn32-defs.sh: New file.
1194 * emulparams/elf32bmipn32.sh: Use elf32bmipn32-defs.sh.
1195 * emulparams/elf32btsmipn32.sh: Likewise.
1196 * emulparams/elf64bmip.sh: Likewise.
1197 * emulparams/elf64btsmip.sh: Likewise.
1201 * emulparams/elf_i386_fbsd.sh: Set OUTPUT_FORMAT to
1203 * emulparams/elf64alpha_fbsd.sh: Set OUTPUT_FORMAT to
1204 elf64-alpha-freebsd.
1208 * NEWS: New TI port supports both C4x and C3x series of DSPs.
1210 * po/tr.po: Updated Turkish translation.
1214 * configure.tgt (h8300-*-hms*, h8500-*-hms*): Restore.
1218 * scripttempl/v850.sc: Add EXTERN references to __ctbpm __gp and
1220 * emulparams/v850.sh (TEMPLATE_NAME): Define.
1224 * scripttempl/elfd10v.sc (MEMORY): Remove UNIFIED, it is not
1225 used. Change INSN to start at 0x01000000 and extend for
1226 256K (ignoring holes). Start the STACK on a word aligned
1228 (.rodata): Start it at the READONLY_START_ADDR.
1232 * emulparams/elf32ppc.sh (ARCH): Set to "powerpc:common".
1236 * Makefile.am: Add etic4xcoff.o in ALL_EMULATIONS list and
1237 added makefile targets for this file.
1238 * Makefile.in: Regenerate.
1239 * configure.tgt: Added tic4x-coff and c4x-coff emulations.
1240 * NEWS: Mention new port.
1244 * emulparams/tic3xcoff.sh: New file.
1245 * emulparams/tic4xcoff.sh: New file.
1246 * scripttempl/tic3xcoff.sc: New file.
1247 * scripttempl/tic4xcoff.sc: New file.
1251 * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Replace strtoll,
1252 strtoul and strtoull with bfd_scan_vma.
1253 (gld${EMULATION_NAME}_read_file): Likewise.
1257 * configure.tgt: Remove h8[35]00-*-hms*. Add h8500-*-rtems*.
1261 * scripttempl/pe.sc: Handle .rdata_runtime_pseudo_reloc sections.
1262 Add symbols for application to access them.
1266 * emultempl/armelf.em: Revert this patch, it is not needed.
1272 * configure.in: added --with-lib-path argument to ld's configure
1274 * ld/NEWS: Document new switch.
1275 * ld/README: Mention new switch.
1276 * configure: Regenerate.
1277 * Makefile.in: Regenerate.
1279 Based on this patch:
1282 * Makefile.in (LIB_PATH): Make configurable.
1283 (GENSCRIPTS): Set LIB_PATH in environment.
1284 * configure.in: Substitute LIB_PATH.
1288 * emultempl/armelf.em: Include elf-bfd.h and elf/arm.h.
1289 (arm_elf_finish): Set the last bit of DT_INIT and DT_FINI
1290 depending on the type of the function.
1291 (arm_elf_convert_thumb_symbol_to_address): New function.
1295 * Makefile.am: Add esh{l}elf_nto.o files.
1296 * Makefile.in: Regenerate.
1297 * configure.tgt: Add support for sh-**-nto* targets.
1298 * emulparams/shelf_nto.sh: New file.
1299 * emulparams/shlelf_nto.sh: New file.
1303 * ldlang.c (offsetof): Define if not defined.
1307 * configure.tgt: Always enable 64bit emulations for 32bit
1312 * emulparams/elf32_dlx.sh (TARGET_PAGE_SIZE): Set to 1.
1313 (MAXPAGESIZE): Set to 1.
1315 * ld.h (ALIGN_N): Delete.
1316 * ldexp.h (align_n): Declare.
1317 * ldexp.c (align_n): New function.
1318 (fold_binary): Use align_n instead of ALIGN_N.
1319 (exp_fold_tree): Likewise.
1320 * ldlang.c (lang_size_sections_1): Likewise.
1321 (lang_one_common): Likewise.
1322 * ld.texinfo (ALIGN): Remove power of 2 restriction.
1326 * configure.tgt: Add support for powerpc{le}-*-nto* targets.
1327 * Makefile.am: Add eelf32{l}ppcnto.o files.
1328 * Makefile.in: Regenerate.
1329 * emulparams/elf32lppcnto.sh: New file.
1330 * emulparams/elf32ppcnto.sh: New file.
1334 * ld.texinfo: Document --no-undefined-version.
1336 * ldlang.c (lang_new_vers_pattern): Set the `symver' and
1337 `script.' fields to 0.
1339 * ldmain.c (main): Initialize the allow_undefined_version to
1342 * lexsup.c (OPTION_NO_UNDEFINED_VERSION): New.
1343 (ld_options): Add --no-undefined-version.
1344 (parse_args): Support OPTION_NO_UNDEFINED_VERSION.
1348 * emultempl/armelf.em (arm_elf_before_allocation): Only search for
1349 an interworking bfd if there are input bfds. (107501)
1353 * emultempl/aix.em (gld*_before_parse): Set default arch. Reverts
1358 * emulparams/armelf.sh: Revert previous delta.
1359 * scripttempl/elf.sc: Revert previous delta.
1363 * configure.tgt (powerpc*-*-linux*): Enable elf64ppc for
1364 --enable-64-bit-bfd.
1368 * configure.tgt: Enable x86-64 emulation for Linux/i386 if
1369 64bit BFD is selected.
1373 * configure.tgt: Enable 64bit emulations for 32bit Linux/mips
1374 if 64bit BFD is selected.
1378 * emultempl/netbsd.em (LDEMUL_BEFORE_PARSE): New file to custom set
1379 link_info.common_skip_ar_aymbols.
1380 * emulparams/ns32knbsd.sh (EXTRA_EM_FILE): Refer to extra file.
1382 * ldmain.c (main): Initialize new field
1383 link_info.common_skip_ar_aymbols.
1387 * emulparams/armelf.sh (OTHER_PLT_SECTIONS): New variable. Set it
1389 * scripttempl/elf.sc: Comment it. Use the same way as ${PLT} is
1394 * NEWS: Retroactively add entry for Lars Brinkhoff's contribution
1395 of the PDP-11 and 2.11BSD a.out support.
1399 * Makefile.am (eelf32btsmipn32.o, eelf32ltsmipn32.o): New emulations
1400 for n32 ABI support.
1401 * Makefile.in: Regenerate.
1402 * configure.tgt (mips64*el-*-linux-gnu*,mips64*-*-linux-gnu*): Add
1403 n32 ABI emulations for these 64 bit targets.
1404 * emulparams/elf32bmipn32.sh: Expand comment.
1405 * emulparams/elf32btsmipn32.sh: New file, for traditional big endian
1407 * emulparams/elf32ltsmipn32.sh: Likewise for little endian.
1411 * configure.tgt: Add support for arm-*-nto target.
1412 * Makefile.am: Add earmnto.o file.
1413 * Makefile.in: Regenerate.
1414 * NEWS: Mention port of ARM support to QNX.
1415 * emulparams/armnto.sh: New file.
1419 * ldlang.c (lang_add_section): Don't turn .tbss into normal sections
1420 for relocatable link.
1421 (lang_size_sections_1): Don't make .tbss zero size for relocatable
1426 * emulparams/elf32frv.sh (OTHER_RELOCATING_SECTIONS): Delete.
1431 * po/sv.po: Updated Swedish translation.
1432 * po/es.po: Updated Spanish translation.
1433 * po/fr.po: Updated French translation.
1437 * po/sv.po: Updated Swedish translation.
1438 * po/es.po: Updated Spanish translation.
1442 * po/fr.po: Updated French translation.
1446 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
1447 bomb on /DISCARD/ input section.
1448 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
1449 * emultempl/mmo.em (mmo_place_orphan): Likewise.
1453 * emultempl/mmo.em (mmo_place_orphan): Handle case of no .text
1461 * configure.tgt: Add support for ip2k-elf.
1462 * Makefile.am: Add support for ip2k-elf.
1463 * Makefile.in: Regenerate.
1464 * emulparams/elf32ip2k.sh: New file.
1465 * scripttempl/ip2k.sc: New file
1466 * NEWS: Mention support for new port.
1470 * NEWS: Add 'Changes in 2.13'.
1474 * ld.texinfo: Document a .symver takes precedence over a
1479 * emulparams/elf64ppc.sh (ARCH): Set to powerpc:common64.
1480 (COMMONPAGESIZE): Define.
1484 * emulparams/hppanbsd.sh: Remark that hppaobsd.sh references this file.
1488 * configure.tgt: Add support for alpha-*-openbsd*, hppa-*-openbsd*,
1489 powerpc-*-openbsd* and sparc64-*-openbsd*.
1490 * Makefile.am (ALL_EMULATIONS): Add ehppaobsd.o.
1491 * Makefile.in: Regenerate.
1492 * emulparams/hppaobsd.sh: New file.
1496 * ldlang.c (print_wild_statement): Fix output formatting.
1500 * ldlang.c: (strip_excluded_output_sections): New function.
1501 (lang_process): Call it.
1502 (lang_size_sections_1): Revert 2002-06-10 change.
1506 * Makefile.am (check-DEJAGNU): Revert 2002-06-25 change.
1508 * Makefile.in: Regenerate.
1512 * ldfile.c (ldfile_try_open_bfd): Formatting.
1514 * ldmisc.c (demangle): Move so that it doesn't intrude between
1515 vfinfo comment and body. Add comment.
1519 * emulparams/vax.sh (OUTPUT_FORMAT): Use a.out-vax-bsd format.
1523 * ldlang.h (entry_sym): Make it a struct bfd_sym_chain.
1524 * ldlang.c (entry_sym): Likewise.
1525 (ldlang_undef_chain_list_type): Likewise.
1526 (lang_finish): Adjust references to entry_symbol.
1527 (lang_add_entry): Likewise.
1528 (lang_gc_sections): Use link_info.gc_sym_list.
1529 (lang_process): Set link_info.gc_sym_list.
1530 * ldlex.l: Include bfdlink.h.
1531 * ldmain.c (main): Init link_info.gc_sym_list.
1532 * emultempl/aix.em: Adjust references to entry_symbol.
1533 * emultempl/armcoff.em: Likewise.
1534 * emultempl/armelf.em: Likewise.
1535 * emultempl/pe.em: Likewise.
1536 * emultempl/ppc64elf.em (ppc_after_open): New function.
1537 (LDEMUL_AFTER_OPEN): Define.
1538 * emulparams/elf64ppc.sh: KEEP .opd sections.
1542 * emulparams/m68hc12elfb.sh (EEPROM_MEMORY): Define.
1543 * emulparams/m68hc11elfb.sh (EEPROM_MEMORY): Define.
1544 * emulparams/m68hc11elf.sh (EEPROM_SIZE): Define.
1545 (EEPROM_START_ADDR): Define.
1546 (EEPROM_MEMORY): Define.
1547 * emulparams/m68hc12elf.sh: Likewise.
1548 * scripttempl/elfm68hc11.sc: Handle .eeprom section; handle .softregs
1549 section to put soft registers in .page0.
1550 * scripttempl/elfm68hc12.sc: Likewise but put soft registers in bss.
1554 * emulparams/hppa64linux.sh (OTHER_GOT_RELOC_SECTIONS): Add rela.opd
1555 section. Add ${RELOCATING-0}.
1559 * emulparams/shelf.sh (STACK_ADDR): Don't define.
1560 (OTHER_SECTIONS): Define.
1561 * emulparams/shelf_nbsd.sh ((STACK_ADDR): Don't undef.
1562 (OTHER_SECTIONS): Undef.
1566 * ldmisc.c (demangle): Restore dots stripped from sym name.
1570 * Makefile.am (check-DEJAGNU): Set LC_ALL=C and export it.
1571 * Makefile.in: Regenerated.
1575 * ld.texinfo (Bug Reporting): Update text to suggest a limit on
1576 the size of attached object files, to allow make the object files
1577 available via FTP or HTTP and to mention that the mail will be
1578 sent to a mailing list.
1582 * ld/configure.host (romp): Drop support.
1586 * emultempl/mipself.em (mips_elf${ELFSIZE}_check_sections): Check
1587 section flags for SEC_DATA, rather than for SEC_CODE being unset.
1591 * emultempl/mipself.em (mips_elf${ELFSIZE}_check_sections): Fix
1592 format specifier used to print BFD name.
1596 From Catherine Moore, Michael Meissner, Jim Blandy:
1597 * emulparams/elf32frv.sh: New file.
1598 * configure.tgt: Support frv-*-*.
1599 * Makefile.am (ALL_EMULATIONS): Add eelf32frv.o.
1600 (eelf32frv.c): New target.
1604 * emultempl/elf32.em: gld*_get_script: Check for
1605 GENERATE_COMBRELOC_SCRIPT.
1606 * scripttempl/elfd10v.sc : Fix STACK and INSN.
1607 * emulparams/d10velf.sh : Fix TEXT_START_ADDR.
1611 * configure.tgt: Add support for sh[1234]*le*-*-elf, sh[1234]*-*-elf.
1615 * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Return
1616 false if xvec doesn't match.
1620 * ldlang.c (lang_size_sections_1): Skip removed output sections.
1624 * ldexp.c: Replace CONST with const.
1625 * ldfile.c: Likewise.
1626 * ldfile.h: Likewise.
1627 * ldlex.l: Likewise.
1629 * pe-dll.h: Likewise.
1633 * emultempl/ppc64elf.em (new_vers_pattern): Warning fix.
1637 * ld/ldmain.c (main): initialize link_info.pei386_auto_import
1638 to -1 == implicit enable.
1639 * ld/emultempl/pe.em (gld_${EMULATION_NAME}_before_parse):
1640 initialize link_info.pei386_auto_import to -1 == implicit
1642 (gld_${EMULATION_NAME}_parse_args): When processing
1643 --enable-auto-import and --disable-auto-import options, use
1644 '1' and '0' instead of 'true' and 'false'.
1645 (pe_find_data_imports): Only issue message about auto-import
1646 when the feature is implicitly enabled. Downgrade message to
1647 informational instead of warning.
1651 * scripttempl/elf.sc (.tbss): Fix mismatched parentheses/braces.
1655 * configure.host (hppa*64*-*-hpux11*): Define NATIVE_LIB_DIRS,
1656 HOSTING_CRT0 and HOSTING_LIBS.
1660 * configure.tgt (shle*-*-elf*, sh64le-*-elf*): New configurations.
1664 * emulparams/ns32knbsd.sh (EXECUTABLE_SYMBOLS): Set _DYNAMIC to 0.
1665 (NONPAGED_TEXT_START_ADDR): Set to 0x1000.
1669 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Place
1670 SEC_EXCLUDE sections when doing a relocatable link.
1674 * Makefile.am (ALL_EMULATIONS): Add eshelf32_nbsd.o,
1675 eshlelf32_nbsd.o, eshelf64_nbsd.o, and eshlelf64_nbsd.o.
1676 (eshelf32_nbsd.c, eshelf64_nbsd.c, eshlelf32_nbsd.c)
1677 (eshlelf64_nbsd.c): New rules.
1678 * Makefile.in: Regenerate.
1679 * configure.tgt (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
1680 (sh64-*-netbsd*): New targets.
1681 * emulparams/shelf32_nbsd.sh: New file.
1682 * emulparams/shelf64_nbsd.sh: New file.
1683 * emulparams/shlelf32_nbsd.sh: New file.
1684 * emulparams/shlelf64_nbsd.sh: New file.
1688 * ldlang.c (section_already_linked): Call bfd_discard_group. Typo fix.
1692 * scripttempl/avr.sc: Changes to support current GCC and avr-libc,
1693 C++ constructors/destructors, loosely based on the m68hc11 port.
1697 * Makefile.in: Regenerate.
1698 * aclocal.m4: Regenerate.
1699 * config.in: Regenerate.
1700 * configure: Regenerate.
1704 * Makefile.am (ALL_EMULATIONS): Add ei386nto.o.
1705 (ei386nto.c): Add rule.
1706 * Makefile.in: Regenerate.
1707 * configure.tgt: Add i[3456]86-*-nto-qnx*.
1708 * emulparams/i386nto.sh: New file.
1712 * NEWS: Add entry for VAX ELF support.
1717 * Makefile.am (ALL_EMULATIONS): Add eelf32vax.o and evaxnbsd.o.
1719 (evaxnbsd.c): New rules.
1720 * Makefile.in: Regenerate.
1721 * configure.tgt (vax-*-netbsdelf*)
1723 (vax-*-netbsd*): New targets.
1724 * emulparams/elf32vax.sh: New file.
1725 * emulparams/vaxnbsd.sh: New file.
1729 * emultempl/armelf.em (arm_elf_after_open): Don't determine
1730 bfd_for_interwork, instead add glue sections to each input bfd.
1731 (bfd_for_interwork): New global.
1732 (arm_elf_set_bfd_for_interworking): New function.
1733 (arm_elf_before_allocation): Use it.
1737 * Makefile.am: Add DLX make target.
1738 * configure.tgt: Add DLX configuration.
1739 * Makefile.in: Regenerate.
1740 * emulparams/elf32_dlx.sh: New file
1741 * scripttempl/dlx.sc: New file
1745 * Makefile.am (eelf_i386_chaos): Use elf_chaos.sc script.
1746 * Makefile.in: Regenerate.
1747 * emulparams/elf_chaos.sh: Use elf_chaos script.
1748 * scripttempl/elf_chaos.sc: New file.
1752 * ldlang.c (lang_size_sections_1): Move check for conflicting load
1753 addresses and regions from here...
1754 (lang_get_regions): ...to this new function.
1755 (lang_leave_output_section_statement): Use lang_get_regions.
1756 (lang_leave_overlay): Likewise.
1757 * mri.c (mri_draw_tree): Pass null as last argument to
1758 lang_leave_output_section_statement.
1759 * emultempl/elf32.em (gld*_place_orphan): Likewise.
1760 * emultempl/mmo.em (mmo_place_orphan): Likewise.
1761 * emultempl/pe.em (gld*_place_orphan): Likewise.
1765 * configure.tgt: Use ns32k-*-netbsd* instead of ns32k-pc532-netbsd*.
1769 * ldemul.c: Fix formatting.
1770 * ldfile.c: Likewise.
1771 * pe-dll.c: Likewise.
1772 * pe-dll.h: Likewise.
1776 * ldlang.c (lang_process): Formatting, grammar.
1778 * ldlex.l: Use #include "" instead of <> for local header files.
1782 * configure.tgt: Add a target for i386-netbsdpe.
1786 * scripttempl/elf.sc: Add .rel{,a}.t{bss,data}, .tdata and .tbss.
1787 * ldlang.c (lang_add_section): Set SEC_THREAD_LOCAL for
1788 output section if necessary. Handle .tbss.
1789 (lang_size_sections): Clear _raw_size for .tbss section
1790 (it allocates space in PT_TLS segment only).
1791 * ldwrite.c (build_link_order): Build link order for .tbss too.
1795 * configure.in: Correct spelling of AC_PREREQ.
1799 * pe-dll.c (autofilter_liblist): Add more system libs excluded by
1801 (autofilter_objlist): Add crtbegin.o, crtend.o.
1805 * emultempl/pe.em (OPTION_EXCLUDE_LIBS): Add new define.
1806 (longopts): Add new option --exclude-libs.
1807 (gld_${EMULATION_NAME}_list_options): Give quick help about it.
1808 (gld_${EMULATION_NAME}_parse_args): Use it.
1809 * pe-dll.h (pe_dll_add_excludes): Add second param to prototype.
1810 * pe-dll.c (exclude_list_struct): Add field type to distinguish symbols
1811 from whole archives.
1812 (pe_dll_add_excludes): Set excludes->type.
1813 (auto_export): Add new variable libname and set to archive basename if
1814 abfd. Use it when filtering default and user-specified libarary
1815 excludes. Let string "ALL" mean all libs when filtering user-specified
1817 * ld.texinfo: Document --exclude-libs.
1821 * ldemul.c (ldemul_new_vers_pattern): New function.
1822 * ldemul.h (ldemul_new_vers_pattern): Declare.
1823 (struct ld_emulation_xfer_struct): Add new_vers_pattern.
1824 * ldlang.c (lang_new_vers_pattern): Call ldemul_new_vers_pattern.
1825 * emultempl/ppc64elf.em (dotsyms): New static var.
1826 (gld${EMULATION_NAME}_new_vers_pattern): New function.
1827 (LDEMUL_NEW_VERS_PATTERN): Define.
1828 (PARSE_AND_LIST_PROLOGUE): Add OPTION_DOTSYMS, OPTION_NO_DOTSYMS.
1829 (PARSE_AND_LIST_LONGOPTS): Likewise.
1830 (PARSE_AND_LIST_ARGS_CASES): Handle them.
1831 * emultempl/aix.em (ld_${EMULATION_NAME}_emulation): Update
1833 * emultempl/armcoff.em: Likewise.
1834 * emultempl/armelf_oabi.em: Likewise.
1835 * emultempl/beos.em: Likewise.
1836 * emultempl/elf32.em: Likewise.
1837 * emultempl/generic.em: Likewise.
1838 * emultempl/gld960.em: Likewise.
1839 * emultempl/gld960c.em: Likewise.
1840 * emultempl/linux.em: Likewise.
1841 * emultempl/lnk960.em: Likewise.
1842 * emultempl/m68kcoff.em: Likewise.
1843 * emultempl/mipsecoff.em: Likewise.
1844 * emultempl/pe.em: Likewise.
1845 * emultempl/sunos.em: Likewise.
1846 * emultempl/ticoff.em: Likewise.
1847 * emultempl/vanilla.em: Likewise.
1851 * genscripts.sh (LIB_PATH): For native targets, concatenate $libdir
1852 and $NATIVE_LIB_DIRS. Add $tool_lib before other libs.
1853 (LIB_SEARCH_DIRS): No need to use "tr".
1854 (COMPILE_IN): Only set for native targets.
1855 * configure.host (NATIVE_LIB_DIRS): Specify all native search dirs
1856 here, rather than adding lib:/usr/lib:/usr/local/lib in genscripts.sh.
1857 * configure.tgt (powerpc*): Set tdir_*.
1858 (powerpcle*): Correct targ_extra_emuls.
1859 * emulparams/elf32ppc.sh (LIB_PATH): Set up native 64 bit dirs.
1860 * emulparams/elf64ppc.sh (LIB_PATH): Likewise.
1864 * emultempl/pe.em (set_pe_subsystem): Don't set "cmdline" when
1865 calling lang_add_entry.
1869 * emultempl/elf32.em (gld${EMULATION_NAME}_parse_args): Handle
1871 (gld${EMULATION_NAME}_list_options): Add "-z muldefs".
1873 * ld.texinfo: Updated for --allow-multiple-definition and
1876 * ldmain.c (main): Initialize the allow_multiple_definition
1879 * lexsup.c (OPTION_ALLOW_MULTIPLE_DEFINITION): New.
1880 (ld_options): Add --allow-multiple-definition.
1881 (parse_args): Support OPTION_ALLOW_MULTIPLE_DEFINITION.
1885 * Makefile.am (ALL_EMULATIONS): Add earmelfb_nbsd.o.
1886 (earmelfb_nbsd.c): New rule.
1887 * Makefile.in: Regenerate.
1888 * configure.tgt (armeb-*-netbsdelf*): New target.
1889 (arm-*-netbsdelf*): Add armelfb_nbsd to targ_extra_emuls.
1890 (arm-*-netbsd*): Likewise.
1891 * emulparams/armelfb_nbsd.sh: New file.
1895 * emultempl/aix.em (gld*_parse_args): Add -bnortl and -bnortllib
1900 * Makefile.am: Add new emulations avr1, avr2, avr3, avr4, avr5.
1901 * Makefile.in: Regenerate.
1902 * configure.tgt (avr-*-*): Add avr[1-5] to targ_extra_emuls.
1906 * emulparams/avr1.sh: New file.
1907 * emulparams/avr2.sh: New file.
1908 * emulparams/avr3.sh: New file.
1909 * emulparams/avr4.sh: New file.
1910 * emulparams/avr5.sh: New file.
1911 * scripttempl/avr.sc: New file.
1915 * ldlang.c (section_already_linked): Call bfd_link_just_syms.
1916 (lang_place_orphans): Abort if just_syms_flag.
1920 * emultempl/aix.em: (gld*_set_output_arch): New function. Use
1921 architecture and machine information in the output bfd.
1922 (gld*_before_parse): Remove old arch and machine code.
1923 (choose_target): Rename to gld*_choose_target.
1924 (rtld): Change type to int.
1925 * ldfile.c (ldfile_try_open_bfd): Disable compatiblity check for
1926 objects in XCOFF archives.
1927 * ldfile.h: Update copyright date.
1931 * ldmain.c (main): Enable -z combreloc by default.
1935 * Makefile.am: Honour DESTDIR.
1936 * Makefile.in: Regenerate.
1940 * ldlang.h (lang_output_section_statement_type): Add update_dot_tree.
1941 (lang_enter_overlay): Remove the last two parameters.
1942 (lang_leave_overlay): Take them here instead.
1943 * ldgram.y (memspec_at_opt): Set $$ to null if no region is given.
1944 (section): Pass LMA and crossref flag to lang_leave_overlay rather
1945 than lang_enter_overlay.
1946 * ldlang.c (lang_memory_region_lookup): Return null for null names.
1947 (lang_output_section_statement_lookup): Initialize update_dot_tree.
1948 (lang_size_sections_1): Evaluate it.
1949 (lang_leave_output_section_statement): Rework LMA lookup.
1950 (overlay_lma, overlay_nocrossrefs): Remove.
1951 (lang_enter_overlay): Remove LMA and crossref arguments.
1952 (lang_enter_overlay_section): Don't set the LMA here.
1953 (lang_leave_overlay): Take LMA and crossref arguments. Move the '.'
1954 assignment to the last section's update_dot_tree. Unconditionally
1955 use the load and run-time regions specified in the OVERLAY statement.
1956 Likewise the first section's LMA. Only set the other sections' LMAs
1957 when no load region is given.
1961 * po/sv.po: New translation.
1965 * emultempl/hppaelf.em (build_section_lists): New function.
1966 (gld${EMULATION_NAME}_finish): Call elf32_hppa_setup_section_lists
1967 and build_section_lists.
1971 * ld.h: Fix formatting.
1972 * ldexp.c: Likewise.
1973 * ldfile.c: Likewise.
1974 * ldlang.c: Likewise.
1975 * ldmain.c: Likewise.
1976 * lexsup.c: Likewise.
1977 * pe-dll.c: Likewise.
1981 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation):
1982 Adjust for ppc64_elf_set_toc change. #include libbfd.h.
1983 (build_section_lists): Do output_section tests here.
1987 * emultempl/aix.em : (gld*_parse_arge): Formatting changes.
1991 Long branch stubs, multiple stub sections.
1992 * emultempl/ppc64elf.em: Include ldctor.h.
1993 (stub_file): New var.
1994 (group_size): New var.
1995 (ppc_create_output_section_statements): New function.
1996 (struct hook_stub_info): New.
1997 (hook_in_stub): New function.
1998 (ppc_add_stub_section): New function.
1999 (ppc_layout_sections_again): New function.
2000 (build_section_lists): New function.
2001 (gld${EMULATION_NAME}_finish): Rewrite.
2002 (real_func): New var.
2003 (ppc_for_each_input_file_wrapper): New function.
2004 (ppc_lang_for_each_input_file): New function.
2005 (lang_for_each_input_file): Define.
2006 (PARSE_AND_LIST_PROLOGUE): Define.
2007 (PARSE_AND_LIST_LONGOPTS): Define.
2008 (PARSE_AND_LIST_OPTIONS): Define.
2009 (PARSE_AND_LIST_ARGS_CASES): Define.
2010 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
2014 * emultempl/aix.em (gld*_parse_arge, gld*_before_allocation): Add
2015 -blibpath, -bnolibpath support.
2019 * Makefile.am (ALL_EMULATIONS): Add elf32ppcwindiss.o.
2020 (eelf32ppcwindiss.c): New target.
2021 * Makefile.in: Regenerated.
2022 * configure.tgt: Add support for powerpc-*-windiss.
2023 * emulparams/elf32ppcwindiss.sh: New file.
2027 * ldlang.c (print_assignment): Update print_dot for assignments to ".".
2028 * ldexp.c (exp_print_token): Add "infix_p" argument.
2029 (exp_print_tree): Update accordingly.
2033 * Makefile.am (mpw): New maintainer mode rule to make mpw-*.c files.
2034 * Makefile.in: Regenerate.
2035 * mpw-elfmips.c: Delete.
2036 * mpw-eppcmac.c: Delete.
2037 * mpw-esh.c: Delete.
2038 * mpw-idtmips.c: Delete.
2042 * emulparams/shelf32.sh (MACHINE): Now sh5.
2046 * ldgram.y: Fix syntax warning.
2050 * emultempl/armelf.em (PARSE_AND_LIST_SHORTOPTS): Add 'n' in order
2051 to prevent "-n" from being taken as an abbreviation for
2052 "--no-pipeline-knowledge".
2056 * ldlang.c (lang_size_sections_1): Don't complain about
2057 SEC_NEVER_LOAD sections having no memory region specified.
2059 * ld.texinfo (Format Commands <OUTPUT_FORMAT>): Typo fix.
2063 * ld/configure.host (*-*-netbsd*): Add support for NetBSD/ELF.
2067 * dep-in.sed: Cope with absolute paths.
2068 * Makefile.am (dep.sed): Subst TOPDIR and BFDDIR.
2070 * Makefile.in: Regenerate.
2074 * emulparams/elf64btsmip.sh: n64 replaces .reginfo with .MIPS.options.
2078 * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: If common page size
2079 is smaller than maximum, round dot up to common page boundary.
2083 * configure.host: Set up for generic hosts first, then tweak as
2084 necessary in more specific targets.
2085 (HOSTING_LIBS): Include libgcc_eh.a if found.
2089 * emulparams/elf_x86_64.sh (COMMONPAGESIZE): Set it.
2093 * Makefile.am: Run "make dep-am".
2094 * Makefile.in: Regenerate.
2098 * genscripts.sh (LIB_SEARCH_DIRS): Quote path.
2102 * ldlang.c (ldlang_add_undef): If the output bfd has been opened,
2103 add the symbol to the linker hash table immediately.
2104 (lang_place_undefineds): Split symbol creation out..
2105 (insert_undefined): ..to here.
2109 * emultempl/elf32.em: Use lbasename vs. basename to fix problem where
2110 the contents of the buffer returned from basename function will are
2111 getting overwritten while still being used.
2117 * configure.tgt (x86_64-*-linux-gnu*): Configure i386 as native.
2118 * elf_x86_64.sh (ARCH): Set to i386:x86-64
2119 set libraries to default to lib64 paths.
2123 * Makefile.am : Add eaix5ppc and eaix5rs6, AIX 5 support.
2124 * configure.tgt : Same.
2125 * emulparms/aix5ppc.sh : New file. For eaix5ppc.
2126 * emulparms/aix5rs6.sh : New file. For eaix5rs6.
2127 * emulparms/aixppc.sh : OUPUT_FORMAT_32BIT and OUTPUT_FORMAT_64BIT
2128 emulation parameters for better -b32, -b64 support.
2129 * emulparms/aixrs6.sh : Same.
2130 * emulparms/ppcmacos.sh : Same.
2131 * emultempl/aix.em (choose_target) : Use new emulation parameters
2132 OUTPUT_FORMAT_32BIT and OUTPUT_FORMAT_64BIT.
2133 * Makefile.in : Regenerate.
2137 * po/fr.po: Updated version.
2141 * ldmain.c (main): Move .text readonly flag fudges from here..
2142 * ldlang.c (lang_process): ..to here.
2146 * ldlang.c (lang_check): Remove the word size check added in last
2147 change. Treat emitrelocations case as for relocatable links.
2151 * po/fr.po: Updated version.
2155 * ldlang.c (lang_check): Do relocatable link checks first, so that
2156 warn_mismatch can't override. Check compatible and word size too.
2160 * ld.texinfo: Wrap @menu in @ifnottex, not @ifinfo.
2164 * scripttempl/elf.sc: Only use DATA_SEGMENT_END() together with
2169 * scripttempl/elf.sc: Put .preinit_array, .init_array and
2170 .fini_array in the data segment.
2174 * scripttempl/elf.sc: Correct syntax errors in 2002-03-01 commit.
2178 * scripttempl/elf.sc (SECTIONS): Add entries for .preinit_array,
2179 .init_array, and .fini_array.
2183 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't fold
2184 .IA64_unwind* in a relocatable link.
2188 * NEWS: Mark 2.12 branch.
2192 * emulparams/elf64_s390.sh (ARCH): Change to "s390:64-bit".
2193 * emulparams/elf_s390.sh (ARCH): Change to "s390:31-bit".
2197 * emultempl/aix.em (gld*_parse_args): Add -brtl support.
2198 (gld*_before_allocation): Same.
2199 (gld*_create_output_section_statements): Generate
2200 __rtinit if run time linking. Add librtl.a to the link.
2201 (gld*_read_file): Clean.
2205 * emulparams/elf64ppc.sh (OTHER_TEXT_SECTIONS): Define.
2209 * Makefile.am: Add new files earmelf_fbsd, eelf32ppc_fbsd,
2210 eelf_i386_fbsd, eelf64_ia64_fbsd, eelf_x86_64_fbsd, eelf64_sparc_fbsd,
2211 and eelf64alpha_fbsd.
2212 * Makefile.in: Regenerate.
2213 * configure.tgt(sparc64-*-freebsd, ia64-*-freebsd, i[3456]86-*-freebsd,
2214 x86_64-*-freebsd, arm-*-freebsd, alpha*-*-freebsd, powerpc-*-freebsd):
2215 use a FreeBSD-specific emulation rather than the psABI one.
2216 * emulparams/elf_fbsd.sh (ELF_INTERPRETER_NAME): Set appropriate value
2217 for all FreeBSD ELF systems.
2218 * emulparams/armelf_fbsd.sh: Bridge elf_fbsd.sh and the "native" psABI
2220 * emulparams/elf32ppc_fbsd.sh: Likewise.
2221 * emulparams/elf64_ia64_fbsd.sh: Likewise.
2222 * emulparams/elf64_sparc_fbsd.sh: Likewise.
2223 * emulparams/elf64alpha_fbsd.sh: Likewise.
2224 * emulparams/elf_i386_fbsd.sh: Likewise.
2225 * emulparams/elf_x86_64_fbsd.sh: Likewise.
2229 * po/tr.po: Updated version.
2233 * ld.texinfo (Output Section Fill): Fix amateur texinfo.
2238 * emultempl/mmo.em (mmo_after_open): Don't call
2239 _bfd_mmix_check_all_relocs when producing ELF output.
2243 * emulparams/elf64alpha.sh (NOP): Adjust for big-endian
2244 definition. Emit a unop+nop pair.
2248 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Also check
2249 for presence of .MMIX.reg_contents.linker_allocated before early
2252 * NEWS: Mention support for MMIX.
2256 Support arbitrary length fill patterns.
2257 * ld.texinfo (Output Section Fill): Describe fill expressions.
2258 (FILL): Refer to the above.
2259 * ldexp.h (etree_value_type): Add "str" field.
2260 (union etree_union): Add "str" to "value" struct.
2261 (exp_bigintop): Declare.
2262 (exp_get_fill): Declare.
2263 * ldexp.c: Include "safe-ctype.h".
2264 (exp_intop): Set value.str to NULL.
2265 (exp_bigintop): New function.
2266 (new_rel): Pass in "str", and set new.str from it.
2267 (new_rel_from_section): Set new.str to NULL.
2268 (fold_name): Adjust calls to new_rel.
2269 (exp_fold_tree): Likewise.
2270 (exp_get_fill): New function.
2271 * ldgram.y (struct big_int bigint, fill_type *fill): New.
2272 (INT): Returns a "bigint". Adjust all code handling INTs.
2273 (fill_opt): Returns a "fill".
2274 (fill_exp): Split out of fill_opt, use for FILL.
2275 * ldlang.h (struct _fill_type): New.
2276 (fill_type): Move typedef to ldexp.h.
2277 (lang_output_section_statement_type): "fill" is now a pointer.
2278 (lang_fill_statement_type): Likewise.
2279 (lang_padding_statement_type): Likewise.
2280 (lang_add_fill): Now takes a "fill_type *" param.
2281 (lang_leave_output_section_statement): Likewise.
2282 (lang_do_assignments): Likewise.
2283 (lang_size_sections): Likewise.
2284 (lang_leave_overlay_section): Likewise.
2285 (lang_leave_overlay): Likewise.
2286 * ldlang.c: Include ldgram.h after ldexp.h.
2287 (lang_output_section_statement_lookup): Adjust for fill_type change.
2288 (print_fill_statement): Likewise.
2289 (print_padding_statement): Likewise.
2290 (insert_pad): Now takes a "fill_type *" arg.
2291 (size_input_section): Likewise.
2292 (lang_size_sections_1): Likewise.
2293 (lang_size_sections): Likewise.
2294 (lang_do_assignments): Likewise.
2295 (lang_add_fill): Likewise.
2296 (lang_leave_output_section_statement): Likewise.
2297 (lang_leave_overlay_section): Likewise.
2298 (lang_leave_overlay): Likewise.
2299 Adjust all callers of the above function.
2300 * ldlex.l: Include ldgram.h after ldexp.h. Allow hex numbers
2301 starting with "0X" as well as "0x". Return bigint.str for hex
2302 numbers starting with "0x" or "0X", zero bigint.str otherwise.
2303 Always use base 16 for numbers starting with "$".
2304 * ldmain.c: Include ldgram.h after ldexp.h.
2305 * ldwrite.c (build_link_order): Use bfd_data_link_order in place
2306 of bfd_fill_link_order.
2307 * pe-dll.c: Adjust lang_do_assignments calls.
2308 * emultempl/elf32.em: Likewise.
2309 * emultempl/hppaelf.em: Likewise.
2310 * emultempl/ppc64elf.em: Likewise.
2311 * emultempl/beos.em: Include ldgram.h after ldexp.h, adjust
2312 lang_add_assignment call.
2313 * emultempl/pe.em: Likewise.
2317 * ld.texinfo (VERSION scripts): Symbol names are globbing patterns.
2318 * ldgram.y (lang_new_vers_regex): Rename to lang_new_vers_pattern;
2319 the pattern in question is not a regexp.
2320 * ldlang.c: Likewise.
2321 * ldlang.h: Likewise.
2322 * ldlex.l (V_IDENTIFIER): Allow '[', ']', '-', '!', and '^' also.
2326 * ldlex.l (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
2327 * ldgram.y (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
2328 (exp): Add DATA_SEGMENT_ALIGN (exp, exp) and DATA_SEGMENT_END (exp).
2329 * ldexp.c (exp_data_seg): New variable.
2330 (exp_print_token): Handle DATA_SEGMENT_ALIGN and DATA_SEGMENT_END.
2331 (fold_binary): Handle DATA_SEGMENT_ALIGN.
2332 (exp_fold_tree): Handle DATA_SEGMENT_END.
2333 Pass allocation_done when recursing instead of hardcoding
2334 lang_allocating_phase_enum.
2335 * ldexp.h (exp_data_seg): New.
2336 * ldlang.c (lang_size_sections_1): Renamed from lang_size_sections.
2337 (lang_size_sections): New.
2338 * ld.texinfo (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): Document.
2339 * scripttempl/elf.sc: Use DATA_SEGMENT_ALIGN and DATA_SEGMENT_END
2340 if COMMONPAGESIZE is defined.
2341 * emulparams/elf_i386.sh (COMMONPAGESIZE): Set to 4K.
2342 * emulparams/elf32_sparc.sh (COMMONPAGESIZE): Set to 8K.
2343 * emulparams/elf64_sparc.sh (COMMONPAGESIZE): Set to 8K.
2344 * emulparams/elf64alpha.sh (COMMONPAGESIZE): Set to 8K.
2345 * emulparams/elf64_ia64.sh (COMMONPAGESIZE): Set to 16K for shared
2350 * Makefile.in: Regenerate.
2354 * lexsup.c: Remove strtoul declaration.
2358 * ldmain.c: Add prototype for main ().
2359 * lexsup.c: Guard declaration of strtoul with HAVE_STDLIB_H.
2360 * emultempl/lnk960.em (lnk960_choose_target): Function should
2365 * ldlang.c (entry_section): New initialised variable.
2366 (lang_finish): Use it.
2367 * ldlang.h (entry_section): Declare.
2368 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Set
2369 entry_section to ".opd".
2373 * ld.texinfo (Options): Add back in -nostdlib documentation,
2374 which had been inadvertently removed.
2378 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Adjust
2379 register section vma to a sane value after emitting error. Make
2380 fatal conditions cause program exit when emitting message.
2384 * configure.tgt: Add or32-*-rtems target.
2388 Contribute sh64-elf.
2390 * emulparams/shelf32.sh (STACK_ADDR): Define as formerly defined
2391 in OTHER_RELOCATABLE_SECTIONS.
2393 * emulparams/shelf32.sh (STACK_ADDR): Define.
2394 (OTHER_RELOCATABLE_SECTIONS): Renamed to...
2395 (OTHER_SECTIONS): this. Removed stack settings.
2396 * emulparams/shelf64.sh (OTHER_RELOCATABLE_SECTIONS): Do not set.
2397 (OTHER_SECTIONS): Reset after sourcing shelf32.sh.
2399 * emultempl/sh64elf.em (sh64_elf_$_before_allocation): Disable
2400 relaxing if any shmedia or mixed sections are found.
2402 * emultempl/sh64elf.em (sh64_elf_before_allocation): Pass f to
2403 einfo. Gracefully decline to output to non-elf formats.
2405 * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS) <.stack>:
2406 Default to _end aligned to next multiple of 0x40000, plus 0x40000.
2407 * emulparams/shelf32.sh: Ditto.
2409 * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Tweak
2412 * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Avoid
2413 non-portable shell constructs. From Hans-Peter Nilsson.
2415 * emulparams/shelf64.sh (EXTRA_EM_FILE): Define empty.
2416 * Makefile.am (eshelf64.c, eshlelf64.c, eshlelf32.c): Adjust
2417 dependencies to the shell script include chain.
2418 * Makefile.in: Regenerate.
2420 * emultempl/sh64elf.em: Update and tweak comments.
2421 (sh64_elf_${EMULATION_NAME}_after_allocation): Always allocate and
2422 make a .cranges section SEC_IN_MEMORY.
2424 * emultempl/sh64elf.em
2425 (sh64_elf_${EMULATION_NAME}_before_allocation): Don't stop when
2426 .cranges section found to be necessary; continue and set stored
2427 section contents flags for sections with non-mixed contents.
2428 Use a struct sh64_section_data container and sh64_elf_section_data
2429 to store contents-type flags.
2430 Remove unused update of "isec".
2431 (sh64_elf_${EMULATION_NAME}_after_allocation): Only process
2432 sections marked SHF_SH5_ISA32_MIXED. Use sh64_elf_section_data to
2433 access contents-type flags. Assert that the associated container
2434 is initialized. Use that container, not elf_gp_size, to hold size
2435 of linker-generated cranges contents.
2437 * emultempl/sh64elf.em
2438 (sh64_elf_${EMULATION_NAME}_before_allocation): Exit early if
2439 there's already a .cranges section. When section flag difference
2440 is found, don't NULL-check cranges a second time. Tweak comments.
2441 (sh64_elf_${EMULATION_NAME}_after_allocation): Use size after
2442 merging, not max size, as size of ld-generated .cranges contents.
2443 Don't set ELF section flags in output section. When checking for
2444 needed .cranges descriptors, don't use a variable; compare
2445 incoming ELF section flags directly to SHF_SH5_ISA32_MIXED. Tweak
2448 * emultempl/sh64elf.em: New file.
2449 * Makefile.am (eshelf32.c, eshlelf32.c): Adjust dependencies.
2450 * Makefile.in: Regenerate.
2451 * emulparams/shelf32.sh (OUTPUT_FORMAT): Only set if not set.
2452 (OTHER_RELOCATING_SECTIONS): Ditto.
2453 (EXTRA_EM_FILE): New, set to sh64elf if not set.
2454 * emulparams/shlelf32.sh: Stub out all settings except
2455 OUTPUT_FORMAT. Source shelf32.sh.
2456 * emulparams/shelf64.sh: Similar, but also keep ELF_SIZE and
2457 OTHER_RELOCATING_SECTIONS.
2458 (OTHER_RELOCATING_SECTIONS): Remove .cranges.
2459 * emulparams/shlelf64.sh: Stub out all settings except
2460 OUTPUT_FORMAT. Source shelf64.sh.
2462 * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS): Include
2464 (DATA_START_SYMBOLS): Define, provide ___data.
2465 (OTHER_READONLY_SYMBOLS): Define, provide ___rodata and align to 8
2466 for consecutive .data section.
2467 (OTHER_GOT_SECTIONS): Define, align to 8 for consecutive .bss
2468 section after .data section.
2469 * emulparams/shlelf64.sh: Ditto.
2470 * emulparams/shelf32.sh: Ditto.
2471 (ALIGNMENT): Define to 8.
2472 * emulparams/shelf32.sh: Ditto.
2474 * configure.tgt (sh64-*-elf*): Assign targ_extra_libpath to get
2475 built-in linker scripts.
2477 * emulparams/shlelf64.sh: New.
2478 * emulparams/shelf64.sh: New.
2479 * configure.tgt (sh64-*-elf*): Add shelf64 and shlelf64 to
2481 * Makefile.am: Add support for shlelf64 and shelf64.
2482 * Makefile.in: Regenerate.
2484 * configure.tgt (sh64-*-elf*): Add shelf as default.
2485 Add shlelf to targ_extra_emuls.
2487 * emulparams/shelf32.sh: New file.
2488 * emulparams/shlelf32.sh: New file.
2489 * Makefile.am: Add support for shlelf32 and shelf32.
2490 * configure.tgt: Map sh64-*-elf* to shlelf32 and shelf32.
2491 * Makefile.in: Regenerate.
2495 * ldlang.c (lang_reset_memory_regions): Rename from
2496 reset_memory_regions. Change all callers. Make public.
2497 * ldlang.h (lang_reset_memory_regions): Prototype.
2498 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Call
2499 lang_reset_memory_regions before lang_size_sections.
2500 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
2501 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Likewise.
2505 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Use signed
2506 arithmetic when checking for too many global registers.
2510 * Makefile.am (ALL_EMULATIONS): Add ehppanbsd.o.
2511 (ehppanbsd.c): New rule.
2512 * Makefile.in: Regenerate.
2513 * configure.tgt (hppa*-*-netbsd*): New target.
2514 * emulparams/hppalinux.sh: Add comment to check other files
2515 that source this file it is modified, and list which
2517 * emulparams/hppanbsd.sh: New file.
2521 * scripttempl/xstormy16.sc: Don't allocate extra space for the
2526 Support on-demand global register allocation from
2527 R_MMIX_BASE_PLUS_OFFSET relocs.
2528 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Rename from
2529 mmix_set_reg_section_vma. Call
2530 _bfd_mmix_finalize_linker_allocated_gregs.
2531 (mmix_before_allocation): New function.
2532 (LDEMUL_AFTER_ALLOCATION): Set to mmix_after_allocation.
2533 (LDEMUL_BEFORE_ALLOCATION): Define to mmix_before_allocation.
2534 * scripttempl/mmo.sc (.text): Mark .init, .fini as KEEP.
2535 (.MMIX.reg_contents): Add .MMIX.reg_contents.linker_allocated
2536 before .MMIX.reg_contents.
2537 * emultempl/mmo.em (gldmmo_before_allocation): Define to default.
2538 (mmo_after_open): New function.
2539 (LDEMUL_AFTER_OPEN): Define to mmo_after_open.
2540 * emulparams/elf64mmix.sh (OTHER_SECTIONS): Tweak formatting. Add
2541 .MMIX.reg_contents.linker_allocated before .MMIX.reg_contents.
2545 * emulparams/or32.sh: New file.
2546 * emulparams/or32elf.sh: New file.
2547 * scripttempl/or32.sc: New file.
2548 * configure.tgt : Add support for or32.
2549 * configure: Regenerate
2550 * Makefile.am: Add support for or32.
2551 * Makefile.in: Regenerate.
2552 * NEWS: Mention support for or32.
2553 * po/ld.pot: Regenerate.
2558 * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Define to be mipself.
2559 * emultempl/mipself.em: New file to handle MIPS ELF embedded
2560 reloc creation (ld --embedded-relocs).
2564 * configure: Regenerated.
2568 * Makefile.am (install): Depend on install-info.
2569 * Makefile.in: Regenerate.
2573 * ldmain.c (main): Use full sentences to ease translation.
2577 * po/fr.po: Updated version.
2581 * po/es.po: Updated version.
2585 * ldlex.l (yy_input): Correct error check.
2589 * ldmisc.c (demangle): Put back dots when string not demangled.
2593 * emulparams/elf64alpha.sh (NOP): Use unop.
2597 * ldlex.l: Use fread instead of read.
2601 * configure.tgt (ia64-*-netbsd*): New target.
2605 * emulparams/elf32btsmip.sh (SHLIB_TEXT_START_ADDR): Change to
2607 * emulparams/elf64btsmip.sh (SHLIB_TEXT_START_ADDR): Likewise.
2611 * ldver.c (ldversion): Update year.
2615 * po/ld.pot: Regenerate.
2619 * Makefile.am (eelf64ppc.c, eelf64lppc.c): Depend on ppc64elf.em.
2620 * Makefile.in: Regenerate.
2621 * emulparams/elf64ppc.sh (EXTRA_EM_FILE): Define.
2622 * emultempl/ppc64elf.em: New file.
2626 * scripttempl/pe.sc: Add support for constructor priorities.
2630 * emulparams/avr1200.sh (DATA_START): Define as 0x60.
2631 * emulparams/avr23xx.sh: Likewise.
2632 * emulparams/avr4433.sh: Likewise.
2633 * emulparams/avr44x4.sh: Likewise.
2634 * emulparams/avr85xx.sh: Likewise.
2635 * emulparams/avrmega103.sh: Likewise.
2636 * emulparams/avrmega161.sh: Likewise.
2637 * emulparams/avrmega603.sh: Likewise.
2638 * scripttempl/elf32avr.sc: Use DATA_START instead of 0x60.
2642 * ldlang.c (walk_wild_section): Exclude object file if enclosing
2643 archive is excluded.
2647 * Makefile.am (ALL_EMULATIONS): Add eshelf_nbsd.o and eshlelf_nbsd.o.
2648 (eshelf_nbsd.c): New rule.
2649 (eshlelf_nbsd.c): New rule.
2650 * Makefile.in: Regenerate.
2651 * configure.tgt (sh*le-*-netbsdelf*): New target.
2652 (sh*-*-netbsdelf*): New target.
2653 * emulparams/shelf.sh: Document that shelf_nbsd.sh sources this file.
2654 * ld/emulparams/shelf_nbsd.sh: New emulation.
2655 * ld/emulparams/shlelf_nbsd.sh: New emulation.
2659 * po/es.po: New file: Spanish translation.
2660 * configure.in (ALL_LINGUAS): Add es.
2661 * configure: Regenerate.
2665 * ld.texinfo: Note that --emit-relocs is currently only
2666 implemented for ELF.
2670 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Make use
2671 of bfd_section_list_remove and bfd_section_list_insert macros.
2672 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
2673 * emultempl/mmo.em (mmo_place_orphan): Likewise.
2677 * configure.tgt (x86_64-*-netbsd*): New target.
2681 (gld*_create_output_section_statements): New function.
2682 For -binitfini support.
2683 * emultempl/aix.em (gld*_before_parse): Fix comment.
2684 * emultempl/aix.em (gld*_parse_args): Fix comment.
2688 * configure.tgt (mips*-dec-netbsd*): Delete alias for
2690 (sparc64-*-netbsd*): Add elf32_sparc to targ_extra_emuls.
2692 * configure.tgt (arm-*-netbsdelf*): Add target.
2693 (arm-*-netbsd*): Add armelf and armelf_nbsd to targ_extra_emuls.
2694 * emulparams/armelf_nbsd.sh: Added.
2695 * Makefile.am: Add rules for earmelf_nbsd.
2696 * Makefile.in: Regenerate.
2701 * configure.host: Add rules for x86_64-*linux-gnu. Change
2702 s390x-linux entry to use gcc to report configuration, replace gcc
2703 with $CC in s390-linux
2707 * ld.texinfo (VERSION): Fix markup.
2711 * Makefile.am (ALL_EMULATIONS): Add m68kelfnbsd.o.
2712 (m68kelfnbsd.c): New rule.
2713 * Makefile.in: Regenerate.
2714 * configure.tgt (m68*-hp-netbsd*): Renamed to ..
2715 (m68*-*-netbsd*4k*): .. this.
2716 (m68*-*-netbsdelf*): New target.
2717 (m68*-*-netbsd*): Also include ELF support.
2718 (m68*-*-netbsdaout*): New alias for m68*-*-netbsd*.
2719 * emulparams/m68kelfnbsd.sh: New emulation.
2723 * ldgram.y (vers_node): Support anonymous version tags.
2724 * ldlang.c (lang_register_vers_node): Ensure anonymous version
2725 tag is not defined together with non-anonymous versions.
2726 * ld.texinfo: Document it.
2730 * po/tr.po: New file: Turkish translation.
2731 * configure.in (ALL_LINGUAS): Add tr.
2732 * configure: Regenerate.
2736 * Makefile.am: Add rules for eelf64alpha_nbsd.
2737 * Makefile.in: Regenerate.
2738 * configure.tgt (alpha*-*-netbsd*): Set
2739 targ_emul to elf64alpha_nbsd.
2740 * emulparams/elf64alpha_nbsd.sh: Added.
2744 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust
2745 section_tail when fiddling with section list.
2746 (gld${EMULATION_NAME}_list_options): Ensure sentences aren't
2747 broken into separate strings to make translation easier.
2748 * emultempl/mmo.em (mmo_place_orphan): Adjust section_tail when
2749 fiddling with section list.
2750 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
2754 * scripttempl/mmo.sc: Add .debug_ranges to listed sections.
2758 * ldmain.c (main): Initialise link_info.eh_frame_hdr.
2762 * emultempl/elf32.em (finish): Supply output_bfd
2763 to bfd_elf*_discard_info.
2764 (OPTION_EH_FRAME_HDR): Define.
2765 (longopts): Add --eh-frame-hdr.
2766 (parse_args): Handle it.
2767 (list_options): Add --eh-frame-hdr to help.
2768 * emultempl/hppaelf.em (finish): Supply output_bfd
2769 to bfd_elf*_discard_info.
2770 * scripttempl/elf.sc (.eh_frame_hdr): Add.
2774 * lexsup.c (parse_args): Don't pass shortopts to second call to
2775 getopt functions. Restore optind rather than decrementing before
2776 second call. Remove errind as it now duplicates last_optind.
2780 * emultempl/pe.em (gld_${EMULATION_NAME}_list_options): Fix typo.
2785 * Makefile.am: Add support for xstormy16.
2786 * configure.tgt: Add support for xstormy16.
2787 * Makefile.in: Regenerate.
2788 * emulparams/elf32xstormy16.sh: New file.
2789 * scripttempl/xstormy16.sc: New file.
2793 * Makefile.in (LIB_PATH): Make configurable.
2794 (GENSCRIPTS): Set LIB_PATH in environment.
2795 * configure.in: Substitute LIB_PATH.
2796 * configure: Regenerate.
2797 * configure.tgt (*cygwin): Set LIB_PATH for cross build.
2798 * configure.host (*cygwin): Add /usr/lib/w32api to NATIVE_LIB_DIRS.
2802 * lexsup.c (ld_options): Insert 'PROGRAM' into the text string
2803 describing the -N option so that it is easier to translate into
2808 * emultempl/pe.em (..._list_options): Replace multiple fprintf
2809 statements describing a single option with a single, newline
2810 escaped fprintf. This allows better translation into other
2813 * ldmain.c (add_archive_element): Combine multiple strings
2814 into a single string to permit better translation into other
2819 * Makefile.am: Remove eaixppc64.
2820 * Makefile.in: Regenerate.
2824 * emultempl/aix.em (choose_target): Change default target to
2825 OUTPUT_FORMAT for ppcmacos. Add braces to remove compiler
2827 (gld*_read_file): Fix typo.
2828 (change_symbol_mode): Add prototype.
2831 * emulparams/aixppc.sh (SYSCALL_MASK, SYMBOL_MODE_MASK): Delete.
2832 * emulparams/aixrs6.sh : Same.
2833 * emulparams/ppcmacos.sh : Same.
2834 * emulparams/aixppc64.sh : Delete file.
2835 * emultempl/aix.em : Formatting changes.
2839 * emulparams/criself.sh (NO_SMALL_DATA): Set, to yes.
2840 (OTHER_BSS_END_SYMBOLS): Don't refer to .sbss when setting
2842 (OTHER_END_SYMBOLS): Fix formatting.
2843 * emulparams/crislinux.sh (NO_SMALL_DATA): Set, to yes.
2844 (OTHER_END_SYMBOLS): Fix formatting.
2848 * ldexp.c (exp_print_token): Correct "table" entry for RSHIFT.
2852 * configure.tgt : Remove eaixppc64 emulations.
2853 * Makefile.in : Remove eaixppc64.c
2854 * ldemul.c (ldemul_choose_target): New parameters argc, argv.
2855 (ldemul_default_target): Same.
2856 * emultempl/gld960.em (gld960_choose_target): Same.
2857 * emultempl/gld960c.em (gld960_choose_target): Same.
2858 * scripttempl/aix.sc: Remove OUTPUT_FORMAT.
2859 * emultempl/aix.em (is_syscall): syscall_mask now a variable.
2860 * emultempl/aix.em (gld*_read_file): symbol_mode_mask now a variable.
2861 * emultempl/aix.em (gld*_parse_args): Handle -b32 -b64 emulation.
2862 * emultempl/aix.em (choose_target): New function. Handle emulation of
2867 * emulparams/elf_i386.sh (NO_SMALL_DATA): Set to yes.
2868 * emulparams/elf_i386_be.sh (NO_SMALL_DATA): Likewise.
2869 * emulparams/elf_i386_chaos.sh (NO_SMALL_DATA): Likewise.
2870 * emulparams/elf_i386_ldso.sh (NO_SMALL_DATA): Likewise.
2871 * emulparams/elf_x86_64.sh (NO_SMALL_DATA): Likewise.
2872 * emulparams/m68kelf.sh (NO_SMALL_DATA): Likewise.
2873 * emulparams/elf32_sparc.sh (NO_SMALL_DATA): Likewise.
2874 * emulparams/elf64_sparc.sh (NO_SMALL_DATA): Likewise.
2876 * scripttempl/elf.sc (SBSS): New. Define if ${NO_SMALL_DATA}
2879 (REL_SDATA): Likewise.
2880 (REL_SBSS): Likewise.
2881 (REL_SDATA2): Likewise.
2882 (REL_SBSS2): Likewise.
2883 (SBSS2): Define if ${NO_SMALL_DATA} is not empty.
2888 * scripttempl/elfm68hc11.sc (CTOR, DTOR): Put constructor and
2890 * scripttempl/elfm68hc12.sc (CTOR, DTOR): Likewise.
2894 * Makefile.in: Regenerated with automake based on automake
2895 1.4-8 in RedHat 7.1.
2899 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Define.
2900 (config.status): Delete rule.
2901 Add extra dependencies to cover sourced emulparams files.
2902 * Makefile.in: Regenerate.
2904 * scripttempl/elf.sc: Order <section>, <section>.* and
2905 corresponding linkonce sections as seen in input files.
2906 Formatting fixes. Zero vma of all sections if not relocating.
2907 (STACK): Define and insert if STACK_ADDR defined.
2908 (OTHER_RELOCATING_SECTIONS): Delete.
2909 (OTHER_END_SYMBOLS): Define.
2910 (OTHER_READONLY_SECTIONS): Always insert, not just when relocating.
2911 (OTHER_READWRITE_SECTIONS): Likewise.
2912 (OTHER_GOT_SECTIONS): Likewise.
2913 (OTHER_SDATA_SECTIONS): Likewise.
2914 (OTHER_BSS_SECTIONS): Likewise.
2915 * scripttempl/elfi370.sc (OTHER_READONLY_SECTIONS): Likewise.
2916 (OTHER_READWRITE_SECTIONS): Likewise.
2917 * scripttempl/nw.sc (OTHER_READONLY_SECTIONS): Likewise.
2918 (OTHER_READWRITE_SECTIONS): Likewise
2920 * emulparams/armelf.sh (OTHER_RELOCATING_SECTIONS): Delete.
2921 (STACK_ADDR): Define.
2922 * emulparams/armelf_oabi.sh: As for armelf.sh.
2923 * emulparams/elf32mcore.sh: As for armelf.sh.
2924 * emulparams/h8300elf.sh: As for armelf.sh.
2925 * emulparams/mn10200.sh: As for armelf.sh.
2926 * emulparams/shelf.sh: As for armelf.sh.
2928 * emulparams/elf32fr30.sh (OTHER_RELOCATING_SECTIONS): Delete.
2929 (OTHER_END_SYMBOLS): Define.
2930 * emulparams/m32relf.sh: As for elf32fr30.sh.
2931 * emulparams/h8300helf.sh: As for elf32fr30.sh.
2932 * emulparams/h8300self.sh: As for elf32fr30.sh.
2934 * emulparams/criself.sh (OTHER_READONLY_SECTIONS): Protect symbol
2935 defines with RELOCATING test.
2936 (OTHER_SDATA_SECTIONS): Likewise.
2937 (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
2938 (OTHER_END_SYMBOLS): ..this.
2939 * emulparams/crislinux.sh: As for criself.sh.
2941 * emulparams/elf32bmipn32.sh (OTHER_SDATA_SECTIONS): Zero vma
2943 (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
2944 (OTHER_SECTIONS): ..this. Zero vma if not relocating. Order
2945 normal and linkonce sections as seen in input files.
2946 * emulparams/elf32bmip.sh (DATA_ADDR): Don't define if EMBEDDED.
2947 (TEXT_DYNAMIC): Likewise.
2948 (INITIAL_READONLY_SECTIONS): Zero vma if not relocating.
2949 (OTHER_SDATA_SECTIONS): Likewise.
2950 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
2951 * emulparams/shlelf_linux.sh (OTHER_READWRITE_SECTIONS): Likewise.
2952 * emulparams/elf64alpha.sh (OTHER_READONLY_SECTIONS): Likewise.
2953 * emulparams/hppalinux.sh (OTHER_READONLY_SECTIONS): Likewise.
2954 * emulparams/elf64_aix.sh (OTHER_GOT_SECTIONS): Likewise.
2955 (OTHER_PLT_RELOC_SECTIONS): Likewise.
2956 (OTHER_READONLY_SECTIONS): Likewise. Order normal and linkonce
2957 sections as seen in input files.
2958 * emulparams/elf64_ia64.sh: As for emulparams/elf64_aix.sh.
2959 * emulparams/hppa64linux.sh (OTHER_READONLY_SECTIONS): Zero vma
2961 (OTHER_READWRITE_SECTIONS, OTHER_BSS_SECTIONS): Likewise.
2962 (OTHER_BSS_END_SYMBOLS): Merge from elf64hppa.sh.
2963 * emulparams/elf64mmix.sh (OTHER_RELOCATING_SECTIONS): Delete.
2964 (OTHER_SECTIONS): Instead, use this..
2965 (OTHER_END_SYMBOLS): ..and this.
2967 * emulparams/elf32b4300.sh: Source elf32bmip.sh, remove duplicates.
2968 * emulparams/elf32bsmip.sh: Likewise.
2969 * emulparams/elf32btsmip.sh: Likewise.
2970 * emulparams/elf32ebmip.sh: Likewise.
2971 * emulparams/elf32lmip.sh: Likewise.
2972 * emulparams/elf32elmip.sh: Source elf32lmip.sh, remove duplicates.
2973 * emulparams/elf32lsmip.sh: Likewise.
2974 * emulparams/elf32ltsmip.sh: Source elf32btsmip.sh, remove duplicates.
2975 * emulparams/elf32l4300.sh: Source elf32b4300.sh, remove duplicates.
2976 * emulparams/elf64bmip.sh: Source elf32bmipn32.sh, remove duplicates.
2977 * emulparams/elf64btsmip.sh: Likewise.
2978 * emulparams/elf64ltsmip.sh: Source elf64btsmip.sh, remove duplicates.
2979 * emulparams/elf32lppc.sh: Source elf32ppc.sh, remove duplicates.
2980 * emulparams/elf32ppclinux.sh: Likewise.
2981 * emulparams/elf32ppcsim.sh: Likewise.
2982 * emulparams/elf32lppcsim.sh: Source elf32lppc.sh, remove duplicates.
2983 * emulparams/elf64hppa.sh: Source hppa64linux.sh, remove duplicates.
2984 * emulparams/h8300helf.sh: Source h8300elf.sh, remove duplicates.
2985 * emulparams/h8300self.sh: Likewise.
2986 * emulparams/mn10300.sh: Source mn10200.sh, remove duplicates.
2987 * emulparams/sh.sh: Comment.
2988 * emulparams/shl.sh: Source sh.sh, remove duplicates.
2989 * emulparams/shlelf.sh: Source shelf.sh, remove duplicates.
2990 * emulparams/shelf_linux.sh: Source shlelf_linux.sh, remove duplicates.
2995 * ldlang.c (map_input_to_output_sections): Replace "break"
2996 accidentally removed with 2001-08-03 change.
2997 (lang_gc_sections_1): Likewise.
3001 * ldlang.c (walk_wild_section): Move sec == NULL case out of loop.
3005 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Use NULL instead
3006 of false when calling lang_size_sections.
3007 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
3011 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Only emit this
3012 function when LDEMUL_FINISH isn't set to the same name. Don't
3013 call ${LDEMUL_FINISH}.
3014 (ld_${EMULATION_NAME}_emulation): Call $LDEMUL_FINISH if defined.
3015 * emultempl/armelf.em (arm_elf_finish): Call
3016 gld${EMULATION_NAME}_finish.
3017 * emultempl/hppaelf.em (hppaelf_finish): Rename to
3018 gld${EMULATION_NAME}_finish. Call bfd_elf32_discard_info and
3019 hppaelf_layout_sections_again if necessary.
3020 (need_laying_out): New var.
3021 (hppaelf_layaout_sections_again): Rename to
3022 hppaelf_layout_sections_again. Clear need_laying_out.
3023 (PARSE_AND_LIST_OPTIONS): Format text.
3027 * emultempl/armelf.em (arm_elf_finish): Renamed from
3028 gld${EMULATION_NAME}_finish.
3029 (LDEMUL_FINISH): Set to arm_elf_finish.
3033 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): New.
3034 (struct ld_emulation_xfer_struct): Use it.
3038 * emulparams/elf64hppa.sh (OTHER_BSS_END_SYMBOLS): Add
3039 additional symbols referenced by newer crt0.o files from HP.
3043 * emulparams/armelf.sh (DATA_START_SYMBOLS): New symbol.
3047 * Makefile.am (GENSCRIPTS): Quote ${exec_prefix}.
3048 * Makefile.in: Regenerate.
3052 * ld.texinfo: Use @command for commands, @option for options.
3053 * Makefile.am (POD2MAN): Use 'GNU Development Tools' for
3055 * Makefile.in: Rebuild.
3059 * configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
3060 Add support for targets.
3064 * configure.in (ALL_LINGUAS): Add "fr" and "sv"
3065 * configure: Regernate.
3066 * po/fr.po: New file.
3067 * po/sv.po: New file.
3071 * configure.tgt (sh-*-linux): Set targ_emul, targ_extra_emuls
3072 as little endian default and to support big endian.
3076 * ld.texinfo (Options): Document new option, -nostdlib.
3077 * lexsup.c (OPTION_NOSTDLIB): New definition.
3078 (ld_options): Add entry for "nostdlib".
3079 (parse_args): Handle OPTIONS_NOSTDLIB.
3080 * ldfile.c (ldfile_add_library_path): Don't add directories
3081 to the search path if they weren't specified on the command line
3082 and -nostdlib was specified.
3083 * ld.h (ld_config_type): New member only_cmd_line_lib_dirs.
3087 * lexsup.c (parse_args): Prevent infinite parsing loop when
3088 "-rpath.a" is specified on the command line.
3089 Replace calls to fprintf with calls to einfo.
3093 * ld.texinfo: A historical requirement that MEMORY and SECTIONS
3094 appear only once across all the linker scripts involved in a link
3095 invocation no longer applies. Make the documentation reflect
3100 * configure.tgt: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
3102 (sh-*-linux*): Added targ_extra_libpath.
3106 * ldlang.c (lang_size_sections): Keep a valid output_offset field
3107 for padding statements.
3111 * configure.tgt (mmix-*-*): New target.
3112 * Makefile.am (ALL_EMULATIONS): Add eelf64mmix.o and emmo.o.
3113 Add dependencies to match.
3114 * emulparams/mmo.sh, emulparams/elf64mmix.sh, emultempl/mmo.em,
3115 emultempl/mmix-elfnmmo.em, emultempl/mmixelf.em,
3116 scripttempl/mmo.sc: New files.
3117 * gen-doc.texi: @set MMIX.
3118 * ld.texinfo: Ditto.
3119 [MMIX] Add MMIX node.
3120 * Makefile.in: Regenerate.
3124 * ldlang.c: Fix a comment typo.
3128 * configure.host: Move alpha*-*-linux-gnu* entry to generic
3129 entries, and match *-*-linux*.
3133 * ldgram.y (mri_script_command): Surround processing of INCLUDE
3134 with ldlex_script, ldlex_popstate.
3135 (ifile_p1): Likewise.
3136 * ldlex.l (EOF): Don't BEGIN(SCRIPT). Restore lineno from the
3138 (lex_push_file): Save current lineno to lineno_stack. Set lineno
3139 to 1. Don't BEGIN(SCRIPT).
3140 (lex_redirect): Similarly.
3141 * ldmain.c (main): Set yydebug non-zero if YYDEBUG.
3145 * scripttempl/armcoff.sc: Define __EH_FRAME_BEGIN__ and
3146 __EH_FRAME_END__ and accept eh frames into data section.
3147 Add ctor and dtor sections.
3151 * pe-dll.c (autofilter_objectlist): Add gcrt0.o.
3152 (auto-export): Fix indentation.
3156 * pe-dll.c (autofilter_objectlist): Add startup objects
3158 (auto-export): Constify char * p.
3159 Extract file basename and use strcmp rather than ststr
3164 * ldmain.c (get_emulation): Improve comment about the handling
3169 * po/POTFILES.in: Regenerate.
3173 * emultempl/elf32.em (gld*_list_options): Remove extra '\t' from
3174 -z nocopyreloc and -z nocombreloc usage strings.
3178 * emultempl/elf32.em (gld*_list_options): Include -z nocopyreloc
3183 * scripttempl/armaout.sc: Place .bss section after end of aligned
3184 data section to match behaviour of aout code in constructrion of
3189 * pe-dll.c (autofilter_entry_type autofilter_liblist: Add
3190 startup files for mingw32 dlls to list.
3194 * emultempl/elf32.em: Fix shell 'if' usage for portability.
3198 * configure.tgt (targ): Add arm9e-*-elf.
3202 * genscripts.sh: Fix a typo in the last change.
3206 * emultempl/elf32.em (gld_*_list_options): Include -z combreloc and
3207 -z nocombreloc in usage.
3211 * genscripts.sh: Include a comment at the top of each generated
3212 script, explaining its purpose.
3216 * emultempl/elf32.em (parse_args): Handle -z nocopyreloc.
3217 * NEWS: Mention -z nocopyreloc.
3218 * ld.texinfo (Options): Describe nocopyreloc.
3222 * configure: Regenerate.
3226 * ldver.h (ld_program_version): Remove declaration.
3227 * lexsup.c (parse_args): Move printing of copyright message..
3228 * ldver.c (ldversion): .. to here.
3229 Use BFD_VERSION_STRING in place of BFD_VERSION.
3230 (ld_program_version): Remove.
3231 * Makefile.am (Makefile): Depend on bfd/configure.in.
3233 * Makefile.in: Regenerate.
3237 * Makefile.am: Update dependencies with "make dep-am".
3238 * Makefile.in: Regenerate.
3242 * ldlang.c (lang_common): Conditionally inhibit Common allocation.
3243 * lexsup.c: Add --no-define-common commandline option.
3244 * ldgram.y: Add INHIBIT_COMMON_ALLOCATION script command.
3245 * ldlex.l: Likewise.
3246 * ld.h: Add command_line.inhibit_common_definition.
3247 * ldmain.c (main): Initialize.
3248 * ld.texinfo: Document.
3252 * ldlang.c (section_already_linked): Remove assignment to kept_section.
3256 * ldmisc.c (USE_STDARG): Remove.
3257 (info_msg): Define using VPARAMS, VA_OPEN, VA_FIXEDARG, VA_CLOSE.
3262 * ldmisc.h: Remove #ifdef ANSI_PROTOTYPES and non-ansi
3263 declarations. Update copyright.
3267 * pe-dll.c: Remove obsoleted declaration of
3268 pe_get_data_import_dll_name.
3269 (pe_create_import_fixup): Fix thinko.
3271 * ld.texinfo(enable-auto-import): Clarify the explanation.
3275 * pe-dll.c (pe_create_import_fixup): Revert previous patch.
3276 * emultemp/pe.em (pe_data_import_dll): Move definition outside of
3277 DLL_SUPPORT controlled code.
3281 * emultempl/pe.em(pe_data_import_dll): Make static.
3282 (pe_get_data_import_dll_name): New accessor function.
3283 * pe-dll.c(pe_create_import_fixup): call
3284 pe_get_data_import_dll_name() from pe.em, instead of
3285 directly accessing pe_data_import_dll variable from pe.em.
3289 * deffilep.y: Include "safe-ctype.h" instead of <ctype.h>.
3290 (def_file_add_directive): Use ISSPACE instead of isspace.
3291 (def_lex): Use ISDIGIT/ISXDIGIT/ISALPHA/ISALNUM instead of
3292 isdigit/isxdigit/isalpha/isalnum.
3293 * emultempl/aix.em: Include "safe-ctype.h" instead of <ctype.h>.
3294 (gld${EMULATION_NAME}_read_file): Use ISSPACE instead of isspace.
3295 * emultempl/elf32.em: Include "safe-ctype.h" instead of <ctype.h>.
3296 (gld${EMULATION_NAME}_place_orphan): Use ISALNUM instead of
3298 * emultempl/gld960c.em: Include "safe-ctype.h" instead of <ctype.h>.
3299 (gld960_set_output_arch): Use ISUPPER/TOLOWER instead of
3301 * emultempl/sunos.em: Include "safe-ctype.h" instead of <ctype.h>.
3302 (gld${EMULATION_NAME}_search_dir): Use ISDIGIT instead of isdigit.
3303 * ldctor.c: Include "safe-ctype.h" instead of <ctype.h>.
3304 (ctor_prio): Use ISDIGIT instead of isdigit.
3305 * ldfile.c: Include "safe-ctype.h" instead of <ctype.h>.
3306 (ldfile_open_file_search): Use ISALPHA instead of isalpha.
3307 (ldfile_add_arch): Use ISUPPER/TOLOWER instead of
3309 * ldlang.c: Include "safe-ctype.h" instead of <ctype.h>.
3310 (stricpy): Use TOLOWER instead of isupper/tolower.
3311 (lang_leave_overlay_section): Use ISALNUM instead of isalnum.
3312 * ldlex.l: Include "safe-ctype.h" instead of <ctype.h>.
3313 (lex_warn_invalid): Use ISPRINT instead of isprint.
3314 * ldmain.c: Include "safe-ctype.h" instead of <ctype.h>.
3315 (main): For gettext, also set the LC_CTYPE locate facet.
3316 (add_keepsyms_file): Use ISSPACE instead of isspace.
3317 * lexsup.c: Include "safe-ctype.h" instead of <ctype.h>.
3318 (is_num, parse_args): Use ISDIGIT instead of isdigit.
3319 * mpw-elfmips.c: Include "safe-ctype.h" instead of <ctype.h>.
3320 (gldelf32ebmip_place_orphan): Use ISALNUM instead of isalnum.
3321 * mpw-eppcmac.c: Include "safe-ctype.h" instead of <ctype.h>.
3322 (gldppcmacos_read_file): Use ISSPACE instead of isspace.
3323 * pe-dll.c: Include "safe-ctype.h" instead of <ctype.h>.
3324 (quoteput): Use ISSPACE instead of isspace.
3325 (pe_dll_generate_implib, pe_process_import_defs): Use ISALNUM
3330 * deffilep.y (def_stash_module): Constify "name" param.
3332 * pe-dll.c: Replace CONST with const throughout.
3333 (quick_symbol): Constify "n1", "n2", "n3" params.
3334 (make_singleton_name_thunk): Constify "import" param. Make
3335 "buffer_len" a size_t.
3336 (make_import_fixup_entry): Constify "name", "fixup_name",
3337 "dll_symname" params.
3338 (pe_get16): Cast args of bfd_seek. Replace bfd_read with bfd_bread.
3339 (pe_get32): Likewise.
3340 (pe_implied_import_dll): Likewise.
3342 * emultempl/beos.em (sort_by_file_name): Constify "ra", "rb".
3343 (sort_by_section_name): Likewise.
3345 * emultempl/pe.em: Move defines for arm_epoc_pe before bfd.h included.
3346 (make_import_fixup): Cast printf arg, rel->address to long rather
3348 (gld_${EMULATION_NAME}_after_open): Don't compare NULL against int.
3352 * ldmain.c (main): Rename BufferSize to ld_bufsz because HPUX
3353 defines BufferSize. Increase buffer size by one.
3357 * pe-dll.c (pe_walk_relocs_of_symbol): Fix memory leak.
3361 * configure.tgt: Add arm-openbsd target.
3365 * Makefile.am (ALL_EMULATIONS): Move eelf64ppc.o and
3367 (ALL_64_EMULATIONS): Here.
3368 * Makefile.in: Regenerated.
3372 * emultempl/pe.em(make_import_fixup): change signature to
3373 take asection as well as arelec; we need this for proper
3374 error reporting. Only call pe_create_import_fixup() if
3375 there is no attempt to add a constant addend to the reloc;
3376 otherwise, report error condition.
3377 * pe-dll.c(pe_walk_relocs_of_symbol): change signature,
3378 since final argument is a pointer to make_import_fixup().
3379 Change call to cb() to match make_import_fixup() signature.
3380 (make_import_fixup_mark): make buffer_len unsigned.
3381 * pe-dll.h: change signature of pe_walk_relocs_of_symbol.
3385 * ld.texinfo: add verbose documentation for auto-import
3386 direct-addressing workaround, to compliment the terse
3391 * scripttempl/v850.sc: Add gcc_except_table sections.
3395 * emulparams/h8300helf.sh: Move stack to a much higher memory address.
3396 * emulparams/h8300self.sh: Similarly.
3400 * ld.texinfo (Options, --stack): Correct default value for stack
3405 * emultempl/aix.em : Handle import file XMC_XO and syscall symbols.
3409 * emultempl/beos.em: Declare prototypes for comparions functions,
3414 * emultempl/aix.em: Add missing prototype.
3415 * emultempl/lnk960.em: Likewise.
3416 * emultempl/vanilla.em: Likewise.
3417 * emultempl/armcoff.em: Likewise.
3418 * emultempl/armelf_oabi.em: Likewise.
3419 * emultempl/beos.em: Likewise.
3420 * emultempl/gld960c.em: Likewise.
3421 * emultempl/gld960.em: Likewise.
3423 * emulparams/elf64alpha.sh (PARSE_AND_LIST_PROLOGUE): Add parameter
3424 for prototype declaration.
3429 * ldmain.c (get_emulation): Add support for -mips32 and -mips64.
3433 * emultempl/pe.em: Add missing prototypes.
3434 (gld_${EMULATION_NAME}_after_open): Remove extra args to
3435 pe_find_data_imports.
3436 (pr_sym): Add unused attribute.
3440 * configure.tgt (i[3456]86-*-rtems*, m68*-*-rtems*): Change
3441 default from coff to elf.
3445 * emulparams/h8300helf.sh: Resync with h8300elf.sh. Update
3447 * emulparams/h8300self.sh: Similarly.
3451 * Makefile.am (ALL_EMULATIONS): Add eh8300elf.o, eh8300elf.o and
3453 (eh8300elf.c, eh8300helf.c, eh8300self.c): New targets.
3454 * configure.tgt (h8300-*-elf*): New case.
3455 * emulparams/h8300elf.sh, emulparams/h8300helf.sh: New files.
3456 * emulparams/h8300self.sh: New file.
3457 * Makefile.in: Regenerated.
3461 * ldmain.c (main): Rename BSIZE to BufferSize to avoid collision
3467 * Makefile.am (ALL_EMULATIONS): Add eelf64ppc.o and eelf64lppc.o.
3468 (eelf64ppc.c, eelf64lppc.c): Add make targets.
3470 * Makefile.in: Regenerate.
3471 * configure.tgt: Add powerpc64 support. Move pdp11, pjl, pj
3472 entries to correct alphabetical position.
3473 * emulparams/elf64ppc.sh: New.
3474 * emulparams/elf64lppc.sh: New.
3478 * ldmain.c (main): Declare BSIZE as static.
3482 * emultempl/elf32.em (place_orphan): Place orphan .rel* sections
3483 into .rel.dyn resp. .rela.dyn if combreloc.
3484 (get_script): If .x linker script is equal to .xn, only put it
3485 once into the binary.
3486 Add .xc and .xsc scripts.
3487 (parse_args): Handle -z combreloc and -z nocombreloc.
3488 * scripttempl/elf.sc (.rela.sbss): Fix a typo.
3489 For .xc and .xsc scripts put all .rel* or .rela* input sections
3490 but .rel*.plt and PLT-like sections into .rel.dyn resp. .rela.dyn.
3491 * genscripts.sh (GENERATE_COMBRELOC_SCRIPT): Set if SCRIPT_NAME
3493 Strip trailing whitespace from script.
3494 Generate .xc and .xsc scripts if requested.
3495 * ldmain.c (main): Initialize link_info.combreloc and
3496 link_info.spare_dynamic_tags.
3497 * lexsup.c (OPTION_SPARE_DYNAMIC_TAGS): Define.
3498 (ld_options): Add --spare-dynamic-tags option.
3499 (parse_args): Likewise.
3500 * ld.texinfo: Document -z combreloc and -z nocombreloc.
3501 * ldint.texinfo: Document .xc and .xsc linker scripts.
3502 * NEWS: Add notes about -z combreloc and SHF_MERGE.
3506 * emulparams/elf32fr30.sh: Add a newline.
3510 * deffilep.y: Add missing prototypes.
3511 * pe-dll.c: Likewise.
3515 * ldlang.c (insert_pad): Fix typos in last patch.
3517 * ldlang.c: When traversing lang_statement_union_type lists,
3518 consistently use "header.next" rather than "next".
3519 * mpw-eppcmac.c: Likewise.
3520 * emultempl/beos.em: Likewise.
3521 * emultempl/hppaelf.em: Likewise.
3522 * emultempl/pe.em: Likewise.
3523 * ldlang.h (union lang_statement_union): Remove "next" field.
3525 * ldlang.c (insert_pad): Use offsetof macro.
3526 (lang_size_sections): Always neuter padding statements.
3527 * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Delete.
3529 * pe-dll.c (pe_dll_fill_sections): Correct type of "relax" param
3530 passed to lang_size_sections.
3531 (pe_exe_fill_sections): Likewise.
3532 * emultempl/pe.em (output_prev_sec_find): Copied from elf32.em.
3533 (gld_${EMULATION_NAME}_place_orphan): Merge from elf32.em.
3537 * emultempl/aix.em: Formatting fixes.
3541 * ldlang.c (insert_pad): Make use of an existing pad statement if
3542 available. Move code calculating alignment, adjusting section
3543 alignment power, and adjusting dot to ..
3544 (size_input_section): .. here. Remove unused relax param.
3545 (lang_size_sections): Change boolean `relax' param to boolean *.
3546 Adjust call to size_input_section. Make use of insert_pad to
3547 place pad after the assignment statement. If relaxing, zap
3549 (reset_memory_regions): Reset output_bfd section sizes too.
3550 (relax_again): Move to..
3551 (lang_process): ..here. Adjust call to lang_size_sections, and
3552 remove duplicated code.
3553 * ldlang.h (lang_size_sections): Change `relax' param to boolean *.
3557 * ld.texinfo: Document that fill values now use the four least
3559 * emulparams/elf32fr30.sh (NOP): Update.
3560 * emulparams/elf32mcore.sh: Likewise.
3561 * emulparams/elf64_s390.sh: Likewise.
3562 * emulparams/elf_i386.sh: Likewise.
3563 * emulparams/elf_i386_be.sh: Likewise.
3564 * emulparams/elf_i386_chaos.sh: Likewise.
3565 * emulparams/elf_i386_ldso.sh: Likewise.
3566 * emulparams/elf_s390.sh: Likewise.
3567 * emulparams/elf_x86_64.sh: Likewise.
3568 * emulparams/i386moss.sh: Likewise.
3569 * emulparams/i386nw.sh: Likewise.
3570 * emulparams/m68kelf.sh: Likewise.
3571 * scripttempl/elf.sc: Update NOP comment.
3572 * scripttempl/elfi370.sc: Likewise.
3573 * scripttempl/elfm68hc11.sc: Likewise.
3574 * scripttempl/elfm68hc12.sc: Likewise.
3575 * scripttempl/nw.sc: Likewise.
3579 * ldgram.y (saved_script_handle): Initialize to NULL.
3580 * ldmain.c (main): Change check on saved_script_handle.
3584 * emultempl/elf32.em: Formatting fixes.
3585 (output_prev_sec_find): Test for bfd_ind_section too; do so by
3586 looking at sec->owner.
3587 (output_rel_find): Move function inside LDEMUL_PLACE_ORPHAN test.
3588 (gld${EMULATION_NAME}_place_orphan): Add a few comments. Remove
3589 unused code, and reorganize orphan section placement code.
3591 * ldlang.c (wild_doit): Rename to lang_add_section.
3592 * ldlang.h: Here too.
3593 * mpw-elfmips.c: And here.
3594 * emultempl/beos.em: And here.
3595 * emultempl/elf32.em: And here.
3596 * emultempl/hppaelf.em: And here.
3597 * emultempl/pe.em: And here.
3601 * emultempl/needrelax.em: New file.
3602 * emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Reference it.
3603 * Makefile.am (eelf64_ia64.c): Depend on it.
3604 * Makefile.in: Rebuild.
3608 * emultempl/elf32.em: For SEC_EXCLUDE sections, ensure that
3609 output_section is set non-NULL.
3611 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Return
3612 `true' for SEC_EXCLUDE sections so that the generic code doesn't
3613 needlessly create an output_section_statement. Treat a correctly
3614 named output_section_statement with NULL bfd_section as compatible.
3618 * emultempl/generic.em: Support EXTRA_EM_FILE.
3619 (ld_${EMULATION_NAME}_emulation): Support emulation parameters
3620 LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
3621 LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
3622 LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
3623 LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
3624 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
3625 LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
3626 LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
3627 LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
3628 LDEMUL_FIND_POTENTIAL_LIBRARIES.
3632 * scripttempl/elf.sc, scripttempl/elfd30v.sc,
3633 scripttempl/elfm68hc11.sc, scripttempl/elfm68hc12.sc,
3634 scripttempl/v850.sc: Keep .jcr data.
3640 * ldgram.y (had_script): Change name to saved_script_handle.
3641 Change type to file handle.
3642 * ld.h (had_script): Rename and retype.
3643 * ldfile.c (ldfile_open_command_file): Save the file handle
3644 used in saved_script_handle.
3645 * lexsup.c (parse_args): Do not allow -c option to alter
3646 saved_script_handle.
3647 * ldmain.c (main): Print out the linker script used if
3648 --verbose is given. Check saved_script_handle to obtain the
3649 external linker script used, or if NULL, dump the builtin
3651 * ld.texinfo: Document that --verbose now dumps the linker
3652 script used, regardless of whether it was an internal or an
3657 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
3659 * configure: Regenerate.
3663 * emultempl/elf32.em (output_prev_sec_find): Add missing prototype.
3665 * scripttempl/elf.sc: Move non-text .dynamic section before
3666 .plt/.got/.sdata* group.
3667 (OTHER_GOT_SECTIONS): Move to immediately after .got.
3668 (OTHER_SDATA_SECTIONS): Add.
3669 * emulparams/criself.sh: Use OTHER_SDATA_SECTIONS rather than
3671 * emulparams/crislinux.sh: Likewise.
3672 * emulparams/elf32b4300.sh: Likewise.
3673 * emulparams/elf32bmip.sh: Likewise.
3674 * emulparams/elf32bmipn32.sh: Likewise.
3675 * emulparams/elf32bsmip.sh: Likewise.
3676 * emulparams/elf32btsmip.sh: Likewise.
3677 * emulparams/elf32ebmip.sh: Likewise.
3678 * emulparams/elf32elmip.sh: Likewise.
3679 * emulparams/elf32l4300.sh: Likewise.
3680 * emulparams/elf32lmip.sh: Likewise.
3681 * emulparams/elf32lsmip.sh: Likewise.
3682 * emulparams/elf32ltsmip.sh: Likewise.
3683 * emulparams/elf64bmip.sh: Likewise.
3684 * emulparams/elf64btsmip.sh: Likewise.
3685 * emulparams/elf64ltsmip.sh: Likewise.
3689 * genscripts.sh: Source the emulparams script before each output
3690 script is generated so that variables like `RELOCATING' may affect
3691 variables defined in the emulparams script.
3695 * emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this
3698 * emultempl/beos.em (sort_sections): Modify for 2001-08-03 change,
3699 ie. iterate over wild_statement.section_list.
3700 (gld${EMULATION_NAME}_place_orphan): Likewise.
3704 * scripttempl/elfm68hc12.sc (FINISH_CODE, FINISH_RELOC): New to handle
3705 .fini[0-4] sections used by _exit
3706 (CTOR, DTOR): Export ctor/dtor symbols; move them to ROM.
3707 (*.text,*.data,*.bss): Take into account .text.*, .data.*, .bss.*.
3708 * scripttempl/elfm68hc11.sc: Likewise.
3712 * emultempl/beos.em (init): Add the missing initialization.
3716 * ld.texinfo (Input Section Basics): Clarify ordering of output
3718 * ldlang.c (callback_t): Add wildcard_list param.
3719 (walk_wild_section): Remove "section" param. Rewrite for
3720 lang_wild_statement_type change. Remove unique_section_p test.
3721 (walk_wild_file): Remove "section" param.
3722 (walk_wild): Remove "section" and "file" params.
3723 (lang_gc_wild): Likewise.
3724 (wild): Likewise. Modify for lang_wild_statement_type change.
3725 (wild_sort): Likewise. Add "sec" param.
3726 (gc_section_callback): Likewise.
3727 (output_section_callback): Likewise. Do unique_section_p test.
3728 (map_input_to_output_sections): Modify call to wild.
3729 (lang_gc_sections_1): Likewise.
3730 (print_wild_statement): Modify for lang_wild_statement_type
3732 (lang_add_wild): Replace filename, filenames_sorted param with
3733 filespec. Replace section_name, sections_sorted,
3734 exclude_filename_list with section_list.
3735 * ldlang.h (lang_add_wild): Here too.
3736 (lang_wild_statement_type): Replace section_name, sections_sorted,
3737 and exclude_filename_list with section_list.
3738 * ldgram.y (current_file): Delete.
3739 (%union): Add wildcard_list.
3740 (file_NAME_list): Set type to wildcard_list. Build a linked list
3741 rather than calling lang_add_wild for each entry.
3742 (input_section_spec_no_keep): Call lang_add_wild here instead.
3743 * ld.h (struct wildcard_list): Declare.
3744 * mri.c (mri_draw_tree): Modify to suit new lang_add_wild.
3748 * ldmain.c (main): initialize link_info.pei386_auto_import
3749 * pe-dll.c: new tables for auto-export filtering
3750 (auto_export): change API, pass abfd for contextual filtering.
3751 Loop thru tables of excluded symbols instead of comparing
3756 * pe-dll.c: new variable pe_dll_enable_extra_debug. New
3757 static variable current_sec (static struct sec *). Add
3758 forward declaration for add_bfd_to_link.
3759 (process_def_file): Don't export undefined symbols. Do not
3760 export symbols starting with "_imp__". Call auto_export()
3762 (pe_walk_relocs_of_symbol): New function.
3763 (generate_reloc): add optional extra debugging
3764 (pe_dll_generate_def_file): eliminate extraneous initial blank
3766 (make_one): enlarge symtab to make room for __nm__ symbols
3767 (DATA auto-import support).
3768 (make_singleton_name_thunk): New function.
3769 (make_import_fixup_mark): New function.
3770 (make_import_fixup_entry): New function.
3771 (pe_create_import_fixup): New function.
3772 (add_bfd_to_link): Specify that 'name' argument is a CONST
3774 * pe-dll.h: declare new variable pe_dll_extra_pe_debug;
3775 declare new functions pe_walk_relocs_of_symbol and
3776 pe_create_import_fixup.
3777 * emultempl/pe.em: add new options --enable-auto-import,
3778 --disable-auto-import, and --enable-extra-pe-debug.
3779 (make_import_fixup): New function.
3780 (pe_find_data_imports): New function.
3781 (pr_sym): New function.
3782 (gld_${EMULATION_NAME}_after_open): Add optional extra pe
3783 debugging. Call pe_find_data_imports. Mark .idata as DATA, not
3788 * ld.texinfo: add additional documentation for
3789 --export-all-symbols. Document --out-implib,
3790 --enable-auto-image-base, --disable-auto-image-base,
3791 --dll-search-prefix, --enable-auto-import, and
3792 --disable-auto-import.
3793 * ldint.texinfo: Add detailed documentation on auto-import
3798 * ld.texinfo (Simple Assignments): Fix computation in SECTIONS
3803 * Makefile.am: Update dependencies with "make dep-am".
3804 * Makefile.in: Regenerate
3808 * ldcref.c (check_section_sym_xref): New function.
3809 (check_nocrossrefs): Call it.
3810 (check_nocrossref): Interate over h->refs here instead of..
3811 (check_refs): ..here. Pass in the symbol name, section, and bfd
3812 rather than hash_entry pointers.
3813 (struct check_refs_info): Keep symbol name rather than hash entry.
3815 (check_reloc_refs): Tweak for above changes in check_refs_info.
3816 Only report references to section syms when symname is NULL to
3817 prevent duplicate messages for the same reloc.
3821 * ldexp.c (exp_print_tree): Use stderr if config.map_file is not
3822 available. Do not print NULL trees.
3823 (exp_print_token): Print unknown tokens with values > 126 as
3824 decimal values not ASCII characters.
3826 * ldlang.c (lang_leave_overlay): If a region is specified assign
3827 it to all sections inside the overlay unless they have been
3828 assigned to the own, non-default, memory region.
3830 * README: Add header for consistency with other README files.
3834 * emultempl/elf32.em (output_prev_sec_find): Never return
3835 bfd_abs_section_ptr, bfd_com_section_ptr nor
3836 bfd_und_section_ptr.
3840 * Makefile.am (em32relf.c): Change dependency from generic.em to
3842 * Makefile.in: Regenerate.
3846 * configure.tgt (i386-*-netbsdelf*): New target.
3847 (i386-*-netbsd*): Set targ_extra_emuls to `elf_i386'
3851 * emultempl/elf32.em (output_prev_sec_find): New.
3852 (place_orphan): Use it.
3856 * ldmain.c (main): Fix typos in the last change.
3860 * ldmain.c (main): Disallow -F and -f without -shared.
3864 * emultempl/pe.em (after_open): Check for the output_bfd not
3865 having any coff_data structure allocated to it.
3869 * emultempl/elf32.em: Do not assuming that contents of the buffer
3870 returned from basename function will remain unchanged accross other
3875 * scripttempl/elf.sc (DYNAMIC_PAD): Revert the change made on
3876 2001-07-03. It creates dynamic entries even for static binaries.
3880 * scripttempl/elf.sc (DYNAMIC_PAD): New variable.
3881 (DYNAMIC): Use it to reserve few dynamic entries for
3886 * emulparams/hppa64linux.sh: New file.
3887 * configure.tgt: hppa*64*-*-linux* uses hppa64linux.sh
3888 * Makefile.am (ALL_64_EMULATIONS): Add ehppa64linux.o
3889 (ehppa64linux.c): Add rule to make it.
3891 * Makefile.in: Regenerate.
3895 * ld.texinfo (Options, -r): Mention restrictions when using
3896 different object formats.
3900 * ldlang.c (lang_check): Emit fatal error if relocatable link
3901 between different object flavours with relocations in input.
3905 * ld.texinfo (-E, --export-dynamic): Mention --version-script.
3906 (--version-script): Mention the language support.
3910 * ldlang.c (lang_check): Revert the change mode on 2001-06-15.
3914 * Makefile.am (ld.1): Remove the prefix `$(srcdir)/'.
3915 (diststuff): Add $(MANS).
3916 * Makefile.in: Regenerated.
3922 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
3923 Update for API change in bfd_elf${ELFSIZE}_size_dynamic_sections.
3924 * mpw-elfmips.c (gldelf32ebmip_before_allocation): Ditto.
3925 * ld.h (args_type): Remove member export_dynamic. All users
3926 changed to use struct bfd_link_info member.
3928 * Makefile.am (ecriself.c, ed10velf.c, ei386moss.c): Depend on
3929 $(srcdir)/emultempl/elf32.em, not $(srcdir)/emultempl/generic.em.
3930 * Makefile.in: Regenerate.
3934 * ldlang.c (init_os): Add the newline to the einfo call.
3935 (lang_check): Likewise.
3936 (lang_do_version_exports_section): Likewise.
3940 * lexsup.c (parse_args); Save optind to report unrecognized
3945 * ldlang.c (lang_check): Emit fatal error if relocatable link
3946 between different object flavours.
3948 * lexsup.c (parse_args) <case OPTION_EXPORT_DYNAMIC, case 'E'>:
3949 Set new link_info member export_dynamic.
3950 * ldmain.c (main): Initialize new link_info member export_dynamic.
3954 * ldlang.c (walk_wild): Only call walk_wild_file if
3955 lookup_name returns something.
3956 (lookup_name): If load_symbols fails, return NULL.
3957 (load_symbols): Change to a boolean function.
3958 (open_input_bfds): If load_symbols fails then do not make the
3963 * ldlang.c (record_bfd_errors): Remove.
3965 * emultempl/aix.em: Fix copyright dates.
3969 * elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase.
3970 (TEXT_START_ADDR): Likewise.
3974 * configure.host: Set HOSTING_CRT0/HOSTING_LIBS correctly for s/390.
3978 * emultempl/pe.em (init): Reduce default stack reserve to 0x200000.
3982 * ldlang.c (open_input_bfds): Don't change the bfd error
3983 handler whilst loading symbols.
3987 * configure.tgt: Remove i370-mvs architecture, it is not currently
3992 * emulparams/ppcmacos.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
3993 like emulparams/aixppc.sh.
3997 * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Move
3998 setting of output_filename after bfd_scan_arch.
3999 * emultempl/pe.em: Likewise.
4003 * emulparams/aixrs6.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
4004 like emulparams/aixppc.sh.
4006 * emultempl/aix.em (sc): Use ${srcdir}/emultempl/ostring.sed
4007 instead of ${srcdir}/emultempl/stringify.sed.
4011 * emulparams/elf64_aix.sh: Change settings to match IBM linker
4016 * configure.host: Replace linuxoldld with linux*oldld.
4017 * configure.tgt: Likewise.
4021 * emultempl/stringify.sed: Removed again.
4025 * emultempl/aix.em (OUTPUT_ARCH): Defined.
4026 (gld${EMULATION_NAME}_before_parse): Initialize
4027 ldfile_output_architecture, ldfile_output_machine and
4028 ldfile_output_machine_name from ${OUTPUT_ARCH} if possible.
4029 * emultempl/beos.em: Likewise.
4030 * emultempl/elf32.em: Likewise.
4031 * emultempl/linux.em: Likewise.
4032 * emultempl/mipsecoff.em: Likewise.
4033 * emultempl/pe.em: Likewise.
4034 * emultempl/sunos.em: Likewise.
4038 * emultempl/aix.em : (gld${EMULATION_NAME}_read_file)
4039 udate import file format.
4040 (change_symbol_mode) New, same
4041 (is_syscall) New, same
4042 * emulparams/aixppc.sh : add SYSCALL_MASK and SYMBOL_MODE_MASK
4043 * emulparams/aixppc64.sh : same
4044 * emulparams/aixrs6.sh : same
4045 * emulparams/ppcmacos.sh : same
4046 * emultempl/aix.em : use strtoull to parse options
4047 * Makefile.am : add eaixppc64 emulation for xcoff64
4048 * Makefile.in : same
4049 * configure.tgt : same
4051 * scripttempl/aix.sc : default text section offset to 0x10000000
4052 default data section offset to 0x20000000
4053 add .sv3264 and .sv64 pseudo sections
4054 loader and debug sections use the currect section offset.
4056 * emultempl/aix.em : Add xcoff64 support
4057 Add -binitfini support
4058 (gld${EMULATION_NAME}_before_parse) -binitfini
4059 (gld${EMULATION_NAME}_parse_args) same
4060 (gld${EMULATION_NAME}_before_allocation) format change for special
4063 * emulparams/aixppc64.sh : New file for xcoff64 support
4067 * emultempl/elf32.em (ELF_INTERPRETER_SET_DEFAULT): Use this new
4068 variable to avoid non-portable shell construct.
4072 * ldmain.c (get_emulation): Add -mips5 command line argument.
4076 * emulparams/elf_i386_ldso.sh: New, copied from elf_i386.sh.
4077 (ELF_INTERPRETER_NAME): Define it.
4078 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Use
4080 * configure.tgt (targ_emul, targ_extra_emuls)
4081 [i[3456]86-*-solaris2*, i[3456]86-*-solaris*]: Use elf_i386_ldso
4082 as primary, elf_i386 as extra.
4083 * Makefile.am (ALL_EMULATIONS): Added eelf_i386_ldso.o.
4084 (eelf_i386_ldso.c): New rule.
4085 * Makefile.in: Rebuilt.
4089 * lexsup.c (ld_options): Allow -I to be an alias for
4090 --dynamic-linker. This is for Solaris compatability.
4091 * ld.texinfo: Document that -I can be used.
4096 * ldlang.c (wild_doit): Use linker_has_input to reliably determine
4097 whether an input section is the first one assigned to an output
4099 Assorted formatting fixes.
4103 * Makefile.am (ld.dvi): Search bfd/doc for texinfo files.
4104 * Makefile.in: Ditto.
4108 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Put
4109 .gnu.linkonce.ia64unw{,i} sections into corresponding .IA_64.unwind*
4111 * emulparams/elf64_aix.sh (OTHER_READONLY_SECTIONS): Likewise.
4115 * ldlang.c (lang_process): Call bfd_merge_sections.
4119 * ldgram.y: Fix typo.
4123 * emultempl/elf32.em: Include "libiberty.h".
4124 (gld${EMULATION_NAME}_vercheck): Call basename () to get the
4125 basename of the bfd filename.
4126 (gld${EMULATION_NAME}_stat_needed): Likewise.
4127 (gld${EMULATION_NAME}_try_needed): Likewise.
4128 (gld${EMULATION_NAME}_open_dynamic_archive): Likewise.
4132 * emultempl/pe.em: Include <ctype.h>.
4136 * emulparams/elf32openrisc.sh: New file.
4138 * Makefile.am: Add OpenRISC target.
4139 * Makefile.in: Regenerated.
4141 * configure.tgt: Add openrisc-*-* mapping.
4145 * emultempl/aix.em: Replace buystring with xstrdup.
4146 * emultempl/beos.em: Replace buystring with xstrdup.
4150 * ldfile.c: Include "libiberty.h".
4151 * ldlex.l: Likewise.
4153 * ldmisc.c (buystring): Removed.
4154 * ldmisc.h: Likewise.
4156 * ldfile.c: Replace buystring with xstrdup.
4157 * ldlang.c: Likewise.
4158 * ldlex.l: Likewise.
4159 * ldmain.c: Likewise.
4160 * ldmisc.c: Likewise.
4161 * lexsup.c: Likewise.
4162 * mpw-eppcmac.c: Likewise.
4166 * emulparms/elf_x86_64.sh (MAXPAGESIZE): Fix value.
4170 * ldlang.c (load_symbols): Give emulation a chance
4171 to process unrecognized file before fatal error is
4172 reported, not after.
4176 * configure.tgt: Add arm-vxworks target.
4177 * scripttempl/armcoff.sc: Support .text or .data as a section name
4183 * ld.texinfo: Document --fatal-warnings.
4186 * ldmisc.c (vfinfo): Set flag to inhibit making executable if
4187 warnings have been turned into errors.
4188 * lexsup.c (OPTION_WARN_FATAL): Define.
4189 (ld_options): Entry for --fatal-warnings.
4190 (parse_args): Handle OPTION_WARN_FATAL.
4191 * ld.h (ld_config_type): Add fatal_warnings field.
4195 * ldmain.c (main): Default to discard_sec_merge.
4196 * lexsup.c (OPTION_DISCARD_NONE): Define.
4197 (ld_options): Add --discard-none.
4198 (parse_args): Handle OPTION_DISCARD_NONE.
4199 * ldlang.c (wild_doit): SEC_MERGE should be set in the output
4200 section only if SEC_MERGE and SEC_STRINGS flags and entsize of
4201 all its input sections match.
4205 * Makefile.am (ALL_EMULATIONS): Add eelf32ltsmip.o.
4206 (ALL_64_EMULATIONS): Add eelf64btsmip.o and eelf64ltsmip.o.
4207 (eelf32ltsmip.c): New target.
4208 (eelf64btsmip.c): Likewise.
4209 (eelf64ltsmip.c): Likewise.
4210 * Makefile.in: Regenerated.
4212 * configure.tgt (mips*el-*-linux-gnu): Uses traditional MIPS
4214 (mips*-*-linux-gnu*): Likewise.
4216 * emulparams/elf32ltsmip.sh: New. Traditional little endian
4218 * emulparams/elf64btsmip.sh: New. Traditional 64bit big endian
4220 * emulparams/elf64ltsmip.sh: New. Traditional 64bit little
4225 * emulparams/criself.sh (EXECUTABLE_SYMBOLS): Cannot provide
4226 correct value of __Stext here.
4227 (TEXT_START_SYMBOLS): Define; always define __Stext, to start of
4230 * emulparams/crislinux.sh: Remove FIXME.
4234 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 64k.
4235 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Likewise.
4239 * configure.tgt (cris-*-*): Change default emulation to criself.
4240 (cris-*-*aout*): New rule.
4244 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 0x4000.
4245 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
4249 * ld.texinfo (Overview): Fix syntax in texi code.
4253 * ld.texinfo: Put @c man indications to generate the ld man page.
4254 When generating man, define all the variables. Define SEEALSO
4255 and SYNOPSIS. Re-organize some lines to avoid the cross references.
4256 * Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variables.
4257 (ld.1): Generate from ld.texinfo.
4258 * Makefile.in: Regenerate.
4262 * scripttempl/i386go32.sc: Support the GCC flags '-ffunction-sections'
4263 and '-fdata-sections'. Set the VMA of STABS sections to zero.
4267 * emultmpl/elf32.em (gld${EMULATION_NAME}_search_needed): If NAME
4268 is an absolute path look only for this file and not along the path.
4272 * emultempl/elf32.em (OPTION_GROUP): New macro.
4273 Add new option Bgroup to longopts.
4274 (gld*_parse_args): Handle GROUP_OPTION and recognize -z defs.
4275 (gld*_list_options): Add -Bgroup and -z defs.
4276 * ld.1: Document -Bgroup and -z defs.
4277 * ld.texinfo: Likewise.
4281 * scripttempl/elfd10v.sc (.rodata,.rodata1,.data1,.sdata): Deal
4282 with sections created by -fdata-sections.
4283 (.dynbss,.bss): Ditto.
4287 * emultempl/m68kelf.em (m68k_elf_after_allocation): Call
4288 after_allocation_default, not gld..._before_allocation.
4292 * configure.in (BFD_VERSION): New.
4293 (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
4294 * configure: Regenerate.
4295 * Makefile.am: Run "make dep-am"
4296 * Makefile.in: Regenerate.
4300 * emulparams/elf64_aix.sh: Add additional read-only sections;
4301 uncomment lines which are now required.
4305 * ldlang.c (open_input_bfds): Set the bfd error handler so
4306 that problems can be caught whilst loading symbols.
4307 (record_bfd_errors): New function: Report BFD errors and mark
4308 the executable output as being invalid.
4312 * configure.host: Add configuration for ia64-*-aix*.
4313 * Makefile.am (ALL_64_EMULATIONS): Add emulation for ia64-*-aix*.
4314 Add dependencies for eelf64_aix.c.
4315 * Makefile.in: Regenerate.
4316 * configure.tgt: Add ia64-*-aix* mapping.
4317 * emulparams/elf64_aix.sh: Add settings for elf64 on aix5.
4321 * ldfile.c (ldfile_open_file): Set entry->search_dirs_flag to
4322 false if we found the file.
4326 * configure.tgt: Add FreeBSD/Alpha, FreeBSD/x86-64, FreeBSD/ia64,
4327 FreeBSD/PowerPC, FreeBSD/arm, and FreeBSD/sparc64 entries.
4331 * Makefile.am: Add PDP-11 target.
4332 * configure.tgt: Likewise.
4333 * emulparams/pdp11.sh: New file.
4337 * configure.host: Add a generic FreeBSD configuration entry such that
4338 all [modern] FreeBSD systems on all platforms will look the same.
4342 * configure.tgt: Remove mention of earmelf_linux26.
4346 * emulparams/elf64_ia64.sh (OTHER_GOT_SYMBOLS): Remove.
4350 * ldexp.h (node_type): Add etree_provided.
4351 * ldexp.c (exp_fold_tree): Handle etree_provided. Set the node
4352 type to etree_provided if defined by PROVIDE. Allow updating
4354 (exp_print_tree): Handle etree_provided.
4355 * mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle
4360 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add
4361 .IA_64.unwind.* pattern to unwind table section and
4362 .IA_64.unwind_info* pattern to unwind info section.
4366 * Makefile.am: Add linux target for S/390.
4367 * Makefile.in: Likewise.
4368 * configure.host: Likewise.
4369 * configure.tgt: Likewise.
4370 * emulparams/elf64_s390.sh: New file.
4371 * emulparams/elf_s390.sh: New file.
4375 * configure.tgt (sparc64-*-linux-gnu*): Add elf32_sparc into
4377 (sparc-*-linux-gnu*): Add elf64_sparc into targ_extra_libpath.
4381 * Makefile.am: Remove mention of earmelf_linux26.
4382 * Makefile.in: Regenerate.
4386 * emulparams/armelf_linux.sh (TEXT_START_ADDR): Set to 0x8000.
4387 * emulparams/armelf_linux26.sh: Delete.
4388 * configure.tgt: Remove mention of armelf_linux26 emulation.
4392 * ld.1: Replace occurances of -oformat with --oformat.
4396 * ldlang.c (lang_leave_overlay): Don't set lma_region when
4397 load_base is specified.
4401 * emultempl/elf32.em: Correct spelling in comments and listed
4406 * ldlang.c (lang_leave_overlay): Only set lma_region from the
4407 default for the first section of a group of overlay sections.
4411 * Makefile.am (GENSCRIPTS): Pass exec_prefix.
4412 * Makefile.in: Regenerate.
4413 * genscripts.sh: Use exec_prefix parameter to specify tool lib.
4414 Check for null tool_dir.
4418 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add IA_64.unwind
4419 and IA_64.unwind.info.
4423 * ldlang.c (lang_check): Merge the private data only if the
4424 input file has contents.
4428 * emulparams/hppalinux.sh (OUTPUT_FORMAT): Set to elf32-hppa-linux.
4430 * emultempl/hppaelf.em (hppaelf_after_parse): New function,
4431 enabling search for libmilli. On a relocatable link, make .text
4433 (LDEMUL_AFTER_PARSE): Define.
4434 (hppaelf_finish): Correct spelling of relocatable in comments.
4436 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
4437 rummage through the script for sections on the unique list.
4438 Correct length of strncmp for ".note".
4439 (gld${EMULATION_NAME}_check_needed): Rearrange function.
4441 * ldlang.c (unique_section_list): New var.
4442 (unique_section_p): New function.
4443 (walk_wild_section): Don't match sections on unique_section_list.
4444 (lang_add_unique): New function.
4445 Correct spelling of relocatable in comments.
4447 * ldlang.h (struct unique_sections): Declare.
4448 (unique_section_list): Declare.
4449 (unique_section_p): Declare.
4450 (lang_add_unique): Declare.
4452 * lexsup.c (ld_options): Allow --unique to take an optional arg.
4453 (parse_args [OPTION_UNIQUE]): Call lang_add_unique.
4455 * ld.texinfo (--unique): Update.
4459 * lexsup.c (parse_args): Remove spurious white space.
4463 * lexsup.c (parse_args): Update copyright date.
4467 * configure.host: Set HOSTING_LIBS appropriately for ix86-cygwin.
4471 * scripttempl/h8300.sc: Fix formatting. Fix a comment typo.
4472 * scripttempl/h8300h.sc: Fix formatting.
4473 * scripttempl/h8300s.sc: Likewise.
4474 * scripttempl/h8500.sc: Likewise.
4475 * scripttempl/h8500b.sc: Likewise.
4476 * scripttempl/h8500c.sc: Likewise.
4477 * scripttempl/h8500m.sc: Likewise.
4478 * scripttempl/h8500s.sc: Likewise.
4482 * emultempl/elf32.em: Only perform Linux ld hints processing when
4487 * ld.texinfo (Bug Reporting): Update email address for reports.
4491 * lexsup.c (parse_args): Set opterr to 0 and detect unparsed long
4492 options by checking for a return value of '?' not -1.
4496 * lexsup.c (struct ld_option): Add new enum value:
4498 (ld_options[]): Change -omagic, -output and -oformat options
4499 to be EXACTLY_TWO_DASHES.
4500 (OUTPUT_COUNT): Use ARRAY_SIZE.
4501 (parse_args): Change parameter 'argc' to unsigned.
4502 Place EXACTLY_TWO_DASHES options into new really_longopts
4504 If getopt_long_only fails, try calling getopt_long using the
4505 really_longopts array.
4506 (help): Print a double dash for both EXACTLY_TWO_DASHES and
4509 * ldlex.h: Fix prototype of parse_args.
4511 * ld.texinfo: Document that long options starting with 'o'
4512 must be preceeded by two dashes. Change example of a single
4513 dashed long option from -oformat to -trace-symbol.
4517 * emultempl/pe.em (OPTION_NO_DEFAULT_EXCLUDES): Define.
4518 (longopts[]): New --no-default-excludes option.
4519 (gld_${EMULATION_NAME}_list_options): Document.
4520 (gld_${EMULATION_NAME}_parse_args): Handle.
4524 * ldlang.c (new_stat): Revert the last beautification with "innocent"
4525 whitespace, it breaks the K&R C preprocessor.
4529 * ld.texinfo: Add notes about --whole-archive and gcc.
4533 * lexsup.c (OPTION_ALLOW_SHLIB_UNDEFINED): Define.
4534 (ld_options): Entry for --allow-shlib-undefined.
4535 (parse_args): Handle OPTION_ALLOW_SHLIB_UNDEFINED.
4536 * ldmain.c (main): Initialize link_info.allow_shlib_undefined
4538 * ld.texinfo: Document new command line switch.
4542 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS):
4543 .fixup is actually read/write.
4544 * emulparams/elf32lppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
4545 * emulparams/elf32ppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
4546 * emulparams/elf32lppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
4550 * NEWS: Add note about x86_64 architecture.
4554 * scripttempl/i386go32.sc: Use PROVIDE with _etext, _edata, _end.
4555 Set DWARF2 sections to a VMA of zero.
4559 * configure.tgt (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
4561 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
4562 (sparc*-*-rtems*): Switched from a.out to ELF.
4566 * Makefile.am (ALL_EMULATIONS): Add eelf_x86_64.o
4567 (eelf_x86_64.c): New.
4568 * Makefile.in: Regenerate.
4569 * configure.tgt: Add support for x86_64-*-linux-gnu*.
4570 * emulparams/elf_x86_64.sh: New.
4574 * emulparams/crislinux.sh (ENTRY): Change back to _start.
4575 (TEXT_START_SYMBOLS): Remove conditional setting of __start.
4577 * scripttempl/crisaout.sc: Change all RELOCATING not related to
4578 merging non-a.out sections into CONSTRUCTING.
4582 * ld.1 (COPYING): Mention that the GNU Free Documentation
4583 License is present in the sources, but not the output, and
4584 also available from the GNU website.
4585 (GNU Free Documentation License): Comment out this section.
4589 * emulparams/elf64alpha.sh (ENTRY): Remove leading underscore as ELF
4594 * ld.1: Remove old date so it does not give the impression the manpage
4599 * configure.tgt (xscale-coff): Add target.
4600 (xscale-elf): Add target.
4604 * ldmain.c (main): Remove redundant init of config.make_executable
4609 * emulparams/elf64alpha.sh (MAXPAGESIZE): Typo -- 64k, not 1M.
4613 * scripttempl/h8300.sc: Fix formatting.
4614 * scripttempl/h8300h.sc: Likewise.
4615 * scripttempl/h8300s.sc: Likewise.
4619 * scripttempl/elf32avr.sc: Fix bug in .eeprom segment.
4623 * emultempl/pe.em: Define ___start_SECNAME and ___stop_SECNAME
4624 around orphan sections whose names can be represented in C.
4628 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): New local
4629 hold_sdata. If SEC_SMALL_DATA set, set place to hold_sdata.
4633 * ld.texinfo: Add GNU Free Documentation License.
4634 * ldint.texinfo: Add GNU Free Documentation License.
4635 * ld.1: Add GNU Free Documentation License.
4639 * ldlex.l (yy_create_string_buffer): Init yy_is_our_buffer,
4640 yy_is_interactive, yy_at_bol, and yy_fill_buffer.
4642 * Makefile.am (DISTCLEANFILES): Add stringify.sed.
4643 Move 2000-11-02 Makefile.in changes to this file.
4644 * Makefile.in: Regenerate.
4648 * scripttempl/h8300.sc: Use ${CONSTRUCTING...} to enclose
4649 constructors and destructors.
4650 * scripttempl/h8300h.sc: Ditto.
4651 * scripttempl/h8300s.sc: Ditto.
4652 * scripttempl/h8500.sc: Ditto.
4653 * scripttempl/h8500b.sc: Ditto.
4654 * scripttempl/h8500c.sc: Ditto.
4655 * scripttempl/h8500m.sc: Ditto.
4656 * scripttempl/h8500s.sc: Ditto.
4657 * scripttempl/v850.sc: Ditto.
4658 * scripttempl/w65.sc: Ditto.
4659 * scripttempl/z8000.sc: Ditto.
4663 * Makefile.in (e_i386_chaos.c): New rule.
4664 (ALL_EMULATIONS): Added e_i386_chaos.o.
4665 * emulparams/elf_i386_chaos.sh: New file.
4666 * configure.tgt: Recognise i[3456]86-chaosdev-storm-chaos.
4670 * emulparams/elf64_sparc.sh (TEXT_START_ADDR,
4671 NONPAGED_TEXT_START_ADDR): Set to 4GB for Solaris targets.
4672 Fix sed invocation, so that it coped with '/' in Solaris 64bit
4673 library path suffix.
4678 * scripttempl/crisaout.sc (.text, .data): Pad, with ALIGN (32),
4679 for consecutive sections.
4683 * lexsup.c: New option OPTION_TARGET_HELP. Prints all target specific
4685 * ld.texinfo: Added notes about this new option.
4689 * emultempl/pe.em (_after_open): Add tests of return values from
4690 bfd functions. Emit appropriate error messages if necessary.
4694 * emultempl/pe.em (_after_open): Delete 'is2' and 'nsyms'
4695 local variables - they are not used, but leave in the call to
4696 bfd_canonicalize_symtab.
4697 (_open_dynamic_archive): Add #ifdef DLL_SUPPORT around use of
4698 pe_dll_search_prefix.
4702 * emultempl/pe.em (pe_dll_search_prefix): New variable,
4703 (longopts): New --dll-search-prefix option.
4704 (gld_${EMULATION_NAME}_list_options): Document.
4705 (gld_${EMULATION_NAME}_parse_args): Handle.
4706 (gld_${EMULATION_NAME}_open_dynamic_archive): When linking
4707 dynamically, search for a dll named '<prefix><basename>.dll'
4708 in preference to 'lib<basename>.dll' if --dll-search-prefix
4713 * ldlang.c (section_already_linked): Set kept_section instead of
4718 * deffile.h: Fix formatting.
4719 * lexsup.c: Likewise.
4724 * pe-dll.c (make_one): Do not generate code thunk for DATA
4726 (process_def_file): deduce DATA flag for auto-export sumbols.
4730 * ld.h: Fix formatting.
4731 * ldcref.c: Likewise.
4732 * ldctor.h: Likewise.
4733 * ldemul.c: Likewise.
4734 * ldemul.h: Likewise.
4735 * ldexp.c: Likewise.
4736 * ldexp.h: Likewise.
4737 * ldfile.c: Likewise.
4738 * ldfile.h: Likewise.
4739 * ldlang.c: Likewise.
4740 * ldlang.h: Likewise.
4741 * ldmain.c: Likewise.
4742 * pe-dll.c: Likewise.
4744 * pe-dll.c: Revert some formatting fixes.
4748 * pe-dll.c: Fix formatting.
4752 * ldlang.c: Fix formatting.
4756 * pe-dll.c (fill_edata): initialize entire block
4757 (make_one): fill in correct section.
4761 * ldexp.c: Fix formatting.
4765 * emultempl/pe.em (gld_*_after_open): detect case where there two
4766 import libraries for same dll; rename one to ensure proper link
4769 * pe-dll.c (process_def_file): compare ordinals to -1, not 0; fix
4771 (generate_edata): fix typo
4775 * scripttempl/crisaout.sc (ENTRY): Now __start.
4776 (.text): Add default setting for __start.
4777 Remove CONSTRUCTORS handling.
4778 (/DISCARD/): Add .gnu.warning.*.
4779 * emulparams/crislinux.sh (ENTRY): Now __start.
4780 (TEXT_START_SYMBOLS): New; provide __Stext and __start default.
4781 * emulparams/criself.sh (OUTPUT_FORMAT): Now elf32-us-cris.
4782 (ENTRY): Now __start.
4783 (INITIAL_READONLY_SECTIONS): Add KEEP for .startup.
4784 (EXECUTABLE_SYMBOLS): Add default setting for __start.
4788 * deffile.h: Fix formatting.
4790 * ldcref.c: Likewise.
4791 * ldctor.c: Likewise.
4792 * ldctor.h: Likewise.
4793 * ldemul.c: Likewise.
4794 * ldemul.h: Likewise.
4795 * ldexp.c: Likewise.
4796 * ldexp.h: Likewise.
4797 * ldfile.c: Likewise.
4798 * ldfile.h: Likewise.
4799 * ldlang.c: Likewise.
4800 * ldlang.h: Likewise.
4801 * lexsup.c: Likewise.
4803 * pe-dll.c: Likewise.
4807 * pe-dll.c (process_def_file): Uninitialized data wasn't
4808 exported with --export-all-symbols switch.
4812 * pe-dll.c (fill_edata): rearrange the data so that ordinals and
4813 noname work properly.
4817 * ld.texinfo (HPPA ELF32): New section.
4819 * emultempl/hppaelf.em (group_size): New.
4820 (hppaelf_finish): Pass group_size to elf32_hppa_size_stubs.
4821 (PARSE_AND_LIST_PROLOGUE): Add OPTION_STUBGROUP_SIZE.
4822 (PARSE_AND_LIST_LONGOPTS): Add --stub-group-size. Duplicate
4823 options to prevent abbreviations matching.
4824 (PARSE_AND_LIST_OPTIONS): Describe the above. Reformat.
4825 (PARSE_AND_LIST_ARGS_CASES): Handle it.
4829 * emultempl/m68kelf.em: Conditionalise the embedded relocs feature
4830 on the m68*-*-elf target. Make it support COFF input objects.
4834 * ldmain.c: Fix formatting.
4835 * ldmisc.c: Likewise.
4836 * ldver.c: Likewise.
4837 * ldwrite.c: Likewise.
4841 * ldwrite.c (clone_section): Silence gcc warnings.
4845 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Handle
4846 out of memory failure.
4848 * ldwrite.c (ldwrite): Remove unnecessary einfo arg.
4849 (clone_section): Handle out of memory failures. Rename var to
4850 avoid c++ reserved word.
4854 * emultempl/hppaelf.em (hppaelf_add_stub_section): Rename
4855 stub_name param to stub_sec_name.
4856 (hppaelf_finish): Modify call to elf32_hppa_size_stubs.
4860 * emultempl/m68kelf.em: New file.
4861 * emulparams/m68kelf.sh (EXTRA_EM_FILE): Use it.
4862 * Makefile.am (em68kelf.c): Add dependency on m68kelf.em.
4863 * Makefile.in: Regenerate.
4867 * emulparams/hppalinux.sh (DATA_START_SYMBOLS): Provide $global$
4872 * ldmain.c (multiple_definition): Disable relaxation if
4873 multiple symbol definitions are encountered - otherwise the
4874 linker could abort with an assertion failure.
4878 * mri.c: Fix formatting.
4882 * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
4883 * configure: Rebuild.
4887 * Makefile.am (lexsup.o): Also depend on $(INCDIR)/demangle.h.
4888 * Makefile.in: Rebuild.
4892 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Fix
4893 broken list handling. Create __start_SECNAME and __stop_SECNAME
4894 when no place-holder. Add some comments. Test both SEC_CODE and
4895 SEC_READONLY for hold_text to prevent .rodata orphan poisoning.
4896 Handle case where no output section statement created.
4900 * configure.tgt (sh-*-linux*): Added.
4901 * Makefile.am: Added eshelf_linux and eshlelf_linux.
4902 * Makefile.in: Rebuilt.
4903 * emulparams/shelf_linux.sh: New file.
4904 * emulparams/shlelf_linux.sh: New file.
4908 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
4909 try shuffling sections when the orphan happens to be the place
4910 holder. Keep count of unique section names generated so we speed
4911 the search for a new name.
4915 * configure: Rebuilt with new libtool.m4.
4919 * Makefile.in: Regenerate.
4920 * aclocal.m4: Regenerate.
4921 * configure: Regenerate.
4922 * config.in: Regenerate.
4923 * po/ld.pot: Regenerate.
4925 * ldint.texinfo: Remove CVS revision marker - it foils local
4928 * emultempl/ticoff.em: Remove extraneous comma.
4932 * emultempl/hppaelf.em (hppaelf_add_stub_section): Add SEC_RELOC
4933 to stub section flags.
4934 (hppa_for_each_input_file_wrapper): New.
4935 (hppa_lang_for_each_input_file): New.
4936 (lang_for_each_input_file): Define to call above.
4937 (multi_subspace): New.
4938 (hppaelf_finish): Pass multi_subspace to elf32_hppa_size_stubs.
4939 (PARSE_AND_LIST_PROLOGUE): Define.
4940 (PARSE_AND_LIST_LONGOPTS): Define.
4941 (PARSE_AND_LIST_OPTIONS): Define.
4942 (PARSE_AND_LIST_ARGS_CASES): Define.
4943 (hppaelf_finish): Call elf32_hppa_set_gp.
4944 (hppaelf_set_output_arch): Remove.
4945 (LDEMUL_SET_OUTPUT_ARCH): Remove.
4947 * emulparams/hppalinux.sh (ELFSIZE): Define.
4949 (OTHER_READONLY_SECTIONS): Define.
4951 (GENERATE_SHLIB_SCRIPT): Define.
4953 * ldlang.c: Add missing prototypes, and tidy others. Change CONST
4954 to const throughout. Change `void *' to `PTR' throughout.
4955 (lang_memory_default): Function is local to file, add `static'.
4957 * Makefile.am (ehppaelf.c): Depend on emultempl/elf32.em.
4958 (ehppalinux.c): Likewise.
4959 (earmelf.c): Likewise.
4960 (earmelf_linux.c): Likewise.
4961 (earmelf_linux26.c): Likewise.
4962 * Makefile.in: Regenerate.
4964 * ld.h (ld_config_type): Add unique_orphan_sections.
4965 * lexsup.c (OPTION_UNIQUE): Define.
4966 (ld_options): Add "--unique".
4967 (parse_args): Handle it.
4968 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
4969 search for an existing output section if unique_orphan_sections is
4970 set. Make use of bfd_get_unique_section_name rather than
4971 duplicating code here.
4972 * ld.texinfo: Describe --unique.
4974 * lexsup.c (ld_options): Make split-by-reloc arg optional. Add
4975 optional arg to split-by-file.
4976 (parse_args): Handle them.
4977 * ld.texinfo: Update description of these options.
4978 * ldwrite.c (clone_section): Pass in the section name. Replace
4979 local code with bfd_get_unique_section_name.
4980 (split_sections): Tidy code and comments. Use a list traversal
4981 more appropriate to the list construction. Handle cooked section
4982 sizes. Split when split_by_reloc reached rather than exceeded.
4983 Track section size and split when split_by_file reached. Fix
4984 link_order_tail (even though it's not used).
4985 (ldwrite): Modify condition for calling split_sections to suit
4986 changed split_by_reloc and split_by_file.
4987 * ldmain.c (main): Init config.split_by_reloc and
4988 config.split_by_file to -1.
4989 * ld.h (ld_config_type): Change split_by_reloc to unsigned.
4990 Change split_by_file to bfd_size_type.
4994 * configure.in: Increase version number to 2.10.91.
4995 * NEWS: Mention new ability to support removal of duplicate DWARF2
4997 * configure: Regenerate.
4998 * aclocal.m4: Regenerate.
4999 * config.in: Regenerate.
5003 * scripttempl/elf.sc: Add .gnu.linkonce.wi.* to .debug_info
5005 * scripttempl/elf32avr.sc: Ditto.
5006 * scripttempl/elfd10v.sc: Ditto.
5007 * scripttempl/elfd30v.sc: Ditto.
5008 * scripttempl/elfi370.sc: Ditto.
5009 * scripttempl/elfm68hc11.sc: Ditto.
5010 * scripttempl/elfm68hc12.sc: Ditto.
5011 * scripttempl/elfi386beos.sc: Ditto.
5012 * scripttempl/v850.sc: Ditto.
5016 * acinclude.m4: Include libtool and gettext macros from the
5018 * aclocal.m4, configure: Rebuilt.
5022 * ldlang.c (open_output): When choosing the target for a
5023 particular endianness, do nothing if the target is not
5028 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
5029 check -rpath nor LD_RUN_PATH for cross link.
5030 * ld.texinfo: Document the change.
5034 * NEWS: Mention support for CRIS.
5038 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Get
5039 the current runpath list from bfd_elf_get_runpath_list ()
5044 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search
5045 the DT_RPATH/DT_RUNPATH entries for DT_NEEDED after
5046 LD_LIBRARY_PATH for native linker. Display the needed DSO if
5047 trace_file_tries is non-zero.
5048 (gld${EMULATION_NAME}_try_needed): Report the needed DSO found
5049 if trace_file_tries is non-zero.
5051 * ld.texinfo: Document the usage of DT_RPATH/DT_RUNPATH.
5056 * NEWS: Mention i860 support.
5060 * scripttempl/elf.sc: Fix last change to use correct comment
5065 * scripttempl/elf.sc: Add a comment giving the correspondence
5066 between sections, per-datum sections, and linkonce sections. Make
5067 the comment true even for .bss, .sdata, .sdata2, .sbss, and
5072 * emulparams/elf32_i860.sh: New file.
5073 * configure.tgt: Recognize new target i860-stardent-{sysv4*|elf*}.
5074 * Makefile.am (ALL_EMULATIONS): Add eelf32_i860.o.
5075 (eelf32_i860.c): New rule.
5076 * Makefile.in: Regenerate.
5080 * emulparams/mipspe.sh (ENTRY): Add definition.
5084 * emultempl/elf32.em (_after_close): Refer to -rpath not --rpath
5089 * scripttempl/elfm68hc11.sc: Define __bss_size symbol to indicate
5090 the final size of .bss section.
5091 * scripttempl/elfm68hc12.sc: Likewise.
5095 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Rename to
5096 gld${EMULATION_NAME}_parse_args for consistency. Combine
5097 lastoptind and prevoptind vars, and keep track of last optind.
5098 (gld_${EMULATION_NAME}_list_options): Rename to
5099 gld${EMULATION_NAME}_list_options.
5103 * configure.tgt: Select targ_emul=elf_i386 for Unixware 7
5104 (i586-sco-sysv5uw7.1.0).
5108 * emulparams/elf64alpha.sh (PARSE_AND_LIST_ARGS): Removed.
5109 (PARSE_AND_LIST_PROLOGUE): New.
5110 (PARSE_AND_LIST_LONGOPTS): Likewise.
5111 (PARSE_AND_LIST_OPTIONS): Likewise.
5112 (PARSE_AND_LIST_ARGS_CASES): Likewise.
5113 (PARSE_AND_LIST_EPILOGUE): Likewise.
5117 * emultempl/armelf.em: Elide functions common to elf32.em,
5118 ie. most of the file.
5119 (arm_elf_after_open): New. Do arm specific things then call
5120 gld${EMULATION_NAME}_after_open.
5121 (arm_elf_before_allocation): New. Call
5122 gld${EMULATION_NAME}_before_allocation then do arm specifics.
5123 (PARSE_AND_LIST_PROLOGUE): Define.
5124 (PARSE_AND_LIST_SHORTOPTS): Define.
5125 (PARSE_AND_LIST_LONGOPTS): Define.
5126 (PARSE_AND_LIST_OPTIONS): Define.
5127 (PARSE_AND_LIST_ARGS_CASES): Define.
5128 (LDEMUL_AFTER_OPEN): Define.
5129 (LDEMUL_BEFORE_ALLOCATION): Define.
5130 (LDEMUL_BEFORE_PARSE): Define.
5131 (LDEMUL_FINISH): Define.
5133 * emultempl/hppaelf.em: Similarly zap most of this file.
5134 (hppaelf_add_stub_section): Prototype.
5135 (hppaelf_layaout_sections_again): Prototype.
5136 (hook_in_stub): Prototype.
5137 (LDEMUL_SET_OUTPUT_ARCH): Define.
5138 (LDEMUL_FINISH): Define.
5139 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
5141 * emulparams/armelf.sh (TEMPLATE_NAME): Use elf32.
5142 (EXTRA_EM_FILE): New.
5143 * emulparams/armelf_linux.sh: Likewise.
5144 * emulparams/armelf_linux26.sh: Likewise.
5145 * emulparams/hppalinux.sh: Likewise.
5146 * emulparams/hppaelf.sh: Likewise.
5149 * emultempl/elf32.em: Fix formatting.
5150 (EXTRA_EM_FILE): Source it.
5151 (LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
5152 LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
5153 LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
5154 LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
5155 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
5156 LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
5157 LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
5158 LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
5159 LDEMUL_FIND_POTENTIAL_LIBRARIES): New shell vars. Add code to
5160 allow functions in this file to be overridden.
5161 (PARSE_AND_LIST_SHORTOPTS): Handle it.
5163 * emultempl/m68kcoff.em: Include ldfile.h before ldemul.h.
5165 * emultempl/elf32.em: Reorganize file.
5169 * emulparams/elf64alpha.sh: Implement "-taso" emulation
5170 specific option to fit 64-bit executable in the lower
5171 31-bit address range. This is done by changing start
5172 address of .interp (the very first section of executable)
5173 and then setting EF_ALPHA_32BIT elf header flag.
5177 * emultempl/m68kcoff.em: New file.
5178 * emulparams/m68kcoff.sh (TEMPLATE_NAME): Use m68kcoff template.
5179 * Makefile.am (em68kcoff.c): Depend on m68kcoff.em rather than
5181 * Makefile.in: Regenerate.
5185 * emultempl/elf32.em (longopts): Duplicate "disable-new-dtags"
5186 and "disable-new-dtags" to stop getopt from treating -d/-e as
5187 abbreviations for these options.
5191 * ld.texinfo: Add documentation for --disable-new-dtags and
5194 * ldmain.c (main): Initialize link_info.new_dtags to false.
5196 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Add
5197 --disable-new-dtags and --enable-new-dtags.
5198 (gld_${EMULATION_NAME}_list_options): Likewise.
5202 * lexsup.c: Add optional style to demangle switch
5203 * ld.texinfo: Document optional style to demangle switch.
5207 * Makefile.am (ALL_EMULATIONS): Add ecrisaout.o, ecriself.o,
5209 (ecrisaout.c, ecriself.c, ecrislinux.c): New rules.
5210 Regenerate dependencies.
5211 * Makefile.in: Rebuild.
5212 * configure.tgt (cris-*-*): New target.
5213 * emulparams/crisaout.sh, emulparams/criself.sh,
5214 emulparams/crislinux.sh, scripttempl/crisaout.sc: New files.
5215 * po/POTFILES.in, po/ld.pot: Regenerate.
5219 * emultempl/elf32.em (gld_${EMULATION_NAME}_list_options):
5220 Print out ignored -z options.
5224 * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Removed.
5225 (PARSE_AND_LIST_PROLOGUE): New.
5226 (PARSE_AND_LIST_LONGOPTS): Likewise.
5227 (PARSE_AND_LIST_OPTIONS): Likewise.
5228 (PARSE_AND_LIST_ARGS_CASES): Likewise.
5230 * ldmain.c (main): Clear link_info.flags and link_info.flags_1.
5232 * lexsup.c (ld_options): Comment out 'z'.
5233 (parse_args): Likewise.
5235 * emultempl/elf32.em: Include "elf/common.h".
5236 (gld_${EMULATION_NAME}_parse_args): Defined. Handle some -z
5238 (gld_${EMULATION_NAME}_list_options): Likewise.
5240 * ld.texinfo: Add documentation for the recognized -z options.
5244 * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call
5245 bfd_elf_set_dt_needed_soname ().
5249 * pe-dll.c (pe_dll_id_target): check object target name also
5253 * scripttempl/elf.sc (.init): Only do ${INIT_START} and
5254 ${INIT_END} if relocating.
5255 (.fini): Likewise ${FINI_START} and ${FINI_END}.
5259 * emultempl/pe.em (gld_*_open_dynamic_archive): New search
5260 order for dynamic library '-lfoo' on pei386: libfoo.dll.a,
5261 foo.dll.a, libfoo.a, libfoo.dll, foo.dll. This fixes compatibility
5262 errors introduced by the old dynamic lib search order.
5266 * pe-dll.c (process_def_file): auto-export data items also
5267 (pe_process_import_defs): also see if _imp_ form needed
5271 * pe-dll.c (make_one): fix a typo in the __imp_ name decoration
5272 for dll import libraries
5276 * scripttempl/i386go32.sc: Support the g++ attribute init_priority in
5277 gcc 2.95.2 and later.
5281 * ldfile.c (ldfile_try_open_bfd): Output '\n' after an error
5286 * ldemul.h (struct lang_input_statement_struct): Remove forward
5288 (struct search_dirs): Likewise.
5289 * ldfile.h (struct lang_input_statement_struct): Likewise.
5290 Protect file from multiple inclusion.
5291 * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Move file_chain
5292 declaration from macro to file scope.
5294 * ldemul.c: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this order.
5295 * ldgram.y: Likewise here.
5296 * ldlang.c: And here.
5297 * ldmain.c: And here.
5298 * mpw-elfmips.c: And here.
5299 * mpw-eppcmac.c: And here.
5300 * emultempl/aix.em: And here.
5301 * emultempl/armcoff.em: And here.
5302 * emultempl/armelf.em: And here.
5303 * emultempl/armelf_oabi.em: And here.
5304 * emultempl/beos.em: And here.
5305 * emultempl/elf32.em: And here.
5306 * emultempl/hppaelf.em: And here.
5307 * emultempl/linux.em: And here.
5308 * emultempl/lnk960.em: And here.
5309 * emultempl/pe.em: And here.
5310 * emultempl/sunos.em: And here.
5311 * mpw-esh.c: And here. Include ldexp.h and ldlang.h too.
5312 * mpw-idtmips.c: Ditto.
5313 * emultempl/generic.em: Ditto.
5314 * emultempl/gld960.em: Ditto.
5315 * emultempl/gld960c.em: Ditto.
5316 * emultempl/mipsecoff.em: Ditto.
5317 * emultempl/ticoff.em: Ditto.
5318 * emultempl/vanilla.em: Ditto.
5320 * pe-dll.c: Include ldfile.h
5321 * ldver.c: Include ldexp.h, ldlang.h, ldfile.h
5323 * mpw-elfmips.c: (gldelf32ebmip_before_allocation): Add missing
5324 arguments to bfd_elf32_size_dynamic_sections call.
5325 (gldelf32ebmip_place_orphan): Add missing arguments to
5326 lang_leave_output_section_statement call.
5330 * emultempl/pe.em (pe_enable_stdcall_fixup): Protect with
5332 (strhash): Likewise.
5333 (compute_dll_image_base): Likewise.
5334 (pe_undef_found_sym): Likewise.
5335 (pe_undef_cdecl_match): Likewise.
5336 (gld_${EMULATION_NAME}_open_dynamic_archive): Mark the
5337 argument "arch" with ATTRIBUTE_UNUSED.
5341 * configure.tgt: Remove extraneous hppa*-*-linux-gnu*.
5344 * ldwrite.c (SSIZE): Remove to cure macro redefinition warning.
5348 Changes to create multiple linker stubs, positioned immediately
5349 before the section where they are required.
5350 * emultempl/hppaelf.em: Include elf32-hppa.h.
5351 (stub_sec, file_chain): Delete.
5352 (hppaelf_create_output_section_statements): Don't make a stub
5354 (hook_stub_info): New struct.
5355 (hook_in_stub): New function.
5356 (hppaelf_add_stub_section): New function.
5357 (hppaelf_finish): Do nothing for relocateable links. Modify the
5358 call to elf32_hppa_size_stubs. Move code for updating section
5360 (hppaelf_layaout_sections_again): ..to here, a new function.
5362 * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Fix
5363 broken list handling. Pass in a pointer to the list.
5364 (hppaelf_finish): Update call to hppaelf_delete_padding_statements
5366 (hppaelf_before_parse): Prototype.
5367 (hppaelf_set_output_arch): Prototype.
5368 (hppaelf_create_output_section_statements): Prototype.
5369 (hppaelf_delete_padding_statements): Prototype.
5370 (hppaelf_finish): Prototype.
5373 * emultempl/hppaelf.em: Include ctype.h.
5374 (struct orphan_save): New.
5375 (gld${EMULATION_NAME}_place_orphan): New.
5376 (output_rel_find): New.
5377 (hppaelf_get_script): Update from elf32.em.
5378 (ld_hppaelf_emulation): Rename to ld_${EMULATION_NAME}_emulation.
5379 Change emulation_name field to "${EMULATION_NAME}". Add
5380 gld${EMULATION_NAME}_place_orphan.
5382 * Makefile.am (ALL_EMULATIONS): Reinstate ehppaelf.o, add
5383 ehppalinux.o, sort it. Regenerate dependencies.
5384 (ehppalinux.c): Depend on hppaelf.em
5385 * Makefile.in: Regenerate.
5387 * configure.tgt: targ_emul=hppalinux for hppa*linux
5389 * emulparams/hppalinux.sh: New.
5390 * emulparams/hppaelf.sh (TARGET_PAGE_SIZE): Write in hex.
5394 * lexsup.c (parse_args): Copy section name.
5398 * emultempl/pe.em: institute the following search order for
5399 dynamic libraries on pei386: libfoo.dll.a, foo.dll.a (import
5400 libs), libfoo.dll, foo.dll (link direct to dll). Fall back to
5401 static lib (libfoo.a) if none of the above are found.
5405 * emultempl/pe.em (pe_enable_auto_image_base): New variable.
5406 (longopts): New --{enable,disable}-auto-image-base options.
5407 (gld_${EMULATION_NAME}_list_options): Document.
5408 (gld_${EMULATION_NAME}_parse): Handle.
5409 (strhash): New static function.
5410 (compute_dll_image_base): New static function.
5411 (gld_${EMULATION_NAME}_set_symbols): Use.
5419 * configure.tgt: Add traditional mips (mips*-*-sysv4*) target.
5420 * emulparams/elf32btsmip.sh: New file.
5421 * Makefile.am: Add traditional mips target.
5422 * Makefile.in: Rebuild.
5426 * Makefile.am (EXTRA_ld_new_SOURCES): Set to deffilep.y for
5427 automake to use YLWRAP.
5428 * Makefile.in: Rebuild.
5432 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
5433 (CLEANFILES): Add DEPA.
5434 * Makefile.in: Regenerate.
5436 2000-06-30 Timothy Wall <twall@ppc>
5438 * scripttempl/tic54xcoff.sc: PAGE N is not implemented, so encode
5439 the page in the upper octet of the address.
5443 * emulparams/avrmega161.sh (ARCH): Change to avr:5.
5447 * NEWS: arm-elf does --gc-sections too.
5451 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
5453 * Makefile.in: Regenerate.
5457 * Makefile.am: Rebuild dependency.
5458 * Makefile.in: Rebuild.
5462 * Makefile.am: Rebuild dependency.
5463 * Makefile.in: Rebuild.
5467 * scripttempl/tic54xcoff.sc: New.
5468 * ldlang.c (wild_doit): Propagate SEC_BLOCK flag.
5469 * gen-doc.texi: Add flag for TI COFF.
5470 * ld.texinfo: Add documentation for TI COFF handling switches.
5471 * emultempl/ticoff.em: New. TI COFF handling.
5472 * configure.tgt: Add tic54x target.
5473 * Makefile.am: Add tic54x target.
5474 * Makefile.in: Ditto.
5478 * ldmain.c (set_scripts_dir): Correct pointer comparison when
5479 checking for backslashes.
5483 * NEWS: Move entries not in 2.10 above "Changes in version 2.10".
5487 * NEWS: Update list of targets supporting --gc-sections.
5489 * scripttempl/elf.sc: KEEP .eh_frame contents.
5490 * scripttempl/elfd30v.sc: Same here.
5494 * Makefile.am (ALL_EMULATIONS): Added new emulation for m68hc12
5496 * Makefile.in: Rebuild.
5497 * configure.tgt: Recognize m68hc12 and m68hc11.
5498 * scripttempl/elfm68hc12.sc: New file.
5499 * emulparams/m68hc12elfb: New emulation.
5500 * emulparams/m68hc12elf: New emulation.
5501 * emulparams/m68hc11elfb.sh: New file. User configurable emulation
5502 (includes a memory.x script to define the ROM and RAM banks).
5503 * scripttempl/elfm68hc11.sc, emulparams/m68hc11elf.sh:
5504 New configuration files for support of Motorola 68hc11
5508 * ldmain.c (main): Only change SEC_READONLY for final link.
5512 * configure: Regenerate.
5516 * configure.in (VERSION): Update to show this is the CVS mainline.
5520 * emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all
5521 input objects to be ECOFF.
5522 (check_sections): einfo takes %B, not %P, to print a BFD name.
5526 * ldgram.y (vers_defns): Handle 'extern "C++" { ... }' in
5529 * ldlex.l (V_IDENTIFIER): Accept `::' in symbols.
5533 * emulparams/avr1200.sh (STACK): Define as 0.
5534 * emulparams/avr23xx.sh (STACK): Define as last internal SRAM address.
5535 * emulparams/avr4433.sh (STACK): Likewise.
5536 * emulparams/avr44x4.sh (STACK): Likewise.
5537 * emulparams/avr85xx.sh (STACK): Likewise.
5538 * emulparams/avrmega103.sh (STACK): Likewise.
5539 * emulparams/avrmega161.sh (STACK): Likewise.
5540 * emulparams/avrmega603.sh (STACK): Likewise.
5541 * scripttempl/elf32avr.sc (__data_start): Define for gcrt1.
5542 (__stack): Define from ${STACK} for main().
5546 * Makefile.am: Update dependencies with "make dep-am"
5547 * Makefile.in: Regenerate.
5551 * ldmain.c: Include filenames.h.
5552 (set_scripts_dir): Support backslashes in program name.
5556 * ldmain.c (main): When deciding if ".text" section should be
5557 read-only, don't forget to reset SEC_READONLY because it
5558 could be already set.
5562 * ld.1: Add documentation for new command line option:
5563 --section-start <sectionname>=<sectionorg>
5564 This is a generic version of -Ttext etc. which accepts
5565 any section name as a parameter instead of just text/data/
5567 * ld.texinfo: More docs.
5569 * lexsup.c: (parse_args): Recognize new command line option.
5570 (ld_options): Add new option.
5574 * lexsup.c (parse_args): `i' == `r', not `q'.
5578 * configure.tgt (hppa*64*-*-*): Enable PA64 target.
5583 Add support for '-q' == '--emit-relocs' switch.
5584 * ldmain.c (main): Default to false.
5585 * lexsup.c (parse_args): Turn on emitrelocations flag if set.
5586 * NEWS: Describe the emitrelocations switch.
5587 * ld.texinfo: Describe the emitrelocations switch.
5591 * emultempl/pe.em (_open_dynamic_archive): New function: Search
5592 the library path for "foo.dll" and "libfoo.dll" dynamic libraries
5593 before searching for 'libfoo.a' in response to a '-Bdynamic -lfoo'
5598 * lexsup.c (parse_args): Update the year in the copyright notice.
5602 * ld.h (gettext, dgettext, dcgettext, textdomain, bindtextdomain):
5603 Replace defines with those from intl/libgettext.h to quieten gcc
5608 * ldlang.c (open_input_bfds): Don't load the same file within
5609 a group again if the whole archive has been loaded already.
5614 * lexsup.c (set_section_start): Use bfd_scan_vma rather than
5619 * configure.host (ia64-*-linux-gnu*): Change gcc to ${CC}.
5621 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
5622 host "ia64-*-linux-gnu*".
5626 * ld.h: Correctly check GCC version.
5630 * Makefile.am: Add PA64 support. Add missing dependencies for
5632 * Makefile.in: Rebuilt.
5633 * configure.tgt: Add PA64 support (currently disabled).
5637 * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Delete.
5638 (output_rel_find): New function.
5639 (hold_section, hold_use): Delete.
5640 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
5641 hold_interp): Make local to place_orphan.
5642 (gld${EMULATION_NAME}_place_orphan): Use lang_output_section_find
5643 rather than place_section to find possible previous use of orphan.
5644 Similarly find the place-holder output sections. Use returned
5645 value from lang_enter_output_section_statement rather than calling
5646 lang_output_section_statement_lookup.
5647 * emultempl/armelf.em: Same here.
5648 * emultempl/pe.em: Similar to above, but no need for output_rel_find.
5650 * ldlang.c (lang_enter_output_section_statement): Return output
5652 * ldlang.h (lang_enter_output_section_statement): Change
5655 * ldlang.h (lang_output_section_statement): Export it.
5656 * ldlang.c (lang_output_section_statement): Ditto.
5660 * ld.texinfo (Output Section Data): Add note that section data
5661 commands cannot appear outside of section directives.
5665 * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support.
5670 * Makefile.am (ALL_64_EMULATIONS): Add eelf64_ia64.o.
5671 (eelf64_ia64.c): New rule.
5672 * Makefile.in: Rebuild.
5673 * configure.tgt (ia64-*-elf*, ia64-*-linux*): New targets.
5674 * emulparams/elf64_ia64.sh: New file.
5678 * scripttempl/elfd30v.sc: Place .gcc_except_table.
5682 * dep-in.sed: Match space at start of file name, not at end.
5686 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
5687 lang_leave_output_section_statement () after calling
5688 lang_enter_output_section_statement ().
5689 * emultempl/armelf.em: Likewise.
5693 * emultempl/elf32.em (struct orphan_save): Add section field.
5694 (gld${EMULATION_NAME}_place_orphan): Use above to keep sections in
5695 better order, and place first orphan section as we did before the
5696 2000-04-12 patch. Ignore ~SEC_ALLOC sections when choosing place.
5697 Don't call make_bfd_section here, let wild_doit do the job for us.
5698 Don't build a statement list when we'll only throw it away.
5699 * emultempl/armelf.em: Ditto.
5700 * emultempl/pe.em: Similarly.
5704 * scripttempl/elfppc.sc: Remove.
5705 * emulparams/elf32ppc.sh: Use elf.sc.
5706 * emulparams/elf32lppc.sh: Use elf.sc.
5707 * emulparams/elf32ppclinux.sh: Use elf.sc.
5708 * emulparams/elf32ppcsim.sh: New file.
5709 * emulparams/elf32lppcsim.sh: New file.
5710 * Makefile.am: Update dependencies. Add elf32ppcsim ad elf32lppcsim.
5711 (ALL_EMULATIONS): Add elf32ppcsim ad elf32lppcsim.
5712 * Makefile.in: Regenerate.
5713 * configure.tgt (powerpc-*): Add elf32ppcsim and elf32lppcsim.
5717 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Process
5718 ~SEC_ALLOC sections too. Init start address of debug sections.
5719 * emultempl/armelf.em (gld${EMULATION_NAME}_place_orphan): Ditto.
5720 * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Ditto.
5721 Also set all relocateable section start addresses.
5725 * scripttempl/elf.sc: Add support for .sbss2 and .sdata2 sections.
5726 Add new BSS_PLT variable for when .plt need not be contained in
5727 the file. Move _etext so that it is also after .fini, and provide
5728 both etext and _etext with a leading underscore. Mark the start
5733 * emultempl/elf32.em (struct orphan_save): New.
5734 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
5735 hold_interp): Make them struct orphan_save.
5736 (gld${EMULATION_NAME}_place_section): Modify for new hold_*.
5737 (gld${EMULATION_NAME}_place_orphan): Add new orphan sections to
5738 the end of the relevant section list. Also add associated section
5739 statements to the end of any previous orphan statements.
5740 * emultempl/armelf.em: Similarly.
5741 * emultempl/pe.em: Similarly.
5745 * ld.texinfo (Simple Example): Remove extraneous paragraph.
5749 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
5750 --enable-build-warnings option.
5751 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
5752 * Makefile.in, configure: Re-generate.
5756 * po/ld.pot: Regenerate.
5758 * lexsup.c (help): Restore translated part of bug string.
5760 * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
5761 (DEP): Quote when passing vars to sub-make. Add warning message
5763 (DEP1): Rewrite for "gcc -MM".
5764 (CLEANFILES): Add DEP2.
5765 Update dependencies.
5766 * Makefile.in: Regenerate.
5770 * ld.h: #include "bin-bugs.h"
5771 * lexsup.c (help): Use REPORT_BUGS_TO.
5775 * configure.tgt (avr-*-*): New target support.
5776 * Makefile.am: Likewise.
5777 * scripttempl/elf32avr.sc: New script file.
5778 * emulparams/avr1200.sh: New file.
5779 * emulparams/avr23xx.sh: New file.
5780 * emulparams/avr4433.sh New file.
5781 * emulparams/avr44x4.sh New file.
5782 * emulparams/avr85xx.sh New file.
5783 * emulparams/avrmega103.sh New file.
5784 * emulparams/avrmega161.sh New file.
5785 * emulparams/avrmega603.sh New file.
5786 * Makefile.in: Regenerate.
5790 * Makefile.am (check-DEJAGNU): Also unset LANG.
5791 * Makefile.in: Rebuild.
5795 * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
5800 * emulparams/elf32mcore.sh: Include "getopt.h".
5804 * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware.
5808 * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR.
5809 * emulparams/shpe.sh: Likewise.
5813 * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED
5814 to unused parameters.
5816 * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static
5817 functions only used by DLL code.
5818 (_place_orphan): Initialise 'dollar'.
5822 * ldmain.c (undefined_symbol): Take one more arg, fatal, to
5823 indicate if the undefined symbol is a fatal error or not.
5824 Don't delete the output file if "fatal" is false.
5828 * Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)".
5829 Set LC_COLLATE and LC_ALL to null and export them. It is for
5830 sort which expects the C locale.
5831 Add $(LIBS) to all $(HOSTING_LIBS).
5832 * Makefile.in: Rebuild.
5836 * emultempl/{aix.em, armcoff.em, armelf.em, armelf_oabi.em,
5837 beos.em, elf32.em, generic.em, gld960.em, gld960c.em, hppaelf.em,
5838 linux.em, lnk960.em, mipsecoff.em, sunos.em, vanilla.em}
5839 (ld_emulation_xfer_struct): Add missing NULL initialiser for
5840 find_potential_libraries.
5844 * ldgram.y (exclude_name_list): Don't require a comma to separate
5845 list entries; the lexer considers commas to be valid part of a
5846 filename, so in something like `foo, bar' the comma is considered
5847 part of the first filename, `foo,'.
5848 * ld.texinfo: Update section on EXCLUDE_FILE lists.
5852 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
5853 host "i[3456]86-*-freebsdelf*".
5857 * scripttempl/i386go32.sc: Move misplaced semicolons.
5861 * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o.
5862 (ALL_64_EMULATIONS): Remove eelf64hppa.o.
5863 (eelf64hppa.c, ehppaelf.c): Remove targets.
5864 * Makefile.in: Rebuild.
5868 * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on
5869 GNU/Linux/sparc, but keep the default as 32.
5871 * configure.tgt: Enable elf64_sparc on Solaris7+/sparc. And make
5872 it default if sparcv9 or sparc64.
5876 * Makefile.am: Add rules to build emipspe.o and earmpe.o.
5877 * Makefile.in: Regenerate.
5878 * configure.tgt: Add targets for arm-wince, sh-pe and mips-pe.
5880 * ldemul.h (ld_emulation_xfer_struct): Add new field:
5881 find_potential_libraries.
5882 * ldemul.c (ldemul_find_potential_libraries): New function.
5884 * ldfile.c (ldfile_open_file_search): Allow function to be
5886 (ldfile_open_file): Call ldemul_find_potential_libraries.
5887 * ldfile.h: Add prototype for ldfile_open_file_search.
5889 * pe-dll.c: Add support for ARM, MIPS and SH targets.
5891 * emulparams/mipspe.sh: New file. Parameters for mips-pe target.
5892 * emulparams/shpe.sh: New file. Parameters for sh-pe target.
5894 * emultempl/pe.em: Add support for ARM, MIPS and SH DLLs.
5895 (gld_X_find_potential_libraries): New function. Search for
5896 libraries called "*.lib".
5898 * scripttempl/pe.sc: Add .pdata section.
5902 * scripttempl/elfd10v.sc: Remove dynamic linking hooks.
5903 Add and use memory regions.
5907 * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New.
5909 * Makefile.am: Add support for Linux/IBM 370.
5910 * configure.tgt: Likewise.
5912 * Makefile.in: Regenerate.
5916 * ldlang.c (print_input_section, print_data_statement,
5917 print_reloc_statement, print_padding_statement, insert_pad,
5918 size_input_section, lang_check_section_addresses,
5919 lang_size_sections, lang_do_assignments, lang_set_startof,
5920 lang_one_common): Change `opb' to unsigned.
5921 (lang_do_assignments): Also change `size' to unsigned.
5925 * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION.
5929 * mri.c (mri_draw_tree): Add default LMA region argument to call
5930 to lang_leave_output_section_statement.
5931 * ldlang.h: Update prototypes with LMA region arguments.
5932 * ldlang.c (lang_size_sections): Encapsulate region bounds
5933 checking in os_check_region call.
5934 (os_check_region): New function.
5935 (lang_output_section_statement_lookup): Initialize lma_region.
5936 (lang_leave_output_section_statement): Add LMA region argument.
5937 (lang_leave_overlay): Ditto.
5938 * ldgram.y: Handle LMA region syntax.
5939 * ld.texinfo (Output Section Description): Describe LMA region usage.
5940 * emultempl/armelf.em (gld$place_orphan): Add default value for
5941 lma region in call to lang_leave_output_section_statement.
5942 * emultempl/elf32.em (gld$place_orphan): Add default value for
5943 lma region in call to lang_leave_output_section_statement.
5944 * emultempl/pe.em (gld$place_orphan): Add default value for
5945 lma region in call to lang_leave_output_section_statement.
5950 * ldlang.c (lang_check_section_addresses): Use bytes instead of
5951 octets when calculating section end addresses.
5955 * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation.
5959 * ldexp.c (fold_name): Make SIZEOF operator return byte count, not
5961 * ldlang.c (print_input_section, print_data_statement,
5962 print_reloc_statement, print_padding_statement): Print target
5963 address values and section sizes as bytes, not octets.
5964 (insert_pad) Calculate padding size in octets, and adjust "dot"
5966 (size_input_section) Always adjust "dot" by bytes, not octets.
5967 (lang_check_section_addresses, lang_do_assignments) Adjust
5968 "dot" by bytes, not octets. Use the larger of the directive size
5969 or octets_per_byte for the number of octets actually allocated in
5971 (lang_set_startof) Make sure STARTOF returns a target address.
5972 (lang_one_common) Record size changes in octets.
5973 (lang_abs_symbol_at_end_of) Section end symbol's value is
5974 recorded in target bytes.
5975 * ld.texinfo: Updated description of BYTE, SHORT, LONG, etc.
5976 to be clear about behavior when an octet is smaller than one byte.
5980 * ldcref.c (output_cref): Don't pass message strings to printf
5984 * ldmisc.c (vfinfo): Same here.
5989 * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em,
5990 generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em,
5991 mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct):
5992 Add missing NULL initialisers, and comments.
5996 * ldlang.c (lang_size_sections): Fix typo in comment.
6000 * ldlang.c (lang_size_sections): Also update the current
6001 address of a region if the SEC_NEVER_LOAD bit is not set.
6005 * configure.tgt (arm*-*-conix*): New target.
6009 * ld.texinfo (Options): Remind users to preceed linker command
6010 line switches with -Wl, (or whatever is appropriate) if it is
6011 being invoked by a comnpiler driver program.
6012 Fix description of the behaviour of the -n command line switch.
6016 * ld.h (wildcard_spec): Change exclude_name to exclude_name_list.
6018 * ld.texinfo (EXCLUDE_FILE): Update documentation.
6019 * ldgram.y (wildcard_spec): Support a list of excluded_files.
6020 (exclude_name_list): New.
6021 ldlang.c (walk_wild_section): Support list of excluded files.
6022 (print_wild_statement): Likewise.
6023 (lang_add_wild): Likewise.
6024 * ldlang.h (lang_wild_statement_type): Likewise.
6025 * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support.
6029 * pe-dll.c (pe_dll_warn_dup_exports): New variable.
6030 (process_def_file): Use.
6031 (pe_dll_compat_implib): New variable.
6034 * pe-dll.h: Add exports of pe_dll_warn_dup_exports and
6035 pe_dll_compat_implib.
6037 * emultempl/pe.em (longopts): Add warn-duplicate-exports and
6038 compat-implib options.
6039 (gld_${EMULATION_NAME}_list_options): List new options.
6040 (gld_${EMULATION_NAME}_parse_args): Handle.
6042 * pe-dll.c (pe_dll_generate_implib): Use the correct name for output
6045 * deffilep.y (opt_name): Allow "." in name.
6047 For older changes see ChangeLog-9899
6053 version-control: never