3 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Call
8 * ldlang.c (lookup_name): When looking for a previously loaded
9 file compare the local_sym_name not the filename, as the
10 filename might have been transformed via the search directory
12 If the sought-for file has not been found in the input file
13 chain then create a new node with the search_dirs_flag set so
14 that the entire set of directory paths will be scanned for it.
18 * emultempl/pe.em, pe-dll.c: Replace "struct symbol_cache_entry"
19 with "struct bfd_symbol".
23 * Makefile.am (ALL_EMULATIONS): Add elf32mipswindiss.o.
24 (eelf32mipswindiss.c): New target.
25 * Makefile.in: Regenerated.
26 * emulparams/elf32mipswindiss.sh: New file.
27 * configure.tgt (i[3-7]86-*-vxworks*, arm-*-vxworks, sh-*-vxworks,
28 mips*-*-vxworks*): Use ELF now.
29 (mips*-*-windiss): New stanza, use elf32mipswindiss.
33 * scripttempl/elfm68hc12.sc: Define eeprom memory region.
37 * ChangeLog-9197: Fix typos.
39 * ld.texinfo: Likewise.
40 * ldlang.c: Fix comment typos.
44 * ldlang.c (lang_vers_match): Fix a typo.
48 * ldlang.c (lang_vers_match): Check demangled symbols.
52 * ldlang.c (lang_vers_match): Check "symbol" instead of
53 "wildcard" and "pattern". Fix a typo.
54 (lang_finalize_version_expr_head): Likewise.
55 (lang_register_vers_node): Likewise.
56 (realsymbol): New function.
57 (lang_new_vers_pattern): Set "symbol" and remove "wildcard".
59 * ldlex.l (V_IDENTIFIER): Allow '\\'.
63 * emultempl/m68hc1xelf.em (before_allocation): Add missing second
64 parameter to lang_memory_region_lookup.
68 * ldlang.c: Include hashtab.h.
69 (lang_vers_match_lang_c, lang_vers_match_lang_cplusplus,
70 lang_vers_match_lang_java): Remove.
71 (lang_vers_match): New function.
72 (lang_new_vers_pattern): Initialize wildcard and mask
73 fields, don't initialize match.
74 (lang_new_vers_node): Use xcalloc. Adjust for globals and
75 locals field type changes. Set match field.
76 (version_expr_head_hash, version_expr_head_eq): New functions.
77 (lang_finalize_version_expr_head): New function.
78 (lang_register_vers_node): Call lang_finalize_version_expr_head.
79 Search in hash table if not wildcard when looking for duplicates.
80 * emultempl/ppc64elf.em (new_vers_pattern): Don't bother with
81 duplicate checking. Initialize all fields of dot_entry from entry
82 with the exception of pattern and next.
86 * ldlang.c (lang_memory_region_lookup): Add second parameter -
87 create - which is true if the region is being created. Issue
88 appropriate warning messages for finding and not finding
89 already created regions.
90 (lang_memory_default): Use DEFAULT_MEMORY_REGION.
91 (lang_leave_overlay_section): Likewise.
92 (lang_size_sections_1): Likewise.
93 Pass second parameter to lang_memory_region_lookup.
94 (lang_get_regions): Likewise.
95 * ldlang.h (DEFAULT_MEMORY_REGION): Define.
96 Update prototype for lang_memory_region_lookup.
97 * ldgram.y: Pass second parameter to lang_memory_region_lookup.
98 Use DEFAULT_MEMORY_REGION instead of "*default".
102 * pe-dll.c: Replace "struct sec" with "struct bfd_section".
106 * Makefile.am: Remove old (before GCC 3.3) emulations for AVR
107 target: avr1200, avr23xx, avr4433, avr44x4, avr85xx, avrmega103,
108 avrmega161, avrmega603. Default to avr2.
109 * Makefile.in: Regenerate.
110 * configure.tgt: Likewise.
111 * emulparams/avr1200.sh: Remove.
112 * emulparams/avr23xx.sh: Remove.
113 * emulparams/avr4433.sh: Remove.
114 * emulparams/avr44x4.sh: Remove.
115 * emulparams/avr85xx.sh: Remove.
116 * emulparams/avrmega103.sh: Remove.
117 * emulparams/avrmega161.sh: Remove.
118 * emulparams/avrmega603.sh: Remove.
119 * scripttempl/elf32avr.sc: Remove.
123 * emultempl/ticoff.em (gld_${EMULATION_NAME}_list_options): Add
126 * deffilep.y: Remove commas from %token lines.
130 * emultempl/mmix-elfnmmo.em (mmix_before_allocation): Force linker
131 relaxation always; don't exclude relocatable linking. Adjust for
132 _bfd_mmix_prepare_linker_allocated_gregs renamed to
133 _bfd_mmix_before_linker_allocation.
134 (mmix_after_allocation): Adjust for
135 _bfd_mmix_finalize_linker_allocated_gregs renamed to
136 _bfd_mmix_after_linker_allocation.
137 * scripttempl/mmo.sc: Use ADDR (.text), not . - SIZEOF (.text).
139 * ldlang.c (lang_size_sections): Last, set _cooked_size for output
144 * Makefile.am (GENSCRIPTS_EXTRA, GEN_EXTRA_DEPENDS): Remove. Use
145 GENSCRIPTS and GEN_DEPENDS in place of these.
146 * Makefile.in: Regenerate.
147 * genscripts_extra.sh: Delete. Merge extra functionality to..
148 * genscripts.sh: ..here.
150 * emulparams/gld960.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Define.
151 * emulparams/gld960coff.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
152 * emulparams/lnk960.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
153 * emulparams/m88kbcs.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
154 * emulparams/vanilla.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
158 * emultempl/ia64elf.em (gld${EMULATION_NAME}_after_parse): Don't
159 use $EMULATION_NAME to call bfd function.
163 * pe-dll.c (pe_implied_import_dll): Also scan .rdata sections
164 to identify data symbols.
168 * emulparams/elf32bmipn32-defs.sh (INITIAL_READONLY_SECTIONS): Move
169 definition from elf64btsmip.sh.
170 (TEXT_DYNAMIC): Likewise elf32btsmipn32.sh.
171 * emulparams/elf32btsmipn32.sh (TEXT_DYNAMIC): Remove.
172 * emulparams/elf64btsmip.sh (INITIAL_READONLY_SECTIONS): Remove.
173 * emulparams/elf64bmip.sh (SHLIB_TEXT_START_ADDR): Define.
174 (EXECUTABLE_SYMBOLS): Set __elf_header correctly for shared objects.
175 Define __program_header_table in terms of __elf_header.
179 * Makefile.am (eelf64_ia64.c): Also depend on
180 $(srcdir)/emultempl/ia64elf.em.
181 * Makefile.in: Regenerated.
183 * emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Set to ia64elf.
185 * emultempl/ia64elf.em: New.
189 * emulparams/shelf32_nbsd.sh (OTHER_SECTIONS): Redefine.
193 * ld.texinfo (Builtin Functions) <DEFINED>: Say that only symbols
194 defined before the statement using DEFINED yield 1.
195 * ldexp.c (fold_name) <case DEFINED>: In lang_first_phase_enum,
196 call lang_track_definedness on symbol. In subsequent phases, use
197 lang_symbol_definition_iteration and lang_statement_iteration to
198 check whether the symbol was defined before the current statement.
199 (exp_fold_tree) <case etree_assign et al>: Call
200 lang_update_definedness before updating symbol type when setting
202 * ldlang.c (lang_definedness_table): New variable.
203 (lang_definedness_newfunc, lang_track_definedness)
204 (lang_symbol_definition_iteration, lang_update_definedness): New
206 (lang_init): Initialize lang_definedness_table and
207 lang_statement_iteration.
208 (lang_finish): Destroy bfd_hash_table_free.
209 (lang_size_sections): Increment lang_statement_iteration.
210 (lang_do_assignments_1): New function with former
211 lang_do_assignments contents. Change recursive calls to call this
213 (lang_do_assignments): Evacuate contents. Increment
214 lang_statement_iteration, then just call lang_do_assignments_1.
215 * ldlang.h (struct lang_definedness_hash_entry)
216 (lang_statement_iteration, lang_track_definedness)
217 (lang_symbol_definition_iteration, lang_update_definedness):
222 * scripttempl/elf.sc (__executable_start): Provide.
226 * emulparams/armelf.sh: Define NO_SMALL_DATA.
227 * emulparams/armelf_linux.sh, emulparams/armelf_oabi.sh,
228 emulparams/armnto.sh: Likewise.
232 * ldlang.c (lang_size_sections_1): Use IGNORE_SECTION to tell
233 whether to skip test for no memory region.
237 * lexsup.c (parse_args: OPTION_CALL_SHARED): Revise comment
238 describing defaults. Change default to report unresolved symbols
239 in object files as well.
243 * ldexp.c (fold_name) <case DEFINED>: Set section of result to
248 * emulparams/elf32xtensa.sh (OTHER_READONLY_SECTIONS,
249 OTHER_READWRITE_SECTIONS, OTHER_SECTIONS): Set section addresses to
250 zero for relocatable links.
254 * configure.host (HOSTING_LIBS): Define for hppa*-*-linux*.
258 * ldwrite.c (unsplittable_name): New.
259 (clone_section): Strip existing numeric suffix. Only truncate names
261 (split_sections): Use unsplittable_name.
265 * lexsup.c (parse_args): Report unresolved symbols in shared
266 libraries when creating a dynamic executable. This is a
267 restoration of the default behaviour for previous versions of
272 * emulparams/hppanbsd.sh: Remove OUTPUT_FORMAT.
273 * emulparams/hppaobsd.sh: Add OUTPUT_FORMAT="elf32-hppa".
277 * configure.tgt: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
281 * pe-dll.c (make_one): Correct sym def order & pick right sym for
286 * NEWS: Add an indication of the cutoff for 2.14.
290 * ldmain.c (get_emulation): Ignore "-mips64r2".
294 * configure.host: Match GNU/KFreeBSD with new kfreebsd*-gnu
296 * configure.tgt: Likewise.
300 * emulparams/elf32ip2k.sh (TEMPLATE_NAME): Define.
304 * po/tr.po: Updated Turkish translation.
308 * ldmain.c: Initialise the new fields in bfd_link_info to
310 * lexsup.c (enum option_values): New enum. Use this to
311 replace the handed coded values for the long switch options.
312 (ld_options): Add 'unresolved-symbols',
313 'warn-unresolved-symbols' and 'error-unresolved-symbols'.
314 (parse_args): Handle the new switches. Set the values of
315 unresolved_symbols_in_objects and
316 unresolved_symbols_in_shared_libs appropriately. If they were
317 not initialised by the command line, install default values.
318 * emultempl/elf32.em (handle_option): Update OPTION_GROUP and
319 -z defs to use the new fields in bfd_link_info.
320 * ld.texinfo: Document the new switches.
321 * NEWS: Mention this feature.
325 * Makefile.am (GENSCRIPTS_EXTRA): New script definition which
326 calls genscripts_extra.sh.
327 Rearrange all msp430 depends using this script.
328 * Makefile.in: Regenerate.
329 * genscripts_extra.sh: New file: Similar to genscripts.sh, except
330 that the script to be run to generate the emulations can be passed
331 as an optional parameter instead of being computed from the
333 * emulparams/msp430all.sh: New file: Combine all msp430 subdevice
334 definitions into one file.
335 * emulparams/msp430x*.sh: Removed.
339 * ld.texinfo (Options): Put keywords for the -z option into a
340 table. Add more text describing what the -z now option does.
344 * dep-in.sed: Remove libintl.h.
345 * Makefile.am (POTFILES.in): Unset LC_COLLATE.
346 * Makefile.in: Regenerate.
350 * genscripts.sh (libpath.exp): Only generate for first emulation.
351 (LIB_PATH): Correct order of paths. Don't add $tool_lib when
352 already present or when LIB_PATH is set to ":".
356 * ldmain.c (undefined_symbol): Change parameter name from `fatal'
357 to `error'. If only a warning, put warning in the reported
358 string. Consistently set failure flag when not a warning.
362 * Makefile.am: Add xW42 and xE42 parts. Sort MPU list according to
364 * Makefile.in: Regenerate.
365 * configure.tgt: Add extra emulations.
366 * emulparams/msp430xE423.sh: New file.
367 * emulparams/msp430xE427.sh: New file.
368 * emulparams/msp430xW425.sh: New file.
369 * emulparams/msp430xE425.sh: New file.
370 * emulparams/msp430xW423.sh: New file.
371 * emulparams/msp430xW427.sh: New file.
375 * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse):
376 Change second (cmdline) arg to lang_add_entry to FALSE.
377 (set_pe_subsystem): Change second arg to lang_add_entry to TRUE.
382 * configure.tgt: Recognize new target i860-*-coff.
383 * Makefile.am (ALL_EMULATIONS): Add ecoff_i860.o.
384 (ecoff_i860.c): New rule.
385 * emulparams/coff_i860.sh: New file.
386 * scripttempl/i860coff.sc: New file.
387 * Makefile.in: Regenerate.
391 * emultempl/elf32.em (before_allocation): Prepend "warning: "
392 to messages produced for .gnu.warning.SYMBOL sections.
396 * emultempl/elf32.em (output_rel_find): Add "isdyn" param. Put
397 .rel.dyn before other reloc sections. Don't stop looking for reloc
398 sections on finding one that isn't allocated. Match .rel even when
399 placing .rela and vice versa, when setting last_rel and
400 last_rel_alloc for the first time. If no reloc sections in script,
401 prefer allocated section over non-alloc.
402 (gld${EMULATION_NAME}_place_orphan): Handle orphan .rel.dyn.
406 * emulparams/shelf.sh (OTHER_SECTIONS): Don't include .stack
407 section for shared library.
408 * emulparams/shelf32.sh (OTHER_SECTIONS): Likewise.
409 * emulparams/shelf64.sh (OTHER_SECTIONS): Likewise.
413 * scripttempl/elfm68hc12.sc: Add gcc_except_table.
414 * scripttempl/elfm68hc11.sc: Likewise.
418 * emulparams/elf64ppc.sh (GOT): Fix for shell brace matching.
420 * emulparams/elf64ppc.sh (GOT): Don't merge .toc into .got for ld -r.
424 * ld.texinfo: Typo fixes. Document SUBALIGN.
425 * ldgram.y (opt_subalign): Add.
426 * ldlex.l (SUBALIGN): Recognize.
427 * ldlang.c (overlay_subalign): New var.
428 (lang_enter_overlay): Add subalign param.
429 (lang_enter_overlay_section): Pass overlay_subalign to
430 lang_enter_output_section_statement.
431 * ldlang.h (lang_enter_overlay): Update.
435 * po/fr.po: Updated French translation.
439 * scripttempl/elfm68hc11.sc: Keep ctor/dtor sections; Take into
440 account .tramp sections;
441 * scripttempl/elfm68hc12.sc: Likewise.
445 * ld/pe-dll.c: Add libcygwin to autofilter_liblist[]
449 * po/es.po: New Spanish translation.
453 * po/ld.pot: Regenerate.
457 * emulparams/elf32xtensa.sh (OTHER_READONLY_SECTIONS): Replace .xt.lit
458 with new .got.loc section.
459 (OTHER_READWRITE_SECTIONS): Do not combine linkonce sections for
460 non-relocating links.
461 (OTHER_SECTIONS): Add .xt.lit here. Change it to keep linkonce
462 sections separate for non-relocating links; likewise for .xt.insn.
467 * emulparams/elf32am33lin.sh: Adjust to match kernel parameters.
469 * configure.host (am33_2.0-*-linux*): Added.
470 * configure.tgt (am33_2.0-*-linux*): Likewise.
471 * emulparams/elf32am33lin.sh: New.
472 * Makefile.am (eelf32am33lin.c): New rule.
473 * Makefile.in: Rebuilt.
478 * emulparams/mn10300.sh (TEMPLATE_NAME): Define.
479 (GENERATE_SHLIB_SCRIPT): Likewise.
483 * emulparams/elf64ppc.sh (OTHER_GOT_SECTIONS): Don't define.
485 * emultempl/ppc64elf.em (stub_added): New static var.
486 (ppc_create_output_section_statements): Call ppc64_elf_init_stub_bfd.
487 (ppc_add_stub_section): Set stub_added.
488 (gld${EMULATION_NAME}_finish): Look for .got rather than .toc. Adjust
489 ppc64_elf_size_stubs call and test for stubs.
490 * scripttempl/elf.sc (GOT): Define and use.
494 * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_after_allocation):
495 Allow second call from ldemul_finish.
499 * emulparams/shelf32.sh (STACK_ADDR): Don't define.
500 (OTHER_SECTIONS): Include .stack.
501 * emulparams/shelf64.sh (OTHER_SECTIONS): Likewise.
505 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't include
507 (OTHER_READWRITE_SECTIONS): Include .opd if -pie.
508 * scripttempl/elf.sc: Use SHLIB_DATA_ADDR instead of DATA_ADDR
513 * ld.h: Convert to C90, remove unnecessary prototypes and casts.
514 Replace PTR with void *. Formatting.
515 * ldcref.c: Likewise.
516 * ldctor.c: Likewise.
517 * ldctor.h: Likewise.
518 * ldemul.h: Likewise.
521 * ldfile.c: Likewise.
522 * ldfile.h: Likewise.
523 * ldlang.c: Likewise.
524 * ldlang.h: Likewise.
527 * ldmain.c: Likewise.
528 * ldmain.h: Likewise.
529 * ldmisc.c: Likewise.
530 * ldmisc.h: Likewise.
532 * ldwrite.c: Likewise.
533 * ldwrite.h: Likewise.
534 * lexsup.c: Likewise.
537 * pe-dll.c: Likewise.
538 * pe-dll.h: Likewise.
539 * deffilep.y: Likewise.
540 * deffile.h: Likewise. Don't include ansidecl.h.
541 * emulparams/elf32mcore.sh: Remove unnecessary cast.
542 * emultempl/m68kcoff.em: Likewise.
543 * emultempl/m68kelf.em: Likewise.
544 * emultempl/ticoff.em: Remove lang_add_output_format declaration.
545 * sysdep.h: Don't include ansidecl.h.
546 * Makefile.am: Run "make dep-am".
547 * Makefile.in: Regenerate.
551 * deffilep.y (def_file_add_directive): Cope with NUL seperated
552 directives. Fix reporting of unparseable directives.
553 (def_error): Check for a NULL def_filename.
557 * emultempl/aix.em: Convert to C90, remove unnecessary prototypes
558 and casts. Replace PTR with void *. Formatting.
559 * emultempl/alphaelf.em: Likewise.
560 * emultempl/armcoff.em: Likewise.
561 * emultempl/armelf.em: Likewise.
562 * emultempl/armelf_oabi.em: Likewise.
563 * emultempl/beos.em: Likewise.
564 * emultempl/elf32.em: Likewise.
565 * emultempl/generic.em: Likewise.
566 * emultempl/gld960.em: Likewise.
567 * emultempl/gld960c.em: Likewise.
568 * emultempl/hppaelf.em: Likewise.
569 * emultempl/linux.em: Likewise.
570 * emultempl/lnk960.em: Likewise.
571 * emultempl/m68hc1xelf.em: Likewise.
572 * emultempl/m68kcoff.em: Likewise.
573 * emultempl/m68kelf.em: Likewise.
574 * emultempl/mipsecoff.em: Likewise.
575 * emultempl/mipself.em: Likewise.
576 * emultempl/mmix-elfnmmo.em: Likewise.
577 * emultempl/mmixelf.em: Likewise.
578 * emultempl/mmo.em: Likewise.
579 * emultempl/needrelax.em: Likewise.
580 * emultempl/netbsd.em: Likewise.
581 * emultempl/pe.em: Likewise.
582 * emultempl/sh64elf.em: Likewise.
583 * emultempl/sunos.em: Likewise.
584 * emultempl/ticoff.em: Likewise.
585 * emultempl/vanilla.em: Likewise.
586 * emultempl/xtensaelf.em: Likewise.
587 * Makefile.am: Correct dependencies.
588 * Makefile.in: Regenerate.
592 * ld.texinfo: Correct spelling of "relocatable".
593 * ldctor.c: Likewise.
595 * ldfile.c: Likewise.
596 * ldint.texinfo: Likewise.
597 * ldlang.c: Likewise.
598 * ldmain.c: Likewise.
599 * ldwrite.c: Likewise.
600 * lexsup.c: Likewise.
601 * emultempl/aix.em: Likewise.
602 * emultempl/alphaelf.em: Likewise.
603 * emultempl/armcoff.em: Likewise.
604 * emultempl/armelf_oabi.em: Likewise.
605 * emultempl/beos.em: Likewise.
606 * emultempl/elf32.em: Likewise.
607 * emultempl/generic.em: Likewise.
608 * emultempl/gld960.em: Likewise.
609 * emultempl/gld960c.em: Likewise.
610 * emultempl/hppaelf.em: Likewise.
611 * emultempl/linux.em: Likewise.
612 * emultempl/lnk960.em: Likewise.
613 * emultempl/m68hc1xelf.em: Likewise.
614 * emultempl/m68kcoff.em: Likewise.
615 * emultempl/m68kelf.em: Likewise.
616 * emultempl/mipsecoff.em: Likewise.
617 * emultempl/mipself.em: Likewise.
618 * emultempl/mmix-elfnmmo.em: Likewise.
619 * emultempl/mmo.em: Likewise.
620 * emultempl/needrelax.em: Likewise.
621 * emultempl/pe.em: Likewise.
622 * emultempl/ppc64elf.em: Likewise.
623 * emultempl/sh64elf.em: Likewise.
624 * emultempl/sunos.em: Likewise.
625 * emultempl/ticoff.em: Likewise.
626 * emultempl/xtensaelf.em: Likewise.
630 * emultempl/ppc32elf.em: Convert to C90.
634 * emultempl/ppc64elf.em: Convert to C90 function definitions, remove
635 unnecessary prototypes and casts.
639 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Dump out
640 statistics from ppc64_elf_build_stubs.
644 * emultempl/ppc64elf.em (build_section_lists): Check return status
645 from ppc64_elf_next_input_section.
649 * ldlang.c (section_already_linked): Put back assignment of
654 * pe-dll.c (generate_reloc): Catch and ignore an ARM_26D
659 * configure.host (*-*-freebsd*): Add known path for ld-elf.so.1
660 if not produced by gcc.
664 * configure.tgt: Add specific case for cris-*-linux-gnu*
665 with crislinux emulation only.
669 * configure.tgt: Add i386-netbsd-gnu target.
673 * configure.tgt (mips*-sgi-irix6*): Add the o32 and n64 emulations
674 to $targ_extra_libpath.
678 * po/Make-in (DESTDIR): New.
679 (install-data-yes): Support $(DESTDIR).
680 (uninstall): Likewise.
684 * Makefile.am (ALL_EMULATIONS): Add em32relf.o.
685 * Makefile.in: Regenerate.
689 * configure.tgt (h8300*): Add h8300sxn emulations.
690 * Makefile.am (ALL_EMULATIONS): Add eh8300sxn.o and eh8300sxnelf.o.
691 (eh8300sxn.c, eh8300sxnelf.c): New rules.
692 * Makefile.in: Regenerate.
693 * emulparams/h8300sxnelf.sh, emulparams/h8300sxn.sh: New files.
694 * scripttempl/h8300sxn.sc: New file.
698 * emulparams/elf64ppc.sh (EXECUTABLE_SYMBOLS, OTHER_BSS_END_SYMBOLS,
699 CTOR_START, CTOR_END, DTOR_START, DTOR_END): Don't define.
703 * emultempl/ppc64elf.em (emit_stub_syms, toc_section): New vars.
704 (build_toc_list): New function.
705 (gld${EMULATION_NAME}_finish): Call build_toc_list and
706 ppc64_elf_reinit_toc. Adjust ppc64_elf_build_stubs call.
707 (OPTION_STUBSYMS): Define.
708 (PARSE_AND_LIST_LONGOPTS): Add emit-stub-syms.
709 (PARSE_AND_LIST_OPTIONS): Document.
710 (PARSE_AND_LIST_ARGS_CASES): Handle.
714 * emultempl/elf32.em (gld${EMULATION_NAME}_list_options): Remove
715 extra \t in -z noexecstack line.
719 * ldgram.y (phdr_type): Grok PT_GNU_STACK.
720 * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add
721 -z execstack and -z noexecstack.
722 (gld${EMULATION_NAME}_list_options): Likewise.
723 * scripttempl/elf.sc: If not -r, discard .note.GNU-stack section.
729 * Makefile.am: Add new emulations for h8300sx.
730 * Makefile.in: Regenerate.
731 * configure.tgt: Add new emulations.
732 * emulparams/h8300sx.sh: New emulation.
733 * emulparams/h8300sxelf.sh: Ditto.
734 * scripttempl/h8300sx.sc: Ditto.
738 * ldmisc.c: Include "bfdlink.h".
739 (error_handler): Handle LD_DEFINITION_IN_DISCARDED_SECTION
740 and -LD_DEFINITION_IN_DISCARDED_SECTION.
742 * Makefile.am: Rebuild dependency.
743 * Makefile.in: Regenerated.
747 * emulparams/shlelf_linux.sh (GENERATE_PIE_SCRIPT): Set to yes.
748 * emulparams/shlelf32_linux.sh (GENERATE_PIE_SCRIPT): Likewize.
752 * pe-dll.c (fill_edata): Scan table pe_dll->exports, which is
753 sorted alphabetically, instead of exported_symbols, which is
759 * lexsup.c (OPTION_PIE): Define.
760 (ld_options): Add -pie and --pic-executable options.
761 (parse_args): Handle OPTION_PIE.
762 * ldmain.c (main): Initialize link_info.pie and
763 link_info.executable.
764 * genscripts.sh: Generate PIE scripts.
765 * ld.texinfo: Document -pie and --pic-executable options.
766 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open):
767 (gld${EMULATION_NAME}_place_orphan): Likewise.
768 (gld${EMULATION_NAME}_get_script): Include PIE scripts.
769 * scripttempl/elf.sc: In PIE scripts set . the same way as in
771 * emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Set to yes.
772 * emulparams/elf64_ia64.sh (GENERATE_PIE_SCRIPT): Likewise.
773 * emulparams/elf32ppc.sh (GENERATE_PIE_SCRIPT): Likewise.
774 * emulparams/elf64ppc.sh (GENERATE_PIE_SCRIPT): Likewise.
775 * emulparams/elf_x86_64.sh (GENERATE_PIE_SCRIPT): Likewise.
776 * emulparams/elf_s390.sh (GENERATE_PIE_SCRIPT): Likewise.
777 * emulparams/elf32_sparc.sh (GENERATE_PIE_SCRIPT): Likewise.
778 * emulparams/elf64_sparc.sh (GENERATE_PIE_SCRIPT): Likewise.
779 * emulparams/elf64alpha.sh (GENERATE_PIE_SCRIPT): Likewise.
780 * emulparams/elf64_s390.sh (GENERATE_PIE_SCRIPT): Likewise.
781 * emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Likewise.
785 * genscripts.sh: Create tmpdir/libpath.exp.
789 * emultempl/armelf.em (arm_elf_before_allocation): Replace ASSERT
790 with a test for a NULL bfd_for_interworking.
794 * configure.host (*-*-netbsd*): Set HOSTING_CRT0 and HOSTING_LIBS
795 correctly for more recent versions of NetBSD.
796 (alpha*-*-netbsd*): Remove.
797 (i[3-7]86-*-netbsd*): Remove.
801 * emultempl/pe.em: Include "safe-ctype.h" instead of <ctype.h>.
805 * emulparams/elf64btsmip.sh: Set TEXT_START_ADDR to 0x120000000 to
806 trap on pointer crops.
810 * configure.tgt: Check for a target triplet of shl-...-netbsdelf
811 as well as shle-...-netbsdelf.
815 * configure.host: Accept i[3-7]86 variants.
816 * configure.tgt: Likewise.
820 * emulparams/elf64_ia64.sh: Don't set COMMONPAGESIZE for now.
824 * Makefile.am (ALL_EMULATIONS): Add earmelfb.o and earmelfb_linux.o.
825 (earmelfb.c, earmelfb_linux.c): New rules.
826 * Makefile.in: Regenerated.
827 * emulparams/armelfb.sh, emulparams/armelfb_linux.sh: New files.
828 * configure.tgt: Add armeb-elf and arm*b-*-linux-gnu.
832 * ldlang.c (lang_size_sections_1): Default to generating a
833 fatal error message if a loadable section is not allocated
834 to a memory region when regions are defined.
838 * Makefile.am (em68hc11elf.c): Correct dependencies.
839 (em68hc11elfb.c, em68hc12elf.c, em68hc12elfb.c): Likewise.
840 * Makefile.in: Regenerate.
841 * emultempl/elf32.em (find_exp_assignment): Adjust for changed
842 bfd_elf_record_link_assignment name.
846 * ldmain.h (overflow_cutoff_limit): Declare.
847 * ldmain.c (overflow_cutoff_limit): Define, initialized to 10.
848 (reloc_overflow): Limit error messages based on it.
849 * lexsup.c (parse_args) <OPTION_VERBOSE>: Set cutoff to
854 * ldlex.l: Accept C style comments in version scripts.
858 * ldlang.c (lang_process): Add the relax finalize pass.
860 * ldmain.c (main): Initialize link_info.relax_finalizing to
865 * ldgram.y (phdr_type): Grok PT_TLS and PT_GNU_EH_FRAME names.
866 If a name string is unknown, give an error rather than crashing later.
870 * Makefile.am (ALL_EMULATIONS): Add eh8300hn.o, eh8300sn.o,
871 eh8300hnelf.o, eh8300snelf.o and respective rules.
872 * Makefile.in: Regenerate.
873 * configure.tgt: Add h8300hn, h8300sn, h8300hnelf, h8300snelf
874 * emulparams/h8300hn.sh: New
875 * emulparams/h8300sn.sh: New
876 * emulparams/h8300hnelf.sh: New
877 * emulparams/h8300snelf.sh: New
878 * scripttempl/h8300hn.sc: new
879 * scripttempl/h8300sn.sc: new
883 * ldmain.c (link_callbacks): Initialize error_handler.
885 * ldmisc.c (error_handler): New function.
887 * ldmisc.h (error_handler): New prototype.
891 * emulparams/m68hc11elf.sh: Use m68hc1xelf.em extra.
892 * emulparams/m68hc11elfb.sh: Likewise.
893 * emulparams/m68hc12elf.sh: Likewise.
894 * emulparams/m68hc12elfb.sh: Likewise.
898 * emultempl/m68hc1xelf.em: New file to generate far trampolines on
900 (LDEMUL_BEFORE_ALLOCATION): Override to gather the trampolines to
902 (LDEMUL_FINISH): Override to generate the trampolines after gc and
904 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Override to create the
905 stub file for trampolines.
906 (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_LONGOPTS): New options
907 --no-trampoline and --bank-window to control the memory bank window.
911 * ldfile.c (ldfile_add_library_path): Remove the unused
916 * scripttempl/xstormy16.sc (__data, __rdata): New.
920 * scripttempl/xstormy16.sc: Add .jcr section mapping.
926 * ldlex.l: Use YY_CURRENT_BUFFER instead of yy_current_buffer.
930 * h8-doc.texi: Replace occurrances of 'Hitachi' with 'Renesas'.
931 * ld.texinfo: Likewise.
936 * scripttempl/elf.sc (CTOR): Handle crtbeginS.o, crtendS.o and
937 other variants of crtbegin.o, crtend.o.
939 * scripttempl/crisaout.sc (ctors, dtors): Likewise.
940 * scripttempl/elf_chaos.sc (CTOR, DTOR): Likewise.
941 * scripttempl/elfd10v.sc (CTOR, DTOR): Likewise.
942 * scripttempl/elfd30v.sc (CTOR, DTOR): Likewise.
943 * scripttempl/elfxtensa.sc (CTOR, DTOR): Likewise.
944 * scripttempl/iq2000.sc (CTOR, DTOR): Likewise.
945 * scripttempl/mmo.sc (ctors, dtors): Likewise.
946 * scripttempl/xstormy16.sc (CTOR, DTOR): Likewise.
950 * scripttempl/elf32msp430.sc: Add initX, finiX, ctors, dtors
951 sections to respect C++ constructor/destructor. Add ctors/dtors
952 start/stop definitions.
953 * scripttempl/elf32msp430_3.sc: Likewise.
957 * ld.texinfo (Options): Add a reminder of the target specific
958 nature to the description of the i386 PE specific options, for
959 readers who have not read all the way through the manual.
963 * configure.tgt: Fixed bug in list of targ_extra_emuls.
964 * emulparams/tic3xcoff.sh (SCRIPT_NAME): Namespace
965 cleanup. Replace s/c4x/tic4x and s/c3x/tic3x/
966 * emulparams/tic3xcoff_onchip.sh: Ditto
967 * emulparams/tic4xcoff.sh: Ditto
968 * scripttempl/tic4xcoff.sc: Ditto
972 * NEWS: Mention support for Xtensa architecture.
976 * pe-dll.c (pe_detail_list): arm-pe targets use underscores.
980 * emultempl/pe.em (gld_${EMULATION_NAME}_after_open):
981 Don't call pe_dll_build_section() if link_info.relocateable.
982 (gld_${EMULATION_NAME}_finish): Don't call pe_dll_fill_sections()
983 if link_info.relocateable.
987 * pe-dll.c (process_def_file): Don't create an export
988 section if there are no exports and we're building an exe
989 (pe_dll_build_sections): Ditto
990 (pe_dll_fill_sections): Conditionalize setting
991 abfd->dll true on info->shared
992 * emultempl/pe.em (gld_${EMULATION_NAME}_after_open):
993 If i386pe or armpe, call pe_dll_build_section()
994 for both exe's and dll's, not just dll's.
995 (gld_${EMULATION_NAME}_finish): For all targets except
996 shpe and mipspe, call pe_dll_fill_sections() for both
997 exe's and dll's, not just dll's.
1001 * emulparams/xtensa-config.sh: Remove comment indicating that this is
1006 * Makefile.am (ALL_EMULATIONS): Add eelf32xtensa.o.
1007 (eelf32xtensa.c): New target.
1008 * Makefile.in: Regenerate.
1009 * configure.tgt: Handle xtensa-*-*.
1010 * gen-doc.texi: Set XTENSA variable.
1011 * ld.texinfo: Set XTENSA variable. Add new Xtensa node.
1012 * emulparams/elf32xtensa.sh: New file.
1013 * emulparams/xtensa-config.sh: Likewise.
1014 * emultempl/xtensaelf.em: Likewise.
1015 * scripttempl/elfxtensa.sc: Likewise.
1019 * configure.tgt (powerpc*-*-linux*): Add elf32ppc to ppc64
1020 targ_extra_libpath. Add elf64ppc to ppc targ_extra_libpath
1021 if --enable-64-bit-bfd.
1025 * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Change name of
1027 * emulparams/armelf_linux.sh (OTHER_READONLY_SECTIONS): Change
1028 name of note section.
1032 * ld.texinfo (-Tbss, -Tdata, -Ttext): Document in terms of
1037 * ldfile.c (ldfile_add_library_path): Always allocate space for
1039 * ldlang.c (lang_register_vers_node): Free the node if it cannot
1041 * ldmain.c (set_scripts_dir): Always free the constructed
1043 (add_keepsyms_file): Fix memory leak.
1044 * ldmisc.c (vfinfo): Likewise.
1045 * lexsup.c (parse_args): Likewise.
1050 Contribute support for Intel's iWMMXt chip - an ARM variant:
1052 * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Define.
1053 * emulparams/armelf_linux.sh (OTHER_READONLY_SECTIONS): Define.
1054 * scripttempl/armcoff.sc (.data): Ensure 8 byte alignment.
1059 * ldmain.h (ld_canon_sysroot, ld_canon_sysroot_len): Declare.
1060 * ldmain.c (ld_canon_sysroot, ld_canon_sysroot_len): Define.
1061 (main): Initialize them.
1062 * ldfile.c: Include pathnames.h.
1063 (is_sysrooted_pathname): New.
1064 (ldfile_add_library_path): Use it.
1065 (ldfile_open_file_search): Likewise. Use IS_ABSOLUTE_PATH. Don't
1066 search_dirs if given an absolute pathname.
1067 (ldfile_open_file): Issue error message for sysrooted
1069 * Makefile.am: Updated dependencies.
1070 * Makefile.in: Rebuild.
1074 * ld.texinfo: Rename all occurances of C54X to TIC54X.
1078 * ldfile.c (ldfile_try_open_bfd): Pop lexer start condition after
1083 * deffilep.y (opt_base): If no number given, set to default
1088 * deffilep.y (def_import): Use default extension of "dll"
1089 if no extension provided in parsed IMPORT definition.
1091 * deffilep.y (def_lex): Revert 2003-03-12 change.
1092 (dot_name): New id type and rule.
1093 (expline): Use instead of ID.
1094 (opt_equal_name): Likewise.
1098 * deffilep.y (def_lex): Accept '.' as valid non-lead char.
1102 * configure.tgt: Add NATIVE_LIB_DIRS for cygwin target back after
1103 apparent accidental removal on 2003-01-06.
1107 * Makefile.am: Add new devices x1122 x1132 emulation
1108 * configure.tgt: Likewise.
1109 * Makefile.in: Regenerate.
1110 * emulparams/msp430x1122.sh: New file.
1111 * emulparams/msp430x1132.sh: New file.
1115 * ldmain.c (set_scripts_dir): Look for relative to TOOLBINDIR as
1118 * ldfile.h (struct search_dirs): Added sysrooted field.
1119 * ldlang.h (struct lang_input_statement_struct): Likewise.
1120 * ldfile.c (ldfile_add_library_path): Mark sysrooted paths.
1121 (ldfile_open_file_search): Look for sysrooted filename starting
1122 with / in ld_sysroot instead of in the current directory. Clear
1123 sysrooted flag if it's found in the current directory. Set it
1124 from the search directory's sysrooted flag where it is found
1126 * ldlang.c (ldlang_sysrooted_script): New static variable.
1127 (new_afile): Mark search_file_enums as sysrooted if
1128 ldlang_sysrooted_script.
1129 (load_symbols): Set ldlang_sysrooted_script according to the
1130 script's sysrooted field while processing it.
1131 * ld.texinfo: Document INPUT behavior in sysroot.
1135 * scripttempl/pe.sc: Use PROVIDE with etext, end, _end,
1139 * emulparams/elf64alpha.sh (EXTRA_EM_FILE): Define.
1140 (PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_LONGOPTS,
1141 PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES,
1142 PARSE_AND_LIST_EPILOGUE): Don't define.
1143 * emultempl/alphaelf.em: New file.
1147 * ldemul.c: Include getopt.h.
1148 * emultempl/elf32.em: Include getopt.h earlier.
1149 * emultempl/ticoff.em: Likewise.
1153 * emultempl/elf32.em (gld${EMULATION_NAME}_get_script): Add combreloc
1154 support when scripts read from files.
1158 * ldemul.c (ldemul_parse_args): Return FALSE by default.
1159 * ldemul.h (struct ld_emulation_xfer_struct): Update parse_args
1162 * ldemul.c (ldemul_add_options, ldemul_handle_option): New functions.
1163 (ldemul_parse_args): Return bfd_boolean. Formatting.
1164 * ldemul.h (ldemul_add_options, ldemul_handle_option): Declare.
1165 (ldemul_parse_args): Adjust.
1166 (struct ld_emulation_xfer_struct): Add add_options and handle_option.
1167 Return bfd_boolean from parse_args.
1168 * lexsup.c (parse_args): Malloc shortopts, longopts and
1169 really_longopts. Call ldemul_add_options and ldemul_handle_option.
1170 * emultempl/aix.em (gld${EMULATION_NAME}_add_options): Split out from
1171 gld${EMULATION_NAME}_parse_args.
1172 (gld${EMULATION_NAME}_handle_option): Likewise.
1173 (ld_${EMULATION_NAME}_emulation): Adjust initializer.
1174 * emultempl/armcoff.em: As for aix.em, but remove parse_args.
1175 * emultempl/beos.em: Likewise.
1176 * emultempl/pe.em: Likewise.
1177 * emultempl/ticoff.em: Likewise.
1178 * emultempl/elf32.em: Likewise. Don't duplicate long options either.
1179 (gld${EMULATION_NAME}_add_sysroot): Prototype.
1180 * emultempl/armelf.em (PARSE_AND_LIST_LONGOPTS): Don't duplicate
1182 * emultempl/hppaelf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
1183 * emultempl/ppc32elf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
1184 * emultempl/ppc64elf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
1185 * emultempl/armelf_oabi.em (ld_${EMULATION_NAME}_emulation): Adjust
1187 * emultempl/generic.em: Likewise.
1188 * emultempl/gld960.em: Likewise.
1189 * emultempl/gld960c.em: Likewise.
1190 * emultempl/linux.em: Likewise.
1191 * emultempl/lnk960.em: Likewise.
1192 * emultempl/m68kcoff.em: Likewise.
1193 * emultempl/mipsecoff.em: Likewise.
1194 * emultempl/sunos.em: Likewise.
1195 * emultempl/vanilla.em: Likewise.
1196 * emultempl/netbsd.em (gldnetbsd_before_parse): Prototype.
1200 * emultempl/elf32.em (gld${EMULATION_NAME}_add_sysroot): Fix
1201 memory allocation error.
1203 * Makefile.am (ldmain.o): Define TOOLBINDIR.
1204 * Makefile.in: Rebuilt.
1205 * ldmain.c (ld_sysroot): Try to set from TOOLBINDIR too.
1209 * ldlang.c (lang_size_sections_1): Add CHECK_REGIONS argument and only
1210 call os_region_check when it is set.
1211 (lang_size_sections): Add CHECK_REGIONS argument and pass it through to
1212 lang_size_sections_1.
1213 (lang_process): Change lang_size_sections calls to set CHECK_REGIONS
1214 only for the last call, not on every relaxation iteration.
1215 * ldlang.h (lang_size_sections): Update prototype.
1216 * pe-dll.c (pe_dll_fill_sections): Set CHECK_REGIONS argument in calls
1217 to lang_size_sections.
1218 (pe_exe_fill_sections): Likewise.
1219 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Likewise.
1220 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
1221 * emultempl/ppc64elf.em (ppc_before_allocation): Likewise.
1222 (ppc_layout_sections_again): Likewise.
1226 * gen-doc.texi: Set ARM and HPPA variables.
1227 * ld.texinfo: Fix typos and obvious texinfo mistakes. Make section
1228 title capitalization more consistent. Add missing menu entries for
1229 machine-specific sections and conditionalize them consistently.
1230 Conditionalize text that is irrelevant when SingleFormat is set.
1231 Add @group divisions to improve page breaks in long examples.
1232 Use @iftex/@ifnottex instead of @iftex/@ifinfo so that HTML output
1233 is correct. Remove "FIXME" comment about not using
1234 @raisesections/@lowersections. Use @raisesections/@lowersections
1235 consistently for machine-specific sections. Change to be more polite
1236 about poor bug reports. Replace FDL appendix with include of fdl.texi.
1237 Move WIN32 node to match its order in the menus.
1238 * fdl.texi: New file.
1242 * configure.in (TARGET_SYSTEM_ROOT): Set default to
1243 ${exec_prefix}/${target_alias}/sys-root. Match explicit
1244 '${exec_prefix}' (in addition to the expansion thereof) as
1246 * configure: Rebuilt.
1250 * ldgram.y (vers_defns): Also recurse with 'EXTERN NAME' patterns.
1254 * ldgram.y (vers_defns): Allow optional trailing semicolon in
1259 * emultempl/ppc32elf.em: New file.
1260 * emulparams/elf32ppc.sh (EXTRA_EM_FILE): Define.
1261 * Makefile.am (eelf32lppc.c): Depend on emultempl/ppc32elf.em.
1262 (eelf32lppcnto.c): Likewise.
1263 (eelf32lppcsim.c): Likewise.
1264 (eelf32ppcnto.c): Likewise.
1265 (eelf32ppc.c): Likewise.
1266 (eelf32ppc_fbsd.c): Likewise.
1267 (eelf32ppcsim.c): Likewise.
1268 (eelf32ppclinux.c): Likewise.
1269 * Makefile.in: Regenerate.
1273 * ld.texinfo: Remove spaces between @samp and opening brace.
1277 * emultempl/ppc64elf.em (ppc_create_output_section_statements): Check
1279 (ppc_before_allocation): Don't do optimizations if wrong hash table.
1280 (gld${EMULATION_NAME}_finish): Ditto.
1284 * ldmain.c (main) Default allow_shlib_undefined to true.
1285 * lexsup.c (ld_options): Add --no-allow-shlib-undefined.
1286 (parse_args): Parse the new switch.
1287 * ld.texinfo: Document new switch and default behaviour of
1288 allowing undefined symbols in shared libraries.
1292 * scripttempl/elf32msp430.sc: Add new data anchors definitions.
1293 * scripttempl/elf32msp430_3.sc: Likewise.
1297 * configure.tgt: Add support for kaOS as cross build target
1302 * hppaelf.em (group_size): Change default back to 1.
1306 * emultempl/ppc64elf.em: Add "no-tls-optimize" option and support code.
1310 * hppaelf.em (group_size): Change default to -1.
1314 * emultempl/armelf.em (PARSE_AND_LIST_SHORTOPTS): Remove 'n' short
1316 (PARSE_AND_LIST_LONGOPTS): Add duplicate entry for
1317 no-pipeline-knowledge. This will prevent the getopt package from
1318 thinking that there are any shorter abbreviations for
1319 --no-pipeline-knowledge.
1323 * genscripts.sh (LIB_PATH): Don't append LIBPATH_SUFFIX to paths
1324 which already have it. Avoid duplicates.
1328 * emulparams/elf64_s390.sh (LIBPATH_SUFFIX): Set to 64.
1329 * emulparams/elf_x86_64.sh (LIBPATH_SUFFIX): Likewise.
1330 * emulparams/elf64_sparc.sh (LIBPATH_SUFFIX): Set instead of suffix.
1334 * emultempl/ppc64elf.em (ppc_before_allocation): Size sections then
1335 call ppc64_elf_tls_optimize.
1339 * emultempl/elf32.em: Move gld${EMULATION_NAME}_add_sysroot
1340 outside of GNU/Linux conditional.
1344 * deffilep.y (def_get_module): New function: locate an already
1346 * deffile.h (def_get_module): New prototype.
1347 * pe-dll.c (pe_implied_import_dll): Add code to prevent importing
1348 a dll multiple times.
1352 * emultempl/sh64elf.em: Include elf32-sh64.h.
1353 (sh64_elf_${EMULATION_NAME}_before_allocation): Adjust for changed
1354 sh64_elf_section_data.
1355 (sh64_elf_${EMULATION_NAME}_after_allocation): Likewise.
1359 * ld.texinfo: Remove an extra "i" in --dll-search-prefix.
1360 * emultempl/pe.em (gld_${EMULATION_NAME}_list_options): Move a
1361 cross-80th-column-margin "an" to the next line.
1365 * emulparams/tic3xcoff-onchip.sh: Rename to ...z
1366 * emulparams/tic3xcoff_onchip.sh: ...this.
1367 * Makefile.am (etic3xcoff_onchip.c): Fix name of generated C file.
1368 * Makefile.in: Regenerate.
1372 * configure.tgt: Handle i[3456]86-*-aros*
1376 * Makefile.am: Added etic3xcoff.o and etic4xcoff_onchip.o
1377 * Makefile.in: Regenerate
1378 * configure.tgt: Added extra target emulations
1379 * emulparams/tic3xcoff.sh: Remove old settings
1380 * emulparams/tic4xcoff.sh: Ditto
1381 * emulparams/tic3xcoff-onchip.sh: Added new
1382 * scripttempl/tic4xcoff.sc: Revise and combine both c3x and c4x
1383 * scripttempl/tic3xcoff.sc: Remove
1387 * emultempl/elf32.em (gld${EMULATION_NAME}_add_sysroot): Do not
1392 * Makefile.in: Regenerate.
1396 * ld.texinfo (node WIN32): Some clarifications
1397 and formatting fixups.
1401 * ldmain.c (get_emulation): Sort -mipsNN checks in the usual
1402 order, and handle (ignore) -mips32r2.
1406 * ldmain.c (main): Make sure ld_sysroot is initialized.
1410 * Makefile.am (eelf32iq10.c): Fix tab/whitespace mixup.
1412 * Makefile.am (ldmain.o): Add @TARGET_SYSTEM_ROOT_DEFINE@.
1413 (GENSCRIPTS): Add @use_sysroot@.
1414 * Makefile.in: Regenerated.
1415 * configure.host: Move setting of NATIVE_LIB_DIRS to...
1416 * configure.tgt: ... here. Use ${target} instead of ${host}
1417 for NATIVE_LIB_DIRS.
1418 * configure.in: Add --with-sysroot.
1419 * configure: Regenerated.
1420 * genscripts.sh: Accept use_sysroot option. Set new variables
1421 NATIVE and USE_LIBPATH. Prepend "=" to directory names if
1422 $use_sysroot. Don't search $tool_lib if $use_sysroot.
1423 * ldfile.c (ldfile_add_library_path): Handle leading '='.
1424 * ldmain.c (TARGET_SYSTEM_ROOT): Define if not defined.
1425 (ld_sysroot): New variable.
1426 (main): Initialize ld_sysroot.
1427 * ldmain.h (ld_sysroot): New extern.
1428 * emultempl/elf32.em: Use NATIVE and USE_LIBPATH instead of
1429 searching $EMULATION_LIBPATH.
1430 (gld${EMULATION_NAME}_add_sysroot): New function.
1431 (gld${EMULATION_NAME}_check_ld_so_conf): Use it. Honor ld_sysroot.
1432 (gld${EMULATION_NAME}_after_open): Likewise. Only search
1433 environment variables if $NATIVE.
1434 * ld.texinfo (Options): Mention "=" prefix in the description of -L.
1435 * NEWS: Mention --with-sysroot.
1437 * emulparams/elf32bmipn32-defs.sh: Set NATIVE and LIBPATH_SUFFIX
1438 instead of setting LIB_PATH.
1439 * emulparams/elf32ppc.sh: Likewise.
1440 * emulparams/elf64_s390.sh: Likewise.
1441 * emulparams/elf64_sparc.sh: Likewise.
1442 * emulparams/elf64ppc.sh: Likewise.
1443 * emulparams/elf_x86_64.sh: Likewise.
1445 * emulparams/elf64_aix.sh: Add "=" prefixes to LIB_PATH.
1446 * emulparams/elf64hppa.sh: Add "=" prefixes to LIB_PATH.
1450 * pe-dll.c (autofilter_symbollist): Add cygwin_crt0.
1454 * Makefile.am (ldmain.o): Pass BINDIR.
1455 * Makefile.in: Regenerated.
1456 * ldmain.c (set_scripts_dir): Use make_relative_prefix for the first
1461 * Makefile.am (ALL_EMULATIONS): Add eelf32iq2000.o.
1462 (eelf32iq2000.c): New target.
1463 * Makefile.in: Regenerate.
1464 * configure.tgt: Handle iq2000-*-elf.
1465 * emulparams/elf32iq10.sh: New file.
1466 * emulparams/elf32iq2000.sh: New file.
1467 * scripttempl/iq2000.sc: New file.
1471 * pe-dll.c (autofilter_symbollist): Add do_pseudo_reloc
1472 and _pei386_runtime_relocator to the exclude list.
1476 * ldfile.c: Fix comment typos.
1477 * ldlang.c: Likewise.
1479 * pe-dll.c: Likewise.
1484 * Makefile.am (ld.1): Depend on configdoc.texi
1486 * Makefile.in: Regenerated.
1490 * Makefile.am: Add msp430 target.
1491 * configure.tgt: Likewise.
1492 * Makefile.in: Regenerate.
1493 * emulparams/msp430x???.sh: New files. Linker script parameters
1494 for various msp430 configurations.
1495 * gen-doc.texi: Enable msp430 documenation.
1496 * ld.texinfo: Document msp430 sections.
1497 * scripttempl/elf32msp430.sc: New file. Linker script for msp430.
1498 * scripttempl/elf32msp430_3.sc: New file. Linker script for msp430.
1503 * config.in (HAVE_REALPATH): New entry.
1504 (HAVE_SYS_STAT_H, HAVE_SYS_TYPES_H): Removed: obsolete.
1508 * ld.texinfo: New win32 topics: 'symbol aliasing' and 'export dll
1513 * ldmain.c (main): Init "strip_discarded".
1514 * lexsup.c (OPTION_STRIP_DISCARDED): Define.
1515 (OPTION_NO_STRIP_DISCARDED): Define.
1516 (ld_options): Add "strip-discarded" and "no-strip-discarded".
1517 (parse_args): Handle them.
1521 * ld.h (struct args_type): Add new field
1522 'accept_unknown_input_architecture'.
1523 * ldmain.c (main): Initialise 'accept_unknown_input_architecture'
1525 * ldlang.c (lang_check): Pass accept_unknown_input_architecture to
1526 bfd_arch_get_compatible.
1527 * ldfile.c (ldfile_try_open_bfd): Likewise.
1528 * lexsup.c (ld_options): Add new command line switch
1529 --accept-unknown-input-architecture and its inverse.
1530 (parse_args): Handle --accept-unknown-input-architecture.
1531 * ld.texinfo: Document new linker option.
1532 * NEWS: Mention new linker option.
1536 * ldmain.c (main): Re-order link_info initialization. Init all
1541 * ld.texinfo: Clarify and extend the documentation
1542 in the Machine Dependent, WIN32 section.
1546 * ld.texinfo: Add win32 machine depending section.
1547 * gen-doc.texi: Enable win32 machine depending section.
1549 * configure.host: Add win32 library search path.
1553 * emultempl/pe.em (pe_find_data_imports): Don't search for data
1554 import when auto-import is disabled.
1558 * emultempl/pe.em (..._recognized_file): Use LD_PATHMAX+1 to
1559 account for trailing '\0'.
1563 * emultempl/pe.em (longopts): Duplicate entry for --compact-implib
1564 so that it is not confused with -c.
1569 * configure.in: Add check for realpath function.
1570 * configure: Regenerate.
1571 * config.in: Regenerate.
1572 * aclocal.m4: Regenerate.
1573 * deffile.h: Add .data field to def_file_import
1575 * pe-dll.c (pe_proces_import_defs): Use .data field of
1576 def_file_import structure to initialize flag_data field of
1577 def_file_export structure.
1578 (pe_implied_import_dll): New variables exp_funcbase and
1579 [data|bss]_[start|end]. Use DLL's internal name to set dll_name,
1580 not filename (which may be a symlink). Scan the sections and
1581 initialize [data|bss]_[start|end]. When scanning the export
1582 table, skip _nm_ symbols, and mark any symbols whose rva indicates
1583 that it is in the .bss or .data sections as data.
1584 * sysdep.h: Include limits.h and sys/param.h, and define
1585 LD_PATHMAX as appropriate. Also define REALPATH as realpath if it
1586 exists, NULL otherwise.
1587 * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Call
1588 pe_process_import_defs before pe_find_data_imports, so that
1589 auto-import will check the virtual implib as well as "real"
1591 (gld_${EMULATION_NAME}_recognized_file): Use REALPATH to follow
1592 symlinks to their target; check that the target's extension is
1593 .dll before calling pe_implied_import_dll(), not the filename
1594 itself (which may be a symlink).
1598 * emultempl/elf32.em (struct orphan_save): Add os_tail field.
1599 (gld${EMULATION_NAME}_place_orphan): Re-order output_section_statement
1604 * ldlang.h: Formatting.
1608 * ldlang.c (init_os): Ensure sections mentioned in load_base
1613 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Set
1614 load_base for orphans that follow a section with load_base set.
1618 * ld.texinfo: Remove the extra `;' in sample version script.
1622 * configure.host: Correct dynamic-linker for powerpc64 hosts.
1624 * Makefile.am (eelf32ppcwindiss.c): Correct dependencies.
1625 * Makefile.in: Regenerate.
1627 * ld.h, ldcref.c, ldctor.c, ldctor.h, ldemul.c, ldemul.h, ldexp.c,
1628 ldexp.h, ldfile.c, ldfile.h, ldgram.y, ldlang.c, ldlang.h, ldmain.c,
1629 ldmain.h, ldmisc.c, ldwrite.c, lexsup.c, mri.c, pe-dll.c, pe-dll.h,
1630 emulparams/elf32b4300.sh, emultempl/aix.em, emultempl/armcoff.em,
1631 emultempl/armelf.em, emultempl/armelf_oabi.em, emultempl/beos.em,
1632 emultempl/elf32.em, emultempl/generic.em, emultempl/gld960.em,
1633 emultempl/gld960c.em, emultempl/hppaelf.em, emultempl/linux.em,
1634 emultempl/lnk960.em, emultempl/m68kcoff.em, emultempl/mipsecoff.em,
1635 emultempl/mmix-elfnmmo.em, emultempl/mmixelf.em, emultempl/mmo.em,
1636 emultempl/needrelax.em, emultempl/pe.em, emultempl/ppc64elf.em,
1637 emultempl/sh64elf.em, emultempl/sunos.em, emultempl/ticoff.em: Replace
1638 boolean with bfd_boolean, true with TRUE, false with FALSE. Simplify
1639 comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
1643 * configure.host: Fix generic FreeBSD configuration entry.
1647 * ld.texinfo: Add the missing `;' to sample version scripts.
1651 * emulparams/elf64ppc.sh (SEGMENT_SIZE): Don't define.
1655 * ldmain.c (main): Make runtime relocs disabled by default. Remove
1656 assignment which has no effect.
1657 * pe-dll.h (pe_create_import_fixup): Change prototype.
1658 * pe-dll.c (make_runtime_pseudo_reloc): New function.
1659 (pe_create_runtime_relocator_reference): Ditto.
1660 (pe_create_import_fixup): Handle relocations with non-zero addends.
1661 * emultempl/pe.em: Add options --enable-runtime-pseudo-reloc and
1662 --disable-runtime-pseudo-reloc.
1663 (make_import_fixup): Handle relocations with non-zero addends. Create
1664 an external reference to _pei386_runtime_relocator symbol if at least
1665 one pseudo reloc was created.
1666 * ld.texinfo: Document --enable-runtime-pseudo-reloc and
1667 --disable-runtime-pseudo-reloc options.
1671 * ldlang.c (lang_add_section): Discard debugging sections that have
1672 been marked SEC_EXCLUDE.
1676 * configure.in (ALL_LINGUAS): Add da.
1677 * configure: Regenerate.
1678 * po/da.po: New Danish translation.
1682 * emultempl/ppc64elf.em (ppc_before_allocation): New function.
1683 (LDEMUL_BEFORE_ALLOCATION): Define.
1684 (gld${EMULATION_NAME}_finish): Run discard_info for relocatable
1686 * emultemp/hppaelf.em ((gld${EMULATION_NAME}_finish): Likewise.
1690 * configure.tgt (LIB_PATH): Default to searching w32api directory under
1695 * pe-dll.c (autofilter_liblist): add libmingwex and libgcj to the list
1696 of restricted auto-export libs.
1700 * pe-dll.c (autofilter_liblist): Generalize library names to catch more
1701 creative library naming instances like, e.g., libstdc++-2.a.
1705 * emulparams/elf32btsmipn32.sh (TEXT_DYNAMIC): Define.
1706 * emulparams/elf64btsmip.sh (TEXT_DYNAMIC): Likewise.
1710 * deffilep.y (def_lex): Handle '@' as first character of an ID.
1711 * pe-dll.c (auto-export): Filter on "_imp_" prefix, not "_imp__".
1712 (make_one): Don't prefix decorated fastcall symbols with '_'.
1713 (pe_process_import_defs): Likewise.
1714 * emultempl/pe.em (pe_fixup_stdcalls): Don't fixup fastcall
1715 symbols to cdecl names or vise-versa.
1719 * pe-dll.c (process_def_file): Handle fastcall symbols when
1720 generating undecorated aliases. Don't prefix decorated fastcall
1722 (fill_exported_offsets): Don't prefix decorated fastcall symbols
1727 * emultempl/aix.em: Use include <> for generated headers.
1728 * emultempl/beos.em: Likewise.
1729 * emultempl/elf32.em: Likewise.
1730 * emultempl/pe.em: Likewise.
1731 * ldctor.c: Likewise.
1732 * ldexp.c: Likewise.
1733 * ldfile.c: Likewise.
1734 * ldlang.c: Likewise.
1735 * ldlex.c: Likewise.
1736 * ldlex.l: Likewise.
1737 * ldmain.c: Likewise.
1738 * ldmisc.c: Likewise.
1739 * ldwrite.c: Likewise.
1740 * lexsup.c: Likewise.
1742 * pe-dll.c: Likewise.
1746 * emultempl/elf32.em (place_orphan): Don't put non-allocated .rel*
1747 sections into .rel{,a}.dyn.
1751 * lexsup.c (OPTION_NO_OMAGIC): Define.
1752 (ld_options): Add "no-omagic" option.
1753 (parse_args): Parse --no-omagic.
1754 * ld.texinfo: Document --no-omagic.
1755 * NEWS: Mention new option.
1759 * scripttempl/pe.sc (__RUNTIME_PSEUDO_RELOC_LIST__,
1760 __RUNTIME_PSEUDO_RELOC_LIST_END__): Add only when relocating.
1764 * emulparams/elf32bmipn32-defs.sh: Set ELFSIZE according to
1765 emulation name. Set LIB_PATH only for native tools, and
1766 search the ABI-specific versions of NATIVE_LIB_DIRS before the
1767 .../lib variants, not instead of them. Mostly copied from...
1768 * emulparams/elf32ppc.sh: ... here. Fixed typo.
1769 * emulparams/elf64bmip-defs.sh: Backed out.
1770 * emulparams/elf64bmip.sh: Import elf32bmipn32-defs.sh again.
1771 * emulparams/elf64btsmip.sh: Likewise.
1772 (DATA_ADDR, NONPAGED_TEXT_START_ADDR, SHLIB_TEXT_START_ADDR,
1773 TEXT_DYNAMIC): Removed.
1777 * emulparams/elf32bmipn32-defs.sh (LIB_PATH): Set to /usr/lib32.
1778 (GENERATE_SHLIB_SCRIPT): Set to yes.
1779 (EXECUTABLE_SYMBOLS, WRITABLE_RODATA): Moved to...
1780 * emulparams/elf32bmipn32.sh: here.
1781 (GENERATE_SHLIB_SCRIPT): Deleted as redundant.
1782 * emulparams/elf32btsmipn32.sh: Delete redundant unsets.
1783 * emulparams/elf64bmip-defs.sh: New file. Extend
1784 elf32bmipn32-defs.sh by overiding ELFSIZE and LIB_PATH.
1785 * emulparams/elf64bmip.sh: Bring in definitions from
1787 (ELFSIZE, GENERATE_SHLIB_SCRIPT, LIB_PATH): Delete redundant
1789 (WRITABLE_RODATA): Moved from elf32bmipn32-defs.sh.
1790 * emulparams/elf64btsmip.sh: Bring in definitions from
1792 (ELFSIZE, GENERATE_SHLIB_SCRIPT): Delete, redundant.
1793 (EXECUTABLE_SYMBOLS, WRITABLE_RODATA): Delete redundant unsets.
1797 * configure.tgt (s390x-*-linux*): Add elf_s390 emulation.
1798 (s390-*-linux*): Add elf64_s390 emulation if want64.
1799 * emulparams/elf64_sparc.sh (LIB_PATH): Update to match 2002-05-22
1800 genscript.sh changes.
1801 * emulparams/elf_x86_64.sh (LIB_PATH): Likewise.
1802 * emulparams/elf64_s390.sh (LIB_PATH): Set up native 64 bit dirs.
1806 * ldlang.c (load_symbols): Revert last change.
1810 * ldlang.c (load_symbols): Don't call bfd_link_add_symbols when
1812 (lang_reasonable_defaults): Don't compare against false.
1813 (size_input_section): Likewise.
1814 (lang_size_sections_1): Likewise.
1815 (lang_do_assignments): Likewise.
1816 (lang_add_output): Likewise.
1818 * Makefile.am: Run "make dep-am".
1819 * Makefile.in: Regenerate.
1820 * ldver.c: #include "bfdver.h".
1824 * scripttempl/elfm68hc11.sc: Use KEEP for .vectors, .installN,
1826 * scripttempl/elfm68hc12.sc: Likewise.
1830 * pe-dll.c (make_import_fixup_mark): Avoid type-punned pointer.
1832 * ldgram.y (memory_spec): Provide empty action.
1833 (section <NAME>): Likewise.
1837 * ldfile.c (ldfile_try_open_bfd): When searching skip linker scripts if
1838 they have OUTPUT_FORMAT not matching actual output format.
1839 * ldlang.c (lang_get_output_target): New function.
1840 (open_output): Use it.
1841 * ldlang.h (lang_get_output_target): New prototype.
1845 * emultempl/elf32.em (output_rel_find): Prefer .rel script sections
1846 when orphan is .rel, .rela when orphan is .rela.
1847 (gld${EMULATION_NAME}_place_orphan): Handle combreloc .rel* case
1848 first. Remove outsecname var.
1853 * Makefile.am: Add eshelf32_linux.o and
1854 eshlelf32_linux.o, new emulations for sh64 Linux.
1855 * Makefile.in: Regenerate.
1856 * configure.tgt: Add sh64eb-*-linux* and sh64-*-linux* emulations.
1857 * emulparams/shelf32_linux.sh: New file.
1858 * emulparams/shlelf32_linux.sh: New file.
1862 * ldlang.c (lang_file_exist): Removed.
1863 (new_afile): Revert the last change.
1864 * ldlang.h (lang_file_exist): Removed.
1865 * lexsup.c (parse_args): Revert the last change.
1869 * pe-dll.cc (autofilter_symbolprefixlist): Don't re-export
1870 auto-import symbols.
1871 (make_one): Create _nm_<symbol> for data only.
1875 * ldlang.c (lang_file_exist): New function.
1876 (new_afile): Abort if the filename to be added matches the linker
1878 * ldlang.h: Add prototype for lang_file_exist.
1879 * lexsup.c (parse_args): Abort if the output filename matches
1880 one of the input filenames.
1884 * emulparams/elf64ppc.sh (MAXPAGESIZE): Set to 0x10000.
1888 * scripttempl/elfd30v.sc: Order reloc sections placing .plt last.
1889 * scripttempl/elfm68hc11.sc: Likewise.
1890 * scripttempl/elfm68hc12.sc: Likewise.
1892 * emultempl/elf32.em (output_rel_find): Always place orphan loadable
1893 reloc sections just before .rel.plt/.rela.plt.
1894 (gld${EMULATION_NAME}_place_orphan <.rel>): Remove combreloc code.
1895 Only put loadable reloc sections in hold_rel.
1899 * emulparams/elf32ppc.sh (OTHER_GOT_RELOC_SECTIONS): New.
1904 * scripttempl/sh.sc: Handle .eh_frame* and .gcc_exc*
1909 * genscripts.sh (SEGMENT_SIZE): Use MAXPAGESIZE before
1911 * scripttempl/elf.sc (DATA_SEGMENT_ALIGN): Incorporate
1912 SEGMENT_SIZE alignment.
1913 * emulparams/elf64ppc.sh (DATA_ADDR): Delete.
1914 (SEGMENT_SIZE): Define.
1916 * ldexp.c (fold_unary): New. Split out from exp_fold_tree.
1917 (fold_binary): Correct abs - non-abs case.
1918 (fold_trinary): New. Split out from exp_fold_tree.
1922 * emulparams/elf64ppc.sh (DATA_ADDR): Define.
1923 * emulparams/elf64_aix.sh (DATA_ADDR): Don't use a fixed address
1924 for start of .data, instead align up to 256M boundary.
1925 * scripttempl/aix.sc: Likewise.
1929 * scripttempl/i386go32.sc: Handle bss unique sections.
1933 * ldmisc.c (vfinfo <%C,%D,%G>): Always output bfd, section and offset.
1937 * emulparams/elf32bmipn32-defs.sh: New file.
1938 * emulparams/elf32bmipn32.sh: Use elf32bmipn32-defs.sh.
1939 * emulparams/elf32btsmipn32.sh: Likewise.
1940 * emulparams/elf64bmip.sh: Likewise.
1941 * emulparams/elf64btsmip.sh: Likewise.
1945 * emulparams/elf_i386_fbsd.sh: Set OUTPUT_FORMAT to
1947 * emulparams/elf64alpha_fbsd.sh: Set OUTPUT_FORMAT to
1948 elf64-alpha-freebsd.
1952 * NEWS: New TI port supports both C4x and C3x series of DSPs.
1954 * po/tr.po: Updated Turkish translation.
1958 * configure.tgt (h8300-*-hms*, h8500-*-hms*): Restore.
1962 * scripttempl/v850.sc: Add EXTERN references to __ctbpm __gp and
1964 * emulparams/v850.sh (TEMPLATE_NAME): Define.
1968 * scripttempl/elfd10v.sc (MEMORY): Remove UNIFIED, it is not
1969 used. Change INSN to start at 0x01000000 and extend for
1970 256K (ignoring holes). Start the STACK on a word aligned
1972 (.rodata): Start it at the READONLY_START_ADDR.
1976 * emulparams/elf32ppc.sh (ARCH): Set to "powerpc:common".
1980 * Makefile.am: Add etic4xcoff.o in ALL_EMULATIONS list and
1981 added makefile targets for this file.
1982 * Makefile.in: Regenerate.
1983 * configure.tgt: Added tic4x-coff and c4x-coff emulations.
1984 * NEWS: Mention new port.
1988 * emulparams/tic3xcoff.sh: New file.
1989 * emulparams/tic4xcoff.sh: New file.
1990 * scripttempl/tic3xcoff.sc: New file.
1991 * scripttempl/tic4xcoff.sc: New file.
1995 * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Replace strtoll,
1996 strtoul and strtoull with bfd_scan_vma.
1997 (gld${EMULATION_NAME}_read_file): Likewise.
2001 * configure.tgt: Remove h8[35]00-*-hms*. Add h8500-*-rtems*.
2005 * scripttempl/pe.sc: Handle .rdata_runtime_pseudo_reloc sections.
2006 Add symbols for application to access them.
2010 * emultempl/armelf.em: Revert this patch, it is not needed.
2016 * configure.in: added --with-lib-path argument to ld's configure
2018 * NEWS: Document new switch.
2019 * README: Mention new switch.
2020 * configure: Regenerate.
2021 * Makefile.in: Regenerate.
2023 Based on this patch:
2026 * Makefile.in (LIB_PATH): Make configurable.
2027 (GENSCRIPTS): Set LIB_PATH in environment.
2028 * configure.in: Substitute LIB_PATH.
2032 * emultempl/armelf.em: Include elf-bfd.h and elf/arm.h.
2033 (arm_elf_finish): Set the last bit of DT_INIT and DT_FINI
2034 depending on the type of the function.
2035 (arm_elf_convert_thumb_symbol_to_address): New function.
2039 * Makefile.am: Add esh{l}elf_nto.o files.
2040 * Makefile.in: Regenerate.
2041 * configure.tgt: Add support for sh-**-nto* targets.
2042 * emulparams/shelf_nto.sh: New file.
2043 * emulparams/shlelf_nto.sh: New file.
2047 * ldlang.c (offsetof): Define if not defined.
2051 * configure.tgt: Always enable 64bit emulations for 32bit
2056 * emulparams/elf32_dlx.sh (TARGET_PAGE_SIZE): Set to 1.
2057 (MAXPAGESIZE): Set to 1.
2059 * ld.h (ALIGN_N): Delete.
2060 * ldexp.h (align_n): Declare.
2061 * ldexp.c (align_n): New function.
2062 (fold_binary): Use align_n instead of ALIGN_N.
2063 (exp_fold_tree): Likewise.
2064 * ldlang.c (lang_size_sections_1): Likewise.
2065 (lang_one_common): Likewise.
2066 * ld.texinfo (ALIGN): Remove power of 2 restriction.
2070 * configure.tgt: Add support for powerpc{le}-*-nto* targets.
2071 * Makefile.am: Add eelf32{l}ppcnto.o files.
2072 * Makefile.in: Regenerate.
2073 * emulparams/elf32lppcnto.sh: New file.
2074 * emulparams/elf32ppcnto.sh: New file.
2078 * ld.texinfo: Document --no-undefined-version.
2080 * ldlang.c (lang_new_vers_pattern): Set the `symver' and
2081 `script.' fields to 0.
2083 * ldmain.c (main): Initialize the allow_undefined_version to
2086 * lexsup.c (OPTION_NO_UNDEFINED_VERSION): New.
2087 (ld_options): Add --no-undefined-version.
2088 (parse_args): Support OPTION_NO_UNDEFINED_VERSION.
2092 * emultempl/armelf.em (arm_elf_before_allocation): Only search for
2093 an interworking bfd if there are input bfds. (107501)
2097 * emultempl/aix.em (gld*_before_parse): Set default arch. Reverts
2102 * emulparams/armelf.sh: Revert previous delta.
2103 * scripttempl/elf.sc: Revert previous delta.
2107 * configure.tgt (powerpc*-*-linux*): Enable elf64ppc for
2108 --enable-64-bit-bfd.
2112 * configure.tgt: Enable x86-64 emulation for Linux/i386 if
2113 64bit BFD is selected.
2117 * configure.tgt: Enable 64bit emulations for 32bit Linux/mips
2118 if 64bit BFD is selected.
2122 * emultempl/netbsd.em (LDEMUL_BEFORE_PARSE): New file to custom set
2123 link_info.common_skip_ar_aymbols.
2124 * emulparams/ns32knbsd.sh (EXTRA_EM_FILE): Refer to extra file.
2126 * ldmain.c (main): Initialize new field
2127 link_info.common_skip_ar_aymbols.
2131 * emulparams/armelf.sh (OTHER_PLT_SECTIONS): New variable. Set it
2133 * scripttempl/elf.sc: Comment it. Use the same way as ${PLT} is
2138 * NEWS: Retroactively add entry for Lars Brinkhoff's contribution
2139 of the PDP-11 and 2.11BSD a.out support.
2143 * Makefile.am (eelf32btsmipn32.o, eelf32ltsmipn32.o): New emulations
2144 for n32 ABI support.
2145 * Makefile.in: Regenerate.
2146 * configure.tgt (mips64*el-*-linux-gnu*,mips64*-*-linux-gnu*): Add
2147 n32 ABI emulations for these 64 bit targets.
2148 * emulparams/elf32bmipn32.sh: Expand comment.
2149 * emulparams/elf32btsmipn32.sh: New file, for traditional big endian
2151 * emulparams/elf32ltsmipn32.sh: Likewise for little endian.
2155 * configure.tgt: Add support for arm-*-nto target.
2156 * Makefile.am: Add earmnto.o file.
2157 * Makefile.in: Regenerate.
2158 * NEWS: Mention port of ARM support to QNX.
2159 * emulparams/armnto.sh: New file.
2163 * ldlang.c (lang_add_section): Don't turn .tbss into normal sections
2164 for relocatable link.
2165 (lang_size_sections_1): Don't make .tbss zero size for relocatable
2170 * emulparams/elf32frv.sh (OTHER_RELOCATING_SECTIONS): Delete.
2175 * po/sv.po: Updated Swedish translation.
2176 * po/es.po: Updated Spanish translation.
2177 * po/fr.po: Updated French translation.
2181 * po/sv.po: Updated Swedish translation.
2182 * po/es.po: Updated Spanish translation.
2186 * po/fr.po: Updated French translation.
2190 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
2191 bomb on /DISCARD/ input section.
2192 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
2193 * emultempl/mmo.em (mmo_place_orphan): Likewise.
2197 * emultempl/mmo.em (mmo_place_orphan): Handle case of no .text
2205 * configure.tgt: Add support for ip2k-elf.
2206 * Makefile.am: Add support for ip2k-elf.
2207 * Makefile.in: Regenerate.
2208 * emulparams/elf32ip2k.sh: New file.
2209 * scripttempl/ip2k.sc: New file
2210 * NEWS: Mention support for new port.
2214 * NEWS: Add 'Changes in 2.13'.
2218 * ld.texinfo: Document a .symver takes precedence over a
2223 * emulparams/elf64ppc.sh (ARCH): Set to powerpc:common64.
2224 (COMMONPAGESIZE): Define.
2228 * emulparams/hppanbsd.sh: Remark that hppaobsd.sh references this file.
2232 * configure.tgt: Add support for alpha-*-openbsd*, hppa-*-openbsd*,
2233 powerpc-*-openbsd* and sparc64-*-openbsd*.
2234 * Makefile.am (ALL_EMULATIONS): Add ehppaobsd.o.
2235 * Makefile.in: Regenerate.
2236 * emulparams/hppaobsd.sh: New file.
2240 * ldlang.c (print_wild_statement): Fix output formatting.
2244 * ldlang.c: (strip_excluded_output_sections): New function.
2245 (lang_process): Call it.
2246 (lang_size_sections_1): Revert 2002-06-10 change.
2250 * Makefile.am (check-DEJAGNU): Revert 2002-06-25 change.
2252 * Makefile.in: Regenerate.
2256 * ldfile.c (ldfile_try_open_bfd): Formatting.
2258 * ldmisc.c (demangle): Move so that it doesn't intrude between
2259 vfinfo comment and body. Add comment.
2263 * emulparams/vax.sh (OUTPUT_FORMAT): Use a.out-vax-bsd format.
2267 * ldlang.h (entry_sym): Make it a struct bfd_sym_chain.
2268 * ldlang.c (entry_sym): Likewise.
2269 (ldlang_undef_chain_list_type): Likewise.
2270 (lang_finish): Adjust references to entry_symbol.
2271 (lang_add_entry): Likewise.
2272 (lang_gc_sections): Use link_info.gc_sym_list.
2273 (lang_process): Set link_info.gc_sym_list.
2274 * ldlex.l: Include bfdlink.h.
2275 * ldmain.c (main): Init link_info.gc_sym_list.
2276 * emultempl/aix.em: Adjust references to entry_symbol.
2277 * emultempl/armcoff.em: Likewise.
2278 * emultempl/armelf.em: Likewise.
2279 * emultempl/pe.em: Likewise.
2280 * emultempl/ppc64elf.em (ppc_after_open): New function.
2281 (LDEMUL_AFTER_OPEN): Define.
2282 * emulparams/elf64ppc.sh: KEEP .opd sections.
2286 * emulparams/m68hc12elfb.sh (EEPROM_MEMORY): Define.
2287 * emulparams/m68hc11elfb.sh (EEPROM_MEMORY): Define.
2288 * emulparams/m68hc11elf.sh (EEPROM_SIZE): Define.
2289 (EEPROM_START_ADDR): Define.
2290 (EEPROM_MEMORY): Define.
2291 * emulparams/m68hc12elf.sh: Likewise.
2292 * scripttempl/elfm68hc11.sc: Handle .eeprom section; handle .softregs
2293 section to put soft registers in .page0.
2294 * scripttempl/elfm68hc12.sc: Likewise but put soft registers in bss.
2298 * emulparams/hppa64linux.sh (OTHER_GOT_RELOC_SECTIONS): Add rela.opd
2299 section. Add ${RELOCATING-0}.
2303 * emulparams/shelf.sh (STACK_ADDR): Don't define.
2304 (OTHER_SECTIONS): Define.
2305 * emulparams/shelf_nbsd.sh ((STACK_ADDR): Don't undef.
2306 (OTHER_SECTIONS): Undef.
2310 * ldmisc.c (demangle): Restore dots stripped from sym name.
2314 * Makefile.am (check-DEJAGNU): Set LC_ALL=C and export it.
2315 * Makefile.in: Regenerated.
2319 * ld.texinfo (Bug Reporting): Update text to suggest a limit on
2320 the size of attached object files, to allow make the object files
2321 available via FTP or HTTP and to mention that the mail will be
2322 sent to a mailing list.
2326 * configure.host (romp): Drop support.
2330 * emultempl/mipself.em (mips_elf${ELFSIZE}_check_sections): Check
2331 section flags for SEC_DATA, rather than for SEC_CODE being unset.
2335 * emultempl/mipself.em (mips_elf${ELFSIZE}_check_sections): Fix
2336 format specifier used to print BFD name.
2340 From Catherine Moore, Michael Meissner, Jim Blandy:
2341 * emulparams/elf32frv.sh: New file.
2342 * configure.tgt: Support frv-*-*.
2343 * Makefile.am (ALL_EMULATIONS): Add eelf32frv.o.
2344 (eelf32frv.c): New target.
2348 * emultempl/elf32.em: gld*_get_script: Check for
2349 GENERATE_COMBRELOC_SCRIPT.
2350 * scripttempl/elfd10v.sc : Fix STACK and INSN.
2351 * emulparams/d10velf.sh : Fix TEXT_START_ADDR.
2355 * configure.tgt: Add support for sh[1234]*le*-*-elf, sh[1234]*-*-elf.
2359 * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Return
2360 false if xvec doesn't match.
2364 * ldlang.c (lang_size_sections_1): Skip removed output sections.
2368 * ldexp.c: Replace CONST with const.
2369 * ldfile.c: Likewise.
2370 * ldfile.h: Likewise.
2371 * ldlex.l: Likewise.
2373 * pe-dll.h: Likewise.
2377 * emultempl/ppc64elf.em (new_vers_pattern): Warning fix.
2381 * ldmain.c (main): initialize link_info.pei386_auto_import
2382 to -1 == implicit enable.
2383 * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse):
2384 initialize link_info.pei386_auto_import to -1 == implicit
2386 (gld_${EMULATION_NAME}_parse_args): When processing
2387 --enable-auto-import and --disable-auto-import options, use
2388 '1' and '0' instead of 'true' and 'false'.
2389 (pe_find_data_imports): Only issue message about auto-import
2390 when the feature is implicitly enabled. Downgrade message to
2391 informational instead of warning.
2395 * scripttempl/elf.sc (.tbss): Fix mismatched parentheses/braces.
2399 * configure.host (hppa*64*-*-hpux11*): Define NATIVE_LIB_DIRS,
2400 HOSTING_CRT0 and HOSTING_LIBS.
2404 * configure.tgt (shle*-*-elf*, sh64le-*-elf*): New configurations.
2408 * emulparams/ns32knbsd.sh (EXECUTABLE_SYMBOLS): Set _DYNAMIC to 0.
2409 (NONPAGED_TEXT_START_ADDR): Set to 0x1000.
2413 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Place
2414 SEC_EXCLUDE sections when doing a relocatable link.
2418 * Makefile.am (ALL_EMULATIONS): Add eshelf32_nbsd.o,
2419 eshlelf32_nbsd.o, eshelf64_nbsd.o, and eshlelf64_nbsd.o.
2420 (eshelf32_nbsd.c, eshelf64_nbsd.c, eshlelf32_nbsd.c)
2421 (eshlelf64_nbsd.c): New rules.
2422 * Makefile.in: Regenerate.
2423 * configure.tgt (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
2424 (sh64-*-netbsd*): New targets.
2425 * emulparams/shelf32_nbsd.sh: New file.
2426 * emulparams/shelf64_nbsd.sh: New file.
2427 * emulparams/shlelf32_nbsd.sh: New file.
2428 * emulparams/shlelf64_nbsd.sh: New file.
2432 * ldlang.c (section_already_linked): Call bfd_discard_group. Typo fix.
2436 * scripttempl/avr.sc: Changes to support current GCC and avr-libc,
2437 C++ constructors/destructors, loosely based on the m68hc11 port.
2441 * Makefile.in: Regenerate.
2442 * aclocal.m4: Regenerate.
2443 * config.in: Regenerate.
2444 * configure: Regenerate.
2448 * Makefile.am (ALL_EMULATIONS): Add ei386nto.o.
2449 (ei386nto.c): Add rule.
2450 * Makefile.in: Regenerate.
2451 * configure.tgt: Add i[3456]86-*-nto-qnx*.
2452 * emulparams/i386nto.sh: New file.
2456 * NEWS: Add entry for VAX ELF support.
2461 * Makefile.am (ALL_EMULATIONS): Add eelf32vax.o and evaxnbsd.o.
2463 (evaxnbsd.c): New rules.
2464 * Makefile.in: Regenerate.
2465 * configure.tgt (vax-*-netbsdelf*)
2467 (vax-*-netbsd*): New targets.
2468 * emulparams/elf32vax.sh: New file.
2469 * emulparams/vaxnbsd.sh: New file.
2473 * emultempl/armelf.em (arm_elf_after_open): Don't determine
2474 bfd_for_interwork, instead add glue sections to each input bfd.
2475 (bfd_for_interwork): New global.
2476 (arm_elf_set_bfd_for_interworking): New function.
2477 (arm_elf_before_allocation): Use it.
2481 * Makefile.am: Add DLX make target.
2482 * configure.tgt: Add DLX configuration.
2483 * Makefile.in: Regenerate.
2484 * emulparams/elf32_dlx.sh: New file
2485 * scripttempl/dlx.sc: New file
2489 * Makefile.am (eelf_i386_chaos): Use elf_chaos.sc script.
2490 * Makefile.in: Regenerate.
2491 * emulparams/elf_chaos.sh: Use elf_chaos script.
2492 * scripttempl/elf_chaos.sc: New file.
2496 * ldlang.c (lang_size_sections_1): Move check for conflicting load
2497 addresses and regions from here...
2498 (lang_get_regions): ...to this new function.
2499 (lang_leave_output_section_statement): Use lang_get_regions.
2500 (lang_leave_overlay): Likewise.
2501 * mri.c (mri_draw_tree): Pass null as last argument to
2502 lang_leave_output_section_statement.
2503 * emultempl/elf32.em (gld*_place_orphan): Likewise.
2504 * emultempl/mmo.em (mmo_place_orphan): Likewise.
2505 * emultempl/pe.em (gld*_place_orphan): Likewise.
2509 * configure.tgt: Use ns32k-*-netbsd* instead of ns32k-pc532-netbsd*.
2513 * ldemul.c: Fix formatting.
2514 * ldfile.c: Likewise.
2515 * pe-dll.c: Likewise.
2516 * pe-dll.h: Likewise.
2520 * ldlang.c (lang_process): Formatting, grammar.
2522 * ldlex.l: Use #include "" instead of <> for local header files.
2526 * configure.tgt: Add a target for i386-netbsdpe.
2530 * scripttempl/elf.sc: Add .rel{,a}.t{bss,data}, .tdata and .tbss.
2531 * ldlang.c (lang_add_section): Set SEC_THREAD_LOCAL for
2532 output section if necessary. Handle .tbss.
2533 (lang_size_sections): Clear _raw_size for .tbss section
2534 (it allocates space in PT_TLS segment only).
2535 * ldwrite.c (build_link_order): Build link order for .tbss too.
2539 * configure.in: Correct spelling of AC_PREREQ.
2543 * pe-dll.c (autofilter_liblist): Add more system libs excluded by
2545 (autofilter_objlist): Add crtbegin.o, crtend.o.
2549 * emultempl/pe.em (OPTION_EXCLUDE_LIBS): Add new define.
2550 (longopts): Add new option --exclude-libs.
2551 (gld_${EMULATION_NAME}_list_options): Give quick help about it.
2552 (gld_${EMULATION_NAME}_parse_args): Use it.
2553 * pe-dll.h (pe_dll_add_excludes): Add second param to prototype.
2554 * pe-dll.c (exclude_list_struct): Add field type to distinguish symbols
2555 from whole archives.
2556 (pe_dll_add_excludes): Set excludes->type.
2557 (auto_export): Add new variable libname and set to archive basename if
2558 abfd. Use it when filtering default and user-specified libarary
2559 excludes. Let string "ALL" mean all libs when filtering user-specified
2561 * ld.texinfo: Document --exclude-libs.
2565 * ldemul.c (ldemul_new_vers_pattern): New function.
2566 * ldemul.h (ldemul_new_vers_pattern): Declare.
2567 (struct ld_emulation_xfer_struct): Add new_vers_pattern.
2568 * ldlang.c (lang_new_vers_pattern): Call ldemul_new_vers_pattern.
2569 * emultempl/ppc64elf.em (dotsyms): New static var.
2570 (gld${EMULATION_NAME}_new_vers_pattern): New function.
2571 (LDEMUL_NEW_VERS_PATTERN): Define.
2572 (PARSE_AND_LIST_PROLOGUE): Add OPTION_DOTSYMS, OPTION_NO_DOTSYMS.
2573 (PARSE_AND_LIST_LONGOPTS): Likewise.
2574 (PARSE_AND_LIST_ARGS_CASES): Handle them.
2575 * emultempl/aix.em (ld_${EMULATION_NAME}_emulation): Update
2577 * emultempl/armcoff.em: Likewise.
2578 * emultempl/armelf_oabi.em: Likewise.
2579 * emultempl/beos.em: Likewise.
2580 * emultempl/elf32.em: Likewise.
2581 * emultempl/generic.em: Likewise.
2582 * emultempl/gld960.em: Likewise.
2583 * emultempl/gld960c.em: Likewise.
2584 * emultempl/linux.em: Likewise.
2585 * emultempl/lnk960.em: Likewise.
2586 * emultempl/m68kcoff.em: Likewise.
2587 * emultempl/mipsecoff.em: Likewise.
2588 * emultempl/pe.em: Likewise.
2589 * emultempl/sunos.em: Likewise.
2590 * emultempl/ticoff.em: Likewise.
2591 * emultempl/vanilla.em: Likewise.
2595 * genscripts.sh (LIB_PATH): For native targets, concatenate $libdir
2596 and $NATIVE_LIB_DIRS. Add $tool_lib before other libs.
2597 (LIB_SEARCH_DIRS): No need to use "tr".
2598 (COMPILE_IN): Only set for native targets.
2599 * configure.host (NATIVE_LIB_DIRS): Specify all native search dirs
2600 here, rather than adding lib:/usr/lib:/usr/local/lib in genscripts.sh.
2601 * configure.tgt (powerpc*): Set tdir_*.
2602 (powerpcle*): Correct targ_extra_emuls.
2603 * emulparams/elf32ppc.sh (LIB_PATH): Set up native 64 bit dirs.
2604 * emulparams/elf64ppc.sh (LIB_PATH): Likewise.
2608 * emultempl/pe.em (set_pe_subsystem): Don't set "cmdline" when
2609 calling lang_add_entry.
2613 * emultempl/elf32.em (gld${EMULATION_NAME}_parse_args): Handle
2615 (gld${EMULATION_NAME}_list_options): Add "-z muldefs".
2617 * ld.texinfo: Updated for --allow-multiple-definition and
2620 * ldmain.c (main): Initialize the allow_multiple_definition
2623 * lexsup.c (OPTION_ALLOW_MULTIPLE_DEFINITION): New.
2624 (ld_options): Add --allow-multiple-definition.
2625 (parse_args): Support OPTION_ALLOW_MULTIPLE_DEFINITION.
2629 * Makefile.am (ALL_EMULATIONS): Add earmelfb_nbsd.o.
2630 (earmelfb_nbsd.c): New rule.
2631 * Makefile.in: Regenerate.
2632 * configure.tgt (armeb-*-netbsdelf*): New target.
2633 (arm-*-netbsdelf*): Add armelfb_nbsd to targ_extra_emuls.
2634 (arm-*-netbsd*): Likewise.
2635 * emulparams/armelfb_nbsd.sh: New file.
2639 * emultempl/aix.em (gld*_parse_args): Add -bnortl and -bnortllib
2644 * Makefile.am: Add new emulations avr1, avr2, avr3, avr4, avr5.
2645 * Makefile.in: Regenerate.
2646 * configure.tgt (avr-*-*): Add avr[1-5] to targ_extra_emuls.
2650 * emulparams/avr1.sh: New file.
2651 * emulparams/avr2.sh: New file.
2652 * emulparams/avr3.sh: New file.
2653 * emulparams/avr4.sh: New file.
2654 * emulparams/avr5.sh: New file.
2655 * scripttempl/avr.sc: New file.
2659 * ldlang.c (section_already_linked): Call bfd_link_just_syms.
2660 (lang_place_orphans): Abort if just_syms_flag.
2664 * emultempl/aix.em: (gld*_set_output_arch): New function. Use
2665 architecture and machine information in the output bfd.
2666 (gld*_before_parse): Remove old arch and machine code.
2667 (choose_target): Rename to gld*_choose_target.
2668 (rtld): Change type to int.
2669 * ldfile.c (ldfile_try_open_bfd): Disable compatiblity check for
2670 objects in XCOFF archives.
2671 * ldfile.h: Update copyright date.
2675 * ldmain.c (main): Enable -z combreloc by default.
2679 * Makefile.am: Honour DESTDIR.
2680 * Makefile.in: Regenerate.
2684 * ldlang.h (lang_output_section_statement_type): Add update_dot_tree.
2685 (lang_enter_overlay): Remove the last two parameters.
2686 (lang_leave_overlay): Take them here instead.
2687 * ldgram.y (memspec_at_opt): Set $$ to null if no region is given.
2688 (section): Pass LMA and crossref flag to lang_leave_overlay rather
2689 than lang_enter_overlay.
2690 * ldlang.c (lang_memory_region_lookup): Return null for null names.
2691 (lang_output_section_statement_lookup): Initialize update_dot_tree.
2692 (lang_size_sections_1): Evaluate it.
2693 (lang_leave_output_section_statement): Rework LMA lookup.
2694 (overlay_lma, overlay_nocrossrefs): Remove.
2695 (lang_enter_overlay): Remove LMA and crossref arguments.
2696 (lang_enter_overlay_section): Don't set the LMA here.
2697 (lang_leave_overlay): Take LMA and crossref arguments. Move the '.'
2698 assignment to the last section's update_dot_tree. Unconditionally
2699 use the load and run-time regions specified in the OVERLAY statement.
2700 Likewise the first section's LMA. Only set the other sections' LMAs
2701 when no load region is given.
2705 * po/sv.po: New translation.
2709 * emultempl/hppaelf.em (build_section_lists): New function.
2710 (gld${EMULATION_NAME}_finish): Call elf32_hppa_setup_section_lists
2711 and build_section_lists.
2715 * ld.h: Fix formatting.
2716 * ldexp.c: Likewise.
2717 * ldfile.c: Likewise.
2718 * ldlang.c: Likewise.
2719 * ldmain.c: Likewise.
2720 * lexsup.c: Likewise.
2721 * pe-dll.c: Likewise.
2725 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation):
2726 Adjust for ppc64_elf_set_toc change. #include libbfd.h.
2727 (build_section_lists): Do output_section tests here.
2731 * emultempl/aix.em : (gld*_parse_arge): Formatting changes.
2735 Long branch stubs, multiple stub sections.
2736 * emultempl/ppc64elf.em: Include ldctor.h.
2737 (stub_file): New var.
2738 (group_size): New var.
2739 (ppc_create_output_section_statements): New function.
2740 (struct hook_stub_info): New.
2741 (hook_in_stub): New function.
2742 (ppc_add_stub_section): New function.
2743 (ppc_layout_sections_again): New function.
2744 (build_section_lists): New function.
2745 (gld${EMULATION_NAME}_finish): Rewrite.
2746 (real_func): New var.
2747 (ppc_for_each_input_file_wrapper): New function.
2748 (ppc_lang_for_each_input_file): New function.
2749 (lang_for_each_input_file): Define.
2750 (PARSE_AND_LIST_PROLOGUE): Define.
2751 (PARSE_AND_LIST_LONGOPTS): Define.
2752 (PARSE_AND_LIST_OPTIONS): Define.
2753 (PARSE_AND_LIST_ARGS_CASES): Define.
2754 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
2758 * emultempl/aix.em (gld*_parse_arge, gld*_before_allocation): Add
2759 -blibpath, -bnolibpath support.
2763 * Makefile.am (ALL_EMULATIONS): Add elf32ppcwindiss.o.
2764 (eelf32ppcwindiss.c): New target.
2765 * Makefile.in: Regenerated.
2766 * configure.tgt: Add support for powerpc-*-windiss.
2767 * emulparams/elf32ppcwindiss.sh: New file.
2771 * ldlang.c (print_assignment): Update print_dot for assignments to ".".
2772 * ldexp.c (exp_print_token): Add "infix_p" argument.
2773 (exp_print_tree): Update accordingly.
2777 * Makefile.am (mpw): New maintainer mode rule to make mpw-*.c files.
2778 * Makefile.in: Regenerate.
2779 * mpw-elfmips.c: Delete.
2780 * mpw-eppcmac.c: Delete.
2781 * mpw-esh.c: Delete.
2782 * mpw-idtmips.c: Delete.
2786 * emulparams/shelf32.sh (MACHINE): Now sh5.
2790 * ldgram.y: Fix syntax warning.
2794 * emultempl/armelf.em (PARSE_AND_LIST_SHORTOPTS): Add 'n' in order
2795 to prevent "-n" from being taken as an abbreviation for
2796 "--no-pipeline-knowledge".
2800 * ldlang.c (lang_size_sections_1): Don't complain about
2801 SEC_NEVER_LOAD sections having no memory region specified.
2803 * ld.texinfo (Format Commands <OUTPUT_FORMAT>): Typo fix.
2807 * configure.host (*-*-netbsd*): Add support for NetBSD/ELF.
2811 * dep-in.sed: Cope with absolute paths.
2812 * Makefile.am (dep.sed): Subst TOPDIR and BFDDIR.
2814 * Makefile.in: Regenerate.
2818 * emulparams/elf64btsmip.sh: n64 replaces .reginfo with .MIPS.options.
2822 * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: If common page size
2823 is smaller than maximum, round dot up to common page boundary.
2827 * configure.host: Set up for generic hosts first, then tweak as
2828 necessary in more specific targets.
2829 (HOSTING_LIBS): Include libgcc_eh.a if found.
2833 * emulparams/elf_x86_64.sh (COMMONPAGESIZE): Set it.
2837 * Makefile.am: Run "make dep-am".
2838 * Makefile.in: Regenerate.
2842 * genscripts.sh (LIB_SEARCH_DIRS): Quote path.
2846 * ldlang.c (ldlang_add_undef): If the output bfd has been opened,
2847 add the symbol to the linker hash table immediately.
2848 (lang_place_undefineds): Split symbol creation out..
2849 (insert_undefined): ..to here.
2853 * emultempl/elf32.em: Use lbasename vs. basename to fix problem where
2854 the contents of the buffer returned from basename function will are
2855 getting overwritten while still being used.
2861 * configure.tgt (x86_64-*-linux-gnu*): Configure i386 as native.
2862 * elf_x86_64.sh (ARCH): Set to i386:x86-64
2863 set libraries to default to lib64 paths.
2867 * Makefile.am : Add eaix5ppc and eaix5rs6, AIX 5 support.
2868 * configure.tgt : Same.
2869 * emulparms/aix5ppc.sh : New file. For eaix5ppc.
2870 * emulparms/aix5rs6.sh : New file. For eaix5rs6.
2871 * emulparms/aixppc.sh : OUPUT_FORMAT_32BIT and OUTPUT_FORMAT_64BIT
2872 emulation parameters for better -b32, -b64 support.
2873 * emulparms/aixrs6.sh : Same.
2874 * emulparms/ppcmacos.sh : Same.
2875 * emultempl/aix.em (choose_target) : Use new emulation parameters
2876 OUTPUT_FORMAT_32BIT and OUTPUT_FORMAT_64BIT.
2877 * Makefile.in : Regenerate.
2881 * po/fr.po: Updated version.
2885 * ldmain.c (main): Move .text readonly flag fudges from here..
2886 * ldlang.c (lang_process): ..to here.
2890 * ldlang.c (lang_check): Remove the word size check added in last
2891 change. Treat emitrelocations case as for relocatable links.
2895 * po/fr.po: Updated version.
2899 * ldlang.c (lang_check): Do relocatable link checks first, so that
2900 warn_mismatch can't override. Check compatible and word size too.
2904 * ld.texinfo: Wrap @menu in @ifnottex, not @ifinfo.
2908 * scripttempl/elf.sc: Only use DATA_SEGMENT_END() together with
2913 * scripttempl/elf.sc: Put .preinit_array, .init_array and
2914 .fini_array in the data segment.
2918 * scripttempl/elf.sc: Correct syntax errors in 2002-03-01 commit.
2922 * scripttempl/elf.sc (SECTIONS): Add entries for .preinit_array,
2923 .init_array, and .fini_array.
2927 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't fold
2928 .IA64_unwind* in a relocatable link.
2932 * NEWS: Mark 2.12 branch.
2936 * emulparams/elf64_s390.sh (ARCH): Change to "s390:64-bit".
2937 * emulparams/elf_s390.sh (ARCH): Change to "s390:31-bit".
2941 * emultempl/aix.em (gld*_parse_args): Add -brtl support.
2942 (gld*_before_allocation): Same.
2943 (gld*_create_output_section_statements): Generate
2944 __rtinit if run time linking. Add librtl.a to the link.
2945 (gld*_read_file): Clean.
2949 * emulparams/elf64ppc.sh (OTHER_TEXT_SECTIONS): Define.
2953 * Makefile.am: Add new files earmelf_fbsd, eelf32ppc_fbsd,
2954 eelf_i386_fbsd, eelf64_ia64_fbsd, eelf_x86_64_fbsd, eelf64_sparc_fbsd,
2955 and eelf64alpha_fbsd.
2956 * Makefile.in: Regenerate.
2957 * configure.tgt(sparc64-*-freebsd, ia64-*-freebsd, i[3456]86-*-freebsd,
2958 x86_64-*-freebsd, arm-*-freebsd, alpha*-*-freebsd, powerpc-*-freebsd):
2959 use a FreeBSD-specific emulation rather than the psABI one.
2960 * emulparams/elf_fbsd.sh (ELF_INTERPRETER_NAME): Set appropriate value
2961 for all FreeBSD ELF systems.
2962 * emulparams/armelf_fbsd.sh: Bridge elf_fbsd.sh and the "native" psABI
2964 * emulparams/elf32ppc_fbsd.sh: Likewise.
2965 * emulparams/elf64_ia64_fbsd.sh: Likewise.
2966 * emulparams/elf64_sparc_fbsd.sh: Likewise.
2967 * emulparams/elf64alpha_fbsd.sh: Likewise.
2968 * emulparams/elf_i386_fbsd.sh: Likewise.
2969 * emulparams/elf_x86_64_fbsd.sh: Likewise.
2973 * po/tr.po: Updated version.
2977 * ld.texinfo (Output Section Fill): Fix amateur texinfo.
2982 * emultempl/mmo.em (mmo_after_open): Don't call
2983 _bfd_mmix_check_all_relocs when producing ELF output.
2987 * emulparams/elf64alpha.sh (NOP): Adjust for big-endian
2988 definition. Emit a unop+nop pair.
2992 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Also check
2993 for presence of .MMIX.reg_contents.linker_allocated before early
2996 * NEWS: Mention support for MMIX.
3000 Support arbitrary length fill patterns.
3001 * ld.texinfo (Output Section Fill): Describe fill expressions.
3002 (FILL): Refer to the above.
3003 * ldexp.h (etree_value_type): Add "str" field.
3004 (union etree_union): Add "str" to "value" struct.
3005 (exp_bigintop): Declare.
3006 (exp_get_fill): Declare.
3007 * ldexp.c: Include "safe-ctype.h".
3008 (exp_intop): Set value.str to NULL.
3009 (exp_bigintop): New function.
3010 (new_rel): Pass in "str", and set new.str from it.
3011 (new_rel_from_section): Set new.str to NULL.
3012 (fold_name): Adjust calls to new_rel.
3013 (exp_fold_tree): Likewise.
3014 (exp_get_fill): New function.
3015 * ldgram.y (struct big_int bigint, fill_type *fill): New.
3016 (INT): Returns a "bigint". Adjust all code handling INTs.
3017 (fill_opt): Returns a "fill".
3018 (fill_exp): Split out of fill_opt, use for FILL.
3019 * ldlang.h (struct _fill_type): New.
3020 (fill_type): Move typedef to ldexp.h.
3021 (lang_output_section_statement_type): "fill" is now a pointer.
3022 (lang_fill_statement_type): Likewise.
3023 (lang_padding_statement_type): Likewise.
3024 (lang_add_fill): Now takes a "fill_type *" param.
3025 (lang_leave_output_section_statement): Likewise.
3026 (lang_do_assignments): Likewise.
3027 (lang_size_sections): Likewise.
3028 (lang_leave_overlay_section): Likewise.
3029 (lang_leave_overlay): Likewise.
3030 * ldlang.c: Include ldgram.h after ldexp.h.
3031 (lang_output_section_statement_lookup): Adjust for fill_type change.
3032 (print_fill_statement): Likewise.
3033 (print_padding_statement): Likewise.
3034 (insert_pad): Now takes a "fill_type *" arg.
3035 (size_input_section): Likewise.
3036 (lang_size_sections_1): Likewise.
3037 (lang_size_sections): Likewise.
3038 (lang_do_assignments): Likewise.
3039 (lang_add_fill): Likewise.
3040 (lang_leave_output_section_statement): Likewise.
3041 (lang_leave_overlay_section): Likewise.
3042 (lang_leave_overlay): Likewise.
3043 Adjust all callers of the above function.
3044 * ldlex.l: Include ldgram.h after ldexp.h. Allow hex numbers
3045 starting with "0X" as well as "0x". Return bigint.str for hex
3046 numbers starting with "0x" or "0X", zero bigint.str otherwise.
3047 Always use base 16 for numbers starting with "$".
3048 * ldmain.c: Include ldgram.h after ldexp.h.
3049 * ldwrite.c (build_link_order): Use bfd_data_link_order in place
3050 of bfd_fill_link_order.
3051 * pe-dll.c: Adjust lang_do_assignments calls.
3052 * emultempl/elf32.em: Likewise.
3053 * emultempl/hppaelf.em: Likewise.
3054 * emultempl/ppc64elf.em: Likewise.
3055 * emultempl/beos.em: Include ldgram.h after ldexp.h, adjust
3056 lang_add_assignment call.
3057 * emultempl/pe.em: Likewise.
3061 * ld.texinfo (VERSION scripts): Symbol names are globbing patterns.
3062 * ldgram.y (lang_new_vers_regex): Rename to lang_new_vers_pattern;
3063 the pattern in question is not a regexp.
3064 * ldlang.c: Likewise.
3065 * ldlang.h: Likewise.
3066 * ldlex.l (V_IDENTIFIER): Allow '[', ']', '-', '!', and '^' also.
3070 * ldlex.l (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
3071 * ldgram.y (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
3072 (exp): Add DATA_SEGMENT_ALIGN (exp, exp) and DATA_SEGMENT_END (exp).
3073 * ldexp.c (exp_data_seg): New variable.
3074 (exp_print_token): Handle DATA_SEGMENT_ALIGN and DATA_SEGMENT_END.
3075 (fold_binary): Handle DATA_SEGMENT_ALIGN.
3076 (exp_fold_tree): Handle DATA_SEGMENT_END.
3077 Pass allocation_done when recursing instead of hardcoding
3078 lang_allocating_phase_enum.
3079 * ldexp.h (exp_data_seg): New.
3080 * ldlang.c (lang_size_sections_1): Renamed from lang_size_sections.
3081 (lang_size_sections): New.
3082 * ld.texinfo (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): Document.
3083 * scripttempl/elf.sc: Use DATA_SEGMENT_ALIGN and DATA_SEGMENT_END
3084 if COMMONPAGESIZE is defined.
3085 * emulparams/elf_i386.sh (COMMONPAGESIZE): Set to 4K.
3086 * emulparams/elf32_sparc.sh (COMMONPAGESIZE): Set to 8K.
3087 * emulparams/elf64_sparc.sh (COMMONPAGESIZE): Set to 8K.
3088 * emulparams/elf64alpha.sh (COMMONPAGESIZE): Set to 8K.
3089 * emulparams/elf64_ia64.sh (COMMONPAGESIZE): Set to 16K for shared
3094 * Makefile.in: Regenerate.
3098 * lexsup.c: Remove strtoul declaration.
3102 * ldmain.c: Add prototype for main ().
3103 * lexsup.c: Guard declaration of strtoul with HAVE_STDLIB_H.
3104 * emultempl/lnk960.em (lnk960_choose_target): Function should
3109 * ldlang.c (entry_section): New initialised variable.
3110 (lang_finish): Use it.
3111 * ldlang.h (entry_section): Declare.
3112 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Set
3113 entry_section to ".opd".
3117 * ld.texinfo (Options): Add back in -nostdlib documentation,
3118 which had been inadvertently removed.
3122 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Adjust
3123 register section vma to a sane value after emitting error. Make
3124 fatal conditions cause program exit when emitting message.
3128 * configure.tgt: Add or32-*-rtems target.
3132 Contribute sh64-elf.
3134 * emulparams/shelf32.sh (STACK_ADDR): Define as formerly defined
3135 in OTHER_RELOCATABLE_SECTIONS.
3137 * emulparams/shelf32.sh (STACK_ADDR): Define.
3138 (OTHER_RELOCATABLE_SECTIONS): Renamed to...
3139 (OTHER_SECTIONS): this. Removed stack settings.
3140 * emulparams/shelf64.sh (OTHER_RELOCATABLE_SECTIONS): Do not set.
3141 (OTHER_SECTIONS): Reset after sourcing shelf32.sh.
3143 * emultempl/sh64elf.em (sh64_elf_$_before_allocation): Disable
3144 relaxing if any shmedia or mixed sections are found.
3146 * emultempl/sh64elf.em (sh64_elf_before_allocation): Pass f to
3147 einfo. Gracefully decline to output to non-elf formats.
3149 * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS) <.stack>:
3150 Default to _end aligned to next multiple of 0x40000, plus 0x40000.
3151 * emulparams/shelf32.sh: Ditto.
3153 * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Tweak
3156 * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Avoid
3157 non-portable shell constructs. From Hans-Peter Nilsson.
3159 * emulparams/shelf64.sh (EXTRA_EM_FILE): Define empty.
3160 * Makefile.am (eshelf64.c, eshlelf64.c, eshlelf32.c): Adjust
3161 dependencies to the shell script include chain.
3162 * Makefile.in: Regenerate.
3164 * emultempl/sh64elf.em: Update and tweak comments.
3165 (sh64_elf_${EMULATION_NAME}_after_allocation): Always allocate and
3166 make a .cranges section SEC_IN_MEMORY.
3168 * emultempl/sh64elf.em
3169 (sh64_elf_${EMULATION_NAME}_before_allocation): Don't stop when
3170 .cranges section found to be necessary; continue and set stored
3171 section contents flags for sections with non-mixed contents.
3172 Use a struct sh64_section_data container and sh64_elf_section_data
3173 to store contents-type flags.
3174 Remove unused update of "isec".
3175 (sh64_elf_${EMULATION_NAME}_after_allocation): Only process
3176 sections marked SHF_SH5_ISA32_MIXED. Use sh64_elf_section_data to
3177 access contents-type flags. Assert that the associated container
3178 is initialized. Use that container, not elf_gp_size, to hold size
3179 of linker-generated cranges contents.
3181 * emultempl/sh64elf.em
3182 (sh64_elf_${EMULATION_NAME}_before_allocation): Exit early if
3183 there's already a .cranges section. When section flag difference
3184 is found, don't NULL-check cranges a second time. Tweak comments.
3185 (sh64_elf_${EMULATION_NAME}_after_allocation): Use size after
3186 merging, not max size, as size of ld-generated .cranges contents.
3187 Don't set ELF section flags in output section. When checking for
3188 needed .cranges descriptors, don't use a variable; compare
3189 incoming ELF section flags directly to SHF_SH5_ISA32_MIXED. Tweak
3192 * emultempl/sh64elf.em: New file.
3193 * Makefile.am (eshelf32.c, eshlelf32.c): Adjust dependencies.
3194 * Makefile.in: Regenerate.
3195 * emulparams/shelf32.sh (OUTPUT_FORMAT): Only set if not set.
3196 (OTHER_RELOCATING_SECTIONS): Ditto.
3197 (EXTRA_EM_FILE): New, set to sh64elf if not set.
3198 * emulparams/shlelf32.sh: Stub out all settings except
3199 OUTPUT_FORMAT. Source shelf32.sh.
3200 * emulparams/shelf64.sh: Similar, but also keep ELF_SIZE and
3201 OTHER_RELOCATING_SECTIONS.
3202 (OTHER_RELOCATING_SECTIONS): Remove .cranges.
3203 * emulparams/shlelf64.sh: Stub out all settings except
3204 OUTPUT_FORMAT. Source shelf64.sh.
3206 * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS): Include
3208 (DATA_START_SYMBOLS): Define, provide ___data.
3209 (OTHER_READONLY_SYMBOLS): Define, provide ___rodata and align to 8
3210 for consecutive .data section.
3211 (OTHER_GOT_SECTIONS): Define, align to 8 for consecutive .bss
3212 section after .data section.
3213 * emulparams/shlelf64.sh: Ditto.
3214 * emulparams/shelf32.sh: Ditto.
3215 (ALIGNMENT): Define to 8.
3216 * emulparams/shelf32.sh: Ditto.
3218 * configure.tgt (sh64-*-elf*): Assign targ_extra_libpath to get
3219 built-in linker scripts.
3221 * emulparams/shlelf64.sh: New.
3222 * emulparams/shelf64.sh: New.
3223 * configure.tgt (sh64-*-elf*): Add shelf64 and shlelf64 to
3225 * Makefile.am: Add support for shlelf64 and shelf64.
3226 * Makefile.in: Regenerate.
3228 * configure.tgt (sh64-*-elf*): Add shelf as default.
3229 Add shlelf to targ_extra_emuls.
3231 * emulparams/shelf32.sh: New file.
3232 * emulparams/shlelf32.sh: New file.
3233 * Makefile.am: Add support for shlelf32 and shelf32.
3234 * configure.tgt: Map sh64-*-elf* to shlelf32 and shelf32.
3235 * Makefile.in: Regenerate.
3239 * ldlang.c (lang_reset_memory_regions): Rename from
3240 reset_memory_regions. Change all callers. Make public.
3241 * ldlang.h (lang_reset_memory_regions): Prototype.
3242 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Call
3243 lang_reset_memory_regions before lang_size_sections.
3244 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
3245 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Likewise.
3249 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Use signed
3250 arithmetic when checking for too many global registers.
3254 * Makefile.am (ALL_EMULATIONS): Add ehppanbsd.o.
3255 (ehppanbsd.c): New rule.
3256 * Makefile.in: Regenerate.
3257 * configure.tgt (hppa*-*-netbsd*): New target.
3258 * emulparams/hppalinux.sh: Add comment to check other files
3259 that source this file it is modified, and list which
3261 * emulparams/hppanbsd.sh: New file.
3265 * scripttempl/xstormy16.sc: Don't allocate extra space for the
3270 Support on-demand global register allocation from
3271 R_MMIX_BASE_PLUS_OFFSET relocs.
3272 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Rename from
3273 mmix_set_reg_section_vma. Call
3274 _bfd_mmix_finalize_linker_allocated_gregs.
3275 (mmix_before_allocation): New function.
3276 (LDEMUL_AFTER_ALLOCATION): Set to mmix_after_allocation.
3277 (LDEMUL_BEFORE_ALLOCATION): Define to mmix_before_allocation.
3278 * scripttempl/mmo.sc (.text): Mark .init, .fini as KEEP.
3279 (.MMIX.reg_contents): Add .MMIX.reg_contents.linker_allocated
3280 before .MMIX.reg_contents.
3281 * emultempl/mmo.em (gldmmo_before_allocation): Define to default.
3282 (mmo_after_open): New function.
3283 (LDEMUL_AFTER_OPEN): Define to mmo_after_open.
3284 * emulparams/elf64mmix.sh (OTHER_SECTIONS): Tweak formatting. Add
3285 .MMIX.reg_contents.linker_allocated before .MMIX.reg_contents.
3289 * emulparams/or32.sh: New file.
3290 * emulparams/or32elf.sh: New file.
3291 * scripttempl/or32.sc: New file.
3292 * configure.tgt : Add support for or32.
3293 * configure: Regenerate
3294 * Makefile.am: Add support for or32.
3295 * Makefile.in: Regenerate.
3296 * NEWS: Mention support for or32.
3297 * po/ld.pot: Regenerate.
3302 * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Define to be mipself.
3303 * emultempl/mipself.em: New file to handle MIPS ELF embedded
3304 reloc creation (ld --embedded-relocs).
3308 * configure: Regenerated.
3312 * Makefile.am (install): Depend on install-info.
3313 * Makefile.in: Regenerate.
3317 * ldmain.c (main): Use full sentences to ease translation.
3321 * po/fr.po: Updated version.
3325 * po/es.po: Updated version.
3329 * ldlex.l (yy_input): Correct error check.
3333 * ldmisc.c (demangle): Put back dots when string not demangled.
3337 * emulparams/elf64alpha.sh (NOP): Use unop.
3341 * ldlex.l: Use fread instead of read.
3345 * configure.tgt (ia64-*-netbsd*): New target.
3349 * emulparams/elf32btsmip.sh (SHLIB_TEXT_START_ADDR): Change to
3351 * emulparams/elf64btsmip.sh (SHLIB_TEXT_START_ADDR): Likewise.
3355 * ldver.c (ldversion): Update year.
3359 * po/ld.pot: Regenerate.
3363 * Makefile.am (eelf64ppc.c, eelf64lppc.c): Depend on ppc64elf.em.
3364 * Makefile.in: Regenerate.
3365 * emulparams/elf64ppc.sh (EXTRA_EM_FILE): Define.
3366 * emultempl/ppc64elf.em: New file.
3370 * scripttempl/pe.sc: Add support for constructor priorities.
3374 * emulparams/avr1200.sh (DATA_START): Define as 0x60.
3375 * emulparams/avr23xx.sh: Likewise.
3376 * emulparams/avr4433.sh: Likewise.
3377 * emulparams/avr44x4.sh: Likewise.
3378 * emulparams/avr85xx.sh: Likewise.
3379 * emulparams/avrmega103.sh: Likewise.
3380 * emulparams/avrmega161.sh: Likewise.
3381 * emulparams/avrmega603.sh: Likewise.
3382 * scripttempl/elf32avr.sc: Use DATA_START instead of 0x60.
3386 * ldlang.c (walk_wild_section): Exclude object file if enclosing
3387 archive is excluded.
3391 * Makefile.am (ALL_EMULATIONS): Add eshelf_nbsd.o and eshlelf_nbsd.o.
3392 (eshelf_nbsd.c): New rule.
3393 (eshlelf_nbsd.c): New rule.
3394 * Makefile.in: Regenerate.
3395 * configure.tgt (sh*le-*-netbsdelf*): New target.
3396 (sh*-*-netbsdelf*): New target.
3397 * emulparams/shelf.sh: Document that shelf_nbsd.sh sources this file.
3398 * emulparams/shelf_nbsd.sh: New emulation.
3399 * emulparams/shlelf_nbsd.sh: New emulation.
3403 * po/es.po: New file: Spanish translation.
3404 * configure.in (ALL_LINGUAS): Add es.
3405 * configure: Regenerate.
3409 * ld.texinfo: Note that --emit-relocs is currently only
3410 implemented for ELF.
3414 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Make use
3415 of bfd_section_list_remove and bfd_section_list_insert macros.
3416 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
3417 * emultempl/mmo.em (mmo_place_orphan): Likewise.
3421 * configure.tgt (x86_64-*-netbsd*): New target.
3425 (gld*_create_output_section_statements): New function.
3426 For -binitfini support.
3427 * emultempl/aix.em (gld*_before_parse): Fix comment.
3428 * emultempl/aix.em (gld*_parse_args): Fix comment.
3432 * configure.tgt (mips*-dec-netbsd*): Delete alias for
3434 (sparc64-*-netbsd*): Add elf32_sparc to targ_extra_emuls.
3436 * configure.tgt (arm-*-netbsdelf*): Add target.
3437 (arm-*-netbsd*): Add armelf and armelf_nbsd to targ_extra_emuls.
3438 * emulparams/armelf_nbsd.sh: Added.
3439 * Makefile.am: Add rules for earmelf_nbsd.
3440 * Makefile.in: Regenerate.
3445 * configure.host: Add rules for x86_64-*linux-gnu. Change
3446 s390x-linux entry to use gcc to report configuration, replace gcc
3447 with $CC in s390-linux
3451 * ld.texinfo (VERSION): Fix markup.
3455 * Makefile.am (ALL_EMULATIONS): Add m68kelfnbsd.o.
3456 (m68kelfnbsd.c): New rule.
3457 * Makefile.in: Regenerate.
3458 * configure.tgt (m68*-hp-netbsd*): Renamed to ..
3459 (m68*-*-netbsd*4k*): .. this.
3460 (m68*-*-netbsdelf*): New target.
3461 (m68*-*-netbsd*): Also include ELF support.
3462 (m68*-*-netbsdaout*): New alias for m68*-*-netbsd*.
3463 * emulparams/m68kelfnbsd.sh: New emulation.
3467 * ldgram.y (vers_node): Support anonymous version tags.
3468 * ldlang.c (lang_register_vers_node): Ensure anonymous version
3469 tag is not defined together with non-anonymous versions.
3470 * ld.texinfo: Document it.
3474 * po/tr.po: New file: Turkish translation.
3475 * configure.in (ALL_LINGUAS): Add tr.
3476 * configure: Regenerate.
3480 * Makefile.am: Add rules for eelf64alpha_nbsd.
3481 * Makefile.in: Regenerate.
3482 * configure.tgt (alpha*-*-netbsd*): Set
3483 targ_emul to elf64alpha_nbsd.
3484 * emulparams/elf64alpha_nbsd.sh: Added.
3488 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust
3489 section_tail when fiddling with section list.
3490 (gld${EMULATION_NAME}_list_options): Ensure sentences aren't
3491 broken into separate strings to make translation easier.
3492 * emultempl/mmo.em (mmo_place_orphan): Adjust section_tail when
3493 fiddling with section list.
3494 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
3498 * scripttempl/mmo.sc: Add .debug_ranges to listed sections.
3502 * ldmain.c (main): Initialise link_info.eh_frame_hdr.
3506 * emultempl/elf32.em (finish): Supply output_bfd
3507 to bfd_elf*_discard_info.
3508 (OPTION_EH_FRAME_HDR): Define.
3509 (longopts): Add --eh-frame-hdr.
3510 (parse_args): Handle it.
3511 (list_options): Add --eh-frame-hdr to help.
3512 * emultempl/hppaelf.em (finish): Supply output_bfd
3513 to bfd_elf*_discard_info.
3514 * scripttempl/elf.sc (.eh_frame_hdr): Add.
3518 * lexsup.c (parse_args): Don't pass shortopts to second call to
3519 getopt functions. Restore optind rather than decrementing before
3520 second call. Remove errind as it now duplicates last_optind.
3524 * emultempl/pe.em (gld_${EMULATION_NAME}_list_options): Fix typo.
3529 * Makefile.am: Add support for xstormy16.
3530 * configure.tgt: Add support for xstormy16.
3531 * Makefile.in: Regenerate.
3532 * emulparams/elf32xstormy16.sh: New file.
3533 * scripttempl/xstormy16.sc: New file.
3537 * Makefile.in (LIB_PATH): Make configurable.
3538 (GENSCRIPTS): Set LIB_PATH in environment.
3539 * configure.in: Substitute LIB_PATH.
3540 * configure: Regenerate.
3541 * configure.tgt (*cygwin): Set LIB_PATH for cross build.
3542 * configure.host (*cygwin): Add /usr/lib/w32api to NATIVE_LIB_DIRS.
3546 * lexsup.c (ld_options): Insert 'PROGRAM' into the text string
3547 describing the -N option so that it is easier to translate into
3552 * emultempl/pe.em (..._list_options): Replace multiple fprintf
3553 statements describing a single option with a single, newline
3554 escaped fprintf. This allows better translation into other
3557 * ldmain.c (add_archive_element): Combine multiple strings
3558 into a single string to permit better translation into other
3563 * Makefile.am: Remove eaixppc64.
3564 * Makefile.in: Regenerate.
3568 * emultempl/aix.em (choose_target): Change default target to
3569 OUTPUT_FORMAT for ppcmacos. Add braces to remove compiler
3571 (gld*_read_file): Fix typo.
3572 (change_symbol_mode): Add prototype.
3575 * emulparams/aixppc.sh (SYSCALL_MASK, SYMBOL_MODE_MASK): Delete.
3576 * emulparams/aixrs6.sh : Same.
3577 * emulparams/ppcmacos.sh : Same.
3578 * emulparams/aixppc64.sh : Delete file.
3579 * emultempl/aix.em : Formatting changes.
3583 * emulparams/criself.sh (NO_SMALL_DATA): Set, to yes.
3584 (OTHER_BSS_END_SYMBOLS): Don't refer to .sbss when setting
3586 (OTHER_END_SYMBOLS): Fix formatting.
3587 * emulparams/crislinux.sh (NO_SMALL_DATA): Set, to yes.
3588 (OTHER_END_SYMBOLS): Fix formatting.
3592 * ldexp.c (exp_print_token): Correct "table" entry for RSHIFT.
3596 * configure.tgt : Remove eaixppc64 emulations.
3597 * Makefile.in : Remove eaixppc64.c
3598 * ldemul.c (ldemul_choose_target): New parameters argc, argv.
3599 (ldemul_default_target): Same.
3600 * emultempl/gld960.em (gld960_choose_target): Same.
3601 * emultempl/gld960c.em (gld960_choose_target): Same.
3602 * scripttempl/aix.sc: Remove OUTPUT_FORMAT.
3603 * emultempl/aix.em (is_syscall): syscall_mask now a variable.
3604 * emultempl/aix.em (gld*_read_file): symbol_mode_mask now a variable.
3605 * emultempl/aix.em (gld*_parse_args): Handle -b32 -b64 emulation.
3606 * emultempl/aix.em (choose_target): New function. Handle emulation of
3611 * emulparams/elf_i386.sh (NO_SMALL_DATA): Set to yes.
3612 * emulparams/elf_i386_be.sh (NO_SMALL_DATA): Likewise.
3613 * emulparams/elf_i386_chaos.sh (NO_SMALL_DATA): Likewise.
3614 * emulparams/elf_i386_ldso.sh (NO_SMALL_DATA): Likewise.
3615 * emulparams/elf_x86_64.sh (NO_SMALL_DATA): Likewise.
3616 * emulparams/m68kelf.sh (NO_SMALL_DATA): Likewise.
3617 * emulparams/elf32_sparc.sh (NO_SMALL_DATA): Likewise.
3618 * emulparams/elf64_sparc.sh (NO_SMALL_DATA): Likewise.
3620 * scripttempl/elf.sc (SBSS): New. Define if ${NO_SMALL_DATA}
3623 (REL_SDATA): Likewise.
3624 (REL_SBSS): Likewise.
3625 (REL_SDATA2): Likewise.
3626 (REL_SBSS2): Likewise.
3627 (SBSS2): Define if ${NO_SMALL_DATA} is not empty.
3632 * scripttempl/elfm68hc11.sc (CTOR, DTOR): Put constructor and
3634 * scripttempl/elfm68hc12.sc (CTOR, DTOR): Likewise.
3638 * Makefile.in: Regenerated with automake based on automake
3639 1.4-8 in RedHat 7.1.
3643 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Define.
3644 (config.status): Delete rule.
3645 Add extra dependencies to cover sourced emulparams files.
3646 * Makefile.in: Regenerate.
3648 * scripttempl/elf.sc: Order <section>, <section>.* and
3649 corresponding linkonce sections as seen in input files.
3650 Formatting fixes. Zero vma of all sections if not relocating.
3651 (STACK): Define and insert if STACK_ADDR defined.
3652 (OTHER_RELOCATING_SECTIONS): Delete.
3653 (OTHER_END_SYMBOLS): Define.
3654 (OTHER_READONLY_SECTIONS): Always insert, not just when relocating.
3655 (OTHER_READWRITE_SECTIONS): Likewise.
3656 (OTHER_GOT_SECTIONS): Likewise.
3657 (OTHER_SDATA_SECTIONS): Likewise.
3658 (OTHER_BSS_SECTIONS): Likewise.
3659 * scripttempl/elfi370.sc (OTHER_READONLY_SECTIONS): Likewise.
3660 (OTHER_READWRITE_SECTIONS): Likewise.
3661 * scripttempl/nw.sc (OTHER_READONLY_SECTIONS): Likewise.
3662 (OTHER_READWRITE_SECTIONS): Likewise.
3664 * emulparams/armelf.sh (OTHER_RELOCATING_SECTIONS): Delete.
3665 (STACK_ADDR): Define.
3666 * emulparams/armelf_oabi.sh: As for armelf.sh.
3667 * emulparams/elf32mcore.sh: As for armelf.sh.
3668 * emulparams/h8300elf.sh: As for armelf.sh.
3669 * emulparams/mn10200.sh: As for armelf.sh.
3670 * emulparams/shelf.sh: As for armelf.sh.
3672 * emulparams/elf32fr30.sh (OTHER_RELOCATING_SECTIONS): Delete.
3673 (OTHER_END_SYMBOLS): Define.
3674 * emulparams/m32relf.sh: As for elf32fr30.sh.
3675 * emulparams/h8300helf.sh: As for elf32fr30.sh.
3676 * emulparams/h8300self.sh: As for elf32fr30.sh.
3678 * emulparams/criself.sh (OTHER_READONLY_SECTIONS): Protect symbol
3679 defines with RELOCATING test.
3680 (OTHER_SDATA_SECTIONS): Likewise.
3681 (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
3682 (OTHER_END_SYMBOLS): ..this.
3683 * emulparams/crislinux.sh: As for criself.sh.
3685 * emulparams/elf32bmipn32.sh (OTHER_SDATA_SECTIONS): Zero vma
3687 (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
3688 (OTHER_SECTIONS): ..this. Zero vma if not relocating. Order
3689 normal and linkonce sections as seen in input files.
3690 * emulparams/elf32bmip.sh (DATA_ADDR): Don't define if EMBEDDED.
3691 (TEXT_DYNAMIC): Likewise.
3692 (INITIAL_READONLY_SECTIONS): Zero vma if not relocating.
3693 (OTHER_SDATA_SECTIONS): Likewise.
3694 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
3695 * emulparams/shlelf_linux.sh (OTHER_READWRITE_SECTIONS): Likewise.
3696 * emulparams/elf64alpha.sh (OTHER_READONLY_SECTIONS): Likewise.
3697 * emulparams/hppalinux.sh (OTHER_READONLY_SECTIONS): Likewise.
3698 * emulparams/elf64_aix.sh (OTHER_GOT_SECTIONS): Likewise.
3699 (OTHER_PLT_RELOC_SECTIONS): Likewise.
3700 (OTHER_READONLY_SECTIONS): Likewise. Order normal and linkonce
3701 sections as seen in input files.
3702 * emulparams/elf64_ia64.sh: As for emulparams/elf64_aix.sh.
3703 * emulparams/hppa64linux.sh (OTHER_READONLY_SECTIONS): Zero vma
3705 (OTHER_READWRITE_SECTIONS, OTHER_BSS_SECTIONS): Likewise.
3706 (OTHER_BSS_END_SYMBOLS): Merge from elf64hppa.sh.
3707 * emulparams/elf64mmix.sh (OTHER_RELOCATING_SECTIONS): Delete.
3708 (OTHER_SECTIONS): Instead, use this..
3709 (OTHER_END_SYMBOLS): ..and this.
3711 * emulparams/elf32b4300.sh: Source elf32bmip.sh, remove duplicates.
3712 * emulparams/elf32bsmip.sh: Likewise.
3713 * emulparams/elf32btsmip.sh: Likewise.
3714 * emulparams/elf32ebmip.sh: Likewise.
3715 * emulparams/elf32lmip.sh: Likewise.
3716 * emulparams/elf32elmip.sh: Source elf32lmip.sh, remove duplicates.
3717 * emulparams/elf32lsmip.sh: Likewise.
3718 * emulparams/elf32ltsmip.sh: Source elf32btsmip.sh, remove duplicates.
3719 * emulparams/elf32l4300.sh: Source elf32b4300.sh, remove duplicates.
3720 * emulparams/elf64bmip.sh: Source elf32bmipn32.sh, remove duplicates.
3721 * emulparams/elf64btsmip.sh: Likewise.
3722 * emulparams/elf64ltsmip.sh: Source elf64btsmip.sh, remove duplicates.
3723 * emulparams/elf32lppc.sh: Source elf32ppc.sh, remove duplicates.
3724 * emulparams/elf32ppclinux.sh: Likewise.
3725 * emulparams/elf32ppcsim.sh: Likewise.
3726 * emulparams/elf32lppcsim.sh: Source elf32lppc.sh, remove duplicates.
3727 * emulparams/elf64hppa.sh: Source hppa64linux.sh, remove duplicates.
3728 * emulparams/h8300helf.sh: Source h8300elf.sh, remove duplicates.
3729 * emulparams/h8300self.sh: Likewise.
3730 * emulparams/mn10300.sh: Source mn10200.sh, remove duplicates.
3731 * emulparams/sh.sh: Comment.
3732 * emulparams/shl.sh: Source sh.sh, remove duplicates.
3733 * emulparams/shlelf.sh: Source shelf.sh, remove duplicates.
3734 * emulparams/shelf_linux.sh: Source shlelf_linux.sh, remove duplicates.
3739 * ldlang.c (map_input_to_output_sections): Replace "break"
3740 accidentally removed with 2001-08-03 change.
3741 (lang_gc_sections_1): Likewise.
3745 * ldlang.c (walk_wild_section): Move sec == NULL case out of loop.
3749 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Use NULL instead
3750 of false when calling lang_size_sections.
3751 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
3755 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Only emit this
3756 function when LDEMUL_FINISH isn't set to the same name. Don't
3757 call ${LDEMUL_FINISH}.
3758 (ld_${EMULATION_NAME}_emulation): Call $LDEMUL_FINISH if defined.
3759 * emultempl/armelf.em (arm_elf_finish): Call
3760 gld${EMULATION_NAME}_finish.
3761 * emultempl/hppaelf.em (hppaelf_finish): Rename to
3762 gld${EMULATION_NAME}_finish. Call bfd_elf32_discard_info and
3763 hppaelf_layout_sections_again if necessary.
3764 (need_laying_out): New var.
3765 (hppaelf_layaout_sections_again): Rename to
3766 hppaelf_layout_sections_again. Clear need_laying_out.
3767 (PARSE_AND_LIST_OPTIONS): Format text.
3771 * emultempl/armelf.em (arm_elf_finish): Renamed from
3772 gld${EMULATION_NAME}_finish.
3773 (LDEMUL_FINISH): Set to arm_elf_finish.
3777 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): New.
3778 (struct ld_emulation_xfer_struct): Use it.
3782 * emulparams/elf64hppa.sh (OTHER_BSS_END_SYMBOLS): Add
3783 additional symbols referenced by newer crt0.o files from HP.
3787 * emulparams/armelf.sh (DATA_START_SYMBOLS): New symbol.
3791 * Makefile.am (GENSCRIPTS): Quote ${exec_prefix}.
3792 * Makefile.in: Regenerate.
3796 * ld.texinfo: Use @command for commands, @option for options.
3797 * Makefile.am (POD2MAN): Use 'GNU Development Tools' for
3799 * Makefile.in: Rebuild.
3803 * configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
3804 Add support for targets.
3808 * configure.in (ALL_LINGUAS): Add "fr" and "sv"
3809 * configure: Regernate.
3810 * po/fr.po: New file.
3811 * po/sv.po: New file.
3815 * configure.tgt (sh-*-linux): Set targ_emul, targ_extra_emuls
3816 as little endian default and to support big endian.
3820 * ld.texinfo (Options): Document new option, -nostdlib.
3821 * lexsup.c (OPTION_NOSTDLIB): New definition.
3822 (ld_options): Add entry for "nostdlib".
3823 (parse_args): Handle OPTIONS_NOSTDLIB.
3824 * ldfile.c (ldfile_add_library_path): Don't add directories
3825 to the search path if they weren't specified on the command line
3826 and -nostdlib was specified.
3827 * ld.h (ld_config_type): New member only_cmd_line_lib_dirs.
3831 * lexsup.c (parse_args): Prevent infinite parsing loop when
3832 "-rpath.a" is specified on the command line.
3833 Replace calls to fprintf with calls to einfo.
3837 * ld.texinfo: A historical requirement that MEMORY and SECTIONS
3838 appear only once across all the linker scripts involved in a link
3839 invocation no longer applies. Make the documentation reflect
3844 * configure.tgt: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
3846 (sh-*-linux*): Added targ_extra_libpath.
3850 * ldlang.c (lang_size_sections): Keep a valid output_offset field
3851 for padding statements.
3855 * configure.tgt (mmix-*-*): New target.
3856 * Makefile.am (ALL_EMULATIONS): Add eelf64mmix.o and emmo.o.
3857 Add dependencies to match.
3858 * emulparams/mmo.sh, emulparams/elf64mmix.sh, emultempl/mmo.em,
3859 emultempl/mmix-elfnmmo.em, emultempl/mmixelf.em,
3860 scripttempl/mmo.sc: New files.
3861 * gen-doc.texi: @set MMIX.
3862 * ld.texinfo: Ditto.
3863 [MMIX] Add MMIX node.
3864 * Makefile.in: Regenerate.
3868 * ldlang.c: Fix a comment typo.
3872 * configure.host: Move alpha*-*-linux-gnu* entry to generic
3873 entries, and match *-*-linux*.
3877 * ldgram.y (mri_script_command): Surround processing of INCLUDE
3878 with ldlex_script, ldlex_popstate.
3879 (ifile_p1): Likewise.
3880 * ldlex.l (EOF): Don't BEGIN(SCRIPT). Restore lineno from the
3882 (lex_push_file): Save current lineno to lineno_stack. Set lineno
3883 to 1. Don't BEGIN(SCRIPT).
3884 (lex_redirect): Similarly.
3885 * ldmain.c (main): Set yydebug non-zero if YYDEBUG.
3889 * scripttempl/armcoff.sc: Define __EH_FRAME_BEGIN__ and
3890 __EH_FRAME_END__ and accept eh frames into data section.
3891 Add ctor and dtor sections.
3895 * pe-dll.c (autofilter_objectlist): Add gcrt0.o.
3896 (auto-export): Fix indentation.
3900 * pe-dll.c (autofilter_objectlist): Add startup objects
3902 (auto-export): Constify char * p.
3903 Extract file basename and use strcmp rather than ststr
3908 * ldmain.c (get_emulation): Improve comment about the handling
3913 * po/POTFILES.in: Regenerate.
3917 * emultempl/elf32.em (gld*_list_options): Remove extra '\t' from
3918 -z nocopyreloc and -z nocombreloc usage strings.
3922 * emultempl/elf32.em (gld*_list_options): Include -z nocopyreloc
3927 * scripttempl/armaout.sc: Place .bss section after end of aligned
3928 data section to match behaviour of aout code in constructrion of
3933 * pe-dll.c (autofilter_entry_type autofilter_liblist: Add
3934 startup files for mingw32 dlls to list.
3938 * emultempl/elf32.em: Fix shell 'if' usage for portability.
3942 * configure.tgt (targ): Add arm9e-*-elf.
3946 * genscripts.sh: Fix a typo in the last change.
3950 * emultempl/elf32.em (gld_*_list_options): Include -z combreloc and
3951 -z nocombreloc in usage.
3955 * genscripts.sh: Include a comment at the top of each generated
3956 script, explaining its purpose.
3960 * emultempl/elf32.em (parse_args): Handle -z nocopyreloc.
3961 * NEWS: Mention -z nocopyreloc.
3962 * ld.texinfo (Options): Describe nocopyreloc.
3966 * configure: Regenerate.
3970 * ldver.h (ld_program_version): Remove declaration.
3971 * lexsup.c (parse_args): Move printing of copyright message..
3972 * ldver.c (ldversion): .. to here.
3973 Use BFD_VERSION_STRING in place of BFD_VERSION.
3974 (ld_program_version): Remove.
3975 * Makefile.am (Makefile): Depend on bfd/configure.in.
3977 * Makefile.in: Regenerate.
3981 * Makefile.am: Update dependencies with "make dep-am".
3982 * Makefile.in: Regenerate.
3986 * ldlang.c (lang_common): Conditionally inhibit Common allocation.
3987 * lexsup.c: Add --no-define-common commandline option.
3988 * ldgram.y: Add INHIBIT_COMMON_ALLOCATION script command.
3989 * ldlex.l: Likewise.
3990 * ld.h: Add command_line.inhibit_common_definition.
3991 * ldmain.c (main): Initialize.
3992 * ld.texinfo: Document.
3996 * ldlang.c (section_already_linked): Remove assignment to kept_section.
4000 * ldmisc.c (USE_STDARG): Remove.
4001 (info_msg): Define using VPARAMS, VA_OPEN, VA_FIXEDARG, VA_CLOSE.
4006 * ldmisc.h: Remove #ifdef ANSI_PROTOTYPES and non-ansi
4007 declarations. Update copyright.
4011 * pe-dll.c: Remove obsoleted declaration of
4012 pe_get_data_import_dll_name.
4013 (pe_create_import_fixup): Fix thinko.
4015 * ld.texinfo(enable-auto-import): Clarify the explanation.
4019 * pe-dll.c (pe_create_import_fixup): Revert previous patch.
4020 * emultemp/pe.em (pe_data_import_dll): Move definition outside of
4021 DLL_SUPPORT controlled code.
4025 * emultempl/pe.em(pe_data_import_dll): Make static.
4026 (pe_get_data_import_dll_name): New accessor function.
4027 * pe-dll.c(pe_create_import_fixup): call
4028 pe_get_data_import_dll_name() from pe.em, instead of
4029 directly accessing pe_data_import_dll variable from pe.em.
4033 * deffilep.y: Include "safe-ctype.h" instead of <ctype.h>.
4034 (def_file_add_directive): Use ISSPACE instead of isspace.
4035 (def_lex): Use ISDIGIT/ISXDIGIT/ISALPHA/ISALNUM instead of
4036 isdigit/isxdigit/isalpha/isalnum.
4037 * emultempl/aix.em: Include "safe-ctype.h" instead of <ctype.h>.
4038 (gld${EMULATION_NAME}_read_file): Use ISSPACE instead of isspace.
4039 * emultempl/elf32.em: Include "safe-ctype.h" instead of <ctype.h>.
4040 (gld${EMULATION_NAME}_place_orphan): Use ISALNUM instead of
4042 * emultempl/gld960c.em: Include "safe-ctype.h" instead of <ctype.h>.
4043 (gld960_set_output_arch): Use ISUPPER/TOLOWER instead of
4045 * emultempl/sunos.em: Include "safe-ctype.h" instead of <ctype.h>.
4046 (gld${EMULATION_NAME}_search_dir): Use ISDIGIT instead of isdigit.
4047 * ldctor.c: Include "safe-ctype.h" instead of <ctype.h>.
4048 (ctor_prio): Use ISDIGIT instead of isdigit.
4049 * ldfile.c: Include "safe-ctype.h" instead of <ctype.h>.
4050 (ldfile_open_file_search): Use ISALPHA instead of isalpha.
4051 (ldfile_add_arch): Use ISUPPER/TOLOWER instead of
4053 * ldlang.c: Include "safe-ctype.h" instead of <ctype.h>.
4054 (stricpy): Use TOLOWER instead of isupper/tolower.
4055 (lang_leave_overlay_section): Use ISALNUM instead of isalnum.
4056 * ldlex.l: Include "safe-ctype.h" instead of <ctype.h>.
4057 (lex_warn_invalid): Use ISPRINT instead of isprint.
4058 * ldmain.c: Include "safe-ctype.h" instead of <ctype.h>.
4059 (main): For gettext, also set the LC_CTYPE locate facet.
4060 (add_keepsyms_file): Use ISSPACE instead of isspace.
4061 * lexsup.c: Include "safe-ctype.h" instead of <ctype.h>.
4062 (is_num, parse_args): Use ISDIGIT instead of isdigit.
4063 * mpw-elfmips.c: Include "safe-ctype.h" instead of <ctype.h>.
4064 (gldelf32ebmip_place_orphan): Use ISALNUM instead of isalnum.
4065 * mpw-eppcmac.c: Include "safe-ctype.h" instead of <ctype.h>.
4066 (gldppcmacos_read_file): Use ISSPACE instead of isspace.
4067 * pe-dll.c: Include "safe-ctype.h" instead of <ctype.h>.
4068 (quoteput): Use ISSPACE instead of isspace.
4069 (pe_dll_generate_implib, pe_process_import_defs): Use ISALNUM
4074 * deffilep.y (def_stash_module): Constify "name" param.
4076 * pe-dll.c: Replace CONST with const throughout.
4077 (quick_symbol): Constify "n1", "n2", "n3" params.
4078 (make_singleton_name_thunk): Constify "import" param. Make
4079 "buffer_len" a size_t.
4080 (make_import_fixup_entry): Constify "name", "fixup_name",
4081 "dll_symname" params.
4082 (pe_get16): Cast args of bfd_seek. Replace bfd_read with bfd_bread.
4083 (pe_get32): Likewise.
4084 (pe_implied_import_dll): Likewise.
4086 * emultempl/beos.em (sort_by_file_name): Constify "ra", "rb".
4087 (sort_by_section_name): Likewise.
4089 * emultempl/pe.em: Move defines for arm_epoc_pe before bfd.h included.
4090 (make_import_fixup): Cast printf arg, rel->address to long rather
4092 (gld_${EMULATION_NAME}_after_open): Don't compare NULL against int.
4096 * ldmain.c (main): Rename BufferSize to ld_bufsz because HPUX
4097 defines BufferSize. Increase buffer size by one.
4101 * pe-dll.c (pe_walk_relocs_of_symbol): Fix memory leak.
4105 * configure.tgt: Add arm-openbsd target.
4109 * Makefile.am (ALL_EMULATIONS): Move eelf64ppc.o and
4111 (ALL_64_EMULATIONS): Here.
4112 * Makefile.in: Regenerated.
4116 * emultempl/pe.em(make_import_fixup): change signature to
4117 take asection as well as arelec; we need this for proper
4118 error reporting. Only call pe_create_import_fixup() if
4119 there is no attempt to add a constant addend to the reloc;
4120 otherwise, report error condition.
4121 * pe-dll.c(pe_walk_relocs_of_symbol): change signature,
4122 since final argument is a pointer to make_import_fixup().
4123 Change call to cb() to match make_import_fixup() signature.
4124 (make_import_fixup_mark): make buffer_len unsigned.
4125 * pe-dll.h: change signature of pe_walk_relocs_of_symbol.
4129 * ld.texinfo: add verbose documentation for auto-import
4130 direct-addressing workaround, to compliment the terse
4135 * scripttempl/v850.sc: Add gcc_except_table sections.
4139 * emulparams/h8300helf.sh: Move stack to a much higher memory address.
4140 * emulparams/h8300self.sh: Similarly.
4144 * ld.texinfo (Options, --stack): Correct default value for stack
4149 * emultempl/aix.em : Handle import file XMC_XO and syscall symbols.
4153 * emultempl/beos.em: Declare prototypes for comparions functions,
4158 * emultempl/aix.em: Add missing prototype.
4159 * emultempl/lnk960.em: Likewise.
4160 * emultempl/vanilla.em: Likewise.
4161 * emultempl/armcoff.em: Likewise.
4162 * emultempl/armelf_oabi.em: Likewise.
4163 * emultempl/beos.em: Likewise.
4164 * emultempl/gld960c.em: Likewise.
4165 * emultempl/gld960.em: Likewise.
4167 * emulparams/elf64alpha.sh (PARSE_AND_LIST_PROLOGUE): Add parameter
4168 for prototype declaration.
4173 * ldmain.c (get_emulation): Add support for -mips32 and -mips64.
4177 * emultempl/pe.em: Add missing prototypes.
4178 (gld_${EMULATION_NAME}_after_open): Remove extra args to
4179 pe_find_data_imports.
4180 (pr_sym): Add unused attribute.
4184 * configure.tgt (i[3456]86-*-rtems*, m68*-*-rtems*): Change
4185 default from coff to elf.
4189 * emulparams/h8300helf.sh: Resync with h8300elf.sh. Update
4191 * emulparams/h8300self.sh: Similarly.
4195 * Makefile.am (ALL_EMULATIONS): Add eh8300elf.o, eh8300elf.o and
4197 (eh8300elf.c, eh8300helf.c, eh8300self.c): New targets.
4198 * configure.tgt (h8300-*-elf*): New case.
4199 * emulparams/h8300elf.sh, emulparams/h8300helf.sh: New files.
4200 * emulparams/h8300self.sh: New file.
4201 * Makefile.in: Regenerated.
4205 * ldmain.c (main): Rename BSIZE to BufferSize to avoid collision
4211 * Makefile.am (ALL_EMULATIONS): Add eelf64ppc.o and eelf64lppc.o.
4212 (eelf64ppc.c, eelf64lppc.c): Add make targets.
4214 * Makefile.in: Regenerate.
4215 * configure.tgt: Add powerpc64 support. Move pdp11, pjl, pj
4216 entries to correct alphabetical position.
4217 * emulparams/elf64ppc.sh: New.
4218 * emulparams/elf64lppc.sh: New.
4222 * ldmain.c (main): Declare BSIZE as static.
4226 * emultempl/elf32.em (place_orphan): Place orphan .rel* sections
4227 into .rel.dyn resp. .rela.dyn if combreloc.
4228 (get_script): If .x linker script is equal to .xn, only put it
4229 once into the binary.
4230 Add .xc and .xsc scripts.
4231 (parse_args): Handle -z combreloc and -z nocombreloc.
4232 * scripttempl/elf.sc (.rela.sbss): Fix a typo.
4233 For .xc and .xsc scripts put all .rel* or .rela* input sections
4234 but .rel*.plt and PLT-like sections into .rel.dyn resp. .rela.dyn.
4235 * genscripts.sh (GENERATE_COMBRELOC_SCRIPT): Set if SCRIPT_NAME
4237 Strip trailing whitespace from script.
4238 Generate .xc and .xsc scripts if requested.
4239 * ldmain.c (main): Initialize link_info.combreloc and
4240 link_info.spare_dynamic_tags.
4241 * lexsup.c (OPTION_SPARE_DYNAMIC_TAGS): Define.
4242 (ld_options): Add --spare-dynamic-tags option.
4243 (parse_args): Likewise.
4244 * ld.texinfo: Document -z combreloc and -z nocombreloc.
4245 * ldint.texinfo: Document .xc and .xsc linker scripts.
4246 * NEWS: Add notes about -z combreloc and SHF_MERGE.
4250 * emulparams/elf32fr30.sh: Add a newline.
4254 * deffilep.y: Add missing prototypes.
4255 * pe-dll.c: Likewise.
4259 * ldlang.c (insert_pad): Fix typos in last patch.
4261 * ldlang.c: When traversing lang_statement_union_type lists,
4262 consistently use "header.next" rather than "next".
4263 * mpw-eppcmac.c: Likewise.
4264 * emultempl/beos.em: Likewise.
4265 * emultempl/hppaelf.em: Likewise.
4266 * emultempl/pe.em: Likewise.
4267 * ldlang.h (union lang_statement_union): Remove "next" field.
4269 * ldlang.c (insert_pad): Use offsetof macro.
4270 (lang_size_sections): Always neuter padding statements.
4271 * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Delete.
4273 * pe-dll.c (pe_dll_fill_sections): Correct type of "relax" param
4274 passed to lang_size_sections.
4275 (pe_exe_fill_sections): Likewise.
4276 * emultempl/pe.em (output_prev_sec_find): Copied from elf32.em.
4277 (gld_${EMULATION_NAME}_place_orphan): Merge from elf32.em.
4281 * emultempl/aix.em: Formatting fixes.
4285 * ldlang.c (insert_pad): Make use of an existing pad statement if
4286 available. Move code calculating alignment, adjusting section
4287 alignment power, and adjusting dot to ..
4288 (size_input_section): .. here. Remove unused relax param.
4289 (lang_size_sections): Change boolean `relax' param to boolean *.
4290 Adjust call to size_input_section. Make use of insert_pad to
4291 place pad after the assignment statement. If relaxing, zap
4293 (reset_memory_regions): Reset output_bfd section sizes too.
4294 (relax_again): Move to..
4295 (lang_process): ..here. Adjust call to lang_size_sections, and
4296 remove duplicated code.
4297 * ldlang.h (lang_size_sections): Change `relax' param to boolean *.
4301 * ld.texinfo: Document that fill values now use the four least
4303 * emulparams/elf32fr30.sh (NOP): Update.
4304 * emulparams/elf32mcore.sh: Likewise.
4305 * emulparams/elf64_s390.sh: Likewise.
4306 * emulparams/elf_i386.sh: Likewise.
4307 * emulparams/elf_i386_be.sh: Likewise.
4308 * emulparams/elf_i386_chaos.sh: Likewise.
4309 * emulparams/elf_i386_ldso.sh: Likewise.
4310 * emulparams/elf_s390.sh: Likewise.
4311 * emulparams/elf_x86_64.sh: Likewise.
4312 * emulparams/i386moss.sh: Likewise.
4313 * emulparams/i386nw.sh: Likewise.
4314 * emulparams/m68kelf.sh: Likewise.
4315 * scripttempl/elf.sc: Update NOP comment.
4316 * scripttempl/elfi370.sc: Likewise.
4317 * scripttempl/elfm68hc11.sc: Likewise.
4318 * scripttempl/elfm68hc12.sc: Likewise.
4319 * scripttempl/nw.sc: Likewise.
4323 * ldgram.y (saved_script_handle): Initialize to NULL.
4324 * ldmain.c (main): Change check on saved_script_handle.
4328 * emultempl/elf32.em: Formatting fixes.
4329 (output_prev_sec_find): Test for bfd_ind_section too; do so by
4330 looking at sec->owner.
4331 (output_rel_find): Move function inside LDEMUL_PLACE_ORPHAN test.
4332 (gld${EMULATION_NAME}_place_orphan): Add a few comments. Remove
4333 unused code, and reorganize orphan section placement code.
4335 * ldlang.c (wild_doit): Rename to lang_add_section.
4336 * ldlang.h: Here too.
4337 * mpw-elfmips.c: And here.
4338 * emultempl/beos.em: And here.
4339 * emultempl/elf32.em: And here.
4340 * emultempl/hppaelf.em: And here.
4341 * emultempl/pe.em: And here.
4345 * emultempl/needrelax.em: New file.
4346 * emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Reference it.
4347 * Makefile.am (eelf64_ia64.c): Depend on it.
4348 * Makefile.in: Rebuild.
4352 * emultempl/elf32.em: For SEC_EXCLUDE sections, ensure that
4353 output_section is set non-NULL.
4355 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Return
4356 `true' for SEC_EXCLUDE sections so that the generic code doesn't
4357 needlessly create an output_section_statement. Treat a correctly
4358 named output_section_statement with NULL bfd_section as compatible.
4362 * emultempl/generic.em: Support EXTRA_EM_FILE.
4363 (ld_${EMULATION_NAME}_emulation): Support emulation parameters
4364 LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
4365 LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
4366 LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
4367 LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
4368 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
4369 LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
4370 LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
4371 LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
4372 LDEMUL_FIND_POTENTIAL_LIBRARIES.
4376 * scripttempl/elf.sc, scripttempl/elfd30v.sc,
4377 scripttempl/elfm68hc11.sc, scripttempl/elfm68hc12.sc,
4378 scripttempl/v850.sc: Keep .jcr data.
4384 * ldgram.y (had_script): Change name to saved_script_handle.
4385 Change type to file handle.
4386 * ld.h (had_script): Rename and retype.
4387 * ldfile.c (ldfile_open_command_file): Save the file handle
4388 used in saved_script_handle.
4389 * lexsup.c (parse_args): Do not allow -c option to alter
4390 saved_script_handle.
4391 * ldmain.c (main): Print out the linker script used if
4392 --verbose is given. Check saved_script_handle to obtain the
4393 external linker script used, or if NULL, dump the builtin
4395 * ld.texinfo: Document that --verbose now dumps the linker
4396 script used, regardless of whether it was an internal or an
4401 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
4403 * configure: Regenerate.
4407 * emultempl/elf32.em (output_prev_sec_find): Add missing prototype.
4409 * scripttempl/elf.sc: Move non-text .dynamic section before
4410 .plt/.got/.sdata* group.
4411 (OTHER_GOT_SECTIONS): Move to immediately after .got.
4412 (OTHER_SDATA_SECTIONS): Add.
4413 * emulparams/criself.sh: Use OTHER_SDATA_SECTIONS rather than
4415 * emulparams/crislinux.sh: Likewise.
4416 * emulparams/elf32b4300.sh: Likewise.
4417 * emulparams/elf32bmip.sh: Likewise.
4418 * emulparams/elf32bmipn32.sh: Likewise.
4419 * emulparams/elf32bsmip.sh: Likewise.
4420 * emulparams/elf32btsmip.sh: Likewise.
4421 * emulparams/elf32ebmip.sh: Likewise.
4422 * emulparams/elf32elmip.sh: Likewise.
4423 * emulparams/elf32l4300.sh: Likewise.
4424 * emulparams/elf32lmip.sh: Likewise.
4425 * emulparams/elf32lsmip.sh: Likewise.
4426 * emulparams/elf32ltsmip.sh: Likewise.
4427 * emulparams/elf64bmip.sh: Likewise.
4428 * emulparams/elf64btsmip.sh: Likewise.
4429 * emulparams/elf64ltsmip.sh: Likewise.
4433 * genscripts.sh: Source the emulparams script before each output
4434 script is generated so that variables like `RELOCATING' may affect
4435 variables defined in the emulparams script.
4439 * emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this
4442 * emultempl/beos.em (sort_sections): Modify for 2001-08-03 change,
4443 ie. iterate over wild_statement.section_list.
4444 (gld${EMULATION_NAME}_place_orphan): Likewise.
4448 * scripttempl/elfm68hc12.sc (FINISH_CODE, FINISH_RELOC): New to handle
4449 .fini[0-4] sections used by _exit
4450 (CTOR, DTOR): Export ctor/dtor symbols; move them to ROM.
4451 (*.text,*.data,*.bss): Take into account .text.*, .data.*, .bss.*.
4452 * scripttempl/elfm68hc11.sc: Likewise.
4456 * emultempl/beos.em (init): Add the missing initialization.
4460 * ld.texinfo (Input Section Basics): Clarify ordering of output
4462 * ldlang.c (callback_t): Add wildcard_list param.
4463 (walk_wild_section): Remove "section" param. Rewrite for
4464 lang_wild_statement_type change. Remove unique_section_p test.
4465 (walk_wild_file): Remove "section" param.
4466 (walk_wild): Remove "section" and "file" params.
4467 (lang_gc_wild): Likewise.
4468 (wild): Likewise. Modify for lang_wild_statement_type change.
4469 (wild_sort): Likewise. Add "sec" param.
4470 (gc_section_callback): Likewise.
4471 (output_section_callback): Likewise. Do unique_section_p test.
4472 (map_input_to_output_sections): Modify call to wild.
4473 (lang_gc_sections_1): Likewise.
4474 (print_wild_statement): Modify for lang_wild_statement_type
4476 (lang_add_wild): Replace filename, filenames_sorted param with
4477 filespec. Replace section_name, sections_sorted,
4478 exclude_filename_list with section_list.
4479 * ldlang.h (lang_add_wild): Here too.
4480 (lang_wild_statement_type): Replace section_name, sections_sorted,
4481 and exclude_filename_list with section_list.
4482 * ldgram.y (current_file): Delete.
4483 (%union): Add wildcard_list.
4484 (file_NAME_list): Set type to wildcard_list. Build a linked list
4485 rather than calling lang_add_wild for each entry.
4486 (input_section_spec_no_keep): Call lang_add_wild here instead.
4487 * ld.h (struct wildcard_list): Declare.
4488 * mri.c (mri_draw_tree): Modify to suit new lang_add_wild.
4492 * ldmain.c (main): initialize link_info.pei386_auto_import
4493 * pe-dll.c: new tables for auto-export filtering
4494 (auto_export): change API, pass abfd for contextual filtering.
4495 Loop thru tables of excluded symbols instead of comparing
4500 * pe-dll.c: new variable pe_dll_enable_extra_debug. New
4501 static variable current_sec (static struct sec *). Add
4502 forward declaration for add_bfd_to_link.
4503 (process_def_file): Don't export undefined symbols. Do not
4504 export symbols starting with "_imp__". Call auto_export()
4506 (pe_walk_relocs_of_symbol): New function.
4507 (generate_reloc): add optional extra debugging
4508 (pe_dll_generate_def_file): eliminate extraneous initial blank
4510 (make_one): enlarge symtab to make room for __nm__ symbols
4511 (DATA auto-import support).
4512 (make_singleton_name_thunk): New function.
4513 (make_import_fixup_mark): New function.
4514 (make_import_fixup_entry): New function.
4515 (pe_create_import_fixup): New function.
4516 (add_bfd_to_link): Specify that 'name' argument is a CONST
4518 * pe-dll.h: declare new variable pe_dll_extra_pe_debug;
4519 declare new functions pe_walk_relocs_of_symbol and
4520 pe_create_import_fixup.
4521 * emultempl/pe.em: add new options --enable-auto-import,
4522 --disable-auto-import, and --enable-extra-pe-debug.
4523 (make_import_fixup): New function.
4524 (pe_find_data_imports): New function.
4525 (pr_sym): New function.
4526 (gld_${EMULATION_NAME}_after_open): Add optional extra pe
4527 debugging. Call pe_find_data_imports. Mark .idata as DATA, not
4532 * ld.texinfo: add additional documentation for
4533 --export-all-symbols. Document --out-implib,
4534 --enable-auto-image-base, --disable-auto-image-base,
4535 --dll-search-prefix, --enable-auto-import, and
4536 --disable-auto-import.
4537 * ldint.texinfo: Add detailed documentation on auto-import
4542 * ld.texinfo (Simple Assignments): Fix computation in SECTIONS
4547 * Makefile.am: Update dependencies with "make dep-am".
4548 * Makefile.in: Regenerate
4552 * ldcref.c (check_section_sym_xref): New function.
4553 (check_nocrossrefs): Call it.
4554 (check_nocrossref): Interate over h->refs here instead of..
4555 (check_refs): ..here. Pass in the symbol name, section, and bfd
4556 rather than hash_entry pointers.
4557 (struct check_refs_info): Keep symbol name rather than hash entry.
4559 (check_reloc_refs): Tweak for above changes in check_refs_info.
4560 Only report references to section syms when symname is NULL to
4561 prevent duplicate messages for the same reloc.
4565 * ldexp.c (exp_print_tree): Use stderr if config.map_file is not
4566 available. Do not print NULL trees.
4567 (exp_print_token): Print unknown tokens with values > 126 as
4568 decimal values not ASCII characters.
4570 * ldlang.c (lang_leave_overlay): If a region is specified assign
4571 it to all sections inside the overlay unless they have been
4572 assigned to the own, non-default, memory region.
4574 * README: Add header for consistency with other README files.
4578 * emultempl/elf32.em (output_prev_sec_find): Never return
4579 bfd_abs_section_ptr, bfd_com_section_ptr nor
4580 bfd_und_section_ptr.
4584 * Makefile.am (em32relf.c): Change dependency from generic.em to
4586 * Makefile.in: Regenerate.
4590 * configure.tgt (i386-*-netbsdelf*): New target.
4591 (i386-*-netbsd*): Set targ_extra_emuls to `elf_i386'
4595 * emultempl/elf32.em (output_prev_sec_find): New.
4596 (place_orphan): Use it.
4600 * ldmain.c (main): Fix typos in the last change.
4604 * ldmain.c (main): Disallow -F and -f without -shared.
4608 * emultempl/pe.em (after_open): Check for the output_bfd not
4609 having any coff_data structure allocated to it.
4613 * emultempl/elf32.em: Do not assuming that contents of the buffer
4614 returned from basename function will remain unchanged accross other
4619 * scripttempl/elf.sc (DYNAMIC_PAD): Revert the change made on
4620 2001-07-03. It creates dynamic entries even for static binaries.
4624 * scripttempl/elf.sc (DYNAMIC_PAD): New variable.
4625 (DYNAMIC): Use it to reserve few dynamic entries for
4630 * emulparams/hppa64linux.sh: New file.
4631 * configure.tgt: hppa*64*-*-linux* uses hppa64linux.sh
4632 * Makefile.am (ALL_64_EMULATIONS): Add ehppa64linux.o
4633 (ehppa64linux.c): Add rule to make it.
4635 * Makefile.in: Regenerate.
4639 * ld.texinfo (Options, -r): Mention restrictions when using
4640 different object formats.
4644 * ldlang.c (lang_check): Emit fatal error if relocatable link
4645 between different object flavours with relocations in input.
4649 * ld.texinfo (-E, --export-dynamic): Mention --version-script.
4650 (--version-script): Mention the language support.
4654 * ldlang.c (lang_check): Revert the change mode on 2001-06-15.
4658 * Makefile.am (ld.1): Remove the prefix `$(srcdir)/'.
4659 (diststuff): Add $(MANS).
4660 * Makefile.in: Regenerated.
4666 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
4667 Update for API change in bfd_elf${ELFSIZE}_size_dynamic_sections.
4668 * mpw-elfmips.c (gldelf32ebmip_before_allocation): Ditto.
4669 * ld.h (args_type): Remove member export_dynamic. All users
4670 changed to use struct bfd_link_info member.
4672 * Makefile.am (ecriself.c, ed10velf.c, ei386moss.c): Depend on
4673 $(srcdir)/emultempl/elf32.em, not $(srcdir)/emultempl/generic.em.
4674 * Makefile.in: Regenerate.
4678 * ldlang.c (init_os): Add the newline to the einfo call.
4679 (lang_check): Likewise.
4680 (lang_do_version_exports_section): Likewise.
4684 * lexsup.c (parse_args); Save optind to report unrecognized
4689 * ldlang.c (lang_check): Emit fatal error if relocatable link
4690 between different object flavours.
4692 * lexsup.c (parse_args) <case OPTION_EXPORT_DYNAMIC, case 'E'>:
4693 Set new link_info member export_dynamic.
4694 * ldmain.c (main): Initialize new link_info member export_dynamic.
4698 * ldlang.c (walk_wild): Only call walk_wild_file if
4699 lookup_name returns something.
4700 (lookup_name): If load_symbols fails, return NULL.
4701 (load_symbols): Change to a boolean function.
4702 (open_input_bfds): If load_symbols fails then do not make the
4707 * ldlang.c (record_bfd_errors): Remove.
4709 * emultempl/aix.em: Fix copyright dates.
4713 * elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase.
4714 (TEXT_START_ADDR): Likewise.
4718 * configure.host: Set HOSTING_CRT0/HOSTING_LIBS correctly for s/390.
4722 * emultempl/pe.em (init): Reduce default stack reserve to 0x200000.
4726 * ldlang.c (open_input_bfds): Don't change the bfd error
4727 handler whilst loading symbols.
4731 * configure.tgt: Remove i370-mvs architecture, it is not currently
4736 * emulparams/ppcmacos.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
4737 like emulparams/aixppc.sh.
4741 * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Move
4742 setting of output_filename after bfd_scan_arch.
4743 * emultempl/pe.em: Likewise.
4747 * emulparams/aixrs6.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
4748 like emulparams/aixppc.sh.
4750 * emultempl/aix.em (sc): Use ${srcdir}/emultempl/ostring.sed
4751 instead of ${srcdir}/emultempl/stringify.sed.
4755 * emulparams/elf64_aix.sh: Change settings to match IBM linker
4760 * configure.host: Replace linuxoldld with linux*oldld.
4761 * configure.tgt: Likewise.
4765 * emultempl/stringify.sed: Removed again.
4769 * emultempl/aix.em (OUTPUT_ARCH): Defined.
4770 (gld${EMULATION_NAME}_before_parse): Initialize
4771 ldfile_output_architecture, ldfile_output_machine and
4772 ldfile_output_machine_name from ${OUTPUT_ARCH} if possible.
4773 * emultempl/beos.em: Likewise.
4774 * emultempl/elf32.em: Likewise.
4775 * emultempl/linux.em: Likewise.
4776 * emultempl/mipsecoff.em: Likewise.
4777 * emultempl/pe.em: Likewise.
4778 * emultempl/sunos.em: Likewise.
4782 * emultempl/aix.em : (gld${EMULATION_NAME}_read_file)
4783 udate import file format.
4784 (change_symbol_mode) New, same
4785 (is_syscall) New, same
4786 * emulparams/aixppc.sh : add SYSCALL_MASK and SYMBOL_MODE_MASK
4787 * emulparams/aixppc64.sh : same
4788 * emulparams/aixrs6.sh : same
4789 * emulparams/ppcmacos.sh : same
4790 * emultempl/aix.em : use strtoull to parse options
4791 * Makefile.am : add eaixppc64 emulation for xcoff64
4792 * Makefile.in : same
4793 * configure.tgt : same
4795 * scripttempl/aix.sc : default text section offset to 0x10000000
4796 default data section offset to 0x20000000
4797 add .sv3264 and .sv64 pseudo sections
4798 loader and debug sections use the currect section offset.
4800 * emultempl/aix.em : Add xcoff64 support
4801 Add -binitfini support
4802 (gld${EMULATION_NAME}_before_parse) -binitfini
4803 (gld${EMULATION_NAME}_parse_args) same
4804 (gld${EMULATION_NAME}_before_allocation) format change for special
4807 * emulparams/aixppc64.sh : New file for xcoff64 support
4811 * emultempl/elf32.em (ELF_INTERPRETER_SET_DEFAULT): Use this new
4812 variable to avoid non-portable shell construct.
4816 * ldmain.c (get_emulation): Add -mips5 command line argument.
4820 * emulparams/elf_i386_ldso.sh: New, copied from elf_i386.sh.
4821 (ELF_INTERPRETER_NAME): Define it.
4822 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Use
4824 * configure.tgt (targ_emul, targ_extra_emuls)
4825 [i[3456]86-*-solaris2*, i[3456]86-*-solaris*]: Use elf_i386_ldso
4826 as primary, elf_i386 as extra.
4827 * Makefile.am (ALL_EMULATIONS): Added eelf_i386_ldso.o.
4828 (eelf_i386_ldso.c): New rule.
4829 * Makefile.in: Rebuilt.
4833 * lexsup.c (ld_options): Allow -I to be an alias for
4834 --dynamic-linker. This is for Solaris compatability.
4835 * ld.texinfo: Document that -I can be used.
4840 * ldlang.c (wild_doit): Use linker_has_input to reliably determine
4841 whether an input section is the first one assigned to an output
4843 Assorted formatting fixes.
4847 * Makefile.am (ld.dvi): Search bfd/doc for texinfo files.
4848 * Makefile.in: Ditto.
4852 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Put
4853 .gnu.linkonce.ia64unw{,i} sections into corresponding .IA_64.unwind*
4855 * emulparams/elf64_aix.sh (OTHER_READONLY_SECTIONS): Likewise.
4859 * ldlang.c (lang_process): Call bfd_merge_sections.
4863 * ldgram.y: Fix typo.
4867 * emultempl/elf32.em: Include "libiberty.h".
4868 (gld${EMULATION_NAME}_vercheck): Call basename () to get the
4869 basename of the bfd filename.
4870 (gld${EMULATION_NAME}_stat_needed): Likewise.
4871 (gld${EMULATION_NAME}_try_needed): Likewise.
4872 (gld${EMULATION_NAME}_open_dynamic_archive): Likewise.
4876 * emultempl/pe.em: Include <ctype.h>.
4880 * emulparams/elf32openrisc.sh: New file.
4882 * Makefile.am: Add OpenRISC target.
4883 * Makefile.in: Regenerated.
4885 * configure.tgt: Add openrisc-*-* mapping.
4889 * emultempl/aix.em: Replace buystring with xstrdup.
4890 * emultempl/beos.em: Replace buystring with xstrdup.
4894 * ldfile.c: Include "libiberty.h".
4895 * ldlex.l: Likewise.
4897 * ldmisc.c (buystring): Removed.
4898 * ldmisc.h: Likewise.
4900 * ldfile.c: Replace buystring with xstrdup.
4901 * ldlang.c: Likewise.
4902 * ldlex.l: Likewise.
4903 * ldmain.c: Likewise.
4904 * ldmisc.c: Likewise.
4905 * lexsup.c: Likewise.
4906 * mpw-eppcmac.c: Likewise.
4910 * emulparms/elf_x86_64.sh (MAXPAGESIZE): Fix value.
4914 * ldlang.c (load_symbols): Give emulation a chance
4915 to process unrecognized file before fatal error is
4916 reported, not after.
4920 * configure.tgt: Add arm-vxworks target.
4921 * scripttempl/armcoff.sc: Support .text or .data as a section name
4927 * ld.texinfo: Document --fatal-warnings.
4930 * ldmisc.c (vfinfo): Set flag to inhibit making executable if
4931 warnings have been turned into errors.
4932 * lexsup.c (OPTION_WARN_FATAL): Define.
4933 (ld_options): Entry for --fatal-warnings.
4934 (parse_args): Handle OPTION_WARN_FATAL.
4935 * ld.h (ld_config_type): Add fatal_warnings field.
4939 * ldmain.c (main): Default to discard_sec_merge.
4940 * lexsup.c (OPTION_DISCARD_NONE): Define.
4941 (ld_options): Add --discard-none.
4942 (parse_args): Handle OPTION_DISCARD_NONE.
4943 * ldlang.c (wild_doit): SEC_MERGE should be set in the output
4944 section only if SEC_MERGE and SEC_STRINGS flags and entsize of
4945 all its input sections match.
4949 * Makefile.am (ALL_EMULATIONS): Add eelf32ltsmip.o.
4950 (ALL_64_EMULATIONS): Add eelf64btsmip.o and eelf64ltsmip.o.
4951 (eelf32ltsmip.c): New target.
4952 (eelf64btsmip.c): Likewise.
4953 (eelf64ltsmip.c): Likewise.
4954 * Makefile.in: Regenerated.
4956 * configure.tgt (mips*el-*-linux-gnu): Uses traditional MIPS
4958 (mips*-*-linux-gnu*): Likewise.
4960 * emulparams/elf32ltsmip.sh: New. Traditional little endian
4962 * emulparams/elf64btsmip.sh: New. Traditional 64bit big endian
4964 * emulparams/elf64ltsmip.sh: New. Traditional 64bit little
4969 * emulparams/criself.sh (EXECUTABLE_SYMBOLS): Cannot provide
4970 correct value of __Stext here.
4971 (TEXT_START_SYMBOLS): Define; always define __Stext, to start of
4974 * emulparams/crislinux.sh: Remove FIXME.
4978 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 64k.
4979 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Likewise.
4983 * configure.tgt (cris-*-*): Change default emulation to criself.
4984 (cris-*-*aout*): New rule.
4988 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 0x4000.
4989 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
4993 * ld.texinfo (Overview): Fix syntax in texi code.
4997 * ld.texinfo: Put @c man indications to generate the ld man page.
4998 When generating man, define all the variables. Define SEEALSO
4999 and SYNOPSIS. Re-organize some lines to avoid the cross references.
5000 * Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variables.
5001 (ld.1): Generate from ld.texinfo.
5002 * Makefile.in: Regenerate.
5006 * scripttempl/i386go32.sc: Support the GCC flags '-ffunction-sections'
5007 and '-fdata-sections'. Set the VMA of STABS sections to zero.
5011 * emultmpl/elf32.em (gld${EMULATION_NAME}_search_needed): If NAME
5012 is an absolute path look only for this file and not along the path.
5016 * emultempl/elf32.em (OPTION_GROUP): New macro.
5017 Add new option Bgroup to longopts.
5018 (gld*_parse_args): Handle GROUP_OPTION and recognize -z defs.
5019 (gld*_list_options): Add -Bgroup and -z defs.
5020 * ld.1: Document -Bgroup and -z defs.
5021 * ld.texinfo: Likewise.
5025 * scripttempl/elfd10v.sc (.rodata,.rodata1,.data1,.sdata): Deal
5026 with sections created by -fdata-sections.
5027 (.dynbss,.bss): Ditto.
5031 * emultempl/m68kelf.em (m68k_elf_after_allocation): Call
5032 after_allocation_default, not gld..._before_allocation.
5036 * configure.in (BFD_VERSION): New.
5037 (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
5038 * configure: Regenerate.
5039 * Makefile.am: Run "make dep-am"
5040 * Makefile.in: Regenerate.
5044 * emulparams/elf64_aix.sh: Add additional read-only sections;
5045 uncomment lines which are now required.
5049 * ldlang.c (open_input_bfds): Set the bfd error handler so
5050 that problems can be caught whilst loading symbols.
5051 (record_bfd_errors): New function: Report BFD errors and mark
5052 the executable output as being invalid.
5056 * configure.host: Add configuration for ia64-*-aix*.
5057 * Makefile.am (ALL_64_EMULATIONS): Add emulation for ia64-*-aix*.
5058 Add dependencies for eelf64_aix.c.
5059 * Makefile.in: Regenerate.
5060 * configure.tgt: Add ia64-*-aix* mapping.
5061 * emulparams/elf64_aix.sh: Add settings for elf64 on aix5.
5065 * ldfile.c (ldfile_open_file): Set entry->search_dirs_flag to
5066 false if we found the file.
5070 * configure.tgt: Add FreeBSD/Alpha, FreeBSD/x86-64, FreeBSD/ia64,
5071 FreeBSD/PowerPC, FreeBSD/arm, and FreeBSD/sparc64 entries.
5075 * Makefile.am: Add PDP-11 target.
5076 * configure.tgt: Likewise.
5077 * emulparams/pdp11.sh: New file.
5081 * configure.host: Add a generic FreeBSD configuration entry such that
5082 all [modern] FreeBSD systems on all platforms will look the same.
5086 * configure.tgt: Remove mention of earmelf_linux26.
5090 * emulparams/elf64_ia64.sh (OTHER_GOT_SYMBOLS): Remove.
5094 * ldexp.h (node_type): Add etree_provided.
5095 * ldexp.c (exp_fold_tree): Handle etree_provided. Set the node
5096 type to etree_provided if defined by PROVIDE. Allow updating
5098 (exp_print_tree): Handle etree_provided.
5099 * mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle
5104 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add
5105 .IA_64.unwind.* pattern to unwind table section and
5106 .IA_64.unwind_info* pattern to unwind info section.
5110 * Makefile.am: Add linux target for S/390.
5111 * Makefile.in: Likewise.
5112 * configure.host: Likewise.
5113 * configure.tgt: Likewise.
5114 * emulparams/elf64_s390.sh: New file.
5115 * emulparams/elf_s390.sh: New file.
5119 * configure.tgt (sparc64-*-linux-gnu*): Add elf32_sparc into
5121 (sparc-*-linux-gnu*): Add elf64_sparc into targ_extra_libpath.
5125 * Makefile.am: Remove mention of earmelf_linux26.
5126 * Makefile.in: Regenerate.
5130 * emulparams/armelf_linux.sh (TEXT_START_ADDR): Set to 0x8000.
5131 * emulparams/armelf_linux26.sh: Delete.
5132 * configure.tgt: Remove mention of armelf_linux26 emulation.
5136 * ld.1: Replace occurances of -oformat with --oformat.
5140 * ldlang.c (lang_leave_overlay): Don't set lma_region when
5141 load_base is specified.
5145 * emultempl/elf32.em: Correct spelling in comments and listed
5150 * ldlang.c (lang_leave_overlay): Only set lma_region from the
5151 default for the first section of a group of overlay sections.
5155 * Makefile.am (GENSCRIPTS): Pass exec_prefix.
5156 * Makefile.in: Regenerate.
5157 * genscripts.sh: Use exec_prefix parameter to specify tool lib.
5158 Check for null tool_dir.
5162 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add IA_64.unwind
5163 and IA_64.unwind.info.
5167 * ldlang.c (lang_check): Merge the private data only if the
5168 input file has contents.
5172 * emulparams/hppalinux.sh (OUTPUT_FORMAT): Set to elf32-hppa-linux.
5174 * emultempl/hppaelf.em (hppaelf_after_parse): New function,
5175 enabling search for libmilli. On a relocatable link, make .text
5177 (LDEMUL_AFTER_PARSE): Define.
5178 (hppaelf_finish): Correct spelling of relocatable in comments.
5180 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
5181 rummage through the script for sections on the unique list.
5182 Correct length of strncmp for ".note".
5183 (gld${EMULATION_NAME}_check_needed): Rearrange function.
5185 * ldlang.c (unique_section_list): New var.
5186 (unique_section_p): New function.
5187 (walk_wild_section): Don't match sections on unique_section_list.
5188 (lang_add_unique): New function.
5189 Correct spelling of relocatable in comments.
5191 * ldlang.h (struct unique_sections): Declare.
5192 (unique_section_list): Declare.
5193 (unique_section_p): Declare.
5194 (lang_add_unique): Declare.
5196 * lexsup.c (ld_options): Allow --unique to take an optional arg.
5197 (parse_args [OPTION_UNIQUE]): Call lang_add_unique.
5199 * ld.texinfo (--unique): Update.
5203 * lexsup.c (parse_args): Remove spurious white space.
5207 * lexsup.c (parse_args): Update copyright date.
5211 * configure.host: Set HOSTING_LIBS appropriately for ix86-cygwin.
5215 * scripttempl/h8300.sc: Fix formatting. Fix a comment typo.
5216 * scripttempl/h8300h.sc: Fix formatting.
5217 * scripttempl/h8300s.sc: Likewise.
5218 * scripttempl/h8500.sc: Likewise.
5219 * scripttempl/h8500b.sc: Likewise.
5220 * scripttempl/h8500c.sc: Likewise.
5221 * scripttempl/h8500m.sc: Likewise.
5222 * scripttempl/h8500s.sc: Likewise.
5226 * emultempl/elf32.em: Only perform Linux ld hints processing when
5231 * ld.texinfo (Bug Reporting): Update email address for reports.
5235 * lexsup.c (parse_args): Set opterr to 0 and detect unparsed long
5236 options by checking for a return value of '?' not -1.
5240 * lexsup.c (struct ld_option): Add new enum value:
5242 (ld_options[]): Change -omagic, -output and -oformat options
5243 to be EXACTLY_TWO_DASHES.
5244 (OUTPUT_COUNT): Use ARRAY_SIZE.
5245 (parse_args): Change parameter 'argc' to unsigned.
5246 Place EXACTLY_TWO_DASHES options into new really_longopts
5248 If getopt_long_only fails, try calling getopt_long using the
5249 really_longopts array.
5250 (help): Print a double dash for both EXACTLY_TWO_DASHES and
5253 * ldlex.h: Fix prototype of parse_args.
5255 * ld.texinfo: Document that long options starting with 'o'
5256 must be preceeded by two dashes. Change example of a single
5257 dashed long option from -oformat to -trace-symbol.
5261 * emultempl/pe.em (OPTION_NO_DEFAULT_EXCLUDES): Define.
5262 (longopts[]): New --no-default-excludes option.
5263 (gld_${EMULATION_NAME}_list_options): Document.
5264 (gld_${EMULATION_NAME}_parse_args): Handle.
5268 * ldlang.c (new_stat): Revert the last beautification with "innocent"
5269 whitespace, it breaks the K&R C preprocessor.
5273 * ld.texinfo: Add notes about --whole-archive and gcc.
5277 * lexsup.c (OPTION_ALLOW_SHLIB_UNDEFINED): Define.
5278 (ld_options): Entry for --allow-shlib-undefined.
5279 (parse_args): Handle OPTION_ALLOW_SHLIB_UNDEFINED.
5280 * ldmain.c (main): Initialize link_info.allow_shlib_undefined
5282 * ld.texinfo: Document new command line switch.
5286 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS):
5287 .fixup is actually read/write.
5288 * emulparams/elf32lppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
5289 * emulparams/elf32ppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
5290 * emulparams/elf32lppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
5294 * NEWS: Add note about x86_64 architecture.
5298 * scripttempl/i386go32.sc: Use PROVIDE with _etext, _edata, _end.
5299 Set DWARF2 sections to a VMA of zero.
5303 * configure.tgt (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
5305 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5306 (sparc*-*-rtems*): Switched from a.out to ELF.
5310 * Makefile.am (ALL_EMULATIONS): Add eelf_x86_64.o
5311 (eelf_x86_64.c): New.
5312 * Makefile.in: Regenerate.
5313 * configure.tgt: Add support for x86_64-*-linux-gnu*.
5314 * emulparams/elf_x86_64.sh: New.
5318 * emulparams/crislinux.sh (ENTRY): Change back to _start.
5319 (TEXT_START_SYMBOLS): Remove conditional setting of __start.
5321 * scripttempl/crisaout.sc: Change all RELOCATING not related to
5322 merging non-a.out sections into CONSTRUCTING.
5326 * ld.1 (COPYING): Mention that the GNU Free Documentation
5327 License is present in the sources, but not the output, and
5328 also available from the GNU website.
5329 (GNU Free Documentation License): Comment out this section.
5333 * emulparams/elf64alpha.sh (ENTRY): Remove leading underscore as ELF
5338 * ld.1: Remove old date so it does not give the impression the manpage
5343 * configure.tgt (xscale-coff): Add target.
5344 (xscale-elf): Add target.
5348 * ldmain.c (main): Remove redundant init of config.make_executable
5353 * emulparams/elf64alpha.sh (MAXPAGESIZE): Typo -- 64k, not 1M.
5357 * scripttempl/h8300.sc: Fix formatting.
5358 * scripttempl/h8300h.sc: Likewise.
5359 * scripttempl/h8300s.sc: Likewise.
5363 * scripttempl/elf32avr.sc: Fix bug in .eeprom segment.
5367 * emultempl/pe.em: Define ___start_SECNAME and ___stop_SECNAME
5368 around orphan sections whose names can be represented in C.
5372 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): New local
5373 hold_sdata. If SEC_SMALL_DATA set, set place to hold_sdata.
5377 * ld.texinfo: Add GNU Free Documentation License.
5378 * ldint.texinfo: Add GNU Free Documentation License.
5379 * ld.1: Add GNU Free Documentation License.
5383 * ldlex.l (yy_create_string_buffer): Init yy_is_our_buffer,
5384 yy_is_interactive, yy_at_bol, and yy_fill_buffer.
5386 * Makefile.am (DISTCLEANFILES): Add stringify.sed.
5387 Move 2000-11-02 Makefile.in changes to this file.
5388 * Makefile.in: Regenerate.
5392 * scripttempl/h8300.sc: Use ${CONSTRUCTING...} to enclose
5393 constructors and destructors.
5394 * scripttempl/h8300h.sc: Ditto.
5395 * scripttempl/h8300s.sc: Ditto.
5396 * scripttempl/h8500.sc: Ditto.
5397 * scripttempl/h8500b.sc: Ditto.
5398 * scripttempl/h8500c.sc: Ditto.
5399 * scripttempl/h8500m.sc: Ditto.
5400 * scripttempl/h8500s.sc: Ditto.
5401 * scripttempl/v850.sc: Ditto.
5402 * scripttempl/w65.sc: Ditto.
5403 * scripttempl/z8000.sc: Ditto.
5407 * Makefile.in (e_i386_chaos.c): New rule.
5408 (ALL_EMULATIONS): Added e_i386_chaos.o.
5409 * emulparams/elf_i386_chaos.sh: New file.
5410 * configure.tgt: Recognise i[3456]86-chaosdev-storm-chaos.
5414 * emulparams/elf64_sparc.sh (TEXT_START_ADDR,
5415 NONPAGED_TEXT_START_ADDR): Set to 4GB for Solaris targets.
5416 Fix sed invocation, so that it coped with '/' in Solaris 64bit
5417 library path suffix.
5422 * scripttempl/crisaout.sc (.text, .data): Pad, with ALIGN (32),
5423 for consecutive sections.
5427 * lexsup.c: New option OPTION_TARGET_HELP. Prints all target specific
5429 * ld.texinfo: Added notes about this new option.
5433 * emultempl/pe.em (_after_open): Add tests of return values from
5434 bfd functions. Emit appropriate error messages if necessary.
5438 * emultempl/pe.em (_after_open): Delete 'is2' and 'nsyms'
5439 local variables - they are not used, but leave in the call to
5440 bfd_canonicalize_symtab.
5441 (_open_dynamic_archive): Add #ifdef DLL_SUPPORT around use of
5442 pe_dll_search_prefix.
5446 * emultempl/pe.em (pe_dll_search_prefix): New variable,
5447 (longopts): New --dll-search-prefix option.
5448 (gld_${EMULATION_NAME}_list_options): Document.
5449 (gld_${EMULATION_NAME}_parse_args): Handle.
5450 (gld_${EMULATION_NAME}_open_dynamic_archive): When linking
5451 dynamically, search for a dll named '<prefix><basename>.dll'
5452 in preference to 'lib<basename>.dll' if --dll-search-prefix
5457 * ldlang.c (section_already_linked): Set kept_section instead of
5462 * deffile.h: Fix formatting.
5463 * lexsup.c: Likewise.
5468 * pe-dll.c (make_one): Do not generate code thunk for DATA
5470 (process_def_file): deduce DATA flag for auto-export sumbols.
5474 * ld.h: Fix formatting.
5475 * ldcref.c: Likewise.
5476 * ldctor.h: Likewise.
5477 * ldemul.c: Likewise.
5478 * ldemul.h: Likewise.
5479 * ldexp.c: Likewise.
5480 * ldexp.h: Likewise.
5481 * ldfile.c: Likewise.
5482 * ldfile.h: Likewise.
5483 * ldlang.c: Likewise.
5484 * ldlang.h: Likewise.
5485 * ldmain.c: Likewise.
5486 * pe-dll.c: Likewise.
5488 * pe-dll.c: Revert some formatting fixes.
5492 * pe-dll.c: Fix formatting.
5496 * ldlang.c: Fix formatting.
5500 * pe-dll.c (fill_edata): initialize entire block
5501 (make_one): fill in correct section.
5505 * ldexp.c: Fix formatting.
5509 * emultempl/pe.em (gld_*_after_open): detect case where there two
5510 import libraries for same dll; rename one to ensure proper link
5513 * pe-dll.c (process_def_file): compare ordinals to -1, not 0; fix
5515 (generate_edata): fix typo
5519 * scripttempl/crisaout.sc (ENTRY): Now __start.
5520 (.text): Add default setting for __start.
5521 Remove CONSTRUCTORS handling.
5522 (/DISCARD/): Add .gnu.warning.*.
5523 * emulparams/crislinux.sh (ENTRY): Now __start.
5524 (TEXT_START_SYMBOLS): New; provide __Stext and __start default.
5525 * emulparams/criself.sh (OUTPUT_FORMAT): Now elf32-us-cris.
5526 (ENTRY): Now __start.
5527 (INITIAL_READONLY_SECTIONS): Add KEEP for .startup.
5528 (EXECUTABLE_SYMBOLS): Add default setting for __start.
5532 * deffile.h: Fix formatting.
5534 * ldcref.c: Likewise.
5535 * ldctor.c: Likewise.
5536 * ldctor.h: Likewise.
5537 * ldemul.c: Likewise.
5538 * ldemul.h: Likewise.
5539 * ldexp.c: Likewise.
5540 * ldexp.h: Likewise.
5541 * ldfile.c: Likewise.
5542 * ldfile.h: Likewise.
5543 * ldlang.c: Likewise.
5544 * ldlang.h: Likewise.
5545 * lexsup.c: Likewise.
5547 * pe-dll.c: Likewise.
5551 * pe-dll.c (process_def_file): Uninitialized data wasn't
5552 exported with --export-all-symbols switch.
5556 * pe-dll.c (fill_edata): rearrange the data so that ordinals and
5557 noname work properly.
5561 * ld.texinfo (HPPA ELF32): New section.
5563 * emultempl/hppaelf.em (group_size): New.
5564 (hppaelf_finish): Pass group_size to elf32_hppa_size_stubs.
5565 (PARSE_AND_LIST_PROLOGUE): Add OPTION_STUBGROUP_SIZE.
5566 (PARSE_AND_LIST_LONGOPTS): Add --stub-group-size. Duplicate
5567 options to prevent abbreviations matching.
5568 (PARSE_AND_LIST_OPTIONS): Describe the above. Reformat.
5569 (PARSE_AND_LIST_ARGS_CASES): Handle it.
5573 * emultempl/m68kelf.em: Conditionalise the embedded relocs feature
5574 on the m68*-*-elf target. Make it support COFF input objects.
5578 * ldmain.c: Fix formatting.
5579 * ldmisc.c: Likewise.
5580 * ldver.c: Likewise.
5581 * ldwrite.c: Likewise.
5585 * ldwrite.c (clone_section): Silence gcc warnings.
5589 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Handle
5590 out of memory failure.
5592 * ldwrite.c (ldwrite): Remove unnecessary einfo arg.
5593 (clone_section): Handle out of memory failures. Rename var to
5594 avoid c++ reserved word.
5598 * emultempl/hppaelf.em (hppaelf_add_stub_section): Rename
5599 stub_name param to stub_sec_name.
5600 (hppaelf_finish): Modify call to elf32_hppa_size_stubs.
5604 * emultempl/m68kelf.em: New file.
5605 * emulparams/m68kelf.sh (EXTRA_EM_FILE): Use it.
5606 * Makefile.am (em68kelf.c): Add dependency on m68kelf.em.
5607 * Makefile.in: Regenerate.
5611 * emulparams/hppalinux.sh (DATA_START_SYMBOLS): Provide $global$
5616 * ldmain.c (multiple_definition): Disable relaxation if
5617 multiple symbol definitions are encountered - otherwise the
5618 linker could abort with an assertion failure.
5622 * mri.c: Fix formatting.
5626 * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
5627 * configure: Rebuild.
5631 * Makefile.am (lexsup.o): Also depend on $(INCDIR)/demangle.h.
5632 * Makefile.in: Rebuild.
5636 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Fix
5637 broken list handling. Create __start_SECNAME and __stop_SECNAME
5638 when no place-holder. Add some comments. Test both SEC_CODE and
5639 SEC_READONLY for hold_text to prevent .rodata orphan poisoning.
5640 Handle case where no output section statement created.
5644 * configure.tgt (sh-*-linux*): Added.
5645 * Makefile.am: Added eshelf_linux and eshlelf_linux.
5646 * Makefile.in: Rebuilt.
5647 * emulparams/shelf_linux.sh: New file.
5648 * emulparams/shlelf_linux.sh: New file.
5652 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
5653 try shuffling sections when the orphan happens to be the place
5654 holder. Keep count of unique section names generated so we speed
5655 the search for a new name.
5659 * configure: Rebuilt with new libtool.m4.
5663 * Makefile.in: Regenerate.
5664 * aclocal.m4: Regenerate.
5665 * configure: Regenerate.
5666 * config.in: Regenerate.
5667 * po/ld.pot: Regenerate.
5669 * ldint.texinfo: Remove CVS revision marker - it foils local
5672 * emultempl/ticoff.em: Remove extraneous comma.
5676 * emultempl/hppaelf.em (hppaelf_add_stub_section): Add SEC_RELOC
5677 to stub section flags.
5678 (hppa_for_each_input_file_wrapper): New.
5679 (hppa_lang_for_each_input_file): New.
5680 (lang_for_each_input_file): Define to call above.
5681 (multi_subspace): New.
5682 (hppaelf_finish): Pass multi_subspace to elf32_hppa_size_stubs.
5683 (PARSE_AND_LIST_PROLOGUE): Define.
5684 (PARSE_AND_LIST_LONGOPTS): Define.
5685 (PARSE_AND_LIST_OPTIONS): Define.
5686 (PARSE_AND_LIST_ARGS_CASES): Define.
5687 (hppaelf_finish): Call elf32_hppa_set_gp.
5688 (hppaelf_set_output_arch): Remove.
5689 (LDEMUL_SET_OUTPUT_ARCH): Remove.
5691 * emulparams/hppalinux.sh (ELFSIZE): Define.
5693 (OTHER_READONLY_SECTIONS): Define.
5695 (GENERATE_SHLIB_SCRIPT): Define.
5697 * ldlang.c: Add missing prototypes, and tidy others. Change CONST
5698 to const throughout. Change `void *' to `PTR' throughout.
5699 (lang_memory_default): Function is local to file, add `static'.
5701 * Makefile.am (ehppaelf.c): Depend on emultempl/elf32.em.
5702 (ehppalinux.c): Likewise.
5703 (earmelf.c): Likewise.
5704 (earmelf_linux.c): Likewise.
5705 (earmelf_linux26.c): Likewise.
5706 * Makefile.in: Regenerate.
5708 * ld.h (ld_config_type): Add unique_orphan_sections.
5709 * lexsup.c (OPTION_UNIQUE): Define.
5710 (ld_options): Add "--unique".
5711 (parse_args): Handle it.
5712 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
5713 search for an existing output section if unique_orphan_sections is
5714 set. Make use of bfd_get_unique_section_name rather than
5715 duplicating code here.
5716 * ld.texinfo: Describe --unique.
5718 * lexsup.c (ld_options): Make split-by-reloc arg optional. Add
5719 optional arg to split-by-file.
5720 (parse_args): Handle them.
5721 * ld.texinfo: Update description of these options.
5722 * ldwrite.c (clone_section): Pass in the section name. Replace
5723 local code with bfd_get_unique_section_name.
5724 (split_sections): Tidy code and comments. Use a list traversal
5725 more appropriate to the list construction. Handle cooked section
5726 sizes. Split when split_by_reloc reached rather than exceeded.
5727 Track section size and split when split_by_file reached. Fix
5728 link_order_tail (even though it's not used).
5729 (ldwrite): Modify condition for calling split_sections to suit
5730 changed split_by_reloc and split_by_file.
5731 * ldmain.c (main): Init config.split_by_reloc and
5732 config.split_by_file to -1.
5733 * ld.h (ld_config_type): Change split_by_reloc to unsigned.
5734 Change split_by_file to bfd_size_type.
5738 * configure.in: Increase version number to 2.10.91.
5739 * NEWS: Mention new ability to support removal of duplicate DWARF2
5741 * configure: Regenerate.
5742 * aclocal.m4: Regenerate.
5743 * config.in: Regenerate.
5747 * scripttempl/elf.sc: Add .gnu.linkonce.wi.* to .debug_info
5749 * scripttempl/elf32avr.sc: Ditto.
5750 * scripttempl/elfd10v.sc: Ditto.
5751 * scripttempl/elfd30v.sc: Ditto.
5752 * scripttempl/elfi370.sc: Ditto.
5753 * scripttempl/elfm68hc11.sc: Ditto.
5754 * scripttempl/elfm68hc12.sc: Ditto.
5755 * scripttempl/elfi386beos.sc: Ditto.
5756 * scripttempl/v850.sc: Ditto.
5760 * acinclude.m4: Include libtool and gettext macros from the
5762 * aclocal.m4, configure: Rebuilt.
5766 * ldlang.c (open_output): When choosing the target for a
5767 particular endianness, do nothing if the target is not
5772 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
5773 check -rpath nor LD_RUN_PATH for cross link.
5774 * ld.texinfo: Document the change.
5778 * NEWS: Mention support for CRIS.
5782 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Get
5783 the current runpath list from bfd_elf_get_runpath_list ()
5788 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search
5789 the DT_RPATH/DT_RUNPATH entries for DT_NEEDED after
5790 LD_LIBRARY_PATH for native linker. Display the needed DSO if
5791 trace_file_tries is non-zero.
5792 (gld${EMULATION_NAME}_try_needed): Report the needed DSO found
5793 if trace_file_tries is non-zero.
5795 * ld.texinfo: Document the usage of DT_RPATH/DT_RUNPATH.
5800 * NEWS: Mention i860 support.
5804 * scripttempl/elf.sc: Fix last change to use correct comment
5809 * scripttempl/elf.sc: Add a comment giving the correspondence
5810 between sections, per-datum sections, and linkonce sections. Make
5811 the comment true even for .bss, .sdata, .sdata2, .sbss, and
5816 * emulparams/elf32_i860.sh: New file.
5817 * configure.tgt: Recognize new target i860-stardent-{sysv4*|elf*}.
5818 * Makefile.am (ALL_EMULATIONS): Add eelf32_i860.o.
5819 (eelf32_i860.c): New rule.
5820 * Makefile.in: Regenerate.
5824 * emulparams/mipspe.sh (ENTRY): Add definition.
5828 * emultempl/elf32.em (_after_close): Refer to -rpath not --rpath
5833 * scripttempl/elfm68hc11.sc: Define __bss_size symbol to indicate
5834 the final size of .bss section.
5835 * scripttempl/elfm68hc12.sc: Likewise.
5839 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Rename to
5840 gld${EMULATION_NAME}_parse_args for consistency. Combine
5841 lastoptind and prevoptind vars, and keep track of last optind.
5842 (gld_${EMULATION_NAME}_list_options): Rename to
5843 gld${EMULATION_NAME}_list_options.
5847 * configure.tgt: Select targ_emul=elf_i386 for Unixware 7
5848 (i586-sco-sysv5uw7.1.0).
5852 * emulparams/elf64alpha.sh (PARSE_AND_LIST_ARGS): Removed.
5853 (PARSE_AND_LIST_PROLOGUE): New.
5854 (PARSE_AND_LIST_LONGOPTS): Likewise.
5855 (PARSE_AND_LIST_OPTIONS): Likewise.
5856 (PARSE_AND_LIST_ARGS_CASES): Likewise.
5857 (PARSE_AND_LIST_EPILOGUE): Likewise.
5861 * emultempl/armelf.em: Elide functions common to elf32.em,
5862 ie. most of the file.
5863 (arm_elf_after_open): New. Do arm specific things then call
5864 gld${EMULATION_NAME}_after_open.
5865 (arm_elf_before_allocation): New. Call
5866 gld${EMULATION_NAME}_before_allocation then do arm specifics.
5867 (PARSE_AND_LIST_PROLOGUE): Define.
5868 (PARSE_AND_LIST_SHORTOPTS): Define.
5869 (PARSE_AND_LIST_LONGOPTS): Define.
5870 (PARSE_AND_LIST_OPTIONS): Define.
5871 (PARSE_AND_LIST_ARGS_CASES): Define.
5872 (LDEMUL_AFTER_OPEN): Define.
5873 (LDEMUL_BEFORE_ALLOCATION): Define.
5874 (LDEMUL_BEFORE_PARSE): Define.
5875 (LDEMUL_FINISH): Define.
5877 * emultempl/hppaelf.em: Similarly zap most of this file.
5878 (hppaelf_add_stub_section): Prototype.
5879 (hppaelf_layaout_sections_again): Prototype.
5880 (hook_in_stub): Prototype.
5881 (LDEMUL_SET_OUTPUT_ARCH): Define.
5882 (LDEMUL_FINISH): Define.
5883 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
5885 * emulparams/armelf.sh (TEMPLATE_NAME): Use elf32.
5886 (EXTRA_EM_FILE): New.
5887 * emulparams/armelf_linux.sh: Likewise.
5888 * emulparams/armelf_linux26.sh: Likewise.
5889 * emulparams/hppalinux.sh: Likewise.
5890 * emulparams/hppaelf.sh: Likewise.
5893 * emultempl/elf32.em: Fix formatting.
5894 (EXTRA_EM_FILE): Source it.
5895 (LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
5896 LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
5897 LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
5898 LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
5899 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
5900 LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
5901 LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
5902 LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
5903 LDEMUL_FIND_POTENTIAL_LIBRARIES): New shell vars. Add code to
5904 allow functions in this file to be overridden.
5905 (PARSE_AND_LIST_SHORTOPTS): Handle it.
5907 * emultempl/m68kcoff.em: Include ldfile.h before ldemul.h.
5909 * emultempl/elf32.em: Reorganize file.
5913 * emulparams/elf64alpha.sh: Implement "-taso" emulation
5914 specific option to fit 64-bit executable in the lower
5915 31-bit address range. This is done by changing start
5916 address of .interp (the very first section of executable)
5917 and then setting EF_ALPHA_32BIT elf header flag.
5921 * emultempl/m68kcoff.em: New file.
5922 * emulparams/m68kcoff.sh (TEMPLATE_NAME): Use m68kcoff template.
5923 * Makefile.am (em68kcoff.c): Depend on m68kcoff.em rather than
5925 * Makefile.in: Regenerate.
5929 * emultempl/elf32.em (longopts): Duplicate "disable-new-dtags"
5930 and "disable-new-dtags" to stop getopt from treating -d/-e as
5931 abbreviations for these options.
5935 * ld.texinfo: Add documentation for --disable-new-dtags and
5938 * ldmain.c (main): Initialize link_info.new_dtags to false.
5940 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Add
5941 --disable-new-dtags and --enable-new-dtags.
5942 (gld_${EMULATION_NAME}_list_options): Likewise.
5946 * lexsup.c: Add optional style to demangle switch
5947 * ld.texinfo: Document optional style to demangle switch.
5951 * Makefile.am (ALL_EMULATIONS): Add ecrisaout.o, ecriself.o,
5953 (ecrisaout.c, ecriself.c, ecrislinux.c): New rules.
5954 Regenerate dependencies.
5955 * Makefile.in: Rebuild.
5956 * configure.tgt (cris-*-*): New target.
5957 * emulparams/crisaout.sh, emulparams/criself.sh,
5958 emulparams/crislinux.sh, scripttempl/crisaout.sc: New files.
5959 * po/POTFILES.in, po/ld.pot: Regenerate.
5963 * emultempl/elf32.em (gld_${EMULATION_NAME}_list_options):
5964 Print out ignored -z options.
5968 * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Removed.
5969 (PARSE_AND_LIST_PROLOGUE): New.
5970 (PARSE_AND_LIST_LONGOPTS): Likewise.
5971 (PARSE_AND_LIST_OPTIONS): Likewise.
5972 (PARSE_AND_LIST_ARGS_CASES): Likewise.
5974 * ldmain.c (main): Clear link_info.flags and link_info.flags_1.
5976 * lexsup.c (ld_options): Comment out 'z'.
5977 (parse_args): Likewise.
5979 * emultempl/elf32.em: Include "elf/common.h".
5980 (gld_${EMULATION_NAME}_parse_args): Defined. Handle some -z
5982 (gld_${EMULATION_NAME}_list_options): Likewise.
5984 * ld.texinfo: Add documentation for the recognized -z options.
5988 * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call
5989 bfd_elf_set_dt_needed_soname ().
5993 * pe-dll.c (pe_dll_id_target): check object target name also
5997 * scripttempl/elf.sc (.init): Only do ${INIT_START} and
5998 ${INIT_END} if relocating.
5999 (.fini): Likewise ${FINI_START} and ${FINI_END}.
6003 * emultempl/pe.em (gld_*_open_dynamic_archive): New search
6004 order for dynamic library '-lfoo' on pei386: libfoo.dll.a,
6005 foo.dll.a, libfoo.a, libfoo.dll, foo.dll. This fixes compatibility
6006 errors introduced by the old dynamic lib search order.
6010 * pe-dll.c (process_def_file): auto-export data items also
6011 (pe_process_import_defs): also see if _imp_ form needed
6015 * pe-dll.c (make_one): fix a typo in the __imp_ name decoration
6016 for dll import libraries
6020 * scripttempl/i386go32.sc: Support the g++ attribute init_priority in
6021 gcc 2.95.2 and later.
6025 * ldfile.c (ldfile_try_open_bfd): Output '\n' after an error
6030 * ldemul.h (struct lang_input_statement_struct): Remove forward
6032 (struct search_dirs): Likewise.
6033 * ldfile.h (struct lang_input_statement_struct): Likewise.
6034 Protect file from multiple inclusion.
6035 * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Move file_chain
6036 declaration from macro to file scope.
6038 * ldemul.c: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this order.
6039 * ldgram.y: Likewise here.
6040 * ldlang.c: And here.
6041 * ldmain.c: And here.
6042 * mpw-elfmips.c: And here.
6043 * mpw-eppcmac.c: And here.
6044 * emultempl/aix.em: And here.
6045 * emultempl/armcoff.em: And here.
6046 * emultempl/armelf.em: And here.
6047 * emultempl/armelf_oabi.em: And here.
6048 * emultempl/beos.em: And here.
6049 * emultempl/elf32.em: And here.
6050 * emultempl/hppaelf.em: And here.
6051 * emultempl/linux.em: And here.
6052 * emultempl/lnk960.em: And here.
6053 * emultempl/pe.em: And here.
6054 * emultempl/sunos.em: And here.
6055 * mpw-esh.c: And here. Include ldexp.h and ldlang.h too.
6056 * mpw-idtmips.c: Ditto.
6057 * emultempl/generic.em: Ditto.
6058 * emultempl/gld960.em: Ditto.
6059 * emultempl/gld960c.em: Ditto.
6060 * emultempl/mipsecoff.em: Ditto.
6061 * emultempl/ticoff.em: Ditto.
6062 * emultempl/vanilla.em: Ditto.
6064 * pe-dll.c: Include ldfile.h
6065 * ldver.c: Include ldexp.h, ldlang.h, ldfile.h
6067 * mpw-elfmips.c: (gldelf32ebmip_before_allocation): Add missing
6068 arguments to bfd_elf32_size_dynamic_sections call.
6069 (gldelf32ebmip_place_orphan): Add missing arguments to
6070 lang_leave_output_section_statement call.
6074 * emultempl/pe.em (pe_enable_stdcall_fixup): Protect with
6076 (strhash): Likewise.
6077 (compute_dll_image_base): Likewise.
6078 (pe_undef_found_sym): Likewise.
6079 (pe_undef_cdecl_match): Likewise.
6080 (gld_${EMULATION_NAME}_open_dynamic_archive): Mark the
6081 argument "arch" with ATTRIBUTE_UNUSED.
6085 * configure.tgt: Remove extraneous hppa*-*-linux-gnu*.
6088 * ldwrite.c (SSIZE): Remove to cure macro redefinition warning.
6092 Changes to create multiple linker stubs, positioned immediately
6093 before the section where they are required.
6094 * emultempl/hppaelf.em: Include elf32-hppa.h.
6095 (stub_sec, file_chain): Delete.
6096 (hppaelf_create_output_section_statements): Don't make a stub
6098 (hook_stub_info): New struct.
6099 (hook_in_stub): New function.
6100 (hppaelf_add_stub_section): New function.
6101 (hppaelf_finish): Do nothing for relocateable links. Modify the
6102 call to elf32_hppa_size_stubs. Move code for updating section
6104 (hppaelf_layaout_sections_again): ..to here, a new function.
6106 * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Fix
6107 broken list handling. Pass in a pointer to the list.
6108 (hppaelf_finish): Update call to hppaelf_delete_padding_statements
6110 (hppaelf_before_parse): Prototype.
6111 (hppaelf_set_output_arch): Prototype.
6112 (hppaelf_create_output_section_statements): Prototype.
6113 (hppaelf_delete_padding_statements): Prototype.
6114 (hppaelf_finish): Prototype.
6117 * emultempl/hppaelf.em: Include ctype.h.
6118 (struct orphan_save): New.
6119 (gld${EMULATION_NAME}_place_orphan): New.
6120 (output_rel_find): New.
6121 (hppaelf_get_script): Update from elf32.em.
6122 (ld_hppaelf_emulation): Rename to ld_${EMULATION_NAME}_emulation.
6123 Change emulation_name field to "${EMULATION_NAME}". Add
6124 gld${EMULATION_NAME}_place_orphan.
6126 * Makefile.am (ALL_EMULATIONS): Reinstate ehppaelf.o, add
6127 ehppalinux.o, sort it. Regenerate dependencies.
6128 (ehppalinux.c): Depend on hppaelf.em
6129 * Makefile.in: Regenerate.
6131 * configure.tgt: targ_emul=hppalinux for hppa*linux
6133 * emulparams/hppalinux.sh: New.
6134 * emulparams/hppaelf.sh (TARGET_PAGE_SIZE): Write in hex.
6138 * lexsup.c (parse_args): Copy section name.
6142 * emultempl/pe.em: institute the following search order for
6143 dynamic libraries on pei386: libfoo.dll.a, foo.dll.a (import
6144 libs), libfoo.dll, foo.dll (link direct to dll). Fall back to
6145 static lib (libfoo.a) if none of the above are found.
6149 * emultempl/pe.em (pe_enable_auto_image_base): New variable.
6150 (longopts): New --{enable,disable}-auto-image-base options.
6151 (gld_${EMULATION_NAME}_list_options): Document.
6152 (gld_${EMULATION_NAME}_parse): Handle.
6153 (strhash): New static function.
6154 (compute_dll_image_base): New static function.
6155 (gld_${EMULATION_NAME}_set_symbols): Use.
6163 * configure.tgt: Add traditional mips (mips*-*-sysv4*) target.
6164 * emulparams/elf32btsmip.sh: New file.
6165 * Makefile.am: Add traditional mips target.
6166 * Makefile.in: Rebuild.
6170 * Makefile.am (EXTRA_ld_new_SOURCES): Set to deffilep.y for
6171 automake to use YLWRAP.
6172 * Makefile.in: Rebuild.
6176 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
6177 (CLEANFILES): Add DEPA.
6178 * Makefile.in: Regenerate.
6180 2000-06-30 Timothy Wall <twall@ppc>
6182 * scripttempl/tic54xcoff.sc: PAGE N is not implemented, so encode
6183 the page in the upper octet of the address.
6187 * emulparams/avrmega161.sh (ARCH): Change to avr:5.
6191 * NEWS: arm-elf does --gc-sections too.
6195 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
6197 * Makefile.in: Regenerate.
6201 * Makefile.am: Rebuild dependency.
6202 * Makefile.in: Rebuild.
6206 * Makefile.am: Rebuild dependency.
6207 * Makefile.in: Rebuild.
6211 * scripttempl/tic54xcoff.sc: New.
6212 * ldlang.c (wild_doit): Propagate SEC_BLOCK flag.
6213 * gen-doc.texi: Add flag for TI COFF.
6214 * ld.texinfo: Add documentation for TI COFF handling switches.
6215 * emultempl/ticoff.em: New. TI COFF handling.
6216 * configure.tgt: Add tic54x target.
6217 * Makefile.am: Add tic54x target.
6218 * Makefile.in: Ditto.
6222 * ldmain.c (set_scripts_dir): Correct pointer comparison when
6223 checking for backslashes.
6227 * NEWS: Move entries not in 2.10 above "Changes in version 2.10".
6231 * NEWS: Update list of targets supporting --gc-sections.
6233 * scripttempl/elf.sc: KEEP .eh_frame contents.
6234 * scripttempl/elfd30v.sc: Same here.
6238 * Makefile.am (ALL_EMULATIONS): Added new emulation for m68hc12
6240 * Makefile.in: Rebuild.
6241 * configure.tgt: Recognize m68hc12 and m68hc11.
6242 * scripttempl/elfm68hc12.sc: New file.
6243 * emulparams/m68hc12elfb: New emulation.
6244 * emulparams/m68hc12elf: New emulation.
6245 * emulparams/m68hc11elfb.sh: New file. User configurable emulation
6246 (includes a memory.x script to define the ROM and RAM banks).
6247 * scripttempl/elfm68hc11.sc, emulparams/m68hc11elf.sh:
6248 New configuration files for support of Motorola 68hc11
6252 * ldmain.c (main): Only change SEC_READONLY for final link.
6256 * configure: Regenerate.
6260 * configure.in (VERSION): Update to show this is the CVS mainline.
6264 * emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all
6265 input objects to be ECOFF.
6266 (check_sections): einfo takes %B, not %P, to print a BFD name.
6270 * ldgram.y (vers_defns): Handle 'extern "C++" { ... }' in
6273 * ldlex.l (V_IDENTIFIER): Accept `::' in symbols.
6277 * emulparams/avr1200.sh (STACK): Define as 0.
6278 * emulparams/avr23xx.sh (STACK): Define as last internal SRAM address.
6279 * emulparams/avr4433.sh (STACK): Likewise.
6280 * emulparams/avr44x4.sh (STACK): Likewise.
6281 * emulparams/avr85xx.sh (STACK): Likewise.
6282 * emulparams/avrmega103.sh (STACK): Likewise.
6283 * emulparams/avrmega161.sh (STACK): Likewise.
6284 * emulparams/avrmega603.sh (STACK): Likewise.
6285 * scripttempl/elf32avr.sc (__data_start): Define for gcrt1.
6286 (__stack): Define from ${STACK} for main().
6290 * Makefile.am: Update dependencies with "make dep-am"
6291 * Makefile.in: Regenerate.
6295 * ldmain.c: Include filenames.h.
6296 (set_scripts_dir): Support backslashes in program name.
6300 * ldmain.c (main): When deciding if ".text" section should be
6301 read-only, don't forget to reset SEC_READONLY because it
6302 could be already set.
6306 * ld.1: Add documentation for new command line option:
6307 --section-start <sectionname>=<sectionorg>
6308 This is a generic version of -Ttext etc. which accepts
6309 any section name as a parameter instead of just text/data/
6311 * ld.texinfo: More docs.
6313 * lexsup.c: (parse_args): Recognize new command line option.
6314 (ld_options): Add new option.
6318 * lexsup.c (parse_args): `i' == `r', not `q'.
6322 * configure.tgt (hppa*64*-*-*): Enable PA64 target.
6327 Add support for '-q' == '--emit-relocs' switch.
6328 * ldmain.c (main): Default to false.
6329 * lexsup.c (parse_args): Turn on emitrelocations flag if set.
6330 * NEWS: Describe the emitrelocations switch.
6331 * ld.texinfo: Describe the emitrelocations switch.
6335 * emultempl/pe.em (_open_dynamic_archive): New function: Search
6336 the library path for "foo.dll" and "libfoo.dll" dynamic libraries
6337 before searching for 'libfoo.a' in response to a '-Bdynamic -lfoo'
6342 * lexsup.c (parse_args): Update the year in the copyright notice.
6346 * ld.h (gettext, dgettext, dcgettext, textdomain, bindtextdomain):
6347 Replace defines with those from intl/libgettext.h to quieten gcc
6352 * ldlang.c (open_input_bfds): Don't load the same file within
6353 a group again if the whole archive has been loaded already.
6358 * lexsup.c (set_section_start): Use bfd_scan_vma rather than
6363 * configure.host (ia64-*-linux-gnu*): Change gcc to ${CC}.
6365 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
6366 host "ia64-*-linux-gnu*".
6370 * ld.h: Correctly check GCC version.
6374 * Makefile.am: Add PA64 support. Add missing dependencies for
6376 * Makefile.in: Rebuilt.
6377 * configure.tgt: Add PA64 support (currently disabled).
6381 * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Delete.
6382 (output_rel_find): New function.
6383 (hold_section, hold_use): Delete.
6384 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
6385 hold_interp): Make local to place_orphan.
6386 (gld${EMULATION_NAME}_place_orphan): Use lang_output_section_find
6387 rather than place_section to find possible previous use of orphan.
6388 Similarly find the place-holder output sections. Use returned
6389 value from lang_enter_output_section_statement rather than calling
6390 lang_output_section_statement_lookup.
6391 * emultempl/armelf.em: Same here.
6392 * emultempl/pe.em: Similar to above, but no need for output_rel_find.
6394 * ldlang.c (lang_enter_output_section_statement): Return output
6396 * ldlang.h (lang_enter_output_section_statement): Change
6399 * ldlang.h (lang_output_section_statement): Export it.
6400 * ldlang.c (lang_output_section_statement): Ditto.
6404 * ld.texinfo (Output Section Data): Add note that section data
6405 commands cannot appear outside of section directives.
6409 * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support.
6414 * Makefile.am (ALL_64_EMULATIONS): Add eelf64_ia64.o.
6415 (eelf64_ia64.c): New rule.
6416 * Makefile.in: Rebuild.
6417 * configure.tgt (ia64-*-elf*, ia64-*-linux*): New targets.
6418 * emulparams/elf64_ia64.sh: New file.
6422 * scripttempl/elfd30v.sc: Place .gcc_except_table.
6426 * dep-in.sed: Match space at start of file name, not at end.
6430 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
6431 lang_leave_output_section_statement () after calling
6432 lang_enter_output_section_statement ().
6433 * emultempl/armelf.em: Likewise.
6437 * emultempl/elf32.em (struct orphan_save): Add section field.
6438 (gld${EMULATION_NAME}_place_orphan): Use above to keep sections in
6439 better order, and place first orphan section as we did before the
6440 2000-04-12 patch. Ignore ~SEC_ALLOC sections when choosing place.
6441 Don't call make_bfd_section here, let wild_doit do the job for us.
6442 Don't build a statement list when we'll only throw it away.
6443 * emultempl/armelf.em: Ditto.
6444 * emultempl/pe.em: Similarly.
6448 * scripttempl/elfppc.sc: Remove.
6449 * emulparams/elf32ppc.sh: Use elf.sc.
6450 * emulparams/elf32lppc.sh: Use elf.sc.
6451 * emulparams/elf32ppclinux.sh: Use elf.sc.
6452 * emulparams/elf32ppcsim.sh: New file.
6453 * emulparams/elf32lppcsim.sh: New file.
6454 * Makefile.am: Update dependencies. Add elf32ppcsim ad elf32lppcsim.
6455 (ALL_EMULATIONS): Add elf32ppcsim ad elf32lppcsim.
6456 * Makefile.in: Regenerate.
6457 * configure.tgt (powerpc-*): Add elf32ppcsim and elf32lppcsim.
6461 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Process
6462 ~SEC_ALLOC sections too. Init start address of debug sections.
6463 * emultempl/armelf.em (gld${EMULATION_NAME}_place_orphan): Ditto.
6464 * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Ditto.
6465 Also set all relocateable section start addresses.
6469 * scripttempl/elf.sc: Add support for .sbss2 and .sdata2 sections.
6470 Add new BSS_PLT variable for when .plt need not be contained in
6471 the file. Move _etext so that it is also after .fini, and provide
6472 both etext and _etext with a leading underscore. Mark the start
6477 * emultempl/elf32.em (struct orphan_save): New.
6478 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
6479 hold_interp): Make them struct orphan_save.
6480 (gld${EMULATION_NAME}_place_section): Modify for new hold_*.
6481 (gld${EMULATION_NAME}_place_orphan): Add new orphan sections to
6482 the end of the relevant section list. Also add associated section
6483 statements to the end of any previous orphan statements.
6484 * emultempl/armelf.em: Similarly.
6485 * emultempl/pe.em: Similarly.
6489 * ld.texinfo (Simple Example): Remove extraneous paragraph.
6493 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
6494 --enable-build-warnings option.
6495 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
6496 * Makefile.in, configure: Re-generate.
6500 * po/ld.pot: Regenerate.
6502 * lexsup.c (help): Restore translated part of bug string.
6504 * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
6505 (DEP): Quote when passing vars to sub-make. Add warning message
6507 (DEP1): Rewrite for "gcc -MM".
6508 (CLEANFILES): Add DEP2.
6509 Update dependencies.
6510 * Makefile.in: Regenerate.
6514 * ld.h: #include "bin-bugs.h"
6515 * lexsup.c (help): Use REPORT_BUGS_TO.
6519 * configure.tgt (avr-*-*): New target support.
6520 * Makefile.am: Likewise.
6521 * scripttempl/elf32avr.sc: New script file.
6522 * emulparams/avr1200.sh: New file.
6523 * emulparams/avr23xx.sh: New file.
6524 * emulparams/avr4433.sh New file.
6525 * emulparams/avr44x4.sh New file.
6526 * emulparams/avr85xx.sh New file.
6527 * emulparams/avrmega103.sh New file.
6528 * emulparams/avrmega161.sh New file.
6529 * emulparams/avrmega603.sh New file.
6530 * Makefile.in: Regenerate.
6534 * Makefile.am (check-DEJAGNU): Also unset LANG.
6535 * Makefile.in: Rebuild.
6539 * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
6544 * emulparams/elf32mcore.sh: Include "getopt.h".
6548 * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware.
6552 * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR.
6553 * emulparams/shpe.sh: Likewise.
6557 * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED
6558 to unused parameters.
6560 * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static
6561 functions only used by DLL code.
6562 (_place_orphan): Initialise 'dollar'.
6566 * ldmain.c (undefined_symbol): Take one more arg, fatal, to
6567 indicate if the undefined symbol is a fatal error or not.
6568 Don't delete the output file if "fatal" is false.
6572 * Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)".
6573 Set LC_COLLATE and LC_ALL to null and export them. It is for
6574 sort which expects the C locale.
6575 Add $(LIBS) to all $(HOSTING_LIBS).
6576 * Makefile.in: Rebuild.
6580 * emultempl/{aix.em, armcoff.em, armelf.em, armelf_oabi.em,
6581 beos.em, elf32.em, generic.em, gld960.em, gld960c.em, hppaelf.em,
6582 linux.em, lnk960.em, mipsecoff.em, sunos.em, vanilla.em}
6583 (ld_emulation_xfer_struct): Add missing NULL initialiser for
6584 find_potential_libraries.
6588 * ldgram.y (exclude_name_list): Don't require a comma to separate
6589 list entries; the lexer considers commas to be valid part of a
6590 filename, so in something like `foo, bar' the comma is considered
6591 part of the first filename, `foo,'.
6592 * ld.texinfo: Update section on EXCLUDE_FILE lists.
6596 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
6597 host "i[3456]86-*-freebsdelf*".
6601 * scripttempl/i386go32.sc: Move misplaced semicolons.
6605 * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o.
6606 (ALL_64_EMULATIONS): Remove eelf64hppa.o.
6607 (eelf64hppa.c, ehppaelf.c): Remove targets.
6608 * Makefile.in: Rebuild.
6612 * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on
6613 GNU/Linux/sparc, but keep the default as 32.
6615 * configure.tgt: Enable elf64_sparc on Solaris7+/sparc. And make
6616 it default if sparcv9 or sparc64.
6620 * Makefile.am: Add rules to build emipspe.o and earmpe.o.
6621 * Makefile.in: Regenerate.
6622 * configure.tgt: Add targets for arm-wince, sh-pe and mips-pe.
6624 * ldemul.h (ld_emulation_xfer_struct): Add new field:
6625 find_potential_libraries.
6626 * ldemul.c (ldemul_find_potential_libraries): New function.
6628 * ldfile.c (ldfile_open_file_search): Allow function to be
6630 (ldfile_open_file): Call ldemul_find_potential_libraries.
6631 * ldfile.h: Add prototype for ldfile_open_file_search.
6633 * pe-dll.c: Add support for ARM, MIPS and SH targets.
6635 * emulparams/mipspe.sh: New file. Parameters for mips-pe target.
6636 * emulparams/shpe.sh: New file. Parameters for sh-pe target.
6638 * emultempl/pe.em: Add support for ARM, MIPS and SH DLLs.
6639 (gld_X_find_potential_libraries): New function. Search for
6640 libraries called "*.lib".
6642 * scripttempl/pe.sc: Add .pdata section.
6646 * scripttempl/elfd10v.sc: Remove dynamic linking hooks.
6647 Add and use memory regions.
6651 * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New.
6653 * Makefile.am: Add support for Linux/IBM 370.
6654 * configure.tgt: Likewise.
6656 * Makefile.in: Regenerate.
6660 * ldlang.c (print_input_section, print_data_statement,
6661 print_reloc_statement, print_padding_statement, insert_pad,
6662 size_input_section, lang_check_section_addresses,
6663 lang_size_sections, lang_do_assignments, lang_set_startof,
6664 lang_one_common): Change `opb' to unsigned.
6665 (lang_do_assignments): Also change `size' to unsigned.
6669 * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION.
6673 * mri.c (mri_draw_tree): Add default LMA region argument to call
6674 to lang_leave_output_section_statement.
6675 * ldlang.h: Update prototypes with LMA region arguments.
6676 * ldlang.c (lang_size_sections): Encapsulate region bounds
6677 checking in os_check_region call.
6678 (os_check_region): New function.
6679 (lang_output_section_statement_lookup): Initialize lma_region.
6680 (lang_leave_output_section_statement): Add LMA region argument.
6681 (lang_leave_overlay): Ditto.
6682 * ldgram.y: Handle LMA region syntax.
6683 * ld.texinfo (Output Section Description): Describe LMA region usage.
6684 * emultempl/armelf.em (gld$place_orphan): Add default value for
6685 lma region in call to lang_leave_output_section_statement.
6686 * emultempl/elf32.em (gld$place_orphan): Add default value for
6687 lma region in call to lang_leave_output_section_statement.
6688 * emultempl/pe.em (gld$place_orphan): Add default value for
6689 lma region in call to lang_leave_output_section_statement.
6694 * ldlang.c (lang_check_section_addresses): Use bytes instead of
6695 octets when calculating section end addresses.
6699 * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation.
6703 * ldexp.c (fold_name): Make SIZEOF operator return byte count, not
6705 * ldlang.c (print_input_section, print_data_statement,
6706 print_reloc_statement, print_padding_statement): Print target
6707 address values and section sizes as bytes, not octets.
6708 (insert_pad) Calculate padding size in octets, and adjust "dot"
6710 (size_input_section) Always adjust "dot" by bytes, not octets.
6711 (lang_check_section_addresses, lang_do_assignments) Adjust
6712 "dot" by bytes, not octets. Use the larger of the directive size
6713 or octets_per_byte for the number of octets actually allocated in
6715 (lang_set_startof) Make sure STARTOF returns a target address.
6716 (lang_one_common) Record size changes in octets.
6717 (lang_abs_symbol_at_end_of) Section end symbol's value is
6718 recorded in target bytes.
6719 * ld.texinfo: Updated description of BYTE, SHORT, LONG, etc.
6720 to be clear about behavior when an octet is smaller than one byte.
6724 * ldcref.c (output_cref): Don't pass message strings to printf
6728 * ldmisc.c (vfinfo): Same here.
6733 * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em,
6734 generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em,
6735 mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct):
6736 Add missing NULL initialisers, and comments.
6740 * ldlang.c (lang_size_sections): Fix typo in comment.
6744 * ldlang.c (lang_size_sections): Also update the current
6745 address of a region if the SEC_NEVER_LOAD bit is not set.
6749 * configure.tgt (arm*-*-conix*): New target.
6753 * ld.texinfo (Options): Remind users to preceed linker command
6754 line switches with -Wl, (or whatever is appropriate) if it is
6755 being invoked by a comnpiler driver program.
6756 Fix description of the behaviour of the -n command line switch.
6760 * ld.h (wildcard_spec): Change exclude_name to exclude_name_list.
6762 * ld.texinfo (EXCLUDE_FILE): Update documentation.
6763 * ldgram.y (wildcard_spec): Support a list of excluded_files.
6764 (exclude_name_list): New.
6765 ldlang.c (walk_wild_section): Support list of excluded files.
6766 (print_wild_statement): Likewise.
6767 (lang_add_wild): Likewise.
6768 * ldlang.h (lang_wild_statement_type): Likewise.
6769 * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support.
6773 * pe-dll.c (pe_dll_warn_dup_exports): New variable.
6774 (process_def_file): Use.
6775 (pe_dll_compat_implib): New variable.
6778 * pe-dll.h: Add exports of pe_dll_warn_dup_exports and
6779 pe_dll_compat_implib.
6781 * emultempl/pe.em (longopts): Add warn-duplicate-exports and
6782 compat-implib options.
6783 (gld_${EMULATION_NAME}_list_options): List new options.
6784 (gld_${EMULATION_NAME}_parse_args): Handle.
6786 * pe-dll.c (pe_dll_generate_implib): Use the correct name for output
6789 * deffilep.y (opt_name): Allow "." in name.
6791 For older changes see ChangeLog-9899
6797 version-control: never