3 * configure.tgt: Recognize fido.
7 * pe-dll.c (pe_bfd_is_dll): New function.
8 * pe-dll.h (pe_bfd_is_dll): Declare.
9 * emultempl/pe.em (gld_${EMULATION_NAME}_recognized_file): Recognize
10 dlls using pe_bfd_is_dll instead of using the filename extension.
14 * configure.tgt (NATIVE_LIB_DIRS): Specify for spu-*-elf*.
18 * Makefile.am (ld_TEXINFOS): Set.
19 (ld.info ld.dvi ld.html): Delete rule.
20 * Makefile.in: Regenerated.
24 * ldlang.c (print_output_section_statement): Print load address
25 when lma differs from vma.
29 * configure.in: Define GENINSRC_NEVER.
30 * doc/Makefile.am (ld.info): Remove srcdir prefix.
31 (MAINTAINERCLEANFILES): Add info file.
32 (DISTCLEANFILES): Pretend to add info file.
33 * po/Make-in (.po.gmo): Put gmo files in objdir.
34 * configure, Makefile.in: Regenerated.
38 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Create
39 .eh_frame_hdr section here.
43 * Makefile.am (EXTRA_DIST): Put spu_ovl.o in the emultempl
45 * Makefile.in: Regenerate.
49 * emultempl/xtensaelf.em (XSHAL_ABI): Add default definition.
50 (replace_insn_sec_with_prop_sec): Use bfd_make_section_with_flags.
51 Delete redundant code to set sections flags and alignment.
52 (xt_config_info_unpack_and_check, check_xtensa_info): New.
53 (elf_xtensa_after_open): Iterate over input statements instead of
55 (elf_xtensa_before_allocation): Likewise. Call check_xtensa_info for
56 each input, and write a new .xtensa.info section in the output.
60 * configure.in (LINGUAS): Add ga.
61 * po/ga.po: New Irish translation.
65 * ld.texinfo: Fix a typo.
69 * emulparams/elf32_spu.sh (OTHER_SECTIONS): Define.
73 * emultempl/armelf.em (arm_elf_before_allocation): Only call
74 bfd_elf32_arm_process_before_allocation if no dynamic sections.
78 * emultempl/elf32.em (gld*_before_allocation): Adjust output section
79 size for warning sections.
83 * emultempl/elf32.em (gld*_before_allocation): Don't prepend
84 "warning" to the message.
88 * pe-dll.c (autofilter_entry_type): Change name to const.
89 (pe_details_type) : Change target_name, object_target and
90 autofilter_symbollist to const.
91 (autofilter_symbollist_generic): Change to const.
92 (autofilter_symbollist_i386, pe_detail_list, pe_details,
93 autofilter_liblist, autofilter_objlist autofilter_symbolprefixlist,
94 autofilter_symbolsuffixlist): Likewise.
95 (is_import): Fix indentation.
96 (auto_export): Change afptr to const. Move name declaration to
98 (make_tail): Clear undefined byte.
99 (jmp_ix86_bytes, jmp_sh_bytes, jmp_mips_bytes, jmp_arm_bytes): Change
101 (make_one): Change jmp_bytes to const. Make idata$6 member size
102 arithmetic explicit and add comment.
107 * ld.h (args_type): Remove reduce_memory_overheads.
109 * ldlang.c (lang_map): Updated.
110 (section_already_linked): Likewise.
111 (print_input_section): Likewise.
112 * ldmain.c (main): Likewise.
113 * lexsup.c (parse_args): Likewise.
117 * pe-dll.c (make_singleton_name_thunk): Re-add the NULL terminator.
121 * ldlang.c (lang_map): Don't say SEC_LINKER_CREATED and SEC_KEEP
122 sections have been discarded.
123 (lang_do_version_exports_section): Set SEC_KEEP on export section.
124 * emultempl/elf32.em (before_allocation): Set SEC_KEEP on warning
130 * configure.tgt (arm*linux*): Support both big- and little-endian.
134 * emulparams/hppa64linux.sh (LARGE_SECTIONS): Renamed to ...
135 (OTHER_BSS_SECTIONS): This.
136 * scripttempl/elf.sc (OTHER_BSS_SECTIONS): Support LARGE_SECTIONS.
137 (LARGE_SECTIONS): Move .lbss sections to OTHER_BSS_SECTIONS.
145 * emulparams/elf32_spu.sh: New file.
146 * emultempl/spu_inc.s: New file.
147 * emultempl/spu_ovl.S: New file.
148 * emultempl/spu_ovl.o: New file.
149 * emultempl/spuelf.em: New file.
150 * Makefile.am: Add SPU support.
151 * configure.tgt: Likewise.
152 * ldlang.c (load_symbols): Make global.
153 * ldlang.h (load_symbols): Declare.
154 * scripttempl/elf.sc (OTHER_BSS_SECTIONS): Add.
155 * Makefile.in: Regenerate.
159 * lexsup.c (parse_args): Add a comment noting a fall-through.
163 * configure.in (AC_CHECK_HEADERS): Add limits.h and sys/param.h.
164 * configure: Regenerated.
165 * config.in: Likewise.
169 * emulparams/h8300elf.sh (TINY_DATA_SECTION, TINY_BSS_SECTION): Don't
170 set section address on a relocatable link.
172 * ld.texinfo (Output Section Discarding): Fix xref.
176 * emulparams/shelf32.sh: Set default stack to 0x80000.
177 * emulparams/shelf64.sh: Likewise.
181 * emulparams/elf32bmip.sh (OTHER_GOT_RELOC_SECTIONS): Define.
182 * emulparams/elf32bmipn32-defs.sh (OTHER_GOT_RELOC_SECTIONS): Likewise.
186 * emultempl/armelf.em (arm_elf_before_allocation): Run
187 gld${EMULATION_NAME}_before_allocation later.
188 * ldlang.c (lang_size_sections_1): Revert 2006-09-15 change.
192 * emulparams/elf64_sparc_fbsd.sh (OUTPUT_FORMAT): Define as
197 * configure.tgt (i[3-7]86-*-linux-*): Also define
198 targ_extra_libpath in want64 case.
199 * emulparams/elf_x86_64.sh: Handle i[3-7]86-*-linux-* the same as
204 * scripttempl/elf.sc (INTERP): Delete. Move definition to..
205 (INITIAL_READONLY_SECTIONS): ..here.
206 * emulparams/criself.sh (INITIAL_READONLY_SECTIONS): Include .interp.
207 * emulparams/elf32bmip.sh (INITIAL_READONLY_SECTIONS): Ditto.
208 * emulparams/elf32bmipn32-defs.sh (INITIAL_READONLY_SECTIONS): Ditto.
212 * ldlang.c (strip_excluded_output_sections): Do strip sections
213 that define syms, but don't ignore them.
214 * ld.texinfo (Output Section Discarding): Revise.
215 * emultempl/armcoff.em (gld${EMULATION_NAME}_finish): Always call
220 * Makefile.am (eelf64bmip.c): Depend on emulparams/elf64bmip-defs.sh.
221 (eelf64btsmip.c, eelf64ltsmip.c): Likewise.
222 * Makefile.in: Regenerate.
223 * emulparams/elf32bmipn32-defs.sh (INITIAL_READONLY_SECTIONS): Include
224 .reginfo rather than .MIPS.options.
225 * emulparams/elf64bmip-defs.sh: New file.
226 * emulparams/elf64bmip.sh: Include it.
227 (COMMONPAGESIZE): Delete.
228 * emulparams/elf64btsmip.sh: As for elf64bmip.sh.
232 * emultempl/xtensaelf.em (is_inconsistent_linkonce_section): Check
233 for linkonce XCC exception tables (".e" and ".h").
237 * emulparams/elf32xtensa.sh (TEXT_PLT): Enable.
238 (OTHER_READONLY_SECTIONS): Add linkonce .xt_except_table sections.
239 (OTHER_READWRITE_SECTIONS): Add linkonce .xt_except_desc sections.
240 (OTHER_SDATA_SECTIONS): New.
241 * scripttempl/elfxtensa.sc: Import changes from elf.sc.
245 * ldlang.c (lang_append_dynamic_list): When appending, add all elements
246 of the dynamic list rather than just the first entry.
250 * emulparams/elf32xtensa.sh (GENERATE_PIE_SCRIPT): Enable.
254 * genscripts.sh: Respect LIBPATH_SUFFIX when not using sysroot.
258 * emulparams/xtensa-config.sh: Delete file.
259 * emulparams/elf32xtensa.sh: Set MAXPAGESIZE here instead of including
261 * Makefile.am (eelf32xtensa.c): Remove dependency on xtensa-config.sh.
262 * Makefile.in: Regenerate.
266 * pe-dll.c : Fix typo.
267 (autofilter_symbolprefixlist) : Remove __imp_.
269 (auto-export) : Remove re-import check. Moved to callers.
270 (process_def_file) : Check is symbol is an import. Always
272 Only skip underscore on underscored targets.
273 (make_one) : Always underscore __imp_.
274 (pe_create_runtime_relocator_reference) : Only underscore
275 _pei386_runtime_relocator on underscored targets.
276 (pe_process_import_defs) : Always underscore __imp_.
277 * pe.em (U) : New macro.
278 (set_pe_subsystem) : Remove underscore from _WinMainCRTStartup
279 on wince subsystem case.
280 (pe_find_data_imports) : Use U on "_head_".
281 (gld_${EMULATION_NAME}_unrecognized_file) : Use U.
287 * ld.texinfo: Updated Output Section Discarding.
289 * ldlang.h (lang_output_section_statement_type): Add
290 section_relative_symbol.
291 * ldlang.c (strip_excluded_output_sections): Don't strip a
292 section with a symbol relative to it.
293 (lang_size_sections_1): Mark if an output section has a symbol
294 symbol relative to it.
298 * ld.texinfo (Options): Update description of local symbols for -X.
303 * scripttempl/elf.sc: Don't combine .gnu.linkonce.d.*personality*
304 and .gnu.linkonce.wi.* sections with .data and .debug_info for
309 * configure.in: Add new target x86_64-pc-mingw64.
310 * configure: Regenerate.
311 * configure.tgt: Add definition of target emulation i386pep.
312 * Makefile.am: Add new target files for target-all.
313 * Makefile.in: Regenerate.
314 * pe-dll.c: Adjust to be inheritable by pep_dll.c as include.
315 Fix memory out of bounds excess for idata relocation section data.
316 * pep-dll.c: Add target specific shared object handling.
317 * pep-dll.h: Add target specific definitions for shared object handling.
318 * emulparams/i386pep.sh: Add new emulation params for target x86_64 coff.
319 * emultempl/pep.em: Add new emulation file for target x86_64 coff.
320 * po/POTFILES.in: Regenerate.
321 * scripttempl/pep.sc: Add linker script template for target x86_64 coff.
322 * NEWS: Mention new target.
326 * configure.tgt: Add mips*el-sde-elf* and mips*-sde-elf*
331 * emulparams/scoreelf.sh: New file.
332 * emultempl/scoreelf.em: New file.
333 * Makefile.am: Add Score files.
334 * Makefile.in: Regenerate.
335 * configure.tgt: Add Score target.
336 * NEWS: Mention new target support.
341 * ldctor.c: Make use of new STRING_COMMA_LEN and CONST_STRNEQ
342 macros defined in bfd.h.
343 * ldmain.c: Likewise.
344 * ldwrite.c: Likewise.
345 * lexsup.c: Likewise.
346 * pe-dll.c: Likewise.
347 * emultempl/aix.em: Likewise.
348 * emultempl/beos.em: Likewise.
349 * emultempl/elf32.em: Likewise.
350 * emultempl/pe.em: Likewise.
351 * emultempl/sunos.em: Likewise.
352 * emultempl/xtensaelf.em: Likewise.
357 * ldlang.c (lang_size_sections_1): Do not abort when encountering
358 a non-empty section that is ignored. Instead produce a warning
363 * ld.texinfo: Document --dynamic-list-cpp-typeinfo.
367 * Makefile.am (CXX): Set to g++.
368 (CXX_FOR_TARGET): Likewise.
369 * Makefile.in: Regenerated.
371 * NEWS: Mention --dynamic-list.
373 * ld.texinfo: Document --dynamic-list.
375 * ldgram.y: Support dynamic list.
377 * ldlang.c (lang_process): Call lang_finalize_version_expr_head
378 on link_info.dynamic if needed.
379 (lang_append_dynamic_list): New.
380 (lang_append_dynamic_list_cpp_typeinfo): New.
381 * ldlang.h (lang_append_dynamic_list): Likewise.
382 * ldlang.h (lang_append_dynamic_list_cpp_typeinfo): Likewise.
384 * ldlex.h (input_enum): Add input_dynamic_list.
385 * ldlex.l: Handle it.
387 * ldmain.c (main): Initialize link_info.dynamic.
389 * lexsup.c (option_values): Add OPTION_DYNAMIC_LIST and
390 OPTION_DYNAMIC_LIST_CPP_TYPEINFO.
391 (ld_options): Add entries for OPTION_DYNAMIC_LIST and
392 OPTION_DYNAMIC_LIST_CPP_TYPEINFO.
393 (parse_args): Handle OPTION_DYNAMIC_LIST and
394 OPTION_DYNAMIC_LIST_CPP_TYPEINFO.
398 * emulparams/h8300elf.sh: _tinydata should not be placed in
400 * emulparams/h8300.sh: Likewise.
401 * emulparams/h8300sxelf.sh: Likewise.
406 * emultempl/elf32.em: Enable "-z relro" only if $COMMONPAGESIZE
411 * ldlang.c (walk_wild): Allow * to glob '/' in wildcarded match.
415 * scripttempl/elf.sc: Ensure that crtbegin and crtend entries will
416 not match random object files in a path containing "crtbegin" or
417 "crtend" as part of a directory name.
418 * scripttempl/armbpabi.sc: Likewise.
419 * scripttempl/crisaout.sc: Likewise.
420 * scripttempl/elf32crx.sc: Likewise.
421 * scripttempl/elf32sh-symbian.sc: Likewise.
422 * scripttempl/elf_chaos.sc: Likewise.
423 * scripttempl/elfd10v.sc: Likewise.
424 * scripttempl/elfd30v.sc: Likewise.
425 * scripttempl/elfxtensa.sc: Likewise.
426 * scripttempl/iq2000.sc: Likewise.
427 * scripttempl/mmo.sc: Likewise.
428 * scripttempl/xstormy16.sc: Likewise.
432 * emulparams/elf32xtensa.sh (.xt.prop): Add .xt.prop.*.
433 * scripttempl/elfxtensa.sc (.text): Add .literal.*.
437 * ldlang.c (lang_size_sections_1, lang_assignment_statement_enum):
438 Adjust the current address of DEFAULT_MEMORY_REGION even
439 when dot hasn't changed.
443 * ldexp.c (fold_name <LOADADDR>): Return an absolute value
444 rather than a section relative value.
448 * NEWS: Mention LMA default change.
449 * ld.texinfo (Output Section LMA): Update default description.
450 (Location Counter): Clarify backward movement.
451 * ldlang.c (lang_size_sections_1): Leave non-alloc sections with
452 default lma equal to vma. Warn on backward movement of dot.
456 * configure.tgt: Set targ_emul to arm_wince_pe for ARM
461 * Makefile.am: Split arm-wince into its own emulation.
462 * Makefile.in: Regenerate.
463 * pe-dll.c : Define PE_ARCH_arm_wince.
464 (pe_detail_list): Add PE_ARCH_arm_wince case.
465 (make_one): Handle PE_ARCH_arm_epoc and PE_ARCH_arm_wince cases.
466 * emulparams/arm_wince_pe.sh: New file.
467 * emultempl/pe.em: Handle new TARGET_IS_arm_wince_pe define.
468 Remap bfd_arm_allocate_interworking_sections,
469 bfd_arm_get_bfd_for_interworking and
470 bfd_arm_process_before_allocation for arm-pe and arm-wince-pe
472 (gld_${EMULATION_NAME}_recognized_file): Handle arm-wince and
473 arm-epoc bfd format names.
477 * emultempl/armelf.em (arm_elf_before_allocation): Call
478 gld${EMULATION_NAME}_before_allocation after setting interworking bfd.
482 * pe-dll.c (autofilter_symbolprefixlist): Remove .idata$.
483 (generate_reloc): Revert to skipping sections without a SEC_LOAD flag,
484 and to not skipping .idata* sections.
489 * ldlang.h (lang_output_section_statement_type): Replace
490 "processed" field with "processed_vma" and "processed_lma".
491 * ldlang.c (lang_do_assignments_1): Move lma setting code..
492 (lang_size_sections_1): ..to here.
493 (lang_reset_memory_regions): Adjust for
494 lang_output_section_statement_type change.
495 * ldexp.c (fold_name): Likewise.
499 * emulparams/armelf.sh (MAXPAGESIZE): Changed to
500 "CONSTANT (MAXPAGESIZE)".
505 * ldlang.c (lang_section_bst_type): Moved to ...
508 * ldlang.h (lang_wild_statement_struct): Add a tree field.
510 * ldlang.c (wild_sort_fast): Use the tree field for BST.
512 (analyze_walk_wild_section_handler): Initialize the tree field.
517 * ldlang.c (update_wild_statements): Update the whole wild
523 * scripttempl/elf.sc (USER_LABEL_PREFIX): Define.
524 (__preinit_array_start, __preinit_array_end, __init_array_start,
525 __init_array_end, __fini_array_start, __fini_array_end, edata, end):
526 Use ${USER_LABEL_PREFIX}.
527 * emulparams/bfin.sh (DATA_END_SYMBOLS,END_SYMBOLS): Unset.
528 (USER_LABEL_PREFIX): Set.
532 * ldmain.c (main): Initialise print_gc_sections field of link_info
534 * lexsup.c: Add --print-gc-sections and --no-print-gc-sections
536 * ld.texinfo: Document new switches.
537 * NEWS: Mention new switches.
543 * Makefile.am (ALL_EMULATIONS): Add eshelf_vxworks.o and
545 (eshelf_vxworks.c, eshlelf_vxworks.c): New rules.
546 * Makefile.in: Regenerate.
547 * configure.tgt (sh-*-vxworks): Use shelf_vxworks and
549 * emulparams/shelf_vxworks.sh: New file.
550 * emulparams/shlelf_vxworks.sh: Likewise.
551 * emulparams/vxworks.sh (FINI): Prefix _etext with ${SYMPREFIX}.
552 (OTHER_END_SYMBOLS): Likewise _ehdr.
553 (DATA_END_SYMBOLS): Likewise _edata.
554 * emultempl/vxworks.em (vxworks_after_open): Check whether output_bfd
555 is indeed an ELF file before dealing with --force-dynamic.
560 * emulparams/elf_x86_64_fbsd.sh (OUTPUT_FORMAT): Define as
561 elf64-x86-64-freebsd.
565 * ldlang.c (init_os): Add flags. Replace bfd_make_section with
566 bfd_make_section_with_flags.
567 (exp_init_os): Updated.
568 (lang_add_section): Call init_os with flags.
569 (map_input_to_output_sections): Likewise.
573 * Makefile.am (eelf32b4300.c): Update dependencies.
574 (eelf32bmip.c): Likewise.
575 (eelf32bsmip.c): Likewise.
576 (eelf32btsmip.c): Likewise.
577 (eelf32btsmipn32.c): Likewise.
578 (eelf32ltsmip.c): Likewise.
579 (eelf32ltsmipn32.c): Likewise.
580 (eelf32ebmip.c): Likewise.
581 (eelf32ebmipvxworks.c): Likewise.
582 (eelf32elmip.c): Likewise.
583 (eelf32elmipvxworks.c): Likewise.
584 (eelf32bmipn32.c): Likewise.
585 (eelf32lmip.c): Likewise.
586 (eelf32mipswindiss.c): Likewise.
587 (eelf32lsmip.c): Likewise.
588 (eelf64bmip.c): Likewise.
589 (eelf64btsmip.c): Likewise.
590 (eelf64ltsmip.c): Likewise.
591 (emipsbig.c): Likewise. Canonicalize ${GENSCRIPTS} line.
592 (emipsbsd.c): Likewise.
593 (emipsidt.c): Update dependencies.
594 (emipsidtl.c): Likewise.
595 (emipslit.c): Likewise.
596 (emipslnews.c): Likewise.
597 (emipspe.c): Likewise. Fix ${GENSCRIPTS} invocation.
598 * Makefile.in: Regenerate.
599 * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Define.
600 * emulparams/elf32bmipn32-defs.sh (EXTRA_EM_FILE): Likewise.
601 * emultempl/irix.em: Include emultempl/mipself.em.
602 * emultempl/mipself.em: New file.
606 * emultempl/elf-generic.em (map_segments): Reorganise loop so that
607 layout happens before segment map. Don't do segment map on
612 * ldexp.c (fold_name <LOADADDR>): Use the lma.
613 * ldlang.h (lang_memory_region_type): Delete old_length. Add
615 * ldlang.c (lang_memory_region_lookup): Init new field.
616 (lang_reset_memory_regions): Reset new field.
617 (lang_insert_orphan): Don't set load_base.
618 (lang_leave_overlay): Likewise.
619 (lang_size_sections_1): Delete unnecessary code setting lma_region
620 to region. Correct lma region check.
621 (lang_do_assignments_1): Rename output_section_statement parm
622 to current_os. Set lma from previous section in region.
624 * ldlang.c: Formatting.
628 * emultempl/xtensaelf.em (xtensa_strip_inconsistent_linkonce_sections):
629 Set discarded section's output_section to bfd_abs_section_ptr.
633 * ldlang.c (analyze_walk_wild_section_handler): Init handler_data
638 * emultempl/xtensaelf.em (is_inconsistent_linkonce_section): Add space
639 in dep_sec_name for null terminator. Make sure dep_sec_name has a
644 * emulparams/elf_x86_64.sh (LIBPATH_SUFFIX, ELF_INTERPRETER_NAME):
645 Set for *-*-solaris2*.
649 * ld.texinfo: Fix spelling mistakes.
650 * ldint.texinfo: Likewise.
654 * ldlang.c (lang_section_bst): New structure for sorting sections
656 (wild_sort_fast): New function: Insert a section into a binary
658 (output_section_callback_fast): New function: Store a section in
660 (output_section_callback_tree_to_list): New function: Convert a
662 (analyze_walk_wild_section_handler): Initialize handler_data
664 (wild): If the data is sorted by name use the BST method to sort
669 * ld.h (handle_asneeded_cref): Declare.
670 * ldcref.c: Include objalloc.h.
671 (old_table, old_count, old_tab, alloc_mark): New variables.
672 (tabsize, entsize, refsize, old_symcount): Likewise.
673 (add_cref): Use bfd_hash_allocate for refs.
674 (handle_asneeded_cref): New function.
675 * ldmain.c (notice): Call handle_asneeded_cref for NULL name.
679 * configure.tgt (i[3-7]86-*-solaris2*, i[3-7]86-*-solaris*): Correct
680 typo setting targ_extra_libpath.
684 * scripttempl/elf.sc: Add .gnu.hash section.
685 * emultempl/elf32.em (OPTION_HASH_STYLE): Define.
686 (gld${EMULATION_NAME}_add_options): Register --hash-style option.
687 (gld${EMULATION_NAME}_handle_option): Handle it.
688 (gld${EMULATION_NAME}_list_options): Document it.
689 * ldmain.c (main): Initialize emit_hash and emit_gnu_hash.
690 * ld.texinfo: Document --hash-style option.
694 * po/zh_TW.po: New Chinese (traditional) translation.
695 * configure.in (ALL_LINGUAS): Add zh_TW.
696 * configure: Regenerate.
701 * ld.texinfo: Remove "Using LD" from the title since it is
707 * ld.texinfo: Fix spelling mistakes.
712 * emultempl/pe.em (gld_$_open_dynamic_archive): Compute maximum
713 length of format strings in the libname_fmt[] array, rather than
714 relying upon a statically chosen value. Adjust xmalloc call to
715 use this longest length.
719 * ld.texinfo (-rpath-link): Clarify distinction between -rpath and
724 * configure.tgt (i[3-7]86-*-solaris2*, i[3-7]86-*-solaris*): Set
729 * pe-dll.c (pe_details_type): Add new pointer for symbols list
731 (autofilter_symbollist): Split into autofilter_symbollist_generic
732 and autofilter_symbollist_i386.
733 (pe_detail_list): Add autofilter_symbollist_i386 to i386 case and
734 autofilter_symbollist_generic for all the others.
735 (autofilter_symbolprefixlist): Moved _fmode, _impure_ptr, cygwin_attach_dll,
736 cygwin_premain0, cygwin_premain1, cygwin_premain2, cygwin_premain3, environ,
737 into autofilter_symbollist_i386.
738 (auto_export): Get autofilter_symbollist from pe_details.
743 * emultempl/pe.em (gld_$_after_open): When reporting non PE format
744 output files mention the file name and the fact that it is an
749 * emultempl/pe.em (gld_${EMULATION_NAME}_open_dynamic_archive):
750 Restructure. Add native "%s.lib" format to search list
751 * ld.texinfo (node WIN32): Update documentation on dynamic lib
752 search order. Add another reason for using import libs.
756 * ldlang.c (lang_insert_orphan): Correctly handle the case where
757 the section is to end up after the section currently at the end
758 of the list in output_bfd.
762 * emultempl/mmo.em: Improve comments. Explain why there's
767 * emultempl/elf-generic.em (gld${EMULATION_NAME}_map_segments): Limit
768 loop to ten iterations. Throw away any previous linker generated
770 * ldlang.c (lang_phdr_list): Make global.
771 * ldlang.h (lang_phdr_list): Declare.
772 * Makefile.am (ELF_GEN_DEPS): Define. Use in emul deps.
773 * Makefile.in: Regenerate.
777 * Makefile.am (ELF_DEPS): Define. Use in emul file deps. Fix
778 many ELF emul file deps that incorrectly said they needed elf32.em
779 instead of generic.em. Add genelf.em as required.
780 * Makefile.in: Regenerate.
781 * ldlang.c (lang_process): Call ldemul_finish before
782 lang_check_section_addresses.
783 * emulparams/arcelf.sh: Generic elf target needs genelf.
784 * emulparams/d30v_e.sh: Likewise.
785 * emulparams/d30v_o.sh: Likewise.
786 * emulparams/d30velf.sh: Likewise.
787 * emulparams/elf32_dlx.sh: Likewise.
788 * emulparams/elf32_i860.sh: Likewise.
789 * emulparams/elf32fr30.sh: Likewise.
790 * emulparams/elf32frv.sh: Likewise.
791 * emulparams/elf32iq10.sh: Likewise.
792 * emulparams/elf32iq2000.sh: Likewise.
793 * emulparams/elf32mt.sh: Likewise.
794 * emulparams/mn10200.sh: Likewise.
795 * emulparams/or32.sh: Likewise.
796 * emulparams/or32elf.sh: Likewise.
797 * emulparams/pjelf.sh: Likewise.
798 * emulparams/msp430all.sh: Likewise. Extract common entries.
799 * emulparams/pjlelf.sh: Include pjelf.sh.
800 * emulparams/elf32frvfd.sh (EXTRA_EM_FILE): Unset.
801 * emulparams/mn10300.sh (EXTRA_EM_FILE): Unset.
802 * emultempl/elf-generic.em: New file.
803 * emultempl/genelf.em: New file.
804 * emultempl/elf32.em: Include elf-generic.em.
805 (gld${EMULATION_NAME}_layout_sections_again): Delete.
806 (gld${EMULATION_NAME}_finish): Call gld${EMULATION_NAME}_map_segments.
807 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
808 (gld${EMULATION_NAME}_finish): Rename from hppaelf_finish. Call
809 gld${EMULATION_NAME}_map_segments.
810 (LDEMUL_FINISH): Update.
811 * emultempl/mmo.em: Correct comment. Include elf-bfd.h and
812 source elf-generic.em.
813 (mmo_finish): Call gld${EMULATION_NAME}_map_segments.
814 * emultempl/ppc64elf.em (ppc_layout_sections_again): Likewise.
815 (gld${EMULATION_NAME}_finish): Rename from ppc_finish. Call
816 gld${EMULATION_NAME}_map_segments.
817 (LDEMUL_FINISH): Update.
821 * ldexp.c (fold_name): Adjust bfd_sizeof_headers call.
825 * ld.texinfo: Document new -z lazy option.
826 * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
828 (gld${EMULATION_NAME}_list_options): Update help text.
832 * emulparams/elf32bmip.sh (OTHER_SECTIONS): Keep the
833 ".mdebug.<abi>" and ".gcc_compiled_long<size>" sections
834 generated by mips gcc.
838 * emulparams/elf64bmip.sh, emulparams/elf64btsmip.sh (COMMONPAGESIZE):
843 * ldlang.h (lang_input_statement_type): Use bitfields for booleans.
844 * ldlang.c (struct out_section_hash_entry): Rename from
845 output_statement_hash_entry. Delete output_section_statement_type
846 entry. Add statement_union_type entry. Adjust all users.
847 (output_section_statement_table): Rename from output_statement_table.
849 (output_section_statement_newfunc): Rename from
850 output_statement_newfunc. Adjust all users.
851 (output_section_statement_table_init): Rename from
852 output_statement_table_init. Adjust all users.
853 (output_section_statement_table_free): Rename from
854 output_statement_table_free. Adjust all users.
858 * po/Make-in (pdf, ps): New dummy targets.
862 * ldlang.h (enum section_type): Delete dsect_section, copy_section,
863 info_section and overlay_section. Add noalloc_section.
864 * ldlang.c (lang_add_section): Adjust.
865 * ldgram.y (type): Adjust.
869 * ldlang.c (init_os): Whitespace.
870 (map_input_to_output_sections): Don't init_os for lang_input_section.
871 (print_all_symbols): Remove forward declaration. Convert to ISO C.
875 * po/Make-in (top_builddir): Define.
879 * ldexp.c (exp_get_abs_int): Make error message the same as
880 others emitted in this file.
884 * config.in: Regenerate.
888 * ldlang.c (lookup_name): Delete dead code. Remove FIXMEs.
892 * emultempl/elf32.em (global_found): Make it a pointer.
893 (stat_needed, try_needed): Adjust.
894 (check_needed): Don't skip non-loaded as-needed entries. Only
895 consider entries with both filename and the_bfd non-null.
896 (after_open): Try loading non-loaded as-needed libs to satisfy
901 * Makefile.am (TEXI2DVI): Add -I $(top_srcdir)/../libiberty.
902 * Makefile.in: Regenerate.
906 * Makefile.am: Replace INTLLIBS and INTLDEPS with LIBINTL
907 and LIBINTL_DEP everywhere.
909 (INCLUDES): Use @INCINTL@.
910 * configure.in: Use ZW_GNU_GETTEXT_SISTER_DIR and AM_PO_SUBDIRS.
911 Remove local code for po/Makefile.
912 * Makefile.in, configure: Regenerated.
916 * emulparams/arcelf.sh (MAXPAGESIZE): Changed to
917 "CONSTANT (MAXPAGESIZE)".
918 * emulparams/armelf_nbsd.sh: Likewise.
919 * emulparams/armelf_vxworks.sh: Likewise.
920 * emulparams/armnto.sh: Likewise.
921 * emulparams/armsymbian.sh: Likewise.
922 * emulparams/crislinux.sh: Likewise.
923 * emulparams/elf32_i860.sh: Likewise.
924 * emulparams/elf32_i960.sh: Likewise.
925 * emulparams/elf32am33lin.sh: Likewise.
926 * emulparams/elf32bfinfd.sh: Likewise.
927 * emulparams/elf32bmipn32-defs.sh: Likewise.
928 * emulparams/elf32frvfd.sh: Likewise.
929 * emulparams/elf32i370.sh: Likewise.
930 * emulparams/elf32lppcnto.sh: Likewise.
931 * emulparams/elf32mcore.sh: Likewise.
932 * emulparams/elf32openrisc.sh: Likewise.
933 * emulparams/elf32ppcnto.sh: Likewise.
934 * emulparams/elf32ppcwindiss.sh: Likewise.
935 * emulparams/elf32vax.sh: Likewise.
936 * emulparams/elf32xc16x.sh: Likewise.
937 * emulparams/elf32xc16xl.sh: Likewise.
938 * emulparams/elf32xc16xs.sh: Likewise.
939 * emulparams/elf64_aix.sh: Likewise.
940 * emulparams/elf64hppa.sh: Likewise.
941 * emulparams/elf64mmix.sh: Likewise.
942 * emulparams/elf_i386_be.sh: Likewise.
943 * emulparams/elf_i386_chaos.sh: Likewise.
944 * emulparams/elf_i386_ldso.sh: Likewise.
945 * emulparams/hppa64linux.sh: Likewise.
946 * emulparams/hppalinux.sh: Likewise.
947 * emulparams/hppaobsd.sh: Likewise.
948 * emulparams/i386lynx.sh: Likewise.
949 * emulparams/i386moss.sh: Likewise.
950 * emulparams/i386nto.sh: Likewise.
951 * emulparams/i386nw.sh: Likewise.
952 * emulparams/m32relf_linux.sh: Likewise.
953 * emulparams/m68kpsos.sh: Likewise.
954 * emulparams/or32elf.sh: Likewise.
955 * emulparams/pjelf.sh: Likewise.
956 * emulparams/pjlelf.sh: Likewise.
957 * emulparams/ppclynx.sh: Likewise.
958 * emulparams/ppcnw.sh: Likewise.
959 * emulparams/shelf32_nbsd.sh : Likewise.
960 * emulparams/shelf_nbsd.sh: Likewise.
961 * emulparams/shelf_nto.sh: Likewise.
962 * emulparams/shlelf_nto.sh: Likewise.
963 * emulparams/xtensa-config.sh: Likewise.
965 * emulparams/armelf_linux.sh (MAXPAGESIZE): Changed to
966 "CONSTANT (MAXPAGESIZE)".
967 (COMMONPAGESIZE): Changed to "CONSTANT (COMMONPAGESIZE)".
968 * emulparams/elf32_sparc.sh: Likewise.
969 * emulparams/elf32bmip.sh: Likewise.
970 * emulparams/elf32ppccommon.sh: Likewise.
971 * emulparams/elf64_ia64.sh: Likewise.
972 * emulparams/elf64_s390.sh: Likewise.
973 * emulparams/elf64_sparc.sh: Likewise.
974 * emulparams/elf64alpha.sh: Likewise.
975 * emulparams/elf64ppc.sh: Likewise.
976 * emulparams/elf_i386.sh: Likewise.
977 * emulparams/elf_i386_vxworks.sh: Likewise.
978 * emulparams/elf_s390.sh: Likewise.
979 * emulparams/elf_x86_64.sh: Likewise.
980 * emulparams/shlelf32_linux.sh: Likewise.
981 * emulparams/shlelf_linux.sh: Likewise.
983 * emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Changed to
984 "CONSTANT (COMMONPAGESIZE)".
985 * emulparams/elf32btsmipn32.sh: Likewise.
987 * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add
988 "-z max-page-size=" and "-z common-page-size=".
989 (gld${EMULATION_NAME}_list_options): Likewise.
991 * ld.h (ld_config_type): Add maxpagesize and commonpagesize.
993 * ld.texinfo: Document "-z max-page-size=" and
994 "-z common-page-size=".
996 * ldexp.c (exp_print_token): Handle CONSTANT.
997 (fold_name): Likewise.
998 * ldgram.y: Likewise.
1001 * ldmain.c (main): Initiliaze config.maxpagesize and
1002 config.commonpagesize. Call bfd_emul_set_maxpagesize if
1003 config.maxpagesize isn't 0. Call bfd_emul_set_commonpagesize if
1004 config.commonpagesize config.maxpagesize isn't 0.
1008 * po/es.po: Updated Spanish translation.
1012 * emulparams/elf_x86_64.sh (MAXPAGESIZE): Updated to 0x200000.
1017 * configure.in: Use ${srcdir}/../bfd/config.bfd to check 64bit
1018 bfd. Support 64bit host for --enable-targets=all.
1019 * configure: Regenerated.
1023 * po/vi.po: Updated Vietnamese translation.
1027 * configure.tgt: Add avr6 to emulation list.
1028 * Makefile.am: Add eavr6.o and corresponding rule.
1029 * Makefile.in: Regenerate.
1030 * emulparams/avr6.sh: New file.
1031 * emulparams/avrX.sh (TEMPLATE_NAME): Use elf32 instead of generic
1032 for target option support.
1033 (EXTRA_EM_FILE): Add reference to new em template file avrelf.
1034 * scripttempl/avr.sc: Add ".trampolines" section.
1035 * emultempl/avrelf.em: Add new file for target specific options.
1039 * scripttempl/elf32crx.sc (.rdata): Add .rodata.*.
1043 * ldlang.c (lang_size_sections_1): Don't check mem regions for
1044 os->ignored sections.
1048 * ldlang.c (lang_size_sections): Call lang_reset_memory_regions
1049 before redoing one_lang_size_sections_pass.
1053 * ld.texinfo: Rename "Index" to "LD Index"
1057 * pe-dll.c (autofilter_symbollist): Add Dllmain,
1058 DllMainCRTStartup, _DllMainCRTStartup and .text.
1059 (autofilter_liblist): Add libcegcc.
1060 (autofilter_symbolprefixlist): Add __imp_ and .idata$.
1061 (generate_reloc): Do not skip sections without a SEC_LOAD flag,
1062 they can still contain relocs that need processing.
1063 Skip the .idata$6 section.
1064 (jmp_arm_bytes): New array: Contains byte codes for an ARM jump.
1065 (make_one): Use the new array.
1066 (make_import_fixup_entry): Use .idata$2 instead of .idata$3.
1067 * emultempl/pe.em (MajorSubsystemVersion): Set to 3 for armpe.
1071 * ld.texinfo: Document PowerPC and PowerPC64 options.
1072 * gen-doc.texi: Enable.
1076 * Makefile.am (AM_MAKEINFOFLAGS): Add libiberty.
1077 (TEXI2POD): Use AM_MAKEINFOFLAGS.
1078 (configdoc.texi): Don't set top_srcdir.
1079 * ld.texinfo: Don't use top_srcdir.
1080 * aclocal.m4, Makefile.in: Regenerated.
1084 * ldlang.c (wild): Tidy default_common_section loop.
1085 (print_input_section): Format.
1087 * configure: Regenerate.
1091 * po/POTFILES.in: Regenerated.
1095 * config.in: Regenerated.
1100 * emultempl/xtensaelf.em (elf_xtensa_before_allocation): Call new
1101 function to strip inconsistent linkonce sections.
1102 (input_section_linked_worker, input_section_linked): New.
1103 (is_inconsistent_linkonce_section): New.
1104 (xtensa_strip_inconsistent_linkonce_sections): New.
1108 * emultempl/elf32.em: Add support for elf-hints.h on FreeBSD
1109 and Dragonfly targets.
1110 * configure.in (AC_CHECK_HEADERS): Add elf-hints.h.
1111 * Makefile.am (HFILES): Add elf-hints-local.h.
1112 * elf-hints-local.h: New file.
1113 * Makefile.in: Regenerate.
1114 * configure: Regenerate.
1118 * ld.texinfo: Fix typo in documentation of --check-sections.
1122 * ldlang.c (load_symbols): Set as_needed and add_needed according
1123 to the corresponding script's fields while processing it.
1127 * Makefile.am: Add install-html, install-html-am, and
1128 install-html-recursive targets.
1129 * Makefile.in: Regenerate.
1130 * configure.in: AC_SUBST datarootdir, docdir, htmldir.
1131 * configure: Regenerate.
1132 * po/Make-in: Add install-html target.
1136 * emultempl/ia64elf.em: Set link_info.relax_pass to 2. Remove
1137 link_info.need_relax_finalize.
1139 * ldlang.c (relax_sections): New.
1140 (lang_process): Use. Call relax_sections link_info.relax_pass
1143 * ldmain.c (main): Set link_info.relax_pass to 1. Remove
1144 link_info.need_relax_finalize.
1148 * Makefile.am (GENSCRIPTS): Pass prefix.
1149 * Makefile.in: Regenerate.
1150 * genscripts.sh: Adjust for extra parameter.
1151 * emultempl/elf32.em (parse_ld_so_conf): Return true iff file
1153 (check_ld_so_conf): Use ${prefix}/etc/ld.so.conf if it exists.
1159 * configure.tgt (sparc*-*-vxworks*): New stanza.
1160 * emulparams/elf32_sparc_vxworks.sh: New file.
1161 * Makefile.am (ALL_EMULATIONS): Add eelf32_sparc_vxworks.o.
1162 (eelf32_sparc_vxworks.c): New rule.
1163 * Makefile.in: Regenerate.
1167 * ldlang.c (lang_map): Print the list of discarded input sections.
1168 (print_input_section): Change parameter and print zero-sized sections.
1169 (print_statement): Adjust call to print_input_section.
1173 * deffilep.y (def_image_name): If LIBRARY or NAME statement
1174 specifies an empty string, retain the name specified on command
1176 * ld.texinfo: Document above.
1180 * ldmisc.c (vfinfo): Revert 2005-10-05 changes. If
1181 bfd_find_nearest_line succeeded for %C or %D, but filename
1182 is NULL, print section+offset at the end.
1186 * emulparams/elf32bfinfd.sh: New file.
1187 * emultempl/bfin.em: Delete.
1188 * emulparams/bfin.sh: Lose reference to bfin.em.
1189 * Makefile.am (eelf32bfin.c): Likewise.
1190 (eelf32bfinfd.c): New.
1191 * Makefile.in: Regenerate.
1192 * configure.tgt (bfin-*-elf, bfin-*-uclinux): Add elf32bfinfd to
1202 * configure.tgt (mips*el-*-vxworks*, mips*-*-vxworks*): Use
1203 separate VxWorks emulations.
1204 * emulparams/elf32ebmipvxworks.sh: New file.
1205 * emulparams/elf32elmipvxworks.sh: New file.
1206 * Makefile.am (ALL_EMULATIONS): Add eelf32ebmipvxworks.o and
1207 eelf32elmipvxworks.o.
1208 (eelf32ebmipvxworks.c, eelf32elmipvxworks.c): New rules.
1209 * Makefile.in: Regenerate.
1214 * ldcref.c (add_cref): Adjust bfd_hash_table_init calls.
1215 * ldlang.c (output_statement_table_init, lang_init): Likewise.
1216 * ldmain.c (add_ysym, add_wrap, add_keepsyms_file): Likewise.
1217 (undefined_symbol): Likewise.
1227 * emulparams/armelf_vxworks.sh: Include vxworks.sh.
1228 (MAXPAGESIZE): Define.
1229 * emulparams/vxworks.sh: Undefine EMBEDDED.
1230 * Makefile.am (earmelf_vxworks.c): Depend on vxworks.sh and vxworks.em.
1231 * Makefile.in: Regenerate.
1235 * scripttempl/avr.sc: Add *(.jumptables) *(.lowtext) sections.
1236 Add KEEP() directives.
1237 Add *(.data*) *(.rodata) and *(.rodata*) and *(.bss*) to .data and
1238 .bss output sections.
1242 * emulparams/vxworks.sh (VXWORKS_BASE_EM_FILE): New variable.
1243 (EXTRA_EM_FILE): Define.
1244 * emultempl/vxworks.em: New file.
1245 * ld.texinfo (--force-dynamic): Document.
1246 * Makefile.am (eelf32ppcvxworks.cm, eelf_i386_vxworks.c): Depend
1248 * Makefile.in: Regenerate.
1252 * emulparams/elf32ppccommon.sh: New file, extracted from...
1253 * emulparams/elf32ppc.sh: ...here.
1254 * emulparams/elf32ppcvxworks.sh: Include elf32ppccommon.sh
1255 instead of elf32ppc.sh.
1256 (BSS_PLT): Remove override.
1257 * Makefile.am (eelf32lppc.c): Depend on elf32ppccommons.h.
1258 (eelf32lppcnto.c, eelf32lppcsim.c, eelf32ppcnto.c): Likewise.
1259 (eelf32ppc.c, eelf32ppc_fbsd.c, eelf32ppcsimm): Likewise.
1260 (eelf32ppclinux.c): Likewise.
1261 (eelf32ppcvxworks.c): Likewise. Add missing vxworks.sh dependency.
1262 * Makefile.in: Regenerate.
1266 * Makefile.am: Add html target.
1267 * Makefile.in: Regenerate.
1268 * po/Make-in: Add html target.
1274 * scripttemp/elf32xc16x.sc: Default linker script for tiny model.
1275 * scripttemp/elf32xc16xl.sc: Default linker script for large model.
1276 * scripttemp/elf32xc16xs.sc: Default linker script for small model.
1277 * emulparams/elf32xc16x.sh: Emulation script for tiny model.
1278 * emulparams/elf32xc16xl.sh: Emulation script for large model.
1279 * emulparams/elf32xc16xs.sh: Emulation script for small model.
1280 * Makefile.am: Add entry to make xc16x target.
1281 * Makefile.in: Regenerate.
1282 * configure.tgt: Specify default and other emulation parameters
1284 * NEWS: Announce the support for the new target.
1288 * configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
1289 Use the traditional target.
1293 * configure.tgt (arm*b-*-linux-gnueabi): Change to
1294 arm*b-*-linux-*eabi.
1295 (arm*-*-linux-gnueabi): Change to arm*-*-linux-*eabi.
1300 * NEWS: Updated for the Linux linker search order change.
1302 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Call
1303 gld${EMULATION_NAME}_check_ld_so_conf before checking default
1304 search directories for DT_NEEDED entries.
1308 * emultempl/armelf.em: Include elf/arm.h.
1309 (arm_elf_finish): Set low address bit if enty point is a Thumb
1314 * deffilep.y (def_image_name): If the image name does not have
1315 a suffix, append the default.
1316 * ld.texinfo: Document NAME, LIBRARY usage in PE-COFF .def files.
1320 * NEWS: Mention support for forward exports in PE-COFF dll's.
1321 * ld.texinfo: Expand documentation of EXPORT statements in
1326 * deffile.h (struct def_file_export): Add field flag_forward.
1327 * pe-dll.c (process_def_file): Check for forward exports.
1328 (generate_edata): Generate forward export symbols.
1329 (fill_edata): Emit them.
1331 * pe-dll.c (process_def_file): Don't crash on malformed
1332 fastcall symbol names in .def file.
1336 * po/vi.po: Updated Vietnamese translation.
1340 * pe-dll.c (pe_dll_generate_implib): Issue "Creating library
1341 file:" as informational message, not a warning.
1345 * emultempl/irix.em: Use lbasename instead of basename.
1349 * po/zh_CN.po: New Chinese (simplified) translation.
1350 * configure.in (ALL_LINGUAS): Add "zh_CH".
1351 * configure: Regenerate.
1355 * ld.texinfo (Options): Fix typo.
1357 For older changes see ChangeLog-2005
1359 Copyright (C) 2006 Free Software Foundation, Inc.
1361 Copying and distribution of this file, with or without modification,
1362 are permitted in any medium without royalty provided the copyright
1363 notice and this notice are preserved.
1369 version-control: never