3 * ld.texinfo (Builtin Functions) <DEFINED>: Say that only symbols
4 defined before the statement using DEFINED yield 1.
5 * ldexp.c (fold_name) <case DEFINED>: In lang_first_phase_enum,
6 call lang_track_definedness on symbol. In subsequent phases, use
7 lang_symbol_definition_iteration and lang_statement_iteration to
8 check whether the symbol was defined before the current statement.
9 (exp_fold_tree) <case etree_assign et al>: Call
10 lang_update_definedness before updating symbol type when setting
12 * ldlang.c (lang_definedness_table): New variable.
13 (lang_definedness_newfunc, lang_track_definedness)
14 (lang_symbol_definition_iteration, lang_update_definedness): New
16 (lang_init): Initialize lang_definedness_table and
17 lang_statement_iteration.
18 (lang_finish): Destroy bfd_hash_table_free.
19 (lang_size_sections): Increment lang_statement_iteration.
20 (lang_do_assignments_1): New function with former
21 lang_do_assignments contents. Change recursive calls to call this
23 (lang_do_assignments): Evacuate contents. Increment
24 lang_statement_iteration, then just call lang_do_assignments_1.
25 * ldlang.h (struct lang_definedness_hash_entry)
26 (lang_statement_iteration, lang_track_definedness)
27 (lang_symbol_definition_iteration, lang_update_definedness):
32 * scripttempl/elf.sc (__executable_start): Provide.
36 * emulparams/armelf.sh: Define NO_SMALL_DATA.
37 * emulparams/armelf_linux.sh, emulparams/armelf_oabi.sh,
38 emulparams/armnto.sh: Likewise.
42 * ldlang.c (lang_size_sections_1): Use IGNORE_SECTION to tell
43 whether to skip test for no memory region.
47 * lexsup.c (parse_args: OPTION_CALL_SHARED): Revise comment
48 describing defaults. Change default to report unresolved symbols
49 in object files as well.
53 * ldexp.c (fold_name) <case DEFINED>: Set section of result to
58 * emulparams/elf32xtensa.sh (OTHER_READONLY_SECTIONS,
59 OTHER_READWRITE_SECTIONS, OTHER_SECTIONS): Set section addresses to
60 zero for relocatable links.
64 * configure.host (HOSTING_LIBS): Define for hppa*-*-linux*.
68 * ldwrite.c (unsplittable_name): New.
69 (clone_section): Strip existing numeric suffix. Only truncate names
71 (split_sections): Use unsplittable_name.
75 * lexsup.c (parse_args): Report unresolved symbols in shared
76 libraries when creating a dynamic executable. This is a
77 restoration of the default behaviour for previous versions of
82 * emulparams/hppanbsd.sh: Remove OUTPUT_FORMAT.
83 * emulparams/hppaobsd.sh: Add OUTPUT_FORMAT="elf32-hppa".
87 * configure.tgt: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
91 * pe-dll.c (make_one): Correct sym def order & pick right sym for
96 * NEWS: Add an indication of the cutoff for 2.14.
100 * ldmain.c (get_emulation): Ignore "-mips64r2".
104 * configure.host: Match GNU/KFreeBSD with new kfreebsd*-gnu
106 * configure.tgt: Likewise.
110 * emulparams/elf32ip2k.sh (TEMPLATE_NAME): Define.
114 * po/tr.po: Updated Turkish translation.
118 * ldmain.c: Initialise the new fields in bfd_link_info to
120 * lexsup.c (enum option_values): New enum. Use this to
121 replace the handed coded values for the long switch options.
122 (ld_options): Add 'unresolved-symbols',
123 'warn-unresolved-symbols' and 'error-unresolved-symbols'.
124 (parse_args): Handle the new switches. Set the values of
125 unresolved_symbols_in_objects and
126 unresolved_symbols_in_shared_libs appropriately. If they were
127 not initialised by the command line, install default values.
128 * emultempl/elf32.em (handle_option): Update OPTION_GROUP and
129 -z defs to use the new fields in bfd_link_info.
130 * ld.texinfo: Document the new switches.
131 * NEWS: Mention this feature.
135 * Makefile.am (GENSCRIPTS_EXTRA): New script definition which
136 calls genscripts_extra.sh.
137 Rearrange all msp430 depends using this script.
138 * Makefile.in: Regenerate.
139 * genscripts_extra.sh: New file: Similar to genscripts.sh, except
140 that the script to be run to generate the emulations can be passed
141 as an optional parameter instead of being computed from the
143 * emulparams/msp430all.sh: New file: Combine all msp430 subdevice
144 definitions into one file.
145 * emulparams/msp430x*.sh: Removed.
149 * ld.texinfo (Options): Put keywords for the -z option into a
150 table. Add more text describing what the -z now option does.
154 * dep-in.sed: Remove libintl.h.
155 * Makefile.am (POTFILES.in): Unset LC_COLLATE.
156 * Makefile.in: Regenerate.
160 * genscripts.sh (libpath.exp): Only generate for first emulation.
161 (LIB_PATH): Correct order of paths. Don't add $tool_lib when
162 already present or when LIB_PATH is set to ":".
166 * ldmain.c (undefined_symbol): Change parameter name from `fatal'
167 to `error'. If only a warning, put warning in the reported
168 string. Consistently set failure flag when not a warning.
172 * Makefile.am: Add xW42 and xE42 parts. Sort MPU list according to
174 * Makefile.in: Regenerate.
175 * configure.tgt: Add extra emulations.
176 * emulparams/msp430xE423.sh: New file.
177 * emulparams/msp430xE427.sh: New file.
178 * emulparams/msp430xW425.sh: New file.
179 * emulparams/msp430xE425.sh: New file.
180 * emulparams/msp430xW423.sh: New file.
181 * emulparams/msp430xW427.sh: New file.
185 * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse):
186 Change second (cmdline) arg to lang_add_entry to FALSE.
187 (set_pe_subsystem): Change second arg to lang_add_entry to TRUE.
192 * configure.tgt: Recognize new target i860-*-coff.
193 * Makefile.am (ALL_EMULATIONS): Add ecoff_i860.o.
194 (ecoff_i860.c): New rule.
195 * emulparams/coff_i860.sh: New file.
196 * scripttempl/i860coff.sc: New file.
197 * Makefile.in: Regenerate.
201 * emultempl/elf32.em (before_allocation): Prepend "warning: "
202 to messages produced for .gnu.warning.SYMBOL sections.
206 * emultempl/elf32.em (output_rel_find): Add "isdyn" param. Put
207 .rel.dyn before other reloc sections. Don't stop looking for reloc
208 sections on finding one that isn't allocated. Match .rel even when
209 placing .rela and vice versa, when setting last_rel and
210 last_rel_alloc for the first time. If no reloc sections in script,
211 prefer allocated section over non-alloc.
212 (gld${EMULATION_NAME}_place_orphan): Handle orphan .rel.dyn.
216 * emulparams/shelf.sh (OTHER_SECTIONS): Don't include .stack
217 section for shared library.
218 * emulparams/shelf32.sh (OTHER_SECTIONS): Likewise.
219 * emulparams/shelf64.sh (OTHER_SECTIONS): Likewise.
223 * scripttempl/elfm68hc12.sc: Add gcc_except_table.
224 * scripttempl/elfm68hc11.sc: Likewise.
228 * emulparams/elf64ppc.sh (GOT): Fix for shell brace matching.
230 * emulparams/elf64ppc.sh (GOT): Don't merge .toc into .got for ld -r.
234 * ld.texinfo: Typo fixes. Document SUBALIGN.
235 * ldgram.y (opt_subalign): Add.
236 * ldlex.l (SUBALIGN): Recognize.
237 * ldlang.c (overlay_subalign): New var.
238 (lang_enter_overlay): Add subalign param.
239 (lang_enter_overlay_section): Pass overlay_subalign to
240 lang_enter_output_section_statement.
241 * ldlang.h (lang_enter_overlay): Update.
245 * po/fr.po: Updated French translation.
249 * scripttempl/elfm68hc11.sc: Keep ctor/dtor sections; Take into
250 account .tramp sections;
251 * scripttempl/elfm68hc12.sc: Likewise.
255 * ld/pe-dll.c: Add libcygwin to autofilter_liblist[]
259 * po/es.po: New Spanish translation.
263 * po/ld.pot: Regenerate.
267 * emulparams/elf32xtensa.sh (OTHER_READONLY_SECTIONS): Replace .xt.lit
268 with new .got.loc section.
269 (OTHER_READWRITE_SECTIONS): Do not combine linkonce sections for
270 non-relocating links.
271 (OTHER_SECTIONS): Add .xt.lit here. Change it to keep linkonce
272 sections separate for non-relocating links; likewise for .xt.insn.
277 * emulparams/elf32am33lin.sh: Adjust to match kernel parameters.
279 * configure.host (am33_2.0-*-linux*): Added.
280 * configure.tgt (am33_2.0-*-linux*): Likewise.
281 * emulparams/elf32am33lin.sh: New.
282 * Makefile.am (eelf32am33lin.c): New rule.
283 * Makefile.in: Rebuilt.
288 * emulparams/mn10300.sh (TEMPLATE_NAME): Define.
289 (GENERATE_SHLIB_SCRIPT): Likewise.
293 * emulparams/elf64ppc.sh (OTHER_GOT_SECTIONS): Don't define.
295 * emultempl/ppc64elf.em (stub_added): New static var.
296 (ppc_create_output_section_statements): Call ppc64_elf_init_stub_bfd.
297 (ppc_add_stub_section): Set stub_added.
298 (gld${EMULATION_NAME}_finish): Look for .got rather than .toc. Adjust
299 ppc64_elf_size_stubs call and test for stubs.
300 * scripttempl/elf.sc (GOT): Define and use.
304 * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_after_allocation):
305 Allow second call from ldemul_finish.
309 * emulparams/shelf32.sh (STACK_ADDR): Don't define.
310 (OTHER_SECTIONS): Include .stack.
311 * emulparams/shelf64.sh (OTHER_SECTIONS): Likewise.
315 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't include
317 (OTHER_READWRITE_SECTIONS): Include .opd if -pie.
318 * scripttempl/elf.sc: Use SHLIB_DATA_ADDR instead of DATA_ADDR
323 * ld.h: Convert to C90, remove unnecessary prototypes and casts.
324 Replace PTR with void *. Formatting.
325 * ldcref.c: Likewise.
326 * ldctor.c: Likewise.
327 * ldctor.h: Likewise.
328 * ldemul.h: Likewise.
331 * ldfile.c: Likewise.
332 * ldfile.h: Likewise.
333 * ldlang.c: Likewise.
334 * ldlang.h: Likewise.
337 * ldmain.c: Likewise.
338 * ldmain.h: Likewise.
339 * ldmisc.c: Likewise.
340 * ldmisc.h: Likewise.
342 * ldwrite.c: Likewise.
343 * ldwrite.h: Likewise.
344 * lexsup.c: Likewise.
347 * pe-dll.c: Likewise.
348 * pe-dll.h: Likewise.
349 * deffilep.y: Likewise.
350 * deffile.h: Likewise. Don't include ansidecl.h.
351 * emulparams/elf32mcore.sh: Remove unnecessary cast.
352 * emultempl/m68kcoff.em: Likewise.
353 * emultempl/m68kelf.em: Likewise.
354 * emultempl/ticoff.em: Remove lang_add_output_format declaration.
355 * sysdep.h: Don't include ansidecl.h.
356 * Makefile.am: Run "make dep-am".
357 * Makefile.in: Regenerate.
361 * deffilep.y (def_file_add_directive): Cope with NUL seperated
362 directives. Fix reporting of unparseable directives.
363 (def_error): Check for a NULL def_filename.
367 * emultempl/aix.em: Convert to C90, remove unnecessary prototypes
368 and casts. Replace PTR with void *. Formatting.
369 * emultempl/alphaelf.em: Likewise.
370 * emultempl/armcoff.em: Likewise.
371 * emultempl/armelf.em: Likewise.
372 * emultempl/armelf_oabi.em: Likewise.
373 * emultempl/beos.em: Likewise.
374 * emultempl/elf32.em: Likewise.
375 * emultempl/generic.em: Likewise.
376 * emultempl/gld960.em: Likewise.
377 * emultempl/gld960c.em: Likewise.
378 * emultempl/hppaelf.em: Likewise.
379 * emultempl/linux.em: Likewise.
380 * emultempl/lnk960.em: Likewise.
381 * emultempl/m68hc1xelf.em: Likewise.
382 * emultempl/m68kcoff.em: Likewise.
383 * emultempl/m68kelf.em: Likewise.
384 * emultempl/mipsecoff.em: Likewise.
385 * emultempl/mipself.em: Likewise.
386 * emultempl/mmix-elfnmmo.em: Likewise.
387 * emultempl/mmixelf.em: Likewise.
388 * emultempl/mmo.em: Likewise.
389 * emultempl/needrelax.em: Likewise.
390 * emultempl/netbsd.em: Likewise.
391 * emultempl/pe.em: Likewise.
392 * emultempl/sh64elf.em: Likewise.
393 * emultempl/sunos.em: Likewise.
394 * emultempl/ticoff.em: Likewise.
395 * emultempl/vanilla.em: Likewise.
396 * emultempl/xtensaelf.em: Likewise.
397 * Makefile.am: Correct dependencies.
398 * Makefile.in: Regenerate.
402 * ld.texinfo: Correct spelling of "relocatable".
403 * ldctor.c: Likewise.
405 * ldfile.c: Likewise.
406 * ldint.texinfo: Likewise.
407 * ldlang.c: Likewise.
408 * ldmain.c: Likewise.
409 * ldwrite.c: Likewise.
410 * lexsup.c: Likewise.
411 * emultempl/aix.em: Likewise.
412 * emultempl/alphaelf.em: Likewise.
413 * emultempl/armcoff.em: Likewise.
414 * emultempl/armelf_oabi.em: Likewise.
415 * emultempl/beos.em: Likewise.
416 * emultempl/elf32.em: Likewise.
417 * emultempl/generic.em: Likewise.
418 * emultempl/gld960.em: Likewise.
419 * emultempl/gld960c.em: Likewise.
420 * emultempl/hppaelf.em: Likewise.
421 * emultempl/linux.em: Likewise.
422 * emultempl/lnk960.em: Likewise.
423 * emultempl/m68hc1xelf.em: Likewise.
424 * emultempl/m68kcoff.em: Likewise.
425 * emultempl/m68kelf.em: Likewise.
426 * emultempl/mipsecoff.em: Likewise.
427 * emultempl/mipself.em: Likewise.
428 * emultempl/mmix-elfnmmo.em: Likewise.
429 * emultempl/mmo.em: Likewise.
430 * emultempl/needrelax.em: Likewise.
431 * emultempl/pe.em: Likewise.
432 * emultempl/ppc64elf.em: Likewise.
433 * emultempl/sh64elf.em: Likewise.
434 * emultempl/sunos.em: Likewise.
435 * emultempl/ticoff.em: Likewise.
436 * emultempl/xtensaelf.em: Likewise.
440 * emultempl/ppc32elf.em: Convert to C90.
444 * emultempl/ppc64elf.em: Convert to C90 function definitions, remove
445 unnecessary prototypes and casts.
449 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Dump out
450 statistics from ppc64_elf_build_stubs.
454 * emultempl/ppc64elf.em (build_section_lists): Check return status
455 from ppc64_elf_next_input_section.
459 * ldlang.c (section_already_linked): Put back assignment of
464 * pe-dll.c (generate_reloc): Catch and ignore an ARM_26D
469 * configure.host (*-*-freebsd*): Add known path for ld-elf.so.1
470 if not produced by gcc.
474 * configure.tgt: Add specific case for cris-*-linux-gnu*
475 with crislinux emulation only.
479 * configure.tgt: Add i386-netbsd-gnu target.
483 * configure.tgt (mips*-sgi-irix6*): Add the o32 and n64 emulations
484 to $targ_extra_libpath.
488 * po/Make-in (DESTDIR): New.
489 (install-data-yes): Support $(DESTDIR).
490 (uninstall): Likewise.
494 * Makefile.am (ALL_EMULATIONS): Add em32relf.o.
495 * Makefile.in: Regenerate.
499 * configure.tgt (h8300*): Add h8300sxn emulations.
500 * Makefile.am (ALL_EMULATIONS): Add eh8300sxn.o and eh8300sxnelf.o.
501 (eh8300sxn.c, eh8300sxnelf.c): New rules.
502 * Makefile.in: Regenerate.
503 * emulparams/h8300sxnelf.sh, emulparams/h8300sxn.sh: New files.
504 * scripttempl/h8300sxn.sc: New file.
508 * emulparams/elf64ppc.sh (EXECUTABLE_SYMBOLS, OTHER_BSS_END_SYMBOLS,
509 CTOR_START, CTOR_END, DTOR_START, DTOR_END): Don't define.
513 * emultempl/ppc64elf.em (emit_stub_syms, toc_section): New vars.
514 (build_toc_list): New function.
515 (gld${EMULATION_NAME}_finish): Call build_toc_list and
516 ppc64_elf_reinit_toc. Adjust ppc64_elf_build_stubs call.
517 (OPTION_STUBSYMS): Define.
518 (PARSE_AND_LIST_LONGOPTS): Add emit-stub-syms.
519 (PARSE_AND_LIST_OPTIONS): Document.
520 (PARSE_AND_LIST_ARGS_CASES): Handle.
524 * emultempl/elf32.em (gld${EMULATION_NAME}_list_options): Remove
525 extra \t in -z noexecstack line.
529 * ldgram.y (phdr_type): Grok PT_GNU_STACK.
530 * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add
531 -z execstack and -z noexecstack.
532 (gld${EMULATION_NAME}_list_options): Likewise.
533 * scripttempl/elf.sc: If not -r, discard .note.GNU-stack section.
539 * Makefile.am: Add new emulations for h8300sx.
540 * Makefile.in: Regenerate.
541 * configure.tgt: Add new emulations.
542 * emulparams/h8300sx.sh: New emulation.
543 * emulparams/h8300sxelf.sh: Ditto.
544 * scripttempl/h8300sx.sc: Ditto.
548 * ldmisc.c: Include "bfdlink.h".
549 (error_handler): Handle LD_DEFINITION_IN_DISCARDED_SECTION
550 and -LD_DEFINITION_IN_DISCARDED_SECTION.
552 * Makefile.am: Rebuild dependency.
553 * Makefile.in: Regenerated.
557 * emulparams/shlelf_linux.sh (GENERATE_PIE_SCRIPT): Set to yes.
558 * emulparams/shlelf32_linux.sh (GENERATE_PIE_SCRIPT): Likewize.
562 * pe-dll.c (fill_edata): Scan table pe_dll->exports, which is
563 sorted alphabetically, instead of exported_symbols, which is
569 * lexsup.c (OPTION_PIE): Define.
570 (ld_options): Add -pie and --pic-executable options.
571 (parse_args): Handle OPTION_PIE.
572 * ldmain.c (main): Initialize link_info.pie and
573 link_info.executable.
574 * genscripts.sh: Generate PIE scripts.
575 * ld.texinfo: Document -pie and --pic-executable options.
576 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open):
577 (gld${EMULATION_NAME}_place_orphan): Likewise.
578 (gld${EMULATION_NAME}_get_script): Include PIE scripts.
579 * scripttempl/elf.sc: In PIE scripts set . the same way as in
581 * emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Set to yes.
582 * emulparams/elf64_ia64.sh (GENERATE_PIE_SCRIPT): Likewise.
583 * emulparams/elf32ppc.sh (GENERATE_PIE_SCRIPT): Likewise.
584 * emulparams/elf64ppc.sh (GENERATE_PIE_SCRIPT): Likewise.
585 * emulparams/elf_x86_64.sh (GENERATE_PIE_SCRIPT): Likewise.
586 * emulparams/elf_s390.sh (GENERATE_PIE_SCRIPT): Likewise.
587 * emulparams/elf32_sparc.sh (GENERATE_PIE_SCRIPT): Likewise.
588 * emulparams/elf64_sparc.sh (GENERATE_PIE_SCRIPT): Likewise.
589 * emulparams/elf64alpha.sh (GENERATE_PIE_SCRIPT): Likewise.
590 * emulparams/elf64_s390.sh (GENERATE_PIE_SCRIPT): Likewise.
591 * emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Likewise.
595 * genscripts.sh: Create tmpdir/libpath.exp.
599 * emultempl/armelf.em (arm_elf_before_allocation): Replace ASSERT
600 with a test for a NULL bfd_for_interworking.
604 * configure.host (*-*-netbsd*): Set HOSTING_CRT0 and HOSTING_LIBS
605 correctly for more recent versions of NetBSD.
606 (alpha*-*-netbsd*): Remove.
607 (i[3-7]86-*-netbsd*): Remove.
611 * emultempl/pe.em: Include "safe-ctype.h" instead of <ctype.h>.
615 * emulparams/elf64btsmip.sh: Set TEXT_START_ADDR to 0x120000000 to
616 trap on pointer crops.
620 * configure.tgt: Check for a target triplet of shl-...-netbsdelf
621 as well as shle-...-netbsdelf.
625 * configure.host: Accept i[3-7]86 variants.
626 * configure.tgt: Likewise.
630 * emulparams/elf64_ia64.sh: Don't set COMMONPAGESIZE for now.
634 * Makefile.am (ALL_EMULATIONS): Add earmelfb.o and earmelfb_linux.o.
635 (earmelfb.c, earmelfb_linux.c): New rules.
636 * Makefile.in: Regenerated.
637 * emulparams/armelfb.sh, emulparams/armelfb_linux.sh: New files.
638 * configure.tgt: Add armeb-elf and arm*b-*-linux-gnu.
642 * ldlang.c (lang_size_sections_1): Default to generating a
643 fatal error message if a loadable section is not allocated
644 to a memory region when regions are defined.
648 * Makefile.am (em68hc11elf.c): Correct dependencies.
649 (em68hc11elfb.c, em68hc12elf.c, em68hc12elfb.c): Likewise.
650 * Makefile.in: Regenerate.
651 * emultempl/elf32.em (find_exp_assignment): Adjust for changed
652 bfd_elf_record_link_assignment name.
656 * ldmain.h (overflow_cutoff_limit): Declare.
657 * ldmain.c (overflow_cutoff_limit): Define, initialized to 10.
658 (reloc_overflow): Limit error messages based on it.
659 * lexsup.c (parse_args) <OPTION_VERBOSE>: Set cutoff to
664 * ldlex.l: Accept C style comments in version scripts.
668 * ldlang.c (lang_process): Add the relax finalize pass.
670 * ldmain.c (main): Initialize link_info.relax_finalizing to
675 * ldgram.y (phdr_type): Grok PT_TLS and PT_GNU_EH_FRAME names.
676 If a name string is unknown, give an error rather than crashing later.
680 * Makefile.am (ALL_EMULATIONS): Add eh8300hn.o, eh8300sn.o,
681 eh8300hnelf.o, eh8300snelf.o and respective rules.
682 * Makefile.in: Regenerate.
683 * configure.tgt: Add h8300hn, h8300sn, h8300hnelf, h8300snelf
684 * emulparams/h8300hn.sh: New
685 * emulparams/h8300sn.sh: New
686 * emulparams/h8300hnelf.sh: New
687 * emulparams/h8300snelf.sh: New
688 * scripttempl/h8300hn.sc: new
689 * scripttempl/h8300sn.sc: new
693 * ldmain.c (link_callbacks): Initialize error_handler.
695 * ldmisc.c (error_handler): New function.
697 * ldmisc.h (error_handler): New prototype.
701 * emulparams/m68hc11elf.sh: Use m68hc1xelf.em extra.
702 * emulparams/m68hc11elfb.sh: Likewise.
703 * emulparams/m68hc12elf.sh: Likewise.
704 * emulparams/m68hc12elfb.sh: Likewise.
708 * emultempl/m68hc1xelf.em: New file to generate far trampolines on
710 (LDEMUL_BEFORE_ALLOCATION): Override to gather the trampolines to
712 (LDEMUL_FINISH): Override to generate the trampolines after gc and
714 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Override to create the
715 stub file for trampolines.
716 (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_LONGOPTS): New options
717 --no-trampoline and --bank-window to control the memory bank window.
721 * ldfile.c (ldfile_add_library_path): Remove the unused
726 * scripttempl/xstormy16.sc (__data, __rdata): New.
730 * scripttempl/xstormy16.sc: Add .jcr section mapping.
736 * ldlex.l: Use YY_CURRENT_BUFFER instead of yy_current_buffer.
740 * h8-doc.texi: Replace occurrances of 'Hitachi' with 'Renesas'.
741 * ld.texinfo: Likewise.
746 * scripttempl/elf.sc (CTOR): Handle crtbeginS.o, crtendS.o and
747 other variants of crtbegin.o, crtend.o.
749 * scripttempl/crisaout.sc (ctors, dtors): Likewise.
750 * scripttempl/elf_chaos.sc (CTOR, DTOR): Likewise.
751 * scripttempl/elfd10v.sc (CTOR, DTOR): Likewise.
752 * scripttempl/elfd30v.sc (CTOR, DTOR): Likewise.
753 * scripttempl/elfxtensa.sc (CTOR, DTOR): Likewise.
754 * scripttempl/iq2000.sc (CTOR, DTOR): Likewise.
755 * scripttempl/mmo.sc (ctors, dtors): Likewise.
756 * scripttempl/xstormy16.sc (CTOR, DTOR): Likewise.
760 * scripttempl/elf32msp430.sc: Add initX, finiX, ctors, dtors
761 sections to respect C++ constructor/destructor. Add ctors/dtors
762 start/stop definitions.
763 * scripttempl/elf32msp430_3.sc: Likewise.
767 * ld.texinfo (Options): Add a reminder of the target specific
768 nature to the description of the i386 PE specific options, for
769 readers who have not read all the way through the manual.
773 * configure.tgt: Fixed bug in list of targ_extra_emuls.
774 * emulparams/tic3xcoff.sh (SCRIPT_NAME): Namespace
775 cleanup. Replace s/c4x/tic4x and s/c3x/tic3x/
776 * emulparams/tic3xcoff_onchip.sh: Ditto
777 * emulparams/tic4xcoff.sh: Ditto
778 * scripttempl/tic4xcoff.sc: Ditto
782 * NEWS: Mention support for Xtensa architecture.
786 * pe-dll.c (pe_detail_list): arm-pe targets use underscores.
790 * emultempl/pe.em (gld_${EMULATION_NAME}_after_open):
791 Don't call pe_dll_build_section() if link_info.relocateable.
792 (gld_${EMULATION_NAME}_finish): Don't call pe_dll_fill_sections()
793 if link_info.relocateable.
797 * pe-dll.c (process_def_file): Don't create an export
798 section if there are no exports and we're building an exe
799 (pe_dll_build_sections): Ditto
800 (pe_dll_fill_sections): Conditionalize setting
801 abfd->dll true on info->shared
802 * emultempl/pe.em (gld_${EMULATION_NAME}_after_open):
803 If i386pe or armpe, call pe_dll_build_section()
804 for both exe's and dll's, not just dll's.
805 (gld_${EMULATION_NAME}_finish): For all targets except
806 shpe and mipspe, call pe_dll_fill_sections() for both
807 exe's and dll's, not just dll's.
811 * emulparams/xtensa-config.sh: Remove comment indicating that this is
816 * Makefile.am (ALL_EMULATIONS): Add eelf32xtensa.o.
817 (eelf32xtensa.c): New target.
818 * Makefile.in: Regenerate.
819 * configure.tgt: Handle xtensa-*-*.
820 * gen-doc.texi: Set XTENSA variable.
821 * ld.texinfo: Set XTENSA variable. Add new Xtensa node.
822 * emulparams/elf32xtensa.sh: New file.
823 * emulparams/xtensa-config.sh: Likewise.
824 * emultempl/xtensaelf.em: Likewise.
825 * scripttempl/elfxtensa.sc: Likewise.
829 * configure.tgt (powerpc*-*-linux*): Add elf32ppc to ppc64
830 targ_extra_libpath. Add elf64ppc to ppc targ_extra_libpath
831 if --enable-64-bit-bfd.
835 * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Change name of
837 * emulparams/armelf_linux.sh (OTHER_READONLY_SECTIONS): Change
838 name of note section.
842 * ld.texinfo (-Tbss, -Tdata, -Ttext): Document in terms of
847 * ldfile.c (ldfile_add_library_path): Always allocate space for
849 * ldlang.c (lang_register_vers_node): Free the node if it cannot
851 * ldmain.c (set_scripts_dir): Always free the constructed
853 (add_keepsyms_file): Fix memory leak.
854 * ldmisc.c (vfinfo): Likewise.
855 * lexsup.c (parse_args): Likewise.
860 Contribute support for Intel's iWMMXt chip - an ARM variant:
862 * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Define.
863 * emulparams/armelf_linux.sh (OTHER_READONLY_SECTIONS): Define.
864 * scripttempl/armcoff.sc (.data): Ensure 8 byte alignment.
869 * ldmain.h (ld_canon_sysroot, ld_canon_sysroot_len): Declare.
870 * ldmain.c (ld_canon_sysroot, ld_canon_sysroot_len): Define.
871 (main): Initialize them.
872 * ldfile.c: Include pathnames.h.
873 (is_sysrooted_pathname): New.
874 (ldfile_add_library_path): Use it.
875 (ldfile_open_file_search): Likewise. Use IS_ABSOLUTE_PATH. Don't
876 search_dirs if given an absolute pathname.
877 (ldfile_open_file): Issue error message for sysrooted
879 * Makefile.am: Updated dependencies.
880 * Makefile.in: Rebuild.
884 * ld.texinfo: Rename all occurances of C54X to TIC54X.
888 * ldfile.c (ldfile_try_open_bfd): Pop lexer start condition after
893 * deffilep.y (opt_base): If no number given, set to default
898 * deffilep.y (def_import): Use default extension of "dll"
899 if no extension provided in parsed IMPORT definition.
901 * deffilep.y (def_lex): Revert 2003-03-12 change.
902 (dot_name): New id type and rule.
903 (expline): Use instead of ID.
904 (opt_equal_name): Likewise.
908 * deffilep.y (def_lex): Accept '.' as valid non-lead char.
912 * configure.tgt: Add NATIVE_LIB_DIRS for cygwin target back after
913 apparent accidental removal on 2003-01-06.
917 * Makefile.am: Add new devices x1122 x1132 emulation
918 * configure.tgt: Likewise.
919 * Makefile.in: Regenerate.
920 * emulparams/msp430x1122.sh: New file.
921 * emulparams/msp430x1132.sh: New file.
925 * ldmain.c (set_scripts_dir): Look for relative to TOOLBINDIR as
928 * ldfile.h (struct search_dirs): Added sysrooted field.
929 * ldlang.h (struct lang_input_statement_struct): Likewise.
930 * ldfile.c (ldfile_add_library_path): Mark sysrooted paths.
931 (ldfile_open_file_search): Look for sysrooted filename starting
932 with / in ld_sysroot instead of in the current directory. Clear
933 sysrooted flag if it's found in the current directory. Set it
934 from the search directory's sysrooted flag where it is found
936 * ldlang.c (ldlang_sysrooted_script): New static variable.
937 (new_afile): Mark search_file_enums as sysrooted if
938 ldlang_sysrooted_script.
939 (load_symbols): Set ldlang_sysrooted_script according to the
940 script's sysrooted field while processing it.
941 * ld.texinfo: Document INPUT behavior in sysroot.
945 * scripttempl/pe.sc: Use PROVIDE with etext, end, _end,
949 * emulparams/elf64alpha.sh (EXTRA_EM_FILE): Define.
950 (PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_LONGOPTS,
951 PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES,
952 PARSE_AND_LIST_EPILOGUE): Don't define.
953 * emultempl/alphaelf.em: New file.
957 * ldemul.c: Include getopt.h.
958 * emultempl/elf32.em: Include getopt.h earlier.
959 * emultempl/ticoff.em: Likewise.
963 * emultempl/elf32.em (gld${EMULATION_NAME}_get_script): Add combreloc
964 support when scripts read from files.
968 * ldemul.c (ldemul_parse_args): Return FALSE by default.
969 * ldemul.h (struct ld_emulation_xfer_struct): Update parse_args
972 * ldemul.c (ldemul_add_options, ldemul_handle_option): New functions.
973 (ldemul_parse_args): Return bfd_boolean. Formatting.
974 * ldemul.h (ldemul_add_options, ldemul_handle_option): Declare.
975 (ldemul_parse_args): Adjust.
976 (struct ld_emulation_xfer_struct): Add add_options and handle_option.
977 Return bfd_boolean from parse_args.
978 * lexsup.c (parse_args): Malloc shortopts, longopts and
979 really_longopts. Call ldemul_add_options and ldemul_handle_option.
980 * emultempl/aix.em (gld${EMULATION_NAME}_add_options): Split out from
981 gld${EMULATION_NAME}_parse_args.
982 (gld${EMULATION_NAME}_handle_option): Likewise.
983 (ld_${EMULATION_NAME}_emulation): Adjust initializer.
984 * emultempl/armcoff.em: As for aix.em, but remove parse_args.
985 * emultempl/beos.em: Likewise.
986 * emultempl/pe.em: Likewise.
987 * emultempl/ticoff.em: Likewise.
988 * emultempl/elf32.em: Likewise. Don't duplicate long options either.
989 (gld${EMULATION_NAME}_add_sysroot): Prototype.
990 * emultempl/armelf.em (PARSE_AND_LIST_LONGOPTS): Don't duplicate
992 * emultempl/hppaelf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
993 * emultempl/ppc32elf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
994 * emultempl/ppc64elf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
995 * emultempl/armelf_oabi.em (ld_${EMULATION_NAME}_emulation): Adjust
997 * emultempl/generic.em: Likewise.
998 * emultempl/gld960.em: Likewise.
999 * emultempl/gld960c.em: Likewise.
1000 * emultempl/linux.em: Likewise.
1001 * emultempl/lnk960.em: Likewise.
1002 * emultempl/m68kcoff.em: Likewise.
1003 * emultempl/mipsecoff.em: Likewise.
1004 * emultempl/sunos.em: Likewise.
1005 * emultempl/vanilla.em: Likewise.
1006 * emultempl/netbsd.em (gldnetbsd_before_parse): Prototype.
1010 * emultempl/elf32.em (gld${EMULATION_NAME}_add_sysroot): Fix
1011 memory allocation error.
1013 * Makefile.am (ldmain.o): Define TOOLBINDIR.
1014 * Makefile.in: Rebuilt.
1015 * ldmain.c (ld_sysroot): Try to set from TOOLBINDIR too.
1019 * ldlang.c (lang_size_sections_1): Add CHECK_REGIONS argument and only
1020 call os_region_check when it is set.
1021 (lang_size_sections): Add CHECK_REGIONS argument and pass it through to
1022 lang_size_sections_1.
1023 (lang_process): Change lang_size_sections calls to set CHECK_REGIONS
1024 only for the last call, not on every relaxation iteration.
1025 * ldlang.h (lang_size_sections): Update prototype.
1026 * pe-dll.c (pe_dll_fill_sections): Set CHECK_REGIONS argument in calls
1027 to lang_size_sections.
1028 (pe_exe_fill_sections): Likewise.
1029 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Likewise.
1030 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
1031 * emultempl/ppc64elf.em (ppc_before_allocation): Likewise.
1032 (ppc_layout_sections_again): Likewise.
1036 * gen-doc.texi: Set ARM and HPPA variables.
1037 * ld.texinfo: Fix typos and obvious texinfo mistakes. Make section
1038 title capitalization more consistent. Add missing menu entries for
1039 machine-specific sections and conditionalize them consistently.
1040 Conditionalize text that is irrelevant when SingleFormat is set.
1041 Add @group divisions to improve page breaks in long examples.
1042 Use @iftex/@ifnottex instead of @iftex/@ifinfo so that HTML output
1043 is correct. Remove "FIXME" comment about not using
1044 @raisesections/@lowersections. Use @raisesections/@lowersections
1045 consistently for machine-specific sections. Change to be more polite
1046 about poor bug reports. Replace FDL appendix with include of fdl.texi.
1047 Move WIN32 node to match its order in the menus.
1048 * fdl.texi: New file.
1052 * configure.in (TARGET_SYSTEM_ROOT): Set default to
1053 ${exec_prefix}/${target_alias}/sys-root. Match explicit
1054 '${exec_prefix}' (in addition to the expansion thereof) as
1056 * configure: Rebuilt.
1060 * ldgram.y (vers_defns): Also recurse with 'EXTERN NAME' patterns.
1064 * ldgram.y (vers_defns): Allow optional trailing semicolon in
1069 * emultempl/ppc32elf.em: New file.
1070 * emulparams/elf32ppc.sh (EXTRA_EM_FILE): Define.
1071 * Makefile.am (eelf32lppc.c): Depend on emultempl/ppc32elf.em.
1072 (eelf32lppcnto.c): Likewise.
1073 (eelf32lppcsim.c): Likewise.
1074 (eelf32ppcnto.c): Likewise.
1075 (eelf32ppc.c): Likewise.
1076 (eelf32ppc_fbsd.c): Likewise.
1077 (eelf32ppcsim.c): Likewise.
1078 (eelf32ppclinux.c): Likewise.
1079 * Makefile.in: Regenerate.
1083 * ld.texinfo: Remove spaces between @samp and opening brace.
1087 * emultempl/ppc64elf.em (ppc_create_output_section_statements): Check
1089 (ppc_before_allocation): Don't do optimizations if wrong hash table.
1090 (gld${EMULATION_NAME}_finish): Ditto.
1094 * ldmain.c (main) Default allow_shlib_undefined to true.
1095 * lexsup.c (ld_options): Add --no-allow-shlib-undefined.
1096 (parse_args): Parse the new switch.
1097 * ld.texinfo: Document new switch and default behaviour of
1098 allowing undefined symbols in shared libraries.
1102 * scripttempl/elf32msp430.sc: Add new data anchors definitions.
1103 * scripttempl/elf32msp430_3.sc: Likewise.
1107 * configure.tgt: Add support for kaOS as cross build target
1112 * hppaelf.em (group_size): Change default back to 1.
1116 * emultempl/ppc64elf.em: Add "no-tls-optimize" option and support code.
1120 * hppaelf.em (group_size): Change default to -1.
1124 * emultempl/armelf.em (PARSE_AND_LIST_SHORTOPTS): Remove 'n' short
1126 (PARSE_AND_LIST_LONGOPTS): Add duplicate entry for
1127 no-pipeline-knowledge. This will prevent the getopt package from
1128 thinking that there are any shorter abbreviations for
1129 --no-pipeline-knowledge.
1133 * genscripts.sh (LIB_PATH): Don't append LIBPATH_SUFFIX to paths
1134 which already have it. Avoid duplicates.
1138 * emulparams/elf64_s390.sh (LIBPATH_SUFFIX): Set to 64.
1139 * emulparams/elf_x86_64.sh (LIBPATH_SUFFIX): Likewise.
1140 * emulparams/elf64_sparc.sh (LIBPATH_SUFFIX): Set instead of suffix.
1144 * emultempl/ppc64elf.em (ppc_before_allocation): Size sections then
1145 call ppc64_elf_tls_optimize.
1149 * emultempl/elf32.em: Move gld${EMULATION_NAME}_add_sysroot
1150 outside of GNU/Linux conditional.
1154 * deffilep.y (def_get_module): New function: locate an already
1156 * deffile.h (def_get_module): New prototype.
1157 * pe-dll.c (pe_implied_import_dll): Add code to prevent importing
1158 a dll multiple times.
1162 * emultempl/sh64elf.em: Include elf32-sh64.h.
1163 (sh64_elf_${EMULATION_NAME}_before_allocation): Adjust for changed
1164 sh64_elf_section_data.
1165 (sh64_elf_${EMULATION_NAME}_after_allocation): Likewise.
1169 * ld.texinfo: Remove an extra "i" in --dll-search-prefix.
1170 * emultempl/pe.em (gld_${EMULATION_NAME}_list_options): Move a
1171 cross-80th-column-margin "an" to the next line.
1175 * emulparams/tic3xcoff-onchip.sh: Rename to ...z
1176 * emulparams/tic3xcoff_onchip.sh: ...this.
1177 * Makefile.am (etic3xcoff_onchip.c): Fix name of generated C file.
1178 * Makefile.in: Regenerate.
1182 * configure.tgt: Handle i[3456]86-*-aros*
1186 * Makefile.am: Added etic3xcoff.o and etic4xcoff_onchip.o
1187 * Makefile.in: Regenerate
1188 * configure.tgt: Added extra target emulations
1189 * emulparams/tic3xcoff.sh: Remove old settings
1190 * emulparams/tic4xcoff.sh: Ditto
1191 * emulparams/tic3xcoff-onchip.sh: Added new
1192 * scripttempl/tic4xcoff.sc: Revise and combine both c3x and c4x
1193 * scripttempl/tic3xcoff.sc: Remove
1197 * emultempl/elf32.em (gld${EMULATION_NAME}_add_sysroot): Do not
1202 * Makefile.in: Regenerate.
1206 * ld.texinfo (node WIN32): Some clarifications
1207 and formatting fixups.
1211 * ldmain.c (get_emulation): Sort -mipsNN checks in the usual
1212 order, and handle (ignore) -mips32r2.
1216 * ldmain.c (main): Make sure ld_sysroot is initialized.
1220 * Makefile.am (eelf32iq10.c): Fix tab/whitespace mixup.
1222 * Makefile.am (ldmain.o): Add @TARGET_SYSTEM_ROOT_DEFINE@.
1223 (GENSCRIPTS): Add @use_sysroot@.
1224 * Makefile.in: Regenerated.
1225 * configure.host: Move setting of NATIVE_LIB_DIRS to...
1226 * configure.tgt: ... here. Use ${target} instead of ${host}
1227 for NATIVE_LIB_DIRS.
1228 * configure.in: Add --with-sysroot.
1229 * configure: Regenerated.
1230 * genscripts.sh: Accept use_sysroot option. Set new variables
1231 NATIVE and USE_LIBPATH. Prepend "=" to directory names if
1232 $use_sysroot. Don't search $tool_lib if $use_sysroot.
1233 * ldfile.c (ldfile_add_library_path): Handle leading '='.
1234 * ldmain.c (TARGET_SYSTEM_ROOT): Define if not defined.
1235 (ld_sysroot): New variable.
1236 (main): Initialize ld_sysroot.
1237 * ldmain.h (ld_sysroot): New extern.
1238 * emultempl/elf32.em: Use NATIVE and USE_LIBPATH instead of
1239 searching $EMULATION_LIBPATH.
1240 (gld${EMULATION_NAME}_add_sysroot): New function.
1241 (gld${EMULATION_NAME}_check_ld_so_conf): Use it. Honor ld_sysroot.
1242 (gld${EMULATION_NAME}_after_open): Likewise. Only search
1243 environment variables if $NATIVE.
1244 * ld.texinfo (Options): Mention "=" prefix in the description of -L.
1245 * NEWS: Mention --with-sysroot.
1247 * emulparams/elf32bmipn32-defs.sh: Set NATIVE and LIBPATH_SUFFIX
1248 instead of setting LIB_PATH.
1249 * emulparams/elf32ppc.sh: Likewise.
1250 * emulparams/elf64_s390.sh: Likewise.
1251 * emulparams/elf64_sparc.sh: Likewise.
1252 * emulparams/elf64ppc.sh: Likewise.
1253 * emulparams/elf_x86_64.sh: Likewise.
1255 * emulparams/elf64_aix.sh: Add "=" prefixes to LIB_PATH.
1256 * emulparams/elf64hppa.sh: Add "=" prefixes to LIB_PATH.
1260 * pe-dll.c (autofilter_symbollist): Add cygwin_crt0.
1264 * Makefile.am (ldmain.o): Pass BINDIR.
1265 * Makefile.in: Regenerated.
1266 * ldmain.c (set_scripts_dir): Use make_relative_prefix for the first
1271 * Makefile.am (ALL_EMULATIONS): Add eelf32iq2000.o.
1272 (eelf32iq2000.c): New target.
1273 * Makefile.in: Regenerate.
1274 * configure.tgt: Handle iq2000-*-elf.
1275 * emulparams/elf32iq10.sh: New file.
1276 * emulparams/elf32iq2000.sh: New file.
1277 * scripttempl/iq2000.sc: New file.
1281 * pe-dll.c (autofilter_symbollist): Add do_pseudo_reloc
1282 and _pei386_runtime_relocator to the exclude list.
1286 * ldfile.c: Fix comment typos.
1287 * ldlang.c: Likewise.
1289 * pe-dll.c: Likewise.
1294 * Makefile.am (ld.1): Depend on configdoc.texi
1296 * Makefile.in: Regenerated.
1300 * Makefile.am: Add msp430 target.
1301 * configure.tgt: Likewise.
1302 * Makefile.in: Regenerate.
1303 * emulparams/msp430x???.sh: New files. Linker script parameters
1304 for various msp430 configurations.
1305 * gen-doc.texi: Enable msp430 documenation.
1306 * ld.texinfo: Document msp430 sections.
1307 * scripttempl/elf32msp430.sc: New file. Linker script for msp430.
1308 * scripttempl/elf32msp430_3.sc: New file. Linker script for msp430.
1313 * config.in (HAVE_REALPATH): New entry.
1314 (HAVE_SYS_STAT_H, HAVE_SYS_TYPES_H): Removed: obsolete.
1318 * ld.texinfo: New win32 topics: 'symbol aliasing' and 'export dll
1323 * ldmain.c (main): Init "strip_discarded".
1324 * lexsup.c (OPTION_STRIP_DISCARDED): Define.
1325 (OPTION_NO_STRIP_DISCARDED): Define.
1326 (ld_options): Add "strip-discarded" and "no-strip-discarded".
1327 (parse_args): Handle them.
1331 * ld.h (struct args_type): Add new field
1332 'accept_unknown_input_architecture'.
1333 * ldmain.c (main): Initialise 'accept_unknown_input_architecture'
1335 * ldlang.c (lang_check): Pass accept_unknown_input_architecture to
1336 bfd_arch_get_compatible.
1337 * ldfile.c (ldfile_try_open_bfd): Likewise.
1338 * lexsup.c (ld_options): Add new command line switch
1339 --accept-unknown-input-architecture and its inverse.
1340 (parse_args): Handle --accept-unknown-input-architecture.
1341 * ld.texinfo: Document new linker option.
1342 * NEWS: Mention new linker option.
1346 * ldmain.c (main): Re-order link_info initialization. Init all
1351 * ld.texinfo: Clarify and extend the documentation
1352 in the Machine Dependent, WIN32 section.
1356 * ld.texinfo: Add win32 machine depending section.
1357 * gen-doc.texi: Enable win32 machine depending section.
1359 * configure.host: Add win32 library search path.
1363 * emultempl/pe.em (pe_find_data_imports): Don't search for data
1364 import when auto-import is disabled.
1368 * emultempl/pe.em (..._recognized_file): Use LD_PATHMAX+1 to
1369 account for trailing '\0'.
1373 * emultempl/pe.em (longopts): Duplicate entry for --compact-implib
1374 so that it is not confused with -c.
1379 * configure.in: Add check for realpath function.
1380 * configure: Regenerate.
1381 * config.in: Regenerate.
1382 * aclocal.m4: Regenerate.
1383 * deffile.h: Add .data field to def_file_import
1385 * pe-dll.c (pe_proces_import_defs): Use .data field of
1386 def_file_import structure to initialize flag_data field of
1387 def_file_export structure.
1388 (pe_implied_import_dll): New variables exp_funcbase and
1389 [data|bss]_[start|end]. Use DLL's internal name to set dll_name,
1390 not filename (which may be a symlink). Scan the sections and
1391 initialize [data|bss]_[start|end]. When scanning the export
1392 table, skip _nm_ symbols, and mark any symbols whose rva indicates
1393 that it is in the .bss or .data sections as data.
1394 * sysdep.h: Include limits.h and sys/param.h, and define
1395 LD_PATHMAX as appropriate. Also define REALPATH as realpath if it
1396 exists, NULL otherwise.
1397 * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Call
1398 pe_process_import_defs before pe_find_data_imports, so that
1399 auto-import will check the virtual implib as well as "real"
1401 (gld_${EMULATION_NAME}_recognized_file): Use REALPATH to follow
1402 symlinks to their target; check that the target's extension is
1403 .dll before calling pe_implied_import_dll(), not the filename
1404 itself (which may be a symlink).
1408 * emultempl/elf32.em (struct orphan_save): Add os_tail field.
1409 (gld${EMULATION_NAME}_place_orphan): Re-order output_section_statement
1414 * ldlang.h: Formatting.
1418 * ldlang.c (init_os): Ensure sections mentioned in load_base
1423 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Set
1424 load_base for orphans that follow a section with load_base set.
1428 * ld.texinfo: Remove the extra `;' in sample version script.
1432 * configure.host: Correct dynamic-linker for powerpc64 hosts.
1434 * Makefile.am (eelf32ppcwindiss.c): Correct dependencies.
1435 * Makefile.in: Regenerate.
1437 * ld.h, ldcref.c, ldctor.c, ldctor.h, ldemul.c, ldemul.h, ldexp.c,
1438 ldexp.h, ldfile.c, ldfile.h, ldgram.y, ldlang.c, ldlang.h, ldmain.c,
1439 ldmain.h, ldmisc.c, ldwrite.c, lexsup.c, mri.c, pe-dll.c, pe-dll.h,
1440 emulparams/elf32b4300.sh, emultempl/aix.em, emultempl/armcoff.em,
1441 emultempl/armelf.em, emultempl/armelf_oabi.em, emultempl/beos.em,
1442 emultempl/elf32.em, emultempl/generic.em, emultempl/gld960.em,
1443 emultempl/gld960c.em, emultempl/hppaelf.em, emultempl/linux.em,
1444 emultempl/lnk960.em, emultempl/m68kcoff.em, emultempl/mipsecoff.em,
1445 emultempl/mmix-elfnmmo.em, emultempl/mmixelf.em, emultempl/mmo.em,
1446 emultempl/needrelax.em, emultempl/pe.em, emultempl/ppc64elf.em,
1447 emultempl/sh64elf.em, emultempl/sunos.em, emultempl/ticoff.em: Replace
1448 boolean with bfd_boolean, true with TRUE, false with FALSE. Simplify
1449 comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
1453 * configure.host: Fix generic FreeBSD configuration entry.
1457 * ld.texinfo: Add the missing `;' to sample version scripts.
1461 * emulparams/elf64ppc.sh (SEGMENT_SIZE): Don't define.
1465 * ldmain.c (main): Make runtime relocs disabled by default. Remove
1466 assignment which has no effect.
1467 * pe-dll.h (pe_create_import_fixup): Change prototype.
1468 * pe-dll.c (make_runtime_pseudo_reloc): New function.
1469 (pe_create_runtime_relocator_reference): Ditto.
1470 (pe_create_import_fixup): Handle relocations with non-zero addends.
1471 * emultempl/pe.em: Add options --enable-runtime-pseudo-reloc and
1472 --disable-runtime-pseudo-reloc.
1473 (make_import_fixup): Handle relocations with non-zero addends. Create
1474 an external reference to _pei386_runtime_relocator symbol if at least
1475 one pseudo reloc was created.
1476 * ld.texinfo: Document --enable-runtime-pseudo-reloc and
1477 --disable-runtime-pseudo-reloc options.
1481 * ldlang.c (lang_add_section): Discard debugging sections that have
1482 been marked SEC_EXCLUDE.
1486 * configure.in (ALL_LINGUAS): Add da.
1487 * configure: Regenerate.
1488 * po/da.po: New Danish translation.
1492 * emultempl/ppc64elf.em (ppc_before_allocation): New function.
1493 (LDEMUL_BEFORE_ALLOCATION): Define.
1494 (gld${EMULATION_NAME}_finish): Run discard_info for relocatable
1496 * emultemp/hppaelf.em ((gld${EMULATION_NAME}_finish): Likewise.
1500 * configure.tgt (LIB_PATH): Default to searching w32api directory under
1505 * pe-dll.c (autofilter_liblist): add libmingwex and libgcj to the list
1506 of restricted auto-export libs.
1510 * pe-dll.c (autofilter_liblist): Generalize library names to catch more
1511 creative library naming instances like, e.g., libstdc++-2.a.
1515 * emulparams/elf32btsmipn32.sh (TEXT_DYNAMIC): Define.
1516 * emulparams/elf64btsmip.sh (TEXT_DYNAMIC): Likewise.
1520 * deffilep.y (def_lex): Handle '@' as first character of an ID.
1521 * pe-dll.c (auto-export): Filter on "_imp_" prefix, not "_imp__".
1522 (make_one): Don't prefix decorated fastcall symbols with '_'.
1523 (pe_process_import_defs): Likewise.
1524 * emultempl/pe.em (pe_fixup_stdcalls): Don't fixup fastcall
1525 symbols to cdecl names or vise-versa.
1529 * pe-dll.c (process_def_file): Handle fastcall symbols when
1530 generating undecorated aliases. Don't prefix decorated fastcall
1532 (fill_exported_offsets): Don't prefix decorated fastcall symbols
1537 * emultempl/aix.em: Use include <> for generated headers.
1538 * emultempl/beos.em: Likewise.
1539 * emultempl/elf32.em: Likewise.
1540 * emultempl/pe.em: Likewise.
1541 * ldctor.c: Likewise.
1542 * ldexp.c: Likewise.
1543 * ldfile.c: Likewise.
1544 * ldlang.c: Likewise.
1545 * ldlex.c: Likewise.
1546 * ldlex.l: Likewise.
1547 * ldmain.c: Likewise.
1548 * ldmisc.c: Likewise.
1549 * ldwrite.c: Likewise.
1550 * lexsup.c: Likewise.
1552 * pe-dll.c: Likewise.
1556 * emultempl/elf32.em (place_orphan): Don't put non-allocated .rel*
1557 sections into .rel{,a}.dyn.
1561 * lexsup.c (OPTION_NO_OMAGIC): Define.
1562 (ld_options): Add "no-omagic" option.
1563 (parse_args): Parse --no-omagic.
1564 * ld.texinfo: Document --no-omagic.
1565 * NEWS: Mention new option.
1569 * scripttempl/pe.sc (__RUNTIME_PSEUDO_RELOC_LIST__,
1570 __RUNTIME_PSEUDO_RELOC_LIST_END__): Add only when relocating.
1574 * emulparams/elf32bmipn32-defs.sh: Set ELFSIZE according to
1575 emulation name. Set LIB_PATH only for native tools, and
1576 search the ABI-specific versions of NATIVE_LIB_DIRS before the
1577 .../lib variants, not instead of them. Mostly copied from...
1578 * emulparams/elf32ppc.sh: ... here. Fixed typo.
1579 * emulparams/elf64bmip-defs.sh: Backed out.
1580 * emulparams/elf64bmip.sh: Import elf32bmipn32-defs.sh again.
1581 * emulparams/elf64btsmip.sh: Likewise.
1582 (DATA_ADDR, NONPAGED_TEXT_START_ADDR, SHLIB_TEXT_START_ADDR,
1583 TEXT_DYNAMIC): Removed.
1587 * emulparams/elf32bmipn32-defs.sh (LIB_PATH): Set to /usr/lib32.
1588 (GENERATE_SHLIB_SCRIPT): Set to yes.
1589 (EXECUTABLE_SYMBOLS, WRITABLE_RODATA): Moved to...
1590 * emulparams/elf32bmipn32.sh: here.
1591 (GENERATE_SHLIB_SCRIPT): Deleted as redundant.
1592 * emulparams/elf32btsmipn32.sh: Delete redundant unsets.
1593 * emulparams/elf64bmip-defs.sh: New file. Extend
1594 elf32bmipn32-defs.sh by overiding ELFSIZE and LIB_PATH.
1595 * emulparams/elf64bmip.sh: Bring in definitions from
1597 (ELFSIZE, GENERATE_SHLIB_SCRIPT, LIB_PATH): Delete redundant
1599 (WRITABLE_RODATA): Moved from elf32bmipn32-defs.sh.
1600 * emulparams/elf64btsmip.sh: Bring in definitions from
1602 (ELFSIZE, GENERATE_SHLIB_SCRIPT): Delete, redundant.
1603 (EXECUTABLE_SYMBOLS, WRITABLE_RODATA): Delete redundant unsets.
1607 * configure.tgt (s390x-*-linux*): Add elf_s390 emulation.
1608 (s390-*-linux*): Add elf64_s390 emulation if want64.
1609 * emulparams/elf64_sparc.sh (LIB_PATH): Update to match 2002-05-22
1610 genscript.sh changes.
1611 * emulparams/elf_x86_64.sh (LIB_PATH): Likewise.
1612 * emulparams/elf64_s390.sh (LIB_PATH): Set up native 64 bit dirs.
1616 * ldlang.c (load_symbols): Revert last change.
1620 * ldlang.c (load_symbols): Don't call bfd_link_add_symbols when
1622 (lang_reasonable_defaults): Don't compare against false.
1623 (size_input_section): Likewise.
1624 (lang_size_sections_1): Likewise.
1625 (lang_do_assignments): Likewise.
1626 (lang_add_output): Likewise.
1628 * Makefile.am: Run "make dep-am".
1629 * Makefile.in: Regenerate.
1630 * ldver.c: #include "bfdver.h".
1634 * scripttempl/elfm68hc11.sc: Use KEEP for .vectors, .installN,
1636 * scripttempl/elfm68hc12.sc: Likewise.
1640 * pe-dll.c (make_import_fixup_mark): Avoid type-punned pointer.
1642 * ldgram.y (memory_spec): Provide empty action.
1643 (section <NAME>): Likewise.
1647 * ldfile.c (ldfile_try_open_bfd): When searching skip linker scripts if
1648 they have OUTPUT_FORMAT not matching actual output format.
1649 * ldlang.c (lang_get_output_target): New function.
1650 (open_output): Use it.
1651 * ldlang.h (lang_get_output_target): New prototype.
1655 * emultempl/elf32.em (output_rel_find): Prefer .rel script sections
1656 when orphan is .rel, .rela when orphan is .rela.
1657 (gld${EMULATION_NAME}_place_orphan): Handle combreloc .rel* case
1658 first. Remove outsecname var.
1663 * Makefile.am: Add eshelf32_linux.o and
1664 eshlelf32_linux.o, new emulations for sh64 Linux.
1665 * Makefile.in: Regenerate.
1666 * configure.tgt: Add sh64eb-*-linux* and sh64-*-linux* emulations.
1667 * emulparams/shelf32_linux.sh: New file.
1668 * emulparams/shlelf32_linux.sh: New file.
1672 * ldlang.c (lang_file_exist): Removed.
1673 (new_afile): Revert the last change.
1674 * ldlang.h (lang_file_exist): Removed.
1675 * lexsup.c (parse_args): Revert the last change.
1679 * pe-dll.cc (autofilter_symbolprefixlist): Don't re-export
1680 auto-import symbols.
1681 (make_one): Create _nm_<symbol> for data only.
1685 * ldlang.c (lang_file_exist): New function.
1686 (new_afile): Abort if the filename to be added matches the linker
1688 * ldlang.h: Add prototype for lang_file_exist.
1689 * lexsup.c (parse_args): Abort if the output filename matches
1690 one of the input filenames.
1694 * emulparams/elf64ppc.sh (MAXPAGESIZE): Set to 0x10000.
1698 * scripttempl/elfd30v.sc: Order reloc sections placing .plt last.
1699 * scripttempl/elfm68hc11.sc: Likewise.
1700 * scripttempl/elfm68hc12.sc: Likewise.
1702 * emultempl/elf32.em (output_rel_find): Always place orphan loadable
1703 reloc sections just before .rel.plt/.rela.plt.
1704 (gld${EMULATION_NAME}_place_orphan <.rel>): Remove combreloc code.
1705 Only put loadable reloc sections in hold_rel.
1709 * emulparams/elf32ppc.sh (OTHER_GOT_RELOC_SECTIONS): New.
1714 * scripttempl/sh.sc: Handle .eh_frame* and .gcc_exc*
1719 * genscripts.sh (SEGMENT_SIZE): Use MAXPAGESIZE before
1721 * scripttempl/elf.sc (DATA_SEGMENT_ALIGN): Incorporate
1722 SEGMENT_SIZE alignment.
1723 * emulparams/elf64ppc.sh (DATA_ADDR): Delete.
1724 (SEGMENT_SIZE): Define.
1726 * ldexp.c (fold_unary): New. Split out from exp_fold_tree.
1727 (fold_binary): Correct abs - non-abs case.
1728 (fold_trinary): New. Split out from exp_fold_tree.
1732 * emulparams/elf64ppc.sh (DATA_ADDR): Define.
1733 * emulparams/elf64_aix.sh (DATA_ADDR): Don't use a fixed address
1734 for start of .data, instead align up to 256M boundary.
1735 * scripttempl/aix.sc: Likewise.
1739 * scripttempl/i386go32.sc: Handle bss unique sections.
1743 * ldmisc.c (vfinfo <%C,%D,%G>): Always output bfd, section and offset.
1747 * emulparams/elf32bmipn32-defs.sh: New file.
1748 * emulparams/elf32bmipn32.sh: Use elf32bmipn32-defs.sh.
1749 * emulparams/elf32btsmipn32.sh: Likewise.
1750 * emulparams/elf64bmip.sh: Likewise.
1751 * emulparams/elf64btsmip.sh: Likewise.
1755 * emulparams/elf_i386_fbsd.sh: Set OUTPUT_FORMAT to
1757 * emulparams/elf64alpha_fbsd.sh: Set OUTPUT_FORMAT to
1758 elf64-alpha-freebsd.
1762 * NEWS: New TI port supports both C4x and C3x series of DSPs.
1764 * po/tr.po: Updated Turkish translation.
1768 * configure.tgt (h8300-*-hms*, h8500-*-hms*): Restore.
1772 * scripttempl/v850.sc: Add EXTERN references to __ctbpm __gp and
1774 * emulparams/v850.sh (TEMPLATE_NAME): Define.
1778 * scripttempl/elfd10v.sc (MEMORY): Remove UNIFIED, it is not
1779 used. Change INSN to start at 0x01000000 and extend for
1780 256K (ignoring holes). Start the STACK on a word aligned
1782 (.rodata): Start it at the READONLY_START_ADDR.
1786 * emulparams/elf32ppc.sh (ARCH): Set to "powerpc:common".
1790 * Makefile.am: Add etic4xcoff.o in ALL_EMULATIONS list and
1791 added makefile targets for this file.
1792 * Makefile.in: Regenerate.
1793 * configure.tgt: Added tic4x-coff and c4x-coff emulations.
1794 * NEWS: Mention new port.
1798 * emulparams/tic3xcoff.sh: New file.
1799 * emulparams/tic4xcoff.sh: New file.
1800 * scripttempl/tic3xcoff.sc: New file.
1801 * scripttempl/tic4xcoff.sc: New file.
1805 * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Replace strtoll,
1806 strtoul and strtoull with bfd_scan_vma.
1807 (gld${EMULATION_NAME}_read_file): Likewise.
1811 * configure.tgt: Remove h8[35]00-*-hms*. Add h8500-*-rtems*.
1815 * scripttempl/pe.sc: Handle .rdata_runtime_pseudo_reloc sections.
1816 Add symbols for application to access them.
1820 * emultempl/armelf.em: Revert this patch, it is not needed.
1826 * configure.in: added --with-lib-path argument to ld's configure
1828 * NEWS: Document new switch.
1829 * README: Mention new switch.
1830 * configure: Regenerate.
1831 * Makefile.in: Regenerate.
1833 Based on this patch:
1836 * Makefile.in (LIB_PATH): Make configurable.
1837 (GENSCRIPTS): Set LIB_PATH in environment.
1838 * configure.in: Substitute LIB_PATH.
1842 * emultempl/armelf.em: Include elf-bfd.h and elf/arm.h.
1843 (arm_elf_finish): Set the last bit of DT_INIT and DT_FINI
1844 depending on the type of the function.
1845 (arm_elf_convert_thumb_symbol_to_address): New function.
1849 * Makefile.am: Add esh{l}elf_nto.o files.
1850 * Makefile.in: Regenerate.
1851 * configure.tgt: Add support for sh-**-nto* targets.
1852 * emulparams/shelf_nto.sh: New file.
1853 * emulparams/shlelf_nto.sh: New file.
1857 * ldlang.c (offsetof): Define if not defined.
1861 * configure.tgt: Always enable 64bit emulations for 32bit
1866 * emulparams/elf32_dlx.sh (TARGET_PAGE_SIZE): Set to 1.
1867 (MAXPAGESIZE): Set to 1.
1869 * ld.h (ALIGN_N): Delete.
1870 * ldexp.h (align_n): Declare.
1871 * ldexp.c (align_n): New function.
1872 (fold_binary): Use align_n instead of ALIGN_N.
1873 (exp_fold_tree): Likewise.
1874 * ldlang.c (lang_size_sections_1): Likewise.
1875 (lang_one_common): Likewise.
1876 * ld.texinfo (ALIGN): Remove power of 2 restriction.
1880 * configure.tgt: Add support for powerpc{le}-*-nto* targets.
1881 * Makefile.am: Add eelf32{l}ppcnto.o files.
1882 * Makefile.in: Regenerate.
1883 * emulparams/elf32lppcnto.sh: New file.
1884 * emulparams/elf32ppcnto.sh: New file.
1888 * ld.texinfo: Document --no-undefined-version.
1890 * ldlang.c (lang_new_vers_pattern): Set the `symver' and
1891 `script.' fields to 0.
1893 * ldmain.c (main): Initialize the allow_undefined_version to
1896 * lexsup.c (OPTION_NO_UNDEFINED_VERSION): New.
1897 (ld_options): Add --no-undefined-version.
1898 (parse_args): Support OPTION_NO_UNDEFINED_VERSION.
1902 * emultempl/armelf.em (arm_elf_before_allocation): Only search for
1903 an interworking bfd if there are input bfds. (107501)
1907 * emultempl/aix.em (gld*_before_parse): Set default arch. Reverts
1912 * emulparams/armelf.sh: Revert previous delta.
1913 * scripttempl/elf.sc: Revert previous delta.
1917 * configure.tgt (powerpc*-*-linux*): Enable elf64ppc for
1918 --enable-64-bit-bfd.
1922 * configure.tgt: Enable x86-64 emulation for Linux/i386 if
1923 64bit BFD is selected.
1927 * configure.tgt: Enable 64bit emulations for 32bit Linux/mips
1928 if 64bit BFD is selected.
1932 * emultempl/netbsd.em (LDEMUL_BEFORE_PARSE): New file to custom set
1933 link_info.common_skip_ar_aymbols.
1934 * emulparams/ns32knbsd.sh (EXTRA_EM_FILE): Refer to extra file.
1936 * ldmain.c (main): Initialize new field
1937 link_info.common_skip_ar_aymbols.
1941 * emulparams/armelf.sh (OTHER_PLT_SECTIONS): New variable. Set it
1943 * scripttempl/elf.sc: Comment it. Use the same way as ${PLT} is
1948 * NEWS: Retroactively add entry for Lars Brinkhoff's contribution
1949 of the PDP-11 and 2.11BSD a.out support.
1953 * Makefile.am (eelf32btsmipn32.o, eelf32ltsmipn32.o): New emulations
1954 for n32 ABI support.
1955 * Makefile.in: Regenerate.
1956 * configure.tgt (mips64*el-*-linux-gnu*,mips64*-*-linux-gnu*): Add
1957 n32 ABI emulations for these 64 bit targets.
1958 * emulparams/elf32bmipn32.sh: Expand comment.
1959 * emulparams/elf32btsmipn32.sh: New file, for traditional big endian
1961 * emulparams/elf32ltsmipn32.sh: Likewise for little endian.
1965 * configure.tgt: Add support for arm-*-nto target.
1966 * Makefile.am: Add earmnto.o file.
1967 * Makefile.in: Regenerate.
1968 * NEWS: Mention port of ARM support to QNX.
1969 * emulparams/armnto.sh: New file.
1973 * ldlang.c (lang_add_section): Don't turn .tbss into normal sections
1974 for relocatable link.
1975 (lang_size_sections_1): Don't make .tbss zero size for relocatable
1980 * emulparams/elf32frv.sh (OTHER_RELOCATING_SECTIONS): Delete.
1985 * po/sv.po: Updated Swedish translation.
1986 * po/es.po: Updated Spanish translation.
1987 * po/fr.po: Updated French translation.
1991 * po/sv.po: Updated Swedish translation.
1992 * po/es.po: Updated Spanish translation.
1996 * po/fr.po: Updated French translation.
2000 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
2001 bomb on /DISCARD/ input section.
2002 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
2003 * emultempl/mmo.em (mmo_place_orphan): Likewise.
2007 * emultempl/mmo.em (mmo_place_orphan): Handle case of no .text
2015 * configure.tgt: Add support for ip2k-elf.
2016 * Makefile.am: Add support for ip2k-elf.
2017 * Makefile.in: Regenerate.
2018 * emulparams/elf32ip2k.sh: New file.
2019 * scripttempl/ip2k.sc: New file
2020 * NEWS: Mention support for new port.
2024 * NEWS: Add 'Changes in 2.13'.
2028 * ld.texinfo: Document a .symver takes precedence over a
2033 * emulparams/elf64ppc.sh (ARCH): Set to powerpc:common64.
2034 (COMMONPAGESIZE): Define.
2038 * emulparams/hppanbsd.sh: Remark that hppaobsd.sh references this file.
2042 * configure.tgt: Add support for alpha-*-openbsd*, hppa-*-openbsd*,
2043 powerpc-*-openbsd* and sparc64-*-openbsd*.
2044 * Makefile.am (ALL_EMULATIONS): Add ehppaobsd.o.
2045 * Makefile.in: Regenerate.
2046 * emulparams/hppaobsd.sh: New file.
2050 * ldlang.c (print_wild_statement): Fix output formatting.
2054 * ldlang.c: (strip_excluded_output_sections): New function.
2055 (lang_process): Call it.
2056 (lang_size_sections_1): Revert 2002-06-10 change.
2060 * Makefile.am (check-DEJAGNU): Revert 2002-06-25 change.
2062 * Makefile.in: Regenerate.
2066 * ldfile.c (ldfile_try_open_bfd): Formatting.
2068 * ldmisc.c (demangle): Move so that it doesn't intrude between
2069 vfinfo comment and body. Add comment.
2073 * emulparams/vax.sh (OUTPUT_FORMAT): Use a.out-vax-bsd format.
2077 * ldlang.h (entry_sym): Make it a struct bfd_sym_chain.
2078 * ldlang.c (entry_sym): Likewise.
2079 (ldlang_undef_chain_list_type): Likewise.
2080 (lang_finish): Adjust references to entry_symbol.
2081 (lang_add_entry): Likewise.
2082 (lang_gc_sections): Use link_info.gc_sym_list.
2083 (lang_process): Set link_info.gc_sym_list.
2084 * ldlex.l: Include bfdlink.h.
2085 * ldmain.c (main): Init link_info.gc_sym_list.
2086 * emultempl/aix.em: Adjust references to entry_symbol.
2087 * emultempl/armcoff.em: Likewise.
2088 * emultempl/armelf.em: Likewise.
2089 * emultempl/pe.em: Likewise.
2090 * emultempl/ppc64elf.em (ppc_after_open): New function.
2091 (LDEMUL_AFTER_OPEN): Define.
2092 * emulparams/elf64ppc.sh: KEEP .opd sections.
2096 * emulparams/m68hc12elfb.sh (EEPROM_MEMORY): Define.
2097 * emulparams/m68hc11elfb.sh (EEPROM_MEMORY): Define.
2098 * emulparams/m68hc11elf.sh (EEPROM_SIZE): Define.
2099 (EEPROM_START_ADDR): Define.
2100 (EEPROM_MEMORY): Define.
2101 * emulparams/m68hc12elf.sh: Likewise.
2102 * scripttempl/elfm68hc11.sc: Handle .eeprom section; handle .softregs
2103 section to put soft registers in .page0.
2104 * scripttempl/elfm68hc12.sc: Likewise but put soft registers in bss.
2108 * emulparams/hppa64linux.sh (OTHER_GOT_RELOC_SECTIONS): Add rela.opd
2109 section. Add ${RELOCATING-0}.
2113 * emulparams/shelf.sh (STACK_ADDR): Don't define.
2114 (OTHER_SECTIONS): Define.
2115 * emulparams/shelf_nbsd.sh ((STACK_ADDR): Don't undef.
2116 (OTHER_SECTIONS): Undef.
2120 * ldmisc.c (demangle): Restore dots stripped from sym name.
2124 * Makefile.am (check-DEJAGNU): Set LC_ALL=C and export it.
2125 * Makefile.in: Regenerated.
2129 * ld.texinfo (Bug Reporting): Update text to suggest a limit on
2130 the size of attached object files, to allow make the object files
2131 available via FTP or HTTP and to mention that the mail will be
2132 sent to a mailing list.
2136 * configure.host (romp): Drop support.
2140 * emultempl/mipself.em (mips_elf${ELFSIZE}_check_sections): Check
2141 section flags for SEC_DATA, rather than for SEC_CODE being unset.
2145 * emultempl/mipself.em (mips_elf${ELFSIZE}_check_sections): Fix
2146 format specifier used to print BFD name.
2150 From Catherine Moore, Michael Meissner, Jim Blandy:
2151 * emulparams/elf32frv.sh: New file.
2152 * configure.tgt: Support frv-*-*.
2153 * Makefile.am (ALL_EMULATIONS): Add eelf32frv.o.
2154 (eelf32frv.c): New target.
2158 * emultempl/elf32.em: gld*_get_script: Check for
2159 GENERATE_COMBRELOC_SCRIPT.
2160 * scripttempl/elfd10v.sc : Fix STACK and INSN.
2161 * emulparams/d10velf.sh : Fix TEXT_START_ADDR.
2165 * configure.tgt: Add support for sh[1234]*le*-*-elf, sh[1234]*-*-elf.
2169 * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Return
2170 false if xvec doesn't match.
2174 * ldlang.c (lang_size_sections_1): Skip removed output sections.
2178 * ldexp.c: Replace CONST with const.
2179 * ldfile.c: Likewise.
2180 * ldfile.h: Likewise.
2181 * ldlex.l: Likewise.
2183 * pe-dll.h: Likewise.
2187 * emultempl/ppc64elf.em (new_vers_pattern): Warning fix.
2191 * ldmain.c (main): initialize link_info.pei386_auto_import
2192 to -1 == implicit enable.
2193 * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse):
2194 initialize link_info.pei386_auto_import to -1 == implicit
2196 (gld_${EMULATION_NAME}_parse_args): When processing
2197 --enable-auto-import and --disable-auto-import options, use
2198 '1' and '0' instead of 'true' and 'false'.
2199 (pe_find_data_imports): Only issue message about auto-import
2200 when the feature is implicitly enabled. Downgrade message to
2201 informational instead of warning.
2205 * scripttempl/elf.sc (.tbss): Fix mismatched parentheses/braces.
2209 * configure.host (hppa*64*-*-hpux11*): Define NATIVE_LIB_DIRS,
2210 HOSTING_CRT0 and HOSTING_LIBS.
2214 * configure.tgt (shle*-*-elf*, sh64le-*-elf*): New configurations.
2218 * emulparams/ns32knbsd.sh (EXECUTABLE_SYMBOLS): Set _DYNAMIC to 0.
2219 (NONPAGED_TEXT_START_ADDR): Set to 0x1000.
2223 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Place
2224 SEC_EXCLUDE sections when doing a relocatable link.
2228 * Makefile.am (ALL_EMULATIONS): Add eshelf32_nbsd.o,
2229 eshlelf32_nbsd.o, eshelf64_nbsd.o, and eshlelf64_nbsd.o.
2230 (eshelf32_nbsd.c, eshelf64_nbsd.c, eshlelf32_nbsd.c)
2231 (eshlelf64_nbsd.c): New rules.
2232 * Makefile.in: Regenerate.
2233 * configure.tgt (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
2234 (sh64-*-netbsd*): New targets.
2235 * emulparams/shelf32_nbsd.sh: New file.
2236 * emulparams/shelf64_nbsd.sh: New file.
2237 * emulparams/shlelf32_nbsd.sh: New file.
2238 * emulparams/shlelf64_nbsd.sh: New file.
2242 * ldlang.c (section_already_linked): Call bfd_discard_group. Typo fix.
2246 * scripttempl/avr.sc: Changes to support current GCC and avr-libc,
2247 C++ constructors/destructors, loosely based on the m68hc11 port.
2251 * Makefile.in: Regenerate.
2252 * aclocal.m4: Regenerate.
2253 * config.in: Regenerate.
2254 * configure: Regenerate.
2258 * Makefile.am (ALL_EMULATIONS): Add ei386nto.o.
2259 (ei386nto.c): Add rule.
2260 * Makefile.in: Regenerate.
2261 * configure.tgt: Add i[3456]86-*-nto-qnx*.
2262 * emulparams/i386nto.sh: New file.
2266 * NEWS: Add entry for VAX ELF support.
2271 * Makefile.am (ALL_EMULATIONS): Add eelf32vax.o and evaxnbsd.o.
2273 (evaxnbsd.c): New rules.
2274 * Makefile.in: Regenerate.
2275 * configure.tgt (vax-*-netbsdelf*)
2277 (vax-*-netbsd*): New targets.
2278 * emulparams/elf32vax.sh: New file.
2279 * emulparams/vaxnbsd.sh: New file.
2283 * emultempl/armelf.em (arm_elf_after_open): Don't determine
2284 bfd_for_interwork, instead add glue sections to each input bfd.
2285 (bfd_for_interwork): New global.
2286 (arm_elf_set_bfd_for_interworking): New function.
2287 (arm_elf_before_allocation): Use it.
2291 * Makefile.am: Add DLX make target.
2292 * configure.tgt: Add DLX configuration.
2293 * Makefile.in: Regenerate.
2294 * emulparams/elf32_dlx.sh: New file
2295 * scripttempl/dlx.sc: New file
2299 * Makefile.am (eelf_i386_chaos): Use elf_chaos.sc script.
2300 * Makefile.in: Regenerate.
2301 * emulparams/elf_chaos.sh: Use elf_chaos script.
2302 * scripttempl/elf_chaos.sc: New file.
2306 * ldlang.c (lang_size_sections_1): Move check for conflicting load
2307 addresses and regions from here...
2308 (lang_get_regions): ...to this new function.
2309 (lang_leave_output_section_statement): Use lang_get_regions.
2310 (lang_leave_overlay): Likewise.
2311 * mri.c (mri_draw_tree): Pass null as last argument to
2312 lang_leave_output_section_statement.
2313 * emultempl/elf32.em (gld*_place_orphan): Likewise.
2314 * emultempl/mmo.em (mmo_place_orphan): Likewise.
2315 * emultempl/pe.em (gld*_place_orphan): Likewise.
2319 * configure.tgt: Use ns32k-*-netbsd* instead of ns32k-pc532-netbsd*.
2323 * ldemul.c: Fix formatting.
2324 * ldfile.c: Likewise.
2325 * pe-dll.c: Likewise.
2326 * pe-dll.h: Likewise.
2330 * ldlang.c (lang_process): Formatting, grammar.
2332 * ldlex.l: Use #include "" instead of <> for local header files.
2336 * configure.tgt: Add a target for i386-netbsdpe.
2340 * scripttempl/elf.sc: Add .rel{,a}.t{bss,data}, .tdata and .tbss.
2341 * ldlang.c (lang_add_section): Set SEC_THREAD_LOCAL for
2342 output section if necessary. Handle .tbss.
2343 (lang_size_sections): Clear _raw_size for .tbss section
2344 (it allocates space in PT_TLS segment only).
2345 * ldwrite.c (build_link_order): Build link order for .tbss too.
2349 * configure.in: Correct spelling of AC_PREREQ.
2353 * pe-dll.c (autofilter_liblist): Add more system libs excluded by
2355 (autofilter_objlist): Add crtbegin.o, crtend.o.
2359 * emultempl/pe.em (OPTION_EXCLUDE_LIBS): Add new define.
2360 (longopts): Add new option --exclude-libs.
2361 (gld_${EMULATION_NAME}_list_options): Give quick help about it.
2362 (gld_${EMULATION_NAME}_parse_args): Use it.
2363 * pe-dll.h (pe_dll_add_excludes): Add second param to prototype.
2364 * pe-dll.c (exclude_list_struct): Add field type to distinguish symbols
2365 from whole archives.
2366 (pe_dll_add_excludes): Set excludes->type.
2367 (auto_export): Add new variable libname and set to archive basename if
2368 abfd. Use it when filtering default and user-specified libarary
2369 excludes. Let string "ALL" mean all libs when filtering user-specified
2371 * ld.texinfo: Document --exclude-libs.
2375 * ldemul.c (ldemul_new_vers_pattern): New function.
2376 * ldemul.h (ldemul_new_vers_pattern): Declare.
2377 (struct ld_emulation_xfer_struct): Add new_vers_pattern.
2378 * ldlang.c (lang_new_vers_pattern): Call ldemul_new_vers_pattern.
2379 * emultempl/ppc64elf.em (dotsyms): New static var.
2380 (gld${EMULATION_NAME}_new_vers_pattern): New function.
2381 (LDEMUL_NEW_VERS_PATTERN): Define.
2382 (PARSE_AND_LIST_PROLOGUE): Add OPTION_DOTSYMS, OPTION_NO_DOTSYMS.
2383 (PARSE_AND_LIST_LONGOPTS): Likewise.
2384 (PARSE_AND_LIST_ARGS_CASES): Handle them.
2385 * emultempl/aix.em (ld_${EMULATION_NAME}_emulation): Update
2387 * emultempl/armcoff.em: Likewise.
2388 * emultempl/armelf_oabi.em: Likewise.
2389 * emultempl/beos.em: Likewise.
2390 * emultempl/elf32.em: Likewise.
2391 * emultempl/generic.em: Likewise.
2392 * emultempl/gld960.em: Likewise.
2393 * emultempl/gld960c.em: Likewise.
2394 * emultempl/linux.em: Likewise.
2395 * emultempl/lnk960.em: Likewise.
2396 * emultempl/m68kcoff.em: Likewise.
2397 * emultempl/mipsecoff.em: Likewise.
2398 * emultempl/pe.em: Likewise.
2399 * emultempl/sunos.em: Likewise.
2400 * emultempl/ticoff.em: Likewise.
2401 * emultempl/vanilla.em: Likewise.
2405 * genscripts.sh (LIB_PATH): For native targets, concatenate $libdir
2406 and $NATIVE_LIB_DIRS. Add $tool_lib before other libs.
2407 (LIB_SEARCH_DIRS): No need to use "tr".
2408 (COMPILE_IN): Only set for native targets.
2409 * configure.host (NATIVE_LIB_DIRS): Specify all native search dirs
2410 here, rather than adding lib:/usr/lib:/usr/local/lib in genscripts.sh.
2411 * configure.tgt (powerpc*): Set tdir_*.
2412 (powerpcle*): Correct targ_extra_emuls.
2413 * emulparams/elf32ppc.sh (LIB_PATH): Set up native 64 bit dirs.
2414 * emulparams/elf64ppc.sh (LIB_PATH): Likewise.
2418 * emultempl/pe.em (set_pe_subsystem): Don't set "cmdline" when
2419 calling lang_add_entry.
2423 * emultempl/elf32.em (gld${EMULATION_NAME}_parse_args): Handle
2425 (gld${EMULATION_NAME}_list_options): Add "-z muldefs".
2427 * ld.texinfo: Updated for --allow-multiple-definition and
2430 * ldmain.c (main): Initialize the allow_multiple_definition
2433 * lexsup.c (OPTION_ALLOW_MULTIPLE_DEFINITION): New.
2434 (ld_options): Add --allow-multiple-definition.
2435 (parse_args): Support OPTION_ALLOW_MULTIPLE_DEFINITION.
2439 * Makefile.am (ALL_EMULATIONS): Add earmelfb_nbsd.o.
2440 (earmelfb_nbsd.c): New rule.
2441 * Makefile.in: Regenerate.
2442 * configure.tgt (armeb-*-netbsdelf*): New target.
2443 (arm-*-netbsdelf*): Add armelfb_nbsd to targ_extra_emuls.
2444 (arm-*-netbsd*): Likewise.
2445 * emulparams/armelfb_nbsd.sh: New file.
2449 * emultempl/aix.em (gld*_parse_args): Add -bnortl and -bnortllib
2454 * Makefile.am: Add new emulations avr1, avr2, avr3, avr4, avr5.
2455 * Makefile.in: Regenerate.
2456 * configure.tgt (avr-*-*): Add avr[1-5] to targ_extra_emuls.
2460 * emulparams/avr1.sh: New file.
2461 * emulparams/avr2.sh: New file.
2462 * emulparams/avr3.sh: New file.
2463 * emulparams/avr4.sh: New file.
2464 * emulparams/avr5.sh: New file.
2465 * scripttempl/avr.sc: New file.
2469 * ldlang.c (section_already_linked): Call bfd_link_just_syms.
2470 (lang_place_orphans): Abort if just_syms_flag.
2474 * emultempl/aix.em: (gld*_set_output_arch): New function. Use
2475 architecture and machine information in the output bfd.
2476 (gld*_before_parse): Remove old arch and machine code.
2477 (choose_target): Rename to gld*_choose_target.
2478 (rtld): Change type to int.
2479 * ldfile.c (ldfile_try_open_bfd): Disable compatiblity check for
2480 objects in XCOFF archives.
2481 * ldfile.h: Update copyright date.
2485 * ldmain.c (main): Enable -z combreloc by default.
2489 * Makefile.am: Honour DESTDIR.
2490 * Makefile.in: Regenerate.
2494 * ldlang.h (lang_output_section_statement_type): Add update_dot_tree.
2495 (lang_enter_overlay): Remove the last two parameters.
2496 (lang_leave_overlay): Take them here instead.
2497 * ldgram.y (memspec_at_opt): Set $$ to null if no region is given.
2498 (section): Pass LMA and crossref flag to lang_leave_overlay rather
2499 than lang_enter_overlay.
2500 * ldlang.c (lang_memory_region_lookup): Return null for null names.
2501 (lang_output_section_statement_lookup): Initialize update_dot_tree.
2502 (lang_size_sections_1): Evaluate it.
2503 (lang_leave_output_section_statement): Rework LMA lookup.
2504 (overlay_lma, overlay_nocrossrefs): Remove.
2505 (lang_enter_overlay): Remove LMA and crossref arguments.
2506 (lang_enter_overlay_section): Don't set the LMA here.
2507 (lang_leave_overlay): Take LMA and crossref arguments. Move the '.'
2508 assignment to the last section's update_dot_tree. Unconditionally
2509 use the load and run-time regions specified in the OVERLAY statement.
2510 Likewise the first section's LMA. Only set the other sections' LMAs
2511 when no load region is given.
2515 * po/sv.po: New translation.
2519 * emultempl/hppaelf.em (build_section_lists): New function.
2520 (gld${EMULATION_NAME}_finish): Call elf32_hppa_setup_section_lists
2521 and build_section_lists.
2525 * ld.h: Fix formatting.
2526 * ldexp.c: Likewise.
2527 * ldfile.c: Likewise.
2528 * ldlang.c: Likewise.
2529 * ldmain.c: Likewise.
2530 * lexsup.c: Likewise.
2531 * pe-dll.c: Likewise.
2535 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation):
2536 Adjust for ppc64_elf_set_toc change. #include libbfd.h.
2537 (build_section_lists): Do output_section tests here.
2541 * emultempl/aix.em : (gld*_parse_arge): Formatting changes.
2545 Long branch stubs, multiple stub sections.
2546 * emultempl/ppc64elf.em: Include ldctor.h.
2547 (stub_file): New var.
2548 (group_size): New var.
2549 (ppc_create_output_section_statements): New function.
2550 (struct hook_stub_info): New.
2551 (hook_in_stub): New function.
2552 (ppc_add_stub_section): New function.
2553 (ppc_layout_sections_again): New function.
2554 (build_section_lists): New function.
2555 (gld${EMULATION_NAME}_finish): Rewrite.
2556 (real_func): New var.
2557 (ppc_for_each_input_file_wrapper): New function.
2558 (ppc_lang_for_each_input_file): New function.
2559 (lang_for_each_input_file): Define.
2560 (PARSE_AND_LIST_PROLOGUE): Define.
2561 (PARSE_AND_LIST_LONGOPTS): Define.
2562 (PARSE_AND_LIST_OPTIONS): Define.
2563 (PARSE_AND_LIST_ARGS_CASES): Define.
2564 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
2568 * emultempl/aix.em (gld*_parse_arge, gld*_before_allocation): Add
2569 -blibpath, -bnolibpath support.
2573 * Makefile.am (ALL_EMULATIONS): Add elf32ppcwindiss.o.
2574 (eelf32ppcwindiss.c): New target.
2575 * Makefile.in: Regenerated.
2576 * configure.tgt: Add support for powerpc-*-windiss.
2577 * emulparams/elf32ppcwindiss.sh: New file.
2581 * ldlang.c (print_assignment): Update print_dot for assignments to ".".
2582 * ldexp.c (exp_print_token): Add "infix_p" argument.
2583 (exp_print_tree): Update accordingly.
2587 * Makefile.am (mpw): New maintainer mode rule to make mpw-*.c files.
2588 * Makefile.in: Regenerate.
2589 * mpw-elfmips.c: Delete.
2590 * mpw-eppcmac.c: Delete.
2591 * mpw-esh.c: Delete.
2592 * mpw-idtmips.c: Delete.
2596 * emulparams/shelf32.sh (MACHINE): Now sh5.
2600 * ldgram.y: Fix syntax warning.
2604 * emultempl/armelf.em (PARSE_AND_LIST_SHORTOPTS): Add 'n' in order
2605 to prevent "-n" from being taken as an abbreviation for
2606 "--no-pipeline-knowledge".
2610 * ldlang.c (lang_size_sections_1): Don't complain about
2611 SEC_NEVER_LOAD sections having no memory region specified.
2613 * ld.texinfo (Format Commands <OUTPUT_FORMAT>): Typo fix.
2617 * configure.host (*-*-netbsd*): Add support for NetBSD/ELF.
2621 * dep-in.sed: Cope with absolute paths.
2622 * Makefile.am (dep.sed): Subst TOPDIR and BFDDIR.
2624 * Makefile.in: Regenerate.
2628 * emulparams/elf64btsmip.sh: n64 replaces .reginfo with .MIPS.options.
2632 * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: If common page size
2633 is smaller than maximum, round dot up to common page boundary.
2637 * configure.host: Set up for generic hosts first, then tweak as
2638 necessary in more specific targets.
2639 (HOSTING_LIBS): Include libgcc_eh.a if found.
2643 * emulparams/elf_x86_64.sh (COMMONPAGESIZE): Set it.
2647 * Makefile.am: Run "make dep-am".
2648 * Makefile.in: Regenerate.
2652 * genscripts.sh (LIB_SEARCH_DIRS): Quote path.
2656 * ldlang.c (ldlang_add_undef): If the output bfd has been opened,
2657 add the symbol to the linker hash table immediately.
2658 (lang_place_undefineds): Split symbol creation out..
2659 (insert_undefined): ..to here.
2663 * emultempl/elf32.em: Use lbasename vs. basename to fix problem where
2664 the contents of the buffer returned from basename function will are
2665 getting overwritten while still being used.
2671 * configure.tgt (x86_64-*-linux-gnu*): Configure i386 as native.
2672 * elf_x86_64.sh (ARCH): Set to i386:x86-64
2673 set libraries to default to lib64 paths.
2677 * Makefile.am : Add eaix5ppc and eaix5rs6, AIX 5 support.
2678 * configure.tgt : Same.
2679 * emulparms/aix5ppc.sh : New file. For eaix5ppc.
2680 * emulparms/aix5rs6.sh : New file. For eaix5rs6.
2681 * emulparms/aixppc.sh : OUPUT_FORMAT_32BIT and OUTPUT_FORMAT_64BIT
2682 emulation parameters for better -b32, -b64 support.
2683 * emulparms/aixrs6.sh : Same.
2684 * emulparms/ppcmacos.sh : Same.
2685 * emultempl/aix.em (choose_target) : Use new emulation parameters
2686 OUTPUT_FORMAT_32BIT and OUTPUT_FORMAT_64BIT.
2687 * Makefile.in : Regenerate.
2691 * po/fr.po: Updated version.
2695 * ldmain.c (main): Move .text readonly flag fudges from here..
2696 * ldlang.c (lang_process): ..to here.
2700 * ldlang.c (lang_check): Remove the word size check added in last
2701 change. Treat emitrelocations case as for relocatable links.
2705 * po/fr.po: Updated version.
2709 * ldlang.c (lang_check): Do relocatable link checks first, so that
2710 warn_mismatch can't override. Check compatible and word size too.
2714 * ld.texinfo: Wrap @menu in @ifnottex, not @ifinfo.
2718 * scripttempl/elf.sc: Only use DATA_SEGMENT_END() together with
2723 * scripttempl/elf.sc: Put .preinit_array, .init_array and
2724 .fini_array in the data segment.
2728 * scripttempl/elf.sc: Correct syntax errors in 2002-03-01 commit.
2732 * scripttempl/elf.sc (SECTIONS): Add entries for .preinit_array,
2733 .init_array, and .fini_array.
2737 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't fold
2738 .IA64_unwind* in a relocatable link.
2742 * NEWS: Mark 2.12 branch.
2746 * emulparams/elf64_s390.sh (ARCH): Change to "s390:64-bit".
2747 * emulparams/elf_s390.sh (ARCH): Change to "s390:31-bit".
2751 * emultempl/aix.em (gld*_parse_args): Add -brtl support.
2752 (gld*_before_allocation): Same.
2753 (gld*_create_output_section_statements): Generate
2754 __rtinit if run time linking. Add librtl.a to the link.
2755 (gld*_read_file): Clean.
2759 * emulparams/elf64ppc.sh (OTHER_TEXT_SECTIONS): Define.
2763 * Makefile.am: Add new files earmelf_fbsd, eelf32ppc_fbsd,
2764 eelf_i386_fbsd, eelf64_ia64_fbsd, eelf_x86_64_fbsd, eelf64_sparc_fbsd,
2765 and eelf64alpha_fbsd.
2766 * Makefile.in: Regenerate.
2767 * configure.tgt(sparc64-*-freebsd, ia64-*-freebsd, i[3456]86-*-freebsd,
2768 x86_64-*-freebsd, arm-*-freebsd, alpha*-*-freebsd, powerpc-*-freebsd):
2769 use a FreeBSD-specific emulation rather than the psABI one.
2770 * emulparams/elf_fbsd.sh (ELF_INTERPRETER_NAME): Set appropriate value
2771 for all FreeBSD ELF systems.
2772 * emulparams/armelf_fbsd.sh: Bridge elf_fbsd.sh and the "native" psABI
2774 * emulparams/elf32ppc_fbsd.sh: Likewise.
2775 * emulparams/elf64_ia64_fbsd.sh: Likewise.
2776 * emulparams/elf64_sparc_fbsd.sh: Likewise.
2777 * emulparams/elf64alpha_fbsd.sh: Likewise.
2778 * emulparams/elf_i386_fbsd.sh: Likewise.
2779 * emulparams/elf_x86_64_fbsd.sh: Likewise.
2783 * po/tr.po: Updated version.
2787 * ld.texinfo (Output Section Fill): Fix amateur texinfo.
2792 * emultempl/mmo.em (mmo_after_open): Don't call
2793 _bfd_mmix_check_all_relocs when producing ELF output.
2797 * emulparams/elf64alpha.sh (NOP): Adjust for big-endian
2798 definition. Emit a unop+nop pair.
2802 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Also check
2803 for presence of .MMIX.reg_contents.linker_allocated before early
2806 * NEWS: Mention support for MMIX.
2810 Support arbitrary length fill patterns.
2811 * ld.texinfo (Output Section Fill): Describe fill expressions.
2812 (FILL): Refer to the above.
2813 * ldexp.h (etree_value_type): Add "str" field.
2814 (union etree_union): Add "str" to "value" struct.
2815 (exp_bigintop): Declare.
2816 (exp_get_fill): Declare.
2817 * ldexp.c: Include "safe-ctype.h".
2818 (exp_intop): Set value.str to NULL.
2819 (exp_bigintop): New function.
2820 (new_rel): Pass in "str", and set new.str from it.
2821 (new_rel_from_section): Set new.str to NULL.
2822 (fold_name): Adjust calls to new_rel.
2823 (exp_fold_tree): Likewise.
2824 (exp_get_fill): New function.
2825 * ldgram.y (struct big_int bigint, fill_type *fill): New.
2826 (INT): Returns a "bigint". Adjust all code handling INTs.
2827 (fill_opt): Returns a "fill".
2828 (fill_exp): Split out of fill_opt, use for FILL.
2829 * ldlang.h (struct _fill_type): New.
2830 (fill_type): Move typedef to ldexp.h.
2831 (lang_output_section_statement_type): "fill" is now a pointer.
2832 (lang_fill_statement_type): Likewise.
2833 (lang_padding_statement_type): Likewise.
2834 (lang_add_fill): Now takes a "fill_type *" param.
2835 (lang_leave_output_section_statement): Likewise.
2836 (lang_do_assignments): Likewise.
2837 (lang_size_sections): Likewise.
2838 (lang_leave_overlay_section): Likewise.
2839 (lang_leave_overlay): Likewise.
2840 * ldlang.c: Include ldgram.h after ldexp.h.
2841 (lang_output_section_statement_lookup): Adjust for fill_type change.
2842 (print_fill_statement): Likewise.
2843 (print_padding_statement): Likewise.
2844 (insert_pad): Now takes a "fill_type *" arg.
2845 (size_input_section): Likewise.
2846 (lang_size_sections_1): Likewise.
2847 (lang_size_sections): Likewise.
2848 (lang_do_assignments): Likewise.
2849 (lang_add_fill): Likewise.
2850 (lang_leave_output_section_statement): Likewise.
2851 (lang_leave_overlay_section): Likewise.
2852 (lang_leave_overlay): Likewise.
2853 Adjust all callers of the above function.
2854 * ldlex.l: Include ldgram.h after ldexp.h. Allow hex numbers
2855 starting with "0X" as well as "0x". Return bigint.str for hex
2856 numbers starting with "0x" or "0X", zero bigint.str otherwise.
2857 Always use base 16 for numbers starting with "$".
2858 * ldmain.c: Include ldgram.h after ldexp.h.
2859 * ldwrite.c (build_link_order): Use bfd_data_link_order in place
2860 of bfd_fill_link_order.
2861 * pe-dll.c: Adjust lang_do_assignments calls.
2862 * emultempl/elf32.em: Likewise.
2863 * emultempl/hppaelf.em: Likewise.
2864 * emultempl/ppc64elf.em: Likewise.
2865 * emultempl/beos.em: Include ldgram.h after ldexp.h, adjust
2866 lang_add_assignment call.
2867 * emultempl/pe.em: Likewise.
2871 * ld.texinfo (VERSION scripts): Symbol names are globbing patterns.
2872 * ldgram.y (lang_new_vers_regex): Rename to lang_new_vers_pattern;
2873 the pattern in question is not a regexp.
2874 * ldlang.c: Likewise.
2875 * ldlang.h: Likewise.
2876 * ldlex.l (V_IDENTIFIER): Allow '[', ']', '-', '!', and '^' also.
2880 * ldlex.l (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
2881 * ldgram.y (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
2882 (exp): Add DATA_SEGMENT_ALIGN (exp, exp) and DATA_SEGMENT_END (exp).
2883 * ldexp.c (exp_data_seg): New variable.
2884 (exp_print_token): Handle DATA_SEGMENT_ALIGN and DATA_SEGMENT_END.
2885 (fold_binary): Handle DATA_SEGMENT_ALIGN.
2886 (exp_fold_tree): Handle DATA_SEGMENT_END.
2887 Pass allocation_done when recursing instead of hardcoding
2888 lang_allocating_phase_enum.
2889 * ldexp.h (exp_data_seg): New.
2890 * ldlang.c (lang_size_sections_1): Renamed from lang_size_sections.
2891 (lang_size_sections): New.
2892 * ld.texinfo (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): Document.
2893 * scripttempl/elf.sc: Use DATA_SEGMENT_ALIGN and DATA_SEGMENT_END
2894 if COMMONPAGESIZE is defined.
2895 * emulparams/elf_i386.sh (COMMONPAGESIZE): Set to 4K.
2896 * emulparams/elf32_sparc.sh (COMMONPAGESIZE): Set to 8K.
2897 * emulparams/elf64_sparc.sh (COMMONPAGESIZE): Set to 8K.
2898 * emulparams/elf64alpha.sh (COMMONPAGESIZE): Set to 8K.
2899 * emulparams/elf64_ia64.sh (COMMONPAGESIZE): Set to 16K for shared
2904 * Makefile.in: Regenerate.
2908 * lexsup.c: Remove strtoul declaration.
2912 * ldmain.c: Add prototype for main ().
2913 * lexsup.c: Guard declaration of strtoul with HAVE_STDLIB_H.
2914 * emultempl/lnk960.em (lnk960_choose_target): Function should
2919 * ldlang.c (entry_section): New initialised variable.
2920 (lang_finish): Use it.
2921 * ldlang.h (entry_section): Declare.
2922 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Set
2923 entry_section to ".opd".
2927 * ld.texinfo (Options): Add back in -nostdlib documentation,
2928 which had been inadvertently removed.
2932 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Adjust
2933 register section vma to a sane value after emitting error. Make
2934 fatal conditions cause program exit when emitting message.
2938 * configure.tgt: Add or32-*-rtems target.
2942 Contribute sh64-elf.
2944 * emulparams/shelf32.sh (STACK_ADDR): Define as formerly defined
2945 in OTHER_RELOCATABLE_SECTIONS.
2947 * emulparams/shelf32.sh (STACK_ADDR): Define.
2948 (OTHER_RELOCATABLE_SECTIONS): Renamed to...
2949 (OTHER_SECTIONS): this. Removed stack settings.
2950 * emulparams/shelf64.sh (OTHER_RELOCATABLE_SECTIONS): Do not set.
2951 (OTHER_SECTIONS): Reset after sourcing shelf32.sh.
2953 * emultempl/sh64elf.em (sh64_elf_$_before_allocation): Disable
2954 relaxing if any shmedia or mixed sections are found.
2956 * emultempl/sh64elf.em (sh64_elf_before_allocation): Pass f to
2957 einfo. Gracefully decline to output to non-elf formats.
2959 * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS) <.stack>:
2960 Default to _end aligned to next multiple of 0x40000, plus 0x40000.
2961 * emulparams/shelf32.sh: Ditto.
2963 * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Tweak
2966 * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Avoid
2967 non-portable shell constructs. From Hans-Peter Nilsson.
2969 * emulparams/shelf64.sh (EXTRA_EM_FILE): Define empty.
2970 * Makefile.am (eshelf64.c, eshlelf64.c, eshlelf32.c): Adjust
2971 dependencies to the shell script include chain.
2972 * Makefile.in: Regenerate.
2974 * emultempl/sh64elf.em: Update and tweak comments.
2975 (sh64_elf_${EMULATION_NAME}_after_allocation): Always allocate and
2976 make a .cranges section SEC_IN_MEMORY.
2978 * emultempl/sh64elf.em
2979 (sh64_elf_${EMULATION_NAME}_before_allocation): Don't stop when
2980 .cranges section found to be necessary; continue and set stored
2981 section contents flags for sections with non-mixed contents.
2982 Use a struct sh64_section_data container and sh64_elf_section_data
2983 to store contents-type flags.
2984 Remove unused update of "isec".
2985 (sh64_elf_${EMULATION_NAME}_after_allocation): Only process
2986 sections marked SHF_SH5_ISA32_MIXED. Use sh64_elf_section_data to
2987 access contents-type flags. Assert that the associated container
2988 is initialized. Use that container, not elf_gp_size, to hold size
2989 of linker-generated cranges contents.
2991 * emultempl/sh64elf.em
2992 (sh64_elf_${EMULATION_NAME}_before_allocation): Exit early if
2993 there's already a .cranges section. When section flag difference
2994 is found, don't NULL-check cranges a second time. Tweak comments.
2995 (sh64_elf_${EMULATION_NAME}_after_allocation): Use size after
2996 merging, not max size, as size of ld-generated .cranges contents.
2997 Don't set ELF section flags in output section. When checking for
2998 needed .cranges descriptors, don't use a variable; compare
2999 incoming ELF section flags directly to SHF_SH5_ISA32_MIXED. Tweak
3002 * emultempl/sh64elf.em: New file.
3003 * Makefile.am (eshelf32.c, eshlelf32.c): Adjust dependencies.
3004 * Makefile.in: Regenerate.
3005 * emulparams/shelf32.sh (OUTPUT_FORMAT): Only set if not set.
3006 (OTHER_RELOCATING_SECTIONS): Ditto.
3007 (EXTRA_EM_FILE): New, set to sh64elf if not set.
3008 * emulparams/shlelf32.sh: Stub out all settings except
3009 OUTPUT_FORMAT. Source shelf32.sh.
3010 * emulparams/shelf64.sh: Similar, but also keep ELF_SIZE and
3011 OTHER_RELOCATING_SECTIONS.
3012 (OTHER_RELOCATING_SECTIONS): Remove .cranges.
3013 * emulparams/shlelf64.sh: Stub out all settings except
3014 OUTPUT_FORMAT. Source shelf64.sh.
3016 * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS): Include
3018 (DATA_START_SYMBOLS): Define, provide ___data.
3019 (OTHER_READONLY_SYMBOLS): Define, provide ___rodata and align to 8
3020 for consecutive .data section.
3021 (OTHER_GOT_SECTIONS): Define, align to 8 for consecutive .bss
3022 section after .data section.
3023 * emulparams/shlelf64.sh: Ditto.
3024 * emulparams/shelf32.sh: Ditto.
3025 (ALIGNMENT): Define to 8.
3026 * emulparams/shelf32.sh: Ditto.
3028 * configure.tgt (sh64-*-elf*): Assign targ_extra_libpath to get
3029 built-in linker scripts.
3031 * emulparams/shlelf64.sh: New.
3032 * emulparams/shelf64.sh: New.
3033 * configure.tgt (sh64-*-elf*): Add shelf64 and shlelf64 to
3035 * Makefile.am: Add support for shlelf64 and shelf64.
3036 * Makefile.in: Regenerate.
3038 * configure.tgt (sh64-*-elf*): Add shelf as default.
3039 Add shlelf to targ_extra_emuls.
3041 * emulparams/shelf32.sh: New file.
3042 * emulparams/shlelf32.sh: New file.
3043 * Makefile.am: Add support for shlelf32 and shelf32.
3044 * configure.tgt: Map sh64-*-elf* to shlelf32 and shelf32.
3045 * Makefile.in: Regenerate.
3049 * ldlang.c (lang_reset_memory_regions): Rename from
3050 reset_memory_regions. Change all callers. Make public.
3051 * ldlang.h (lang_reset_memory_regions): Prototype.
3052 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Call
3053 lang_reset_memory_regions before lang_size_sections.
3054 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
3055 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Likewise.
3059 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Use signed
3060 arithmetic when checking for too many global registers.
3064 * Makefile.am (ALL_EMULATIONS): Add ehppanbsd.o.
3065 (ehppanbsd.c): New rule.
3066 * Makefile.in: Regenerate.
3067 * configure.tgt (hppa*-*-netbsd*): New target.
3068 * emulparams/hppalinux.sh: Add comment to check other files
3069 that source this file it is modified, and list which
3071 * emulparams/hppanbsd.sh: New file.
3075 * scripttempl/xstormy16.sc: Don't allocate extra space for the
3080 Support on-demand global register allocation from
3081 R_MMIX_BASE_PLUS_OFFSET relocs.
3082 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Rename from
3083 mmix_set_reg_section_vma. Call
3084 _bfd_mmix_finalize_linker_allocated_gregs.
3085 (mmix_before_allocation): New function.
3086 (LDEMUL_AFTER_ALLOCATION): Set to mmix_after_allocation.
3087 (LDEMUL_BEFORE_ALLOCATION): Define to mmix_before_allocation.
3088 * scripttempl/mmo.sc (.text): Mark .init, .fini as KEEP.
3089 (.MMIX.reg_contents): Add .MMIX.reg_contents.linker_allocated
3090 before .MMIX.reg_contents.
3091 * emultempl/mmo.em (gldmmo_before_allocation): Define to default.
3092 (mmo_after_open): New function.
3093 (LDEMUL_AFTER_OPEN): Define to mmo_after_open.
3094 * emulparams/elf64mmix.sh (OTHER_SECTIONS): Tweak formatting. Add
3095 .MMIX.reg_contents.linker_allocated before .MMIX.reg_contents.
3099 * emulparams/or32.sh: New file.
3100 * emulparams/or32elf.sh: New file.
3101 * scripttempl/or32.sc: New file.
3102 * configure.tgt : Add support for or32.
3103 * configure: Regenerate
3104 * Makefile.am: Add support for or32.
3105 * Makefile.in: Regenerate.
3106 * NEWS: Mention support for or32.
3107 * po/ld.pot: Regenerate.
3112 * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Define to be mipself.
3113 * emultempl/mipself.em: New file to handle MIPS ELF embedded
3114 reloc creation (ld --embedded-relocs).
3118 * configure: Regenerated.
3122 * Makefile.am (install): Depend on install-info.
3123 * Makefile.in: Regenerate.
3127 * ldmain.c (main): Use full sentences to ease translation.
3131 * po/fr.po: Updated version.
3135 * po/es.po: Updated version.
3139 * ldlex.l (yy_input): Correct error check.
3143 * ldmisc.c (demangle): Put back dots when string not demangled.
3147 * emulparams/elf64alpha.sh (NOP): Use unop.
3151 * ldlex.l: Use fread instead of read.
3155 * configure.tgt (ia64-*-netbsd*): New target.
3159 * emulparams/elf32btsmip.sh (SHLIB_TEXT_START_ADDR): Change to
3161 * emulparams/elf64btsmip.sh (SHLIB_TEXT_START_ADDR): Likewise.
3165 * ldver.c (ldversion): Update year.
3169 * po/ld.pot: Regenerate.
3173 * Makefile.am (eelf64ppc.c, eelf64lppc.c): Depend on ppc64elf.em.
3174 * Makefile.in: Regenerate.
3175 * emulparams/elf64ppc.sh (EXTRA_EM_FILE): Define.
3176 * emultempl/ppc64elf.em: New file.
3180 * scripttempl/pe.sc: Add support for constructor priorities.
3184 * emulparams/avr1200.sh (DATA_START): Define as 0x60.
3185 * emulparams/avr23xx.sh: Likewise.
3186 * emulparams/avr4433.sh: Likewise.
3187 * emulparams/avr44x4.sh: Likewise.
3188 * emulparams/avr85xx.sh: Likewise.
3189 * emulparams/avrmega103.sh: Likewise.
3190 * emulparams/avrmega161.sh: Likewise.
3191 * emulparams/avrmega603.sh: Likewise.
3192 * scripttempl/elf32avr.sc: Use DATA_START instead of 0x60.
3196 * ldlang.c (walk_wild_section): Exclude object file if enclosing
3197 archive is excluded.
3201 * Makefile.am (ALL_EMULATIONS): Add eshelf_nbsd.o and eshlelf_nbsd.o.
3202 (eshelf_nbsd.c): New rule.
3203 (eshlelf_nbsd.c): New rule.
3204 * Makefile.in: Regenerate.
3205 * configure.tgt (sh*le-*-netbsdelf*): New target.
3206 (sh*-*-netbsdelf*): New target.
3207 * emulparams/shelf.sh: Document that shelf_nbsd.sh sources this file.
3208 * emulparams/shelf_nbsd.sh: New emulation.
3209 * emulparams/shlelf_nbsd.sh: New emulation.
3213 * po/es.po: New file: Spanish translation.
3214 * configure.in (ALL_LINGUAS): Add es.
3215 * configure: Regenerate.
3219 * ld.texinfo: Note that --emit-relocs is currently only
3220 implemented for ELF.
3224 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Make use
3225 of bfd_section_list_remove and bfd_section_list_insert macros.
3226 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
3227 * emultempl/mmo.em (mmo_place_orphan): Likewise.
3231 * configure.tgt (x86_64-*-netbsd*): New target.
3235 (gld*_create_output_section_statements): New function.
3236 For -binitfini support.
3237 * emultempl/aix.em (gld*_before_parse): Fix comment.
3238 * emultempl/aix.em (gld*_parse_args): Fix comment.
3242 * configure.tgt (mips*-dec-netbsd*): Delete alias for
3244 (sparc64-*-netbsd*): Add elf32_sparc to targ_extra_emuls.
3246 * configure.tgt (arm-*-netbsdelf*): Add target.
3247 (arm-*-netbsd*): Add armelf and armelf_nbsd to targ_extra_emuls.
3248 * emulparams/armelf_nbsd.sh: Added.
3249 * Makefile.am: Add rules for earmelf_nbsd.
3250 * Makefile.in: Regenerate.
3255 * configure.host: Add rules for x86_64-*linux-gnu. Change
3256 s390x-linux entry to use gcc to report configuration, replace gcc
3257 with $CC in s390-linux
3261 * ld.texinfo (VERSION): Fix markup.
3265 * Makefile.am (ALL_EMULATIONS): Add m68kelfnbsd.o.
3266 (m68kelfnbsd.c): New rule.
3267 * Makefile.in: Regenerate.
3268 * configure.tgt (m68*-hp-netbsd*): Renamed to ..
3269 (m68*-*-netbsd*4k*): .. this.
3270 (m68*-*-netbsdelf*): New target.
3271 (m68*-*-netbsd*): Also include ELF support.
3272 (m68*-*-netbsdaout*): New alias for m68*-*-netbsd*.
3273 * emulparams/m68kelfnbsd.sh: New emulation.
3277 * ldgram.y (vers_node): Support anonymous version tags.
3278 * ldlang.c (lang_register_vers_node): Ensure anonymous version
3279 tag is not defined together with non-anonymous versions.
3280 * ld.texinfo: Document it.
3284 * po/tr.po: New file: Turkish translation.
3285 * configure.in (ALL_LINGUAS): Add tr.
3286 * configure: Regenerate.
3290 * Makefile.am: Add rules for eelf64alpha_nbsd.
3291 * Makefile.in: Regenerate.
3292 * configure.tgt (alpha*-*-netbsd*): Set
3293 targ_emul to elf64alpha_nbsd.
3294 * emulparams/elf64alpha_nbsd.sh: Added.
3298 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust
3299 section_tail when fiddling with section list.
3300 (gld${EMULATION_NAME}_list_options): Ensure sentences aren't
3301 broken into separate strings to make translation easier.
3302 * emultempl/mmo.em (mmo_place_orphan): Adjust section_tail when
3303 fiddling with section list.
3304 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
3308 * scripttempl/mmo.sc: Add .debug_ranges to listed sections.
3312 * ldmain.c (main): Initialise link_info.eh_frame_hdr.
3316 * emultempl/elf32.em (finish): Supply output_bfd
3317 to bfd_elf*_discard_info.
3318 (OPTION_EH_FRAME_HDR): Define.
3319 (longopts): Add --eh-frame-hdr.
3320 (parse_args): Handle it.
3321 (list_options): Add --eh-frame-hdr to help.
3322 * emultempl/hppaelf.em (finish): Supply output_bfd
3323 to bfd_elf*_discard_info.
3324 * scripttempl/elf.sc (.eh_frame_hdr): Add.
3328 * lexsup.c (parse_args): Don't pass shortopts to second call to
3329 getopt functions. Restore optind rather than decrementing before
3330 second call. Remove errind as it now duplicates last_optind.
3334 * emultempl/pe.em (gld_${EMULATION_NAME}_list_options): Fix typo.
3339 * Makefile.am: Add support for xstormy16.
3340 * configure.tgt: Add support for xstormy16.
3341 * Makefile.in: Regenerate.
3342 * emulparams/elf32xstormy16.sh: New file.
3343 * scripttempl/xstormy16.sc: New file.
3347 * Makefile.in (LIB_PATH): Make configurable.
3348 (GENSCRIPTS): Set LIB_PATH in environment.
3349 * configure.in: Substitute LIB_PATH.
3350 * configure: Regenerate.
3351 * configure.tgt (*cygwin): Set LIB_PATH for cross build.
3352 * configure.host (*cygwin): Add /usr/lib/w32api to NATIVE_LIB_DIRS.
3356 * lexsup.c (ld_options): Insert 'PROGRAM' into the text string
3357 describing the -N option so that it is easier to translate into
3362 * emultempl/pe.em (..._list_options): Replace multiple fprintf
3363 statements describing a single option with a single, newline
3364 escaped fprintf. This allows better translation into other
3367 * ldmain.c (add_archive_element): Combine multiple strings
3368 into a single string to permit better translation into other
3373 * Makefile.am: Remove eaixppc64.
3374 * Makefile.in: Regenerate.
3378 * emultempl/aix.em (choose_target): Change default target to
3379 OUTPUT_FORMAT for ppcmacos. Add braces to remove compiler
3381 (gld*_read_file): Fix typo.
3382 (change_symbol_mode): Add prototype.
3385 * emulparams/aixppc.sh (SYSCALL_MASK, SYMBOL_MODE_MASK): Delete.
3386 * emulparams/aixrs6.sh : Same.
3387 * emulparams/ppcmacos.sh : Same.
3388 * emulparams/aixppc64.sh : Delete file.
3389 * emultempl/aix.em : Formatting changes.
3393 * emulparams/criself.sh (NO_SMALL_DATA): Set, to yes.
3394 (OTHER_BSS_END_SYMBOLS): Don't refer to .sbss when setting
3396 (OTHER_END_SYMBOLS): Fix formatting.
3397 * emulparams/crislinux.sh (NO_SMALL_DATA): Set, to yes.
3398 (OTHER_END_SYMBOLS): Fix formatting.
3402 * ldexp.c (exp_print_token): Correct "table" entry for RSHIFT.
3406 * configure.tgt : Remove eaixppc64 emulations.
3407 * Makefile.in : Remove eaixppc64.c
3408 * ldemul.c (ldemul_choose_target): New parameters argc, argv.
3409 (ldemul_default_target): Same.
3410 * emultempl/gld960.em (gld960_choose_target): Same.
3411 * emultempl/gld960c.em (gld960_choose_target): Same.
3412 * scripttempl/aix.sc: Remove OUTPUT_FORMAT.
3413 * emultempl/aix.em (is_syscall): syscall_mask now a variable.
3414 * emultempl/aix.em (gld*_read_file): symbol_mode_mask now a variable.
3415 * emultempl/aix.em (gld*_parse_args): Handle -b32 -b64 emulation.
3416 * emultempl/aix.em (choose_target): New function. Handle emulation of
3421 * emulparams/elf_i386.sh (NO_SMALL_DATA): Set to yes.
3422 * emulparams/elf_i386_be.sh (NO_SMALL_DATA): Likewise.
3423 * emulparams/elf_i386_chaos.sh (NO_SMALL_DATA): Likewise.
3424 * emulparams/elf_i386_ldso.sh (NO_SMALL_DATA): Likewise.
3425 * emulparams/elf_x86_64.sh (NO_SMALL_DATA): Likewise.
3426 * emulparams/m68kelf.sh (NO_SMALL_DATA): Likewise.
3427 * emulparams/elf32_sparc.sh (NO_SMALL_DATA): Likewise.
3428 * emulparams/elf64_sparc.sh (NO_SMALL_DATA): Likewise.
3430 * scripttempl/elf.sc (SBSS): New. Define if ${NO_SMALL_DATA}
3433 (REL_SDATA): Likewise.
3434 (REL_SBSS): Likewise.
3435 (REL_SDATA2): Likewise.
3436 (REL_SBSS2): Likewise.
3437 (SBSS2): Define if ${NO_SMALL_DATA} is not empty.
3442 * scripttempl/elfm68hc11.sc (CTOR, DTOR): Put constructor and
3444 * scripttempl/elfm68hc12.sc (CTOR, DTOR): Likewise.
3448 * Makefile.in: Regenerated with automake based on automake
3449 1.4-8 in RedHat 7.1.
3453 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Define.
3454 (config.status): Delete rule.
3455 Add extra dependencies to cover sourced emulparams files.
3456 * Makefile.in: Regenerate.
3458 * scripttempl/elf.sc: Order <section>, <section>.* and
3459 corresponding linkonce sections as seen in input files.
3460 Formatting fixes. Zero vma of all sections if not relocating.
3461 (STACK): Define and insert if STACK_ADDR defined.
3462 (OTHER_RELOCATING_SECTIONS): Delete.
3463 (OTHER_END_SYMBOLS): Define.
3464 (OTHER_READONLY_SECTIONS): Always insert, not just when relocating.
3465 (OTHER_READWRITE_SECTIONS): Likewise.
3466 (OTHER_GOT_SECTIONS): Likewise.
3467 (OTHER_SDATA_SECTIONS): Likewise.
3468 (OTHER_BSS_SECTIONS): Likewise.
3469 * scripttempl/elfi370.sc (OTHER_READONLY_SECTIONS): Likewise.
3470 (OTHER_READWRITE_SECTIONS): Likewise.
3471 * scripttempl/nw.sc (OTHER_READONLY_SECTIONS): Likewise.
3472 (OTHER_READWRITE_SECTIONS): Likewise.
3474 * emulparams/armelf.sh (OTHER_RELOCATING_SECTIONS): Delete.
3475 (STACK_ADDR): Define.
3476 * emulparams/armelf_oabi.sh: As for armelf.sh.
3477 * emulparams/elf32mcore.sh: As for armelf.sh.
3478 * emulparams/h8300elf.sh: As for armelf.sh.
3479 * emulparams/mn10200.sh: As for armelf.sh.
3480 * emulparams/shelf.sh: As for armelf.sh.
3482 * emulparams/elf32fr30.sh (OTHER_RELOCATING_SECTIONS): Delete.
3483 (OTHER_END_SYMBOLS): Define.
3484 * emulparams/m32relf.sh: As for elf32fr30.sh.
3485 * emulparams/h8300helf.sh: As for elf32fr30.sh.
3486 * emulparams/h8300self.sh: As for elf32fr30.sh.
3488 * emulparams/criself.sh (OTHER_READONLY_SECTIONS): Protect symbol
3489 defines with RELOCATING test.
3490 (OTHER_SDATA_SECTIONS): Likewise.
3491 (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
3492 (OTHER_END_SYMBOLS): ..this.
3493 * emulparams/crislinux.sh: As for criself.sh.
3495 * emulparams/elf32bmipn32.sh (OTHER_SDATA_SECTIONS): Zero vma
3497 (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
3498 (OTHER_SECTIONS): ..this. Zero vma if not relocating. Order
3499 normal and linkonce sections as seen in input files.
3500 * emulparams/elf32bmip.sh (DATA_ADDR): Don't define if EMBEDDED.
3501 (TEXT_DYNAMIC): Likewise.
3502 (INITIAL_READONLY_SECTIONS): Zero vma if not relocating.
3503 (OTHER_SDATA_SECTIONS): Likewise.
3504 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
3505 * emulparams/shlelf_linux.sh (OTHER_READWRITE_SECTIONS): Likewise.
3506 * emulparams/elf64alpha.sh (OTHER_READONLY_SECTIONS): Likewise.
3507 * emulparams/hppalinux.sh (OTHER_READONLY_SECTIONS): Likewise.
3508 * emulparams/elf64_aix.sh (OTHER_GOT_SECTIONS): Likewise.
3509 (OTHER_PLT_RELOC_SECTIONS): Likewise.
3510 (OTHER_READONLY_SECTIONS): Likewise. Order normal and linkonce
3511 sections as seen in input files.
3512 * emulparams/elf64_ia64.sh: As for emulparams/elf64_aix.sh.
3513 * emulparams/hppa64linux.sh (OTHER_READONLY_SECTIONS): Zero vma
3515 (OTHER_READWRITE_SECTIONS, OTHER_BSS_SECTIONS): Likewise.
3516 (OTHER_BSS_END_SYMBOLS): Merge from elf64hppa.sh.
3517 * emulparams/elf64mmix.sh (OTHER_RELOCATING_SECTIONS): Delete.
3518 (OTHER_SECTIONS): Instead, use this..
3519 (OTHER_END_SYMBOLS): ..and this.
3521 * emulparams/elf32b4300.sh: Source elf32bmip.sh, remove duplicates.
3522 * emulparams/elf32bsmip.sh: Likewise.
3523 * emulparams/elf32btsmip.sh: Likewise.
3524 * emulparams/elf32ebmip.sh: Likewise.
3525 * emulparams/elf32lmip.sh: Likewise.
3526 * emulparams/elf32elmip.sh: Source elf32lmip.sh, remove duplicates.
3527 * emulparams/elf32lsmip.sh: Likewise.
3528 * emulparams/elf32ltsmip.sh: Source elf32btsmip.sh, remove duplicates.
3529 * emulparams/elf32l4300.sh: Source elf32b4300.sh, remove duplicates.
3530 * emulparams/elf64bmip.sh: Source elf32bmipn32.sh, remove duplicates.
3531 * emulparams/elf64btsmip.sh: Likewise.
3532 * emulparams/elf64ltsmip.sh: Source elf64btsmip.sh, remove duplicates.
3533 * emulparams/elf32lppc.sh: Source elf32ppc.sh, remove duplicates.
3534 * emulparams/elf32ppclinux.sh: Likewise.
3535 * emulparams/elf32ppcsim.sh: Likewise.
3536 * emulparams/elf32lppcsim.sh: Source elf32lppc.sh, remove duplicates.
3537 * emulparams/elf64hppa.sh: Source hppa64linux.sh, remove duplicates.
3538 * emulparams/h8300helf.sh: Source h8300elf.sh, remove duplicates.
3539 * emulparams/h8300self.sh: Likewise.
3540 * emulparams/mn10300.sh: Source mn10200.sh, remove duplicates.
3541 * emulparams/sh.sh: Comment.
3542 * emulparams/shl.sh: Source sh.sh, remove duplicates.
3543 * emulparams/shlelf.sh: Source shelf.sh, remove duplicates.
3544 * emulparams/shelf_linux.sh: Source shlelf_linux.sh, remove duplicates.
3549 * ldlang.c (map_input_to_output_sections): Replace "break"
3550 accidentally removed with 2001-08-03 change.
3551 (lang_gc_sections_1): Likewise.
3555 * ldlang.c (walk_wild_section): Move sec == NULL case out of loop.
3559 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Use NULL instead
3560 of false when calling lang_size_sections.
3561 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
3565 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Only emit this
3566 function when LDEMUL_FINISH isn't set to the same name. Don't
3567 call ${LDEMUL_FINISH}.
3568 (ld_${EMULATION_NAME}_emulation): Call $LDEMUL_FINISH if defined.
3569 * emultempl/armelf.em (arm_elf_finish): Call
3570 gld${EMULATION_NAME}_finish.
3571 * emultempl/hppaelf.em (hppaelf_finish): Rename to
3572 gld${EMULATION_NAME}_finish. Call bfd_elf32_discard_info and
3573 hppaelf_layout_sections_again if necessary.
3574 (need_laying_out): New var.
3575 (hppaelf_layaout_sections_again): Rename to
3576 hppaelf_layout_sections_again. Clear need_laying_out.
3577 (PARSE_AND_LIST_OPTIONS): Format text.
3581 * emultempl/armelf.em (arm_elf_finish): Renamed from
3582 gld${EMULATION_NAME}_finish.
3583 (LDEMUL_FINISH): Set to arm_elf_finish.
3587 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): New.
3588 (struct ld_emulation_xfer_struct): Use it.
3592 * emulparams/elf64hppa.sh (OTHER_BSS_END_SYMBOLS): Add
3593 additional symbols referenced by newer crt0.o files from HP.
3597 * emulparams/armelf.sh (DATA_START_SYMBOLS): New symbol.
3601 * Makefile.am (GENSCRIPTS): Quote ${exec_prefix}.
3602 * Makefile.in: Regenerate.
3606 * ld.texinfo: Use @command for commands, @option for options.
3607 * Makefile.am (POD2MAN): Use 'GNU Development Tools' for
3609 * Makefile.in: Rebuild.
3613 * configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
3614 Add support for targets.
3618 * configure.in (ALL_LINGUAS): Add "fr" and "sv"
3619 * configure: Regernate.
3620 * po/fr.po: New file.
3621 * po/sv.po: New file.
3625 * configure.tgt (sh-*-linux): Set targ_emul, targ_extra_emuls
3626 as little endian default and to support big endian.
3630 * ld.texinfo (Options): Document new option, -nostdlib.
3631 * lexsup.c (OPTION_NOSTDLIB): New definition.
3632 (ld_options): Add entry for "nostdlib".
3633 (parse_args): Handle OPTIONS_NOSTDLIB.
3634 * ldfile.c (ldfile_add_library_path): Don't add directories
3635 to the search path if they weren't specified on the command line
3636 and -nostdlib was specified.
3637 * ld.h (ld_config_type): New member only_cmd_line_lib_dirs.
3641 * lexsup.c (parse_args): Prevent infinite parsing loop when
3642 "-rpath.a" is specified on the command line.
3643 Replace calls to fprintf with calls to einfo.
3647 * ld.texinfo: A historical requirement that MEMORY and SECTIONS
3648 appear only once across all the linker scripts involved in a link
3649 invocation no longer applies. Make the documentation reflect
3654 * configure.tgt: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
3656 (sh-*-linux*): Added targ_extra_libpath.
3660 * ldlang.c (lang_size_sections): Keep a valid output_offset field
3661 for padding statements.
3665 * configure.tgt (mmix-*-*): New target.
3666 * Makefile.am (ALL_EMULATIONS): Add eelf64mmix.o and emmo.o.
3667 Add dependencies to match.
3668 * emulparams/mmo.sh, emulparams/elf64mmix.sh, emultempl/mmo.em,
3669 emultempl/mmix-elfnmmo.em, emultempl/mmixelf.em,
3670 scripttempl/mmo.sc: New files.
3671 * gen-doc.texi: @set MMIX.
3672 * ld.texinfo: Ditto.
3673 [MMIX] Add MMIX node.
3674 * Makefile.in: Regenerate.
3678 * ldlang.c: Fix a comment typo.
3682 * configure.host: Move alpha*-*-linux-gnu* entry to generic
3683 entries, and match *-*-linux*.
3687 * ldgram.y (mri_script_command): Surround processing of INCLUDE
3688 with ldlex_script, ldlex_popstate.
3689 (ifile_p1): Likewise.
3690 * ldlex.l (EOF): Don't BEGIN(SCRIPT). Restore lineno from the
3692 (lex_push_file): Save current lineno to lineno_stack. Set lineno
3693 to 1. Don't BEGIN(SCRIPT).
3694 (lex_redirect): Similarly.
3695 * ldmain.c (main): Set yydebug non-zero if YYDEBUG.
3699 * scripttempl/armcoff.sc: Define __EH_FRAME_BEGIN__ and
3700 __EH_FRAME_END__ and accept eh frames into data section.
3701 Add ctor and dtor sections.
3705 * pe-dll.c (autofilter_objectlist): Add gcrt0.o.
3706 (auto-export): Fix indentation.
3710 * pe-dll.c (autofilter_objectlist): Add startup objects
3712 (auto-export): Constify char * p.
3713 Extract file basename and use strcmp rather than ststr
3718 * ldmain.c (get_emulation): Improve comment about the handling
3723 * po/POTFILES.in: Regenerate.
3727 * emultempl/elf32.em (gld*_list_options): Remove extra '\t' from
3728 -z nocopyreloc and -z nocombreloc usage strings.
3732 * emultempl/elf32.em (gld*_list_options): Include -z nocopyreloc
3737 * scripttempl/armaout.sc: Place .bss section after end of aligned
3738 data section to match behaviour of aout code in constructrion of
3743 * pe-dll.c (autofilter_entry_type autofilter_liblist: Add
3744 startup files for mingw32 dlls to list.
3748 * emultempl/elf32.em: Fix shell 'if' usage for portability.
3752 * configure.tgt (targ): Add arm9e-*-elf.
3756 * genscripts.sh: Fix a typo in the last change.
3760 * emultempl/elf32.em (gld_*_list_options): Include -z combreloc and
3761 -z nocombreloc in usage.
3765 * genscripts.sh: Include a comment at the top of each generated
3766 script, explaining its purpose.
3770 * emultempl/elf32.em (parse_args): Handle -z nocopyreloc.
3771 * NEWS: Mention -z nocopyreloc.
3772 * ld.texinfo (Options): Describe nocopyreloc.
3776 * configure: Regenerate.
3780 * ldver.h (ld_program_version): Remove declaration.
3781 * lexsup.c (parse_args): Move printing of copyright message..
3782 * ldver.c (ldversion): .. to here.
3783 Use BFD_VERSION_STRING in place of BFD_VERSION.
3784 (ld_program_version): Remove.
3785 * Makefile.am (Makefile): Depend on bfd/configure.in.
3787 * Makefile.in: Regenerate.
3791 * Makefile.am: Update dependencies with "make dep-am".
3792 * Makefile.in: Regenerate.
3796 * ldlang.c (lang_common): Conditionally inhibit Common allocation.
3797 * lexsup.c: Add --no-define-common commandline option.
3798 * ldgram.y: Add INHIBIT_COMMON_ALLOCATION script command.
3799 * ldlex.l: Likewise.
3800 * ld.h: Add command_line.inhibit_common_definition.
3801 * ldmain.c (main): Initialize.
3802 * ld.texinfo: Document.
3806 * ldlang.c (section_already_linked): Remove assignment to kept_section.
3810 * ldmisc.c (USE_STDARG): Remove.
3811 (info_msg): Define using VPARAMS, VA_OPEN, VA_FIXEDARG, VA_CLOSE.
3816 * ldmisc.h: Remove #ifdef ANSI_PROTOTYPES and non-ansi
3817 declarations. Update copyright.
3821 * pe-dll.c: Remove obsoleted declaration of
3822 pe_get_data_import_dll_name.
3823 (pe_create_import_fixup): Fix thinko.
3825 * ld.texinfo(enable-auto-import): Clarify the explanation.
3829 * pe-dll.c (pe_create_import_fixup): Revert previous patch.
3830 * emultemp/pe.em (pe_data_import_dll): Move definition outside of
3831 DLL_SUPPORT controlled code.
3835 * emultempl/pe.em(pe_data_import_dll): Make static.
3836 (pe_get_data_import_dll_name): New accessor function.
3837 * pe-dll.c(pe_create_import_fixup): call
3838 pe_get_data_import_dll_name() from pe.em, instead of
3839 directly accessing pe_data_import_dll variable from pe.em.
3843 * deffilep.y: Include "safe-ctype.h" instead of <ctype.h>.
3844 (def_file_add_directive): Use ISSPACE instead of isspace.
3845 (def_lex): Use ISDIGIT/ISXDIGIT/ISALPHA/ISALNUM instead of
3846 isdigit/isxdigit/isalpha/isalnum.
3847 * emultempl/aix.em: Include "safe-ctype.h" instead of <ctype.h>.
3848 (gld${EMULATION_NAME}_read_file): Use ISSPACE instead of isspace.
3849 * emultempl/elf32.em: Include "safe-ctype.h" instead of <ctype.h>.
3850 (gld${EMULATION_NAME}_place_orphan): Use ISALNUM instead of
3852 * emultempl/gld960c.em: Include "safe-ctype.h" instead of <ctype.h>.
3853 (gld960_set_output_arch): Use ISUPPER/TOLOWER instead of
3855 * emultempl/sunos.em: Include "safe-ctype.h" instead of <ctype.h>.
3856 (gld${EMULATION_NAME}_search_dir): Use ISDIGIT instead of isdigit.
3857 * ldctor.c: Include "safe-ctype.h" instead of <ctype.h>.
3858 (ctor_prio): Use ISDIGIT instead of isdigit.
3859 * ldfile.c: Include "safe-ctype.h" instead of <ctype.h>.
3860 (ldfile_open_file_search): Use ISALPHA instead of isalpha.
3861 (ldfile_add_arch): Use ISUPPER/TOLOWER instead of
3863 * ldlang.c: Include "safe-ctype.h" instead of <ctype.h>.
3864 (stricpy): Use TOLOWER instead of isupper/tolower.
3865 (lang_leave_overlay_section): Use ISALNUM instead of isalnum.
3866 * ldlex.l: Include "safe-ctype.h" instead of <ctype.h>.
3867 (lex_warn_invalid): Use ISPRINT instead of isprint.
3868 * ldmain.c: Include "safe-ctype.h" instead of <ctype.h>.
3869 (main): For gettext, also set the LC_CTYPE locate facet.
3870 (add_keepsyms_file): Use ISSPACE instead of isspace.
3871 * lexsup.c: Include "safe-ctype.h" instead of <ctype.h>.
3872 (is_num, parse_args): Use ISDIGIT instead of isdigit.
3873 * mpw-elfmips.c: Include "safe-ctype.h" instead of <ctype.h>.
3874 (gldelf32ebmip_place_orphan): Use ISALNUM instead of isalnum.
3875 * mpw-eppcmac.c: Include "safe-ctype.h" instead of <ctype.h>.
3876 (gldppcmacos_read_file): Use ISSPACE instead of isspace.
3877 * pe-dll.c: Include "safe-ctype.h" instead of <ctype.h>.
3878 (quoteput): Use ISSPACE instead of isspace.
3879 (pe_dll_generate_implib, pe_process_import_defs): Use ISALNUM
3884 * deffilep.y (def_stash_module): Constify "name" param.
3886 * pe-dll.c: Replace CONST with const throughout.
3887 (quick_symbol): Constify "n1", "n2", "n3" params.
3888 (make_singleton_name_thunk): Constify "import" param. Make
3889 "buffer_len" a size_t.
3890 (make_import_fixup_entry): Constify "name", "fixup_name",
3891 "dll_symname" params.
3892 (pe_get16): Cast args of bfd_seek. Replace bfd_read with bfd_bread.
3893 (pe_get32): Likewise.
3894 (pe_implied_import_dll): Likewise.
3896 * emultempl/beos.em (sort_by_file_name): Constify "ra", "rb".
3897 (sort_by_section_name): Likewise.
3899 * emultempl/pe.em: Move defines for arm_epoc_pe before bfd.h included.
3900 (make_import_fixup): Cast printf arg, rel->address to long rather
3902 (gld_${EMULATION_NAME}_after_open): Don't compare NULL against int.
3906 * ldmain.c (main): Rename BufferSize to ld_bufsz because HPUX
3907 defines BufferSize. Increase buffer size by one.
3911 * pe-dll.c (pe_walk_relocs_of_symbol): Fix memory leak.
3915 * configure.tgt: Add arm-openbsd target.
3919 * Makefile.am (ALL_EMULATIONS): Move eelf64ppc.o and
3921 (ALL_64_EMULATIONS): Here.
3922 * Makefile.in: Regenerated.
3926 * emultempl/pe.em(make_import_fixup): change signature to
3927 take asection as well as arelec; we need this for proper
3928 error reporting. Only call pe_create_import_fixup() if
3929 there is no attempt to add a constant addend to the reloc;
3930 otherwise, report error condition.
3931 * pe-dll.c(pe_walk_relocs_of_symbol): change signature,
3932 since final argument is a pointer to make_import_fixup().
3933 Change call to cb() to match make_import_fixup() signature.
3934 (make_import_fixup_mark): make buffer_len unsigned.
3935 * pe-dll.h: change signature of pe_walk_relocs_of_symbol.
3939 * ld.texinfo: add verbose documentation for auto-import
3940 direct-addressing workaround, to compliment the terse
3945 * scripttempl/v850.sc: Add gcc_except_table sections.
3949 * emulparams/h8300helf.sh: Move stack to a much higher memory address.
3950 * emulparams/h8300self.sh: Similarly.
3954 * ld.texinfo (Options, --stack): Correct default value for stack
3959 * emultempl/aix.em : Handle import file XMC_XO and syscall symbols.
3963 * emultempl/beos.em: Declare prototypes for comparions functions,
3968 * emultempl/aix.em: Add missing prototype.
3969 * emultempl/lnk960.em: Likewise.
3970 * emultempl/vanilla.em: Likewise.
3971 * emultempl/armcoff.em: Likewise.
3972 * emultempl/armelf_oabi.em: Likewise.
3973 * emultempl/beos.em: Likewise.
3974 * emultempl/gld960c.em: Likewise.
3975 * emultempl/gld960.em: Likewise.
3977 * emulparams/elf64alpha.sh (PARSE_AND_LIST_PROLOGUE): Add parameter
3978 for prototype declaration.
3983 * ldmain.c (get_emulation): Add support for -mips32 and -mips64.
3987 * emultempl/pe.em: Add missing prototypes.
3988 (gld_${EMULATION_NAME}_after_open): Remove extra args to
3989 pe_find_data_imports.
3990 (pr_sym): Add unused attribute.
3994 * configure.tgt (i[3456]86-*-rtems*, m68*-*-rtems*): Change
3995 default from coff to elf.
3999 * emulparams/h8300helf.sh: Resync with h8300elf.sh. Update
4001 * emulparams/h8300self.sh: Similarly.
4005 * Makefile.am (ALL_EMULATIONS): Add eh8300elf.o, eh8300elf.o and
4007 (eh8300elf.c, eh8300helf.c, eh8300self.c): New targets.
4008 * configure.tgt (h8300-*-elf*): New case.
4009 * emulparams/h8300elf.sh, emulparams/h8300helf.sh: New files.
4010 * emulparams/h8300self.sh: New file.
4011 * Makefile.in: Regenerated.
4015 * ldmain.c (main): Rename BSIZE to BufferSize to avoid collision
4021 * Makefile.am (ALL_EMULATIONS): Add eelf64ppc.o and eelf64lppc.o.
4022 (eelf64ppc.c, eelf64lppc.c): Add make targets.
4024 * Makefile.in: Regenerate.
4025 * configure.tgt: Add powerpc64 support. Move pdp11, pjl, pj
4026 entries to correct alphabetical position.
4027 * emulparams/elf64ppc.sh: New.
4028 * emulparams/elf64lppc.sh: New.
4032 * ldmain.c (main): Declare BSIZE as static.
4036 * emultempl/elf32.em (place_orphan): Place orphan .rel* sections
4037 into .rel.dyn resp. .rela.dyn if combreloc.
4038 (get_script): If .x linker script is equal to .xn, only put it
4039 once into the binary.
4040 Add .xc and .xsc scripts.
4041 (parse_args): Handle -z combreloc and -z nocombreloc.
4042 * scripttempl/elf.sc (.rela.sbss): Fix a typo.
4043 For .xc and .xsc scripts put all .rel* or .rela* input sections
4044 but .rel*.plt and PLT-like sections into .rel.dyn resp. .rela.dyn.
4045 * genscripts.sh (GENERATE_COMBRELOC_SCRIPT): Set if SCRIPT_NAME
4047 Strip trailing whitespace from script.
4048 Generate .xc and .xsc scripts if requested.
4049 * ldmain.c (main): Initialize link_info.combreloc and
4050 link_info.spare_dynamic_tags.
4051 * lexsup.c (OPTION_SPARE_DYNAMIC_TAGS): Define.
4052 (ld_options): Add --spare-dynamic-tags option.
4053 (parse_args): Likewise.
4054 * ld.texinfo: Document -z combreloc and -z nocombreloc.
4055 * ldint.texinfo: Document .xc and .xsc linker scripts.
4056 * NEWS: Add notes about -z combreloc and SHF_MERGE.
4060 * emulparams/elf32fr30.sh: Add a newline.
4064 * deffilep.y: Add missing prototypes.
4065 * pe-dll.c: Likewise.
4069 * ldlang.c (insert_pad): Fix typos in last patch.
4071 * ldlang.c: When traversing lang_statement_union_type lists,
4072 consistently use "header.next" rather than "next".
4073 * mpw-eppcmac.c: Likewise.
4074 * emultempl/beos.em: Likewise.
4075 * emultempl/hppaelf.em: Likewise.
4076 * emultempl/pe.em: Likewise.
4077 * ldlang.h (union lang_statement_union): Remove "next" field.
4079 * ldlang.c (insert_pad): Use offsetof macro.
4080 (lang_size_sections): Always neuter padding statements.
4081 * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Delete.
4083 * pe-dll.c (pe_dll_fill_sections): Correct type of "relax" param
4084 passed to lang_size_sections.
4085 (pe_exe_fill_sections): Likewise.
4086 * emultempl/pe.em (output_prev_sec_find): Copied from elf32.em.
4087 (gld_${EMULATION_NAME}_place_orphan): Merge from elf32.em.
4091 * emultempl/aix.em: Formatting fixes.
4095 * ldlang.c (insert_pad): Make use of an existing pad statement if
4096 available. Move code calculating alignment, adjusting section
4097 alignment power, and adjusting dot to ..
4098 (size_input_section): .. here. Remove unused relax param.
4099 (lang_size_sections): Change boolean `relax' param to boolean *.
4100 Adjust call to size_input_section. Make use of insert_pad to
4101 place pad after the assignment statement. If relaxing, zap
4103 (reset_memory_regions): Reset output_bfd section sizes too.
4104 (relax_again): Move to..
4105 (lang_process): ..here. Adjust call to lang_size_sections, and
4106 remove duplicated code.
4107 * ldlang.h (lang_size_sections): Change `relax' param to boolean *.
4111 * ld.texinfo: Document that fill values now use the four least
4113 * emulparams/elf32fr30.sh (NOP): Update.
4114 * emulparams/elf32mcore.sh: Likewise.
4115 * emulparams/elf64_s390.sh: Likewise.
4116 * emulparams/elf_i386.sh: Likewise.
4117 * emulparams/elf_i386_be.sh: Likewise.
4118 * emulparams/elf_i386_chaos.sh: Likewise.
4119 * emulparams/elf_i386_ldso.sh: Likewise.
4120 * emulparams/elf_s390.sh: Likewise.
4121 * emulparams/elf_x86_64.sh: Likewise.
4122 * emulparams/i386moss.sh: Likewise.
4123 * emulparams/i386nw.sh: Likewise.
4124 * emulparams/m68kelf.sh: Likewise.
4125 * scripttempl/elf.sc: Update NOP comment.
4126 * scripttempl/elfi370.sc: Likewise.
4127 * scripttempl/elfm68hc11.sc: Likewise.
4128 * scripttempl/elfm68hc12.sc: Likewise.
4129 * scripttempl/nw.sc: Likewise.
4133 * ldgram.y (saved_script_handle): Initialize to NULL.
4134 * ldmain.c (main): Change check on saved_script_handle.
4138 * emultempl/elf32.em: Formatting fixes.
4139 (output_prev_sec_find): Test for bfd_ind_section too; do so by
4140 looking at sec->owner.
4141 (output_rel_find): Move function inside LDEMUL_PLACE_ORPHAN test.
4142 (gld${EMULATION_NAME}_place_orphan): Add a few comments. Remove
4143 unused code, and reorganize orphan section placement code.
4145 * ldlang.c (wild_doit): Rename to lang_add_section.
4146 * ldlang.h: Here too.
4147 * mpw-elfmips.c: And here.
4148 * emultempl/beos.em: And here.
4149 * emultempl/elf32.em: And here.
4150 * emultempl/hppaelf.em: And here.
4151 * emultempl/pe.em: And here.
4155 * emultempl/needrelax.em: New file.
4156 * emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Reference it.
4157 * Makefile.am (eelf64_ia64.c): Depend on it.
4158 * Makefile.in: Rebuild.
4162 * emultempl/elf32.em: For SEC_EXCLUDE sections, ensure that
4163 output_section is set non-NULL.
4165 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Return
4166 `true' for SEC_EXCLUDE sections so that the generic code doesn't
4167 needlessly create an output_section_statement. Treat a correctly
4168 named output_section_statement with NULL bfd_section as compatible.
4172 * emultempl/generic.em: Support EXTRA_EM_FILE.
4173 (ld_${EMULATION_NAME}_emulation): Support emulation parameters
4174 LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
4175 LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
4176 LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
4177 LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
4178 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
4179 LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
4180 LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
4181 LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
4182 LDEMUL_FIND_POTENTIAL_LIBRARIES.
4186 * scripttempl/elf.sc, scripttempl/elfd30v.sc,
4187 scripttempl/elfm68hc11.sc, scripttempl/elfm68hc12.sc,
4188 scripttempl/v850.sc: Keep .jcr data.
4194 * ldgram.y (had_script): Change name to saved_script_handle.
4195 Change type to file handle.
4196 * ld.h (had_script): Rename and retype.
4197 * ldfile.c (ldfile_open_command_file): Save the file handle
4198 used in saved_script_handle.
4199 * lexsup.c (parse_args): Do not allow -c option to alter
4200 saved_script_handle.
4201 * ldmain.c (main): Print out the linker script used if
4202 --verbose is given. Check saved_script_handle to obtain the
4203 external linker script used, or if NULL, dump the builtin
4205 * ld.texinfo: Document that --verbose now dumps the linker
4206 script used, regardless of whether it was an internal or an
4211 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
4213 * configure: Regenerate.
4217 * emultempl/elf32.em (output_prev_sec_find): Add missing prototype.
4219 * scripttempl/elf.sc: Move non-text .dynamic section before
4220 .plt/.got/.sdata* group.
4221 (OTHER_GOT_SECTIONS): Move to immediately after .got.
4222 (OTHER_SDATA_SECTIONS): Add.
4223 * emulparams/criself.sh: Use OTHER_SDATA_SECTIONS rather than
4225 * emulparams/crislinux.sh: Likewise.
4226 * emulparams/elf32b4300.sh: Likewise.
4227 * emulparams/elf32bmip.sh: Likewise.
4228 * emulparams/elf32bmipn32.sh: Likewise.
4229 * emulparams/elf32bsmip.sh: Likewise.
4230 * emulparams/elf32btsmip.sh: Likewise.
4231 * emulparams/elf32ebmip.sh: Likewise.
4232 * emulparams/elf32elmip.sh: Likewise.
4233 * emulparams/elf32l4300.sh: Likewise.
4234 * emulparams/elf32lmip.sh: Likewise.
4235 * emulparams/elf32lsmip.sh: Likewise.
4236 * emulparams/elf32ltsmip.sh: Likewise.
4237 * emulparams/elf64bmip.sh: Likewise.
4238 * emulparams/elf64btsmip.sh: Likewise.
4239 * emulparams/elf64ltsmip.sh: Likewise.
4243 * genscripts.sh: Source the emulparams script before each output
4244 script is generated so that variables like `RELOCATING' may affect
4245 variables defined in the emulparams script.
4249 * emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this
4252 * emultempl/beos.em (sort_sections): Modify for 2001-08-03 change,
4253 ie. iterate over wild_statement.section_list.
4254 (gld${EMULATION_NAME}_place_orphan): Likewise.
4258 * scripttempl/elfm68hc12.sc (FINISH_CODE, FINISH_RELOC): New to handle
4259 .fini[0-4] sections used by _exit
4260 (CTOR, DTOR): Export ctor/dtor symbols; move them to ROM.
4261 (*.text,*.data,*.bss): Take into account .text.*, .data.*, .bss.*.
4262 * scripttempl/elfm68hc11.sc: Likewise.
4266 * emultempl/beos.em (init): Add the missing initialization.
4270 * ld.texinfo (Input Section Basics): Clarify ordering of output
4272 * ldlang.c (callback_t): Add wildcard_list param.
4273 (walk_wild_section): Remove "section" param. Rewrite for
4274 lang_wild_statement_type change. Remove unique_section_p test.
4275 (walk_wild_file): Remove "section" param.
4276 (walk_wild): Remove "section" and "file" params.
4277 (lang_gc_wild): Likewise.
4278 (wild): Likewise. Modify for lang_wild_statement_type change.
4279 (wild_sort): Likewise. Add "sec" param.
4280 (gc_section_callback): Likewise.
4281 (output_section_callback): Likewise. Do unique_section_p test.
4282 (map_input_to_output_sections): Modify call to wild.
4283 (lang_gc_sections_1): Likewise.
4284 (print_wild_statement): Modify for lang_wild_statement_type
4286 (lang_add_wild): Replace filename, filenames_sorted param with
4287 filespec. Replace section_name, sections_sorted,
4288 exclude_filename_list with section_list.
4289 * ldlang.h (lang_add_wild): Here too.
4290 (lang_wild_statement_type): Replace section_name, sections_sorted,
4291 and exclude_filename_list with section_list.
4292 * ldgram.y (current_file): Delete.
4293 (%union): Add wildcard_list.
4294 (file_NAME_list): Set type to wildcard_list. Build a linked list
4295 rather than calling lang_add_wild for each entry.
4296 (input_section_spec_no_keep): Call lang_add_wild here instead.
4297 * ld.h (struct wildcard_list): Declare.
4298 * mri.c (mri_draw_tree): Modify to suit new lang_add_wild.
4302 * ldmain.c (main): initialize link_info.pei386_auto_import
4303 * pe-dll.c: new tables for auto-export filtering
4304 (auto_export): change API, pass abfd for contextual filtering.
4305 Loop thru tables of excluded symbols instead of comparing
4310 * pe-dll.c: new variable pe_dll_enable_extra_debug. New
4311 static variable current_sec (static struct sec *). Add
4312 forward declaration for add_bfd_to_link.
4313 (process_def_file): Don't export undefined symbols. Do not
4314 export symbols starting with "_imp__". Call auto_export()
4316 (pe_walk_relocs_of_symbol): New function.
4317 (generate_reloc): add optional extra debugging
4318 (pe_dll_generate_def_file): eliminate extraneous initial blank
4320 (make_one): enlarge symtab to make room for __nm__ symbols
4321 (DATA auto-import support).
4322 (make_singleton_name_thunk): New function.
4323 (make_import_fixup_mark): New function.
4324 (make_import_fixup_entry): New function.
4325 (pe_create_import_fixup): New function.
4326 (add_bfd_to_link): Specify that 'name' argument is a CONST
4328 * pe-dll.h: declare new variable pe_dll_extra_pe_debug;
4329 declare new functions pe_walk_relocs_of_symbol and
4330 pe_create_import_fixup.
4331 * emultempl/pe.em: add new options --enable-auto-import,
4332 --disable-auto-import, and --enable-extra-pe-debug.
4333 (make_import_fixup): New function.
4334 (pe_find_data_imports): New function.
4335 (pr_sym): New function.
4336 (gld_${EMULATION_NAME}_after_open): Add optional extra pe
4337 debugging. Call pe_find_data_imports. Mark .idata as DATA, not
4342 * ld.texinfo: add additional documentation for
4343 --export-all-symbols. Document --out-implib,
4344 --enable-auto-image-base, --disable-auto-image-base,
4345 --dll-search-prefix, --enable-auto-import, and
4346 --disable-auto-import.
4347 * ldint.texinfo: Add detailed documentation on auto-import
4352 * ld.texinfo (Simple Assignments): Fix computation in SECTIONS
4357 * Makefile.am: Update dependencies with "make dep-am".
4358 * Makefile.in: Regenerate
4362 * ldcref.c (check_section_sym_xref): New function.
4363 (check_nocrossrefs): Call it.
4364 (check_nocrossref): Interate over h->refs here instead of..
4365 (check_refs): ..here. Pass in the symbol name, section, and bfd
4366 rather than hash_entry pointers.
4367 (struct check_refs_info): Keep symbol name rather than hash entry.
4369 (check_reloc_refs): Tweak for above changes in check_refs_info.
4370 Only report references to section syms when symname is NULL to
4371 prevent duplicate messages for the same reloc.
4375 * ldexp.c (exp_print_tree): Use stderr if config.map_file is not
4376 available. Do not print NULL trees.
4377 (exp_print_token): Print unknown tokens with values > 126 as
4378 decimal values not ASCII characters.
4380 * ldlang.c (lang_leave_overlay): If a region is specified assign
4381 it to all sections inside the overlay unless they have been
4382 assigned to the own, non-default, memory region.
4384 * README: Add header for consistency with other README files.
4388 * emultempl/elf32.em (output_prev_sec_find): Never return
4389 bfd_abs_section_ptr, bfd_com_section_ptr nor
4390 bfd_und_section_ptr.
4394 * Makefile.am (em32relf.c): Change dependency from generic.em to
4396 * Makefile.in: Regenerate.
4400 * configure.tgt (i386-*-netbsdelf*): New target.
4401 (i386-*-netbsd*): Set targ_extra_emuls to `elf_i386'
4405 * emultempl/elf32.em (output_prev_sec_find): New.
4406 (place_orphan): Use it.
4410 * ldmain.c (main): Fix typos in the last change.
4414 * ldmain.c (main): Disallow -F and -f without -shared.
4418 * emultempl/pe.em (after_open): Check for the output_bfd not
4419 having any coff_data structure allocated to it.
4423 * emultempl/elf32.em: Do not assuming that contents of the buffer
4424 returned from basename function will remain unchanged accross other
4429 * scripttempl/elf.sc (DYNAMIC_PAD): Revert the change made on
4430 2001-07-03. It creates dynamic entries even for static binaries.
4434 * scripttempl/elf.sc (DYNAMIC_PAD): New variable.
4435 (DYNAMIC): Use it to reserve few dynamic entries for
4440 * emulparams/hppa64linux.sh: New file.
4441 * configure.tgt: hppa*64*-*-linux* uses hppa64linux.sh
4442 * Makefile.am (ALL_64_EMULATIONS): Add ehppa64linux.o
4443 (ehppa64linux.c): Add rule to make it.
4445 * Makefile.in: Regenerate.
4449 * ld.texinfo (Options, -r): Mention restrictions when using
4450 different object formats.
4454 * ldlang.c (lang_check): Emit fatal error if relocatable link
4455 between different object flavours with relocations in input.
4459 * ld.texinfo (-E, --export-dynamic): Mention --version-script.
4460 (--version-script): Mention the language support.
4464 * ldlang.c (lang_check): Revert the change mode on 2001-06-15.
4468 * Makefile.am (ld.1): Remove the prefix `$(srcdir)/'.
4469 (diststuff): Add $(MANS).
4470 * Makefile.in: Regenerated.
4476 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
4477 Update for API change in bfd_elf${ELFSIZE}_size_dynamic_sections.
4478 * mpw-elfmips.c (gldelf32ebmip_before_allocation): Ditto.
4479 * ld.h (args_type): Remove member export_dynamic. All users
4480 changed to use struct bfd_link_info member.
4482 * Makefile.am (ecriself.c, ed10velf.c, ei386moss.c): Depend on
4483 $(srcdir)/emultempl/elf32.em, not $(srcdir)/emultempl/generic.em.
4484 * Makefile.in: Regenerate.
4488 * ldlang.c (init_os): Add the newline to the einfo call.
4489 (lang_check): Likewise.
4490 (lang_do_version_exports_section): Likewise.
4494 * lexsup.c (parse_args); Save optind to report unrecognized
4499 * ldlang.c (lang_check): Emit fatal error if relocatable link
4500 between different object flavours.
4502 * lexsup.c (parse_args) <case OPTION_EXPORT_DYNAMIC, case 'E'>:
4503 Set new link_info member export_dynamic.
4504 * ldmain.c (main): Initialize new link_info member export_dynamic.
4508 * ldlang.c (walk_wild): Only call walk_wild_file if
4509 lookup_name returns something.
4510 (lookup_name): If load_symbols fails, return NULL.
4511 (load_symbols): Change to a boolean function.
4512 (open_input_bfds): If load_symbols fails then do not make the
4517 * ldlang.c (record_bfd_errors): Remove.
4519 * emultempl/aix.em: Fix copyright dates.
4523 * elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase.
4524 (TEXT_START_ADDR): Likewise.
4528 * configure.host: Set HOSTING_CRT0/HOSTING_LIBS correctly for s/390.
4532 * emultempl/pe.em (init): Reduce default stack reserve to 0x200000.
4536 * ldlang.c (open_input_bfds): Don't change the bfd error
4537 handler whilst loading symbols.
4541 * configure.tgt: Remove i370-mvs architecture, it is not currently
4546 * emulparams/ppcmacos.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
4547 like emulparams/aixppc.sh.
4551 * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Move
4552 setting of output_filename after bfd_scan_arch.
4553 * emultempl/pe.em: Likewise.
4557 * emulparams/aixrs6.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
4558 like emulparams/aixppc.sh.
4560 * emultempl/aix.em (sc): Use ${srcdir}/emultempl/ostring.sed
4561 instead of ${srcdir}/emultempl/stringify.sed.
4565 * emulparams/elf64_aix.sh: Change settings to match IBM linker
4570 * configure.host: Replace linuxoldld with linux*oldld.
4571 * configure.tgt: Likewise.
4575 * emultempl/stringify.sed: Removed again.
4579 * emultempl/aix.em (OUTPUT_ARCH): Defined.
4580 (gld${EMULATION_NAME}_before_parse): Initialize
4581 ldfile_output_architecture, ldfile_output_machine and
4582 ldfile_output_machine_name from ${OUTPUT_ARCH} if possible.
4583 * emultempl/beos.em: Likewise.
4584 * emultempl/elf32.em: Likewise.
4585 * emultempl/linux.em: Likewise.
4586 * emultempl/mipsecoff.em: Likewise.
4587 * emultempl/pe.em: Likewise.
4588 * emultempl/sunos.em: Likewise.
4592 * emultempl/aix.em : (gld${EMULATION_NAME}_read_file)
4593 udate import file format.
4594 (change_symbol_mode) New, same
4595 (is_syscall) New, same
4596 * emulparams/aixppc.sh : add SYSCALL_MASK and SYMBOL_MODE_MASK
4597 * emulparams/aixppc64.sh : same
4598 * emulparams/aixrs6.sh : same
4599 * emulparams/ppcmacos.sh : same
4600 * emultempl/aix.em : use strtoull to parse options
4601 * Makefile.am : add eaixppc64 emulation for xcoff64
4602 * Makefile.in : same
4603 * configure.tgt : same
4605 * scripttempl/aix.sc : default text section offset to 0x10000000
4606 default data section offset to 0x20000000
4607 add .sv3264 and .sv64 pseudo sections
4608 loader and debug sections use the currect section offset.
4610 * emultempl/aix.em : Add xcoff64 support
4611 Add -binitfini support
4612 (gld${EMULATION_NAME}_before_parse) -binitfini
4613 (gld${EMULATION_NAME}_parse_args) same
4614 (gld${EMULATION_NAME}_before_allocation) format change for special
4617 * emulparams/aixppc64.sh : New file for xcoff64 support
4621 * emultempl/elf32.em (ELF_INTERPRETER_SET_DEFAULT): Use this new
4622 variable to avoid non-portable shell construct.
4626 * ldmain.c (get_emulation): Add -mips5 command line argument.
4630 * emulparams/elf_i386_ldso.sh: New, copied from elf_i386.sh.
4631 (ELF_INTERPRETER_NAME): Define it.
4632 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Use
4634 * configure.tgt (targ_emul, targ_extra_emuls)
4635 [i[3456]86-*-solaris2*, i[3456]86-*-solaris*]: Use elf_i386_ldso
4636 as primary, elf_i386 as extra.
4637 * Makefile.am (ALL_EMULATIONS): Added eelf_i386_ldso.o.
4638 (eelf_i386_ldso.c): New rule.
4639 * Makefile.in: Rebuilt.
4643 * lexsup.c (ld_options): Allow -I to be an alias for
4644 --dynamic-linker. This is for Solaris compatability.
4645 * ld.texinfo: Document that -I can be used.
4650 * ldlang.c (wild_doit): Use linker_has_input to reliably determine
4651 whether an input section is the first one assigned to an output
4653 Assorted formatting fixes.
4657 * Makefile.am (ld.dvi): Search bfd/doc for texinfo files.
4658 * Makefile.in: Ditto.
4662 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Put
4663 .gnu.linkonce.ia64unw{,i} sections into corresponding .IA_64.unwind*
4665 * emulparams/elf64_aix.sh (OTHER_READONLY_SECTIONS): Likewise.
4669 * ldlang.c (lang_process): Call bfd_merge_sections.
4673 * ldgram.y: Fix typo.
4677 * emultempl/elf32.em: Include "libiberty.h".
4678 (gld${EMULATION_NAME}_vercheck): Call basename () to get the
4679 basename of the bfd filename.
4680 (gld${EMULATION_NAME}_stat_needed): Likewise.
4681 (gld${EMULATION_NAME}_try_needed): Likewise.
4682 (gld${EMULATION_NAME}_open_dynamic_archive): Likewise.
4686 * emultempl/pe.em: Include <ctype.h>.
4690 * emulparams/elf32openrisc.sh: New file.
4692 * Makefile.am: Add OpenRISC target.
4693 * Makefile.in: Regenerated.
4695 * configure.tgt: Add openrisc-*-* mapping.
4699 * emultempl/aix.em: Replace buystring with xstrdup.
4700 * emultempl/beos.em: Replace buystring with xstrdup.
4704 * ldfile.c: Include "libiberty.h".
4705 * ldlex.l: Likewise.
4707 * ldmisc.c (buystring): Removed.
4708 * ldmisc.h: Likewise.
4710 * ldfile.c: Replace buystring with xstrdup.
4711 * ldlang.c: Likewise.
4712 * ldlex.l: Likewise.
4713 * ldmain.c: Likewise.
4714 * ldmisc.c: Likewise.
4715 * lexsup.c: Likewise.
4716 * mpw-eppcmac.c: Likewise.
4720 * emulparms/elf_x86_64.sh (MAXPAGESIZE): Fix value.
4724 * ldlang.c (load_symbols): Give emulation a chance
4725 to process unrecognized file before fatal error is
4726 reported, not after.
4730 * configure.tgt: Add arm-vxworks target.
4731 * scripttempl/armcoff.sc: Support .text or .data as a section name
4737 * ld.texinfo: Document --fatal-warnings.
4740 * ldmisc.c (vfinfo): Set flag to inhibit making executable if
4741 warnings have been turned into errors.
4742 * lexsup.c (OPTION_WARN_FATAL): Define.
4743 (ld_options): Entry for --fatal-warnings.
4744 (parse_args): Handle OPTION_WARN_FATAL.
4745 * ld.h (ld_config_type): Add fatal_warnings field.
4749 * ldmain.c (main): Default to discard_sec_merge.
4750 * lexsup.c (OPTION_DISCARD_NONE): Define.
4751 (ld_options): Add --discard-none.
4752 (parse_args): Handle OPTION_DISCARD_NONE.
4753 * ldlang.c (wild_doit): SEC_MERGE should be set in the output
4754 section only if SEC_MERGE and SEC_STRINGS flags and entsize of
4755 all its input sections match.
4759 * Makefile.am (ALL_EMULATIONS): Add eelf32ltsmip.o.
4760 (ALL_64_EMULATIONS): Add eelf64btsmip.o and eelf64ltsmip.o.
4761 (eelf32ltsmip.c): New target.
4762 (eelf64btsmip.c): Likewise.
4763 (eelf64ltsmip.c): Likewise.
4764 * Makefile.in: Regenerated.
4766 * configure.tgt (mips*el-*-linux-gnu): Uses traditional MIPS
4768 (mips*-*-linux-gnu*): Likewise.
4770 * emulparams/elf32ltsmip.sh: New. Traditional little endian
4772 * emulparams/elf64btsmip.sh: New. Traditional 64bit big endian
4774 * emulparams/elf64ltsmip.sh: New. Traditional 64bit little
4779 * emulparams/criself.sh (EXECUTABLE_SYMBOLS): Cannot provide
4780 correct value of __Stext here.
4781 (TEXT_START_SYMBOLS): Define; always define __Stext, to start of
4784 * emulparams/crislinux.sh: Remove FIXME.
4788 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 64k.
4789 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Likewise.
4793 * configure.tgt (cris-*-*): Change default emulation to criself.
4794 (cris-*-*aout*): New rule.
4798 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 0x4000.
4799 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
4803 * ld.texinfo (Overview): Fix syntax in texi code.
4807 * ld.texinfo: Put @c man indications to generate the ld man page.
4808 When generating man, define all the variables. Define SEEALSO
4809 and SYNOPSIS. Re-organize some lines to avoid the cross references.
4810 * Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variables.
4811 (ld.1): Generate from ld.texinfo.
4812 * Makefile.in: Regenerate.
4816 * scripttempl/i386go32.sc: Support the GCC flags '-ffunction-sections'
4817 and '-fdata-sections'. Set the VMA of STABS sections to zero.
4821 * emultmpl/elf32.em (gld${EMULATION_NAME}_search_needed): If NAME
4822 is an absolute path look only for this file and not along the path.
4826 * emultempl/elf32.em (OPTION_GROUP): New macro.
4827 Add new option Bgroup to longopts.
4828 (gld*_parse_args): Handle GROUP_OPTION and recognize -z defs.
4829 (gld*_list_options): Add -Bgroup and -z defs.
4830 * ld.1: Document -Bgroup and -z defs.
4831 * ld.texinfo: Likewise.
4835 * scripttempl/elfd10v.sc (.rodata,.rodata1,.data1,.sdata): Deal
4836 with sections created by -fdata-sections.
4837 (.dynbss,.bss): Ditto.
4841 * emultempl/m68kelf.em (m68k_elf_after_allocation): Call
4842 after_allocation_default, not gld..._before_allocation.
4846 * configure.in (BFD_VERSION): New.
4847 (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
4848 * configure: Regenerate.
4849 * Makefile.am: Run "make dep-am"
4850 * Makefile.in: Regenerate.
4854 * emulparams/elf64_aix.sh: Add additional read-only sections;
4855 uncomment lines which are now required.
4859 * ldlang.c (open_input_bfds): Set the bfd error handler so
4860 that problems can be caught whilst loading symbols.
4861 (record_bfd_errors): New function: Report BFD errors and mark
4862 the executable output as being invalid.
4866 * configure.host: Add configuration for ia64-*-aix*.
4867 * Makefile.am (ALL_64_EMULATIONS): Add emulation for ia64-*-aix*.
4868 Add dependencies for eelf64_aix.c.
4869 * Makefile.in: Regenerate.
4870 * configure.tgt: Add ia64-*-aix* mapping.
4871 * emulparams/elf64_aix.sh: Add settings for elf64 on aix5.
4875 * ldfile.c (ldfile_open_file): Set entry->search_dirs_flag to
4876 false if we found the file.
4880 * configure.tgt: Add FreeBSD/Alpha, FreeBSD/x86-64, FreeBSD/ia64,
4881 FreeBSD/PowerPC, FreeBSD/arm, and FreeBSD/sparc64 entries.
4885 * Makefile.am: Add PDP-11 target.
4886 * configure.tgt: Likewise.
4887 * emulparams/pdp11.sh: New file.
4891 * configure.host: Add a generic FreeBSD configuration entry such that
4892 all [modern] FreeBSD systems on all platforms will look the same.
4896 * configure.tgt: Remove mention of earmelf_linux26.
4900 * emulparams/elf64_ia64.sh (OTHER_GOT_SYMBOLS): Remove.
4904 * ldexp.h (node_type): Add etree_provided.
4905 * ldexp.c (exp_fold_tree): Handle etree_provided. Set the node
4906 type to etree_provided if defined by PROVIDE. Allow updating
4908 (exp_print_tree): Handle etree_provided.
4909 * mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle
4914 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add
4915 .IA_64.unwind.* pattern to unwind table section and
4916 .IA_64.unwind_info* pattern to unwind info section.
4920 * Makefile.am: Add linux target for S/390.
4921 * Makefile.in: Likewise.
4922 * configure.host: Likewise.
4923 * configure.tgt: Likewise.
4924 * emulparams/elf64_s390.sh: New file.
4925 * emulparams/elf_s390.sh: New file.
4929 * configure.tgt (sparc64-*-linux-gnu*): Add elf32_sparc into
4931 (sparc-*-linux-gnu*): Add elf64_sparc into targ_extra_libpath.
4935 * Makefile.am: Remove mention of earmelf_linux26.
4936 * Makefile.in: Regenerate.
4940 * emulparams/armelf_linux.sh (TEXT_START_ADDR): Set to 0x8000.
4941 * emulparams/armelf_linux26.sh: Delete.
4942 * configure.tgt: Remove mention of armelf_linux26 emulation.
4946 * ld.1: Replace occurances of -oformat with --oformat.
4950 * ldlang.c (lang_leave_overlay): Don't set lma_region when
4951 load_base is specified.
4955 * emultempl/elf32.em: Correct spelling in comments and listed
4960 * ldlang.c (lang_leave_overlay): Only set lma_region from the
4961 default for the first section of a group of overlay sections.
4965 * Makefile.am (GENSCRIPTS): Pass exec_prefix.
4966 * Makefile.in: Regenerate.
4967 * genscripts.sh: Use exec_prefix parameter to specify tool lib.
4968 Check for null tool_dir.
4972 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add IA_64.unwind
4973 and IA_64.unwind.info.
4977 * ldlang.c (lang_check): Merge the private data only if the
4978 input file has contents.
4982 * emulparams/hppalinux.sh (OUTPUT_FORMAT): Set to elf32-hppa-linux.
4984 * emultempl/hppaelf.em (hppaelf_after_parse): New function,
4985 enabling search for libmilli. On a relocatable link, make .text
4987 (LDEMUL_AFTER_PARSE): Define.
4988 (hppaelf_finish): Correct spelling of relocatable in comments.
4990 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
4991 rummage through the script for sections on the unique list.
4992 Correct length of strncmp for ".note".
4993 (gld${EMULATION_NAME}_check_needed): Rearrange function.
4995 * ldlang.c (unique_section_list): New var.
4996 (unique_section_p): New function.
4997 (walk_wild_section): Don't match sections on unique_section_list.
4998 (lang_add_unique): New function.
4999 Correct spelling of relocatable in comments.
5001 * ldlang.h (struct unique_sections): Declare.
5002 (unique_section_list): Declare.
5003 (unique_section_p): Declare.
5004 (lang_add_unique): Declare.
5006 * lexsup.c (ld_options): Allow --unique to take an optional arg.
5007 (parse_args [OPTION_UNIQUE]): Call lang_add_unique.
5009 * ld.texinfo (--unique): Update.
5013 * lexsup.c (parse_args): Remove spurious white space.
5017 * lexsup.c (parse_args): Update copyright date.
5021 * configure.host: Set HOSTING_LIBS appropriately for ix86-cygwin.
5025 * scripttempl/h8300.sc: Fix formatting. Fix a comment typo.
5026 * scripttempl/h8300h.sc: Fix formatting.
5027 * scripttempl/h8300s.sc: Likewise.
5028 * scripttempl/h8500.sc: Likewise.
5029 * scripttempl/h8500b.sc: Likewise.
5030 * scripttempl/h8500c.sc: Likewise.
5031 * scripttempl/h8500m.sc: Likewise.
5032 * scripttempl/h8500s.sc: Likewise.
5036 * emultempl/elf32.em: Only perform Linux ld hints processing when
5041 * ld.texinfo (Bug Reporting): Update email address for reports.
5045 * lexsup.c (parse_args): Set opterr to 0 and detect unparsed long
5046 options by checking for a return value of '?' not -1.
5050 * lexsup.c (struct ld_option): Add new enum value:
5052 (ld_options[]): Change -omagic, -output and -oformat options
5053 to be EXACTLY_TWO_DASHES.
5054 (OUTPUT_COUNT): Use ARRAY_SIZE.
5055 (parse_args): Change parameter 'argc' to unsigned.
5056 Place EXACTLY_TWO_DASHES options into new really_longopts
5058 If getopt_long_only fails, try calling getopt_long using the
5059 really_longopts array.
5060 (help): Print a double dash for both EXACTLY_TWO_DASHES and
5063 * ldlex.h: Fix prototype of parse_args.
5065 * ld.texinfo: Document that long options starting with 'o'
5066 must be preceeded by two dashes. Change example of a single
5067 dashed long option from -oformat to -trace-symbol.
5071 * emultempl/pe.em (OPTION_NO_DEFAULT_EXCLUDES): Define.
5072 (longopts[]): New --no-default-excludes option.
5073 (gld_${EMULATION_NAME}_list_options): Document.
5074 (gld_${EMULATION_NAME}_parse_args): Handle.
5078 * ldlang.c (new_stat): Revert the last beautification with "innocent"
5079 whitespace, it breaks the K&R C preprocessor.
5083 * ld.texinfo: Add notes about --whole-archive and gcc.
5087 * lexsup.c (OPTION_ALLOW_SHLIB_UNDEFINED): Define.
5088 (ld_options): Entry for --allow-shlib-undefined.
5089 (parse_args): Handle OPTION_ALLOW_SHLIB_UNDEFINED.
5090 * ldmain.c (main): Initialize link_info.allow_shlib_undefined
5092 * ld.texinfo: Document new command line switch.
5096 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS):
5097 .fixup is actually read/write.
5098 * emulparams/elf32lppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
5099 * emulparams/elf32ppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
5100 * emulparams/elf32lppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
5104 * NEWS: Add note about x86_64 architecture.
5108 * scripttempl/i386go32.sc: Use PROVIDE with _etext, _edata, _end.
5109 Set DWARF2 sections to a VMA of zero.
5113 * configure.tgt (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
5115 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5116 (sparc*-*-rtems*): Switched from a.out to ELF.
5120 * Makefile.am (ALL_EMULATIONS): Add eelf_x86_64.o
5121 (eelf_x86_64.c): New.
5122 * Makefile.in: Regenerate.
5123 * configure.tgt: Add support for x86_64-*-linux-gnu*.
5124 * emulparams/elf_x86_64.sh: New.
5128 * emulparams/crislinux.sh (ENTRY): Change back to _start.
5129 (TEXT_START_SYMBOLS): Remove conditional setting of __start.
5131 * scripttempl/crisaout.sc: Change all RELOCATING not related to
5132 merging non-a.out sections into CONSTRUCTING.
5136 * ld.1 (COPYING): Mention that the GNU Free Documentation
5137 License is present in the sources, but not the output, and
5138 also available from the GNU website.
5139 (GNU Free Documentation License): Comment out this section.
5143 * emulparams/elf64alpha.sh (ENTRY): Remove leading underscore as ELF
5148 * ld.1: Remove old date so it does not give the impression the manpage
5153 * configure.tgt (xscale-coff): Add target.
5154 (xscale-elf): Add target.
5158 * ldmain.c (main): Remove redundant init of config.make_executable
5163 * emulparams/elf64alpha.sh (MAXPAGESIZE): Typo -- 64k, not 1M.
5167 * scripttempl/h8300.sc: Fix formatting.
5168 * scripttempl/h8300h.sc: Likewise.
5169 * scripttempl/h8300s.sc: Likewise.
5173 * scripttempl/elf32avr.sc: Fix bug in .eeprom segment.
5177 * emultempl/pe.em: Define ___start_SECNAME and ___stop_SECNAME
5178 around orphan sections whose names can be represented in C.
5182 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): New local
5183 hold_sdata. If SEC_SMALL_DATA set, set place to hold_sdata.
5187 * ld.texinfo: Add GNU Free Documentation License.
5188 * ldint.texinfo: Add GNU Free Documentation License.
5189 * ld.1: Add GNU Free Documentation License.
5193 * ldlex.l (yy_create_string_buffer): Init yy_is_our_buffer,
5194 yy_is_interactive, yy_at_bol, and yy_fill_buffer.
5196 * Makefile.am (DISTCLEANFILES): Add stringify.sed.
5197 Move 2000-11-02 Makefile.in changes to this file.
5198 * Makefile.in: Regenerate.
5202 * scripttempl/h8300.sc: Use ${CONSTRUCTING...} to enclose
5203 constructors and destructors.
5204 * scripttempl/h8300h.sc: Ditto.
5205 * scripttempl/h8300s.sc: Ditto.
5206 * scripttempl/h8500.sc: Ditto.
5207 * scripttempl/h8500b.sc: Ditto.
5208 * scripttempl/h8500c.sc: Ditto.
5209 * scripttempl/h8500m.sc: Ditto.
5210 * scripttempl/h8500s.sc: Ditto.
5211 * scripttempl/v850.sc: Ditto.
5212 * scripttempl/w65.sc: Ditto.
5213 * scripttempl/z8000.sc: Ditto.
5217 * Makefile.in (e_i386_chaos.c): New rule.
5218 (ALL_EMULATIONS): Added e_i386_chaos.o.
5219 * emulparams/elf_i386_chaos.sh: New file.
5220 * configure.tgt: Recognise i[3456]86-chaosdev-storm-chaos.
5224 * emulparams/elf64_sparc.sh (TEXT_START_ADDR,
5225 NONPAGED_TEXT_START_ADDR): Set to 4GB for Solaris targets.
5226 Fix sed invocation, so that it coped with '/' in Solaris 64bit
5227 library path suffix.
5232 * scripttempl/crisaout.sc (.text, .data): Pad, with ALIGN (32),
5233 for consecutive sections.
5237 * lexsup.c: New option OPTION_TARGET_HELP. Prints all target specific
5239 * ld.texinfo: Added notes about this new option.
5243 * emultempl/pe.em (_after_open): Add tests of return values from
5244 bfd functions. Emit appropriate error messages if necessary.
5248 * emultempl/pe.em (_after_open): Delete 'is2' and 'nsyms'
5249 local variables - they are not used, but leave in the call to
5250 bfd_canonicalize_symtab.
5251 (_open_dynamic_archive): Add #ifdef DLL_SUPPORT around use of
5252 pe_dll_search_prefix.
5256 * emultempl/pe.em (pe_dll_search_prefix): New variable,
5257 (longopts): New --dll-search-prefix option.
5258 (gld_${EMULATION_NAME}_list_options): Document.
5259 (gld_${EMULATION_NAME}_parse_args): Handle.
5260 (gld_${EMULATION_NAME}_open_dynamic_archive): When linking
5261 dynamically, search for a dll named '<prefix><basename>.dll'
5262 in preference to 'lib<basename>.dll' if --dll-search-prefix
5267 * ldlang.c (section_already_linked): Set kept_section instead of
5272 * deffile.h: Fix formatting.
5273 * lexsup.c: Likewise.
5278 * pe-dll.c (make_one): Do not generate code thunk for DATA
5280 (process_def_file): deduce DATA flag for auto-export sumbols.
5284 * ld.h: Fix formatting.
5285 * ldcref.c: Likewise.
5286 * ldctor.h: Likewise.
5287 * ldemul.c: Likewise.
5288 * ldemul.h: Likewise.
5289 * ldexp.c: Likewise.
5290 * ldexp.h: Likewise.
5291 * ldfile.c: Likewise.
5292 * ldfile.h: Likewise.
5293 * ldlang.c: Likewise.
5294 * ldlang.h: Likewise.
5295 * ldmain.c: Likewise.
5296 * pe-dll.c: Likewise.
5298 * pe-dll.c: Revert some formatting fixes.
5302 * pe-dll.c: Fix formatting.
5306 * ldlang.c: Fix formatting.
5310 * pe-dll.c (fill_edata): initialize entire block
5311 (make_one): fill in correct section.
5315 * ldexp.c: Fix formatting.
5319 * emultempl/pe.em (gld_*_after_open): detect case where there two
5320 import libraries for same dll; rename one to ensure proper link
5323 * pe-dll.c (process_def_file): compare ordinals to -1, not 0; fix
5325 (generate_edata): fix typo
5329 * scripttempl/crisaout.sc (ENTRY): Now __start.
5330 (.text): Add default setting for __start.
5331 Remove CONSTRUCTORS handling.
5332 (/DISCARD/): Add .gnu.warning.*.
5333 * emulparams/crislinux.sh (ENTRY): Now __start.
5334 (TEXT_START_SYMBOLS): New; provide __Stext and __start default.
5335 * emulparams/criself.sh (OUTPUT_FORMAT): Now elf32-us-cris.
5336 (ENTRY): Now __start.
5337 (INITIAL_READONLY_SECTIONS): Add KEEP for .startup.
5338 (EXECUTABLE_SYMBOLS): Add default setting for __start.
5342 * deffile.h: Fix formatting.
5344 * ldcref.c: Likewise.
5345 * ldctor.c: Likewise.
5346 * ldctor.h: Likewise.
5347 * ldemul.c: Likewise.
5348 * ldemul.h: Likewise.
5349 * ldexp.c: Likewise.
5350 * ldexp.h: Likewise.
5351 * ldfile.c: Likewise.
5352 * ldfile.h: Likewise.
5353 * ldlang.c: Likewise.
5354 * ldlang.h: Likewise.
5355 * lexsup.c: Likewise.
5357 * pe-dll.c: Likewise.
5361 * pe-dll.c (process_def_file): Uninitialized data wasn't
5362 exported with --export-all-symbols switch.
5366 * pe-dll.c (fill_edata): rearrange the data so that ordinals and
5367 noname work properly.
5371 * ld.texinfo (HPPA ELF32): New section.
5373 * emultempl/hppaelf.em (group_size): New.
5374 (hppaelf_finish): Pass group_size to elf32_hppa_size_stubs.
5375 (PARSE_AND_LIST_PROLOGUE): Add OPTION_STUBGROUP_SIZE.
5376 (PARSE_AND_LIST_LONGOPTS): Add --stub-group-size. Duplicate
5377 options to prevent abbreviations matching.
5378 (PARSE_AND_LIST_OPTIONS): Describe the above. Reformat.
5379 (PARSE_AND_LIST_ARGS_CASES): Handle it.
5383 * emultempl/m68kelf.em: Conditionalise the embedded relocs feature
5384 on the m68*-*-elf target. Make it support COFF input objects.
5388 * ldmain.c: Fix formatting.
5389 * ldmisc.c: Likewise.
5390 * ldver.c: Likewise.
5391 * ldwrite.c: Likewise.
5395 * ldwrite.c (clone_section): Silence gcc warnings.
5399 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Handle
5400 out of memory failure.
5402 * ldwrite.c (ldwrite): Remove unnecessary einfo arg.
5403 (clone_section): Handle out of memory failures. Rename var to
5404 avoid c++ reserved word.
5408 * emultempl/hppaelf.em (hppaelf_add_stub_section): Rename
5409 stub_name param to stub_sec_name.
5410 (hppaelf_finish): Modify call to elf32_hppa_size_stubs.
5414 * emultempl/m68kelf.em: New file.
5415 * emulparams/m68kelf.sh (EXTRA_EM_FILE): Use it.
5416 * Makefile.am (em68kelf.c): Add dependency on m68kelf.em.
5417 * Makefile.in: Regenerate.
5421 * emulparams/hppalinux.sh (DATA_START_SYMBOLS): Provide $global$
5426 * ldmain.c (multiple_definition): Disable relaxation if
5427 multiple symbol definitions are encountered - otherwise the
5428 linker could abort with an assertion failure.
5432 * mri.c: Fix formatting.
5436 * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
5437 * configure: Rebuild.
5441 * Makefile.am (lexsup.o): Also depend on $(INCDIR)/demangle.h.
5442 * Makefile.in: Rebuild.
5446 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Fix
5447 broken list handling. Create __start_SECNAME and __stop_SECNAME
5448 when no place-holder. Add some comments. Test both SEC_CODE and
5449 SEC_READONLY for hold_text to prevent .rodata orphan poisoning.
5450 Handle case where no output section statement created.
5454 * configure.tgt (sh-*-linux*): Added.
5455 * Makefile.am: Added eshelf_linux and eshlelf_linux.
5456 * Makefile.in: Rebuilt.
5457 * emulparams/shelf_linux.sh: New file.
5458 * emulparams/shlelf_linux.sh: New file.
5462 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
5463 try shuffling sections when the orphan happens to be the place
5464 holder. Keep count of unique section names generated so we speed
5465 the search for a new name.
5469 * configure: Rebuilt with new libtool.m4.
5473 * Makefile.in: Regenerate.
5474 * aclocal.m4: Regenerate.
5475 * configure: Regenerate.
5476 * config.in: Regenerate.
5477 * po/ld.pot: Regenerate.
5479 * ldint.texinfo: Remove CVS revision marker - it foils local
5482 * emultempl/ticoff.em: Remove extraneous comma.
5486 * emultempl/hppaelf.em (hppaelf_add_stub_section): Add SEC_RELOC
5487 to stub section flags.
5488 (hppa_for_each_input_file_wrapper): New.
5489 (hppa_lang_for_each_input_file): New.
5490 (lang_for_each_input_file): Define to call above.
5491 (multi_subspace): New.
5492 (hppaelf_finish): Pass multi_subspace to elf32_hppa_size_stubs.
5493 (PARSE_AND_LIST_PROLOGUE): Define.
5494 (PARSE_AND_LIST_LONGOPTS): Define.
5495 (PARSE_AND_LIST_OPTIONS): Define.
5496 (PARSE_AND_LIST_ARGS_CASES): Define.
5497 (hppaelf_finish): Call elf32_hppa_set_gp.
5498 (hppaelf_set_output_arch): Remove.
5499 (LDEMUL_SET_OUTPUT_ARCH): Remove.
5501 * emulparams/hppalinux.sh (ELFSIZE): Define.
5503 (OTHER_READONLY_SECTIONS): Define.
5505 (GENERATE_SHLIB_SCRIPT): Define.
5507 * ldlang.c: Add missing prototypes, and tidy others. Change CONST
5508 to const throughout. Change `void *' to `PTR' throughout.
5509 (lang_memory_default): Function is local to file, add `static'.
5511 * Makefile.am (ehppaelf.c): Depend on emultempl/elf32.em.
5512 (ehppalinux.c): Likewise.
5513 (earmelf.c): Likewise.
5514 (earmelf_linux.c): Likewise.
5515 (earmelf_linux26.c): Likewise.
5516 * Makefile.in: Regenerate.
5518 * ld.h (ld_config_type): Add unique_orphan_sections.
5519 * lexsup.c (OPTION_UNIQUE): Define.
5520 (ld_options): Add "--unique".
5521 (parse_args): Handle it.
5522 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
5523 search for an existing output section if unique_orphan_sections is
5524 set. Make use of bfd_get_unique_section_name rather than
5525 duplicating code here.
5526 * ld.texinfo: Describe --unique.
5528 * lexsup.c (ld_options): Make split-by-reloc arg optional. Add
5529 optional arg to split-by-file.
5530 (parse_args): Handle them.
5531 * ld.texinfo: Update description of these options.
5532 * ldwrite.c (clone_section): Pass in the section name. Replace
5533 local code with bfd_get_unique_section_name.
5534 (split_sections): Tidy code and comments. Use a list traversal
5535 more appropriate to the list construction. Handle cooked section
5536 sizes. Split when split_by_reloc reached rather than exceeded.
5537 Track section size and split when split_by_file reached. Fix
5538 link_order_tail (even though it's not used).
5539 (ldwrite): Modify condition for calling split_sections to suit
5540 changed split_by_reloc and split_by_file.
5541 * ldmain.c (main): Init config.split_by_reloc and
5542 config.split_by_file to -1.
5543 * ld.h (ld_config_type): Change split_by_reloc to unsigned.
5544 Change split_by_file to bfd_size_type.
5548 * configure.in: Increase version number to 2.10.91.
5549 * NEWS: Mention new ability to support removal of duplicate DWARF2
5551 * configure: Regenerate.
5552 * aclocal.m4: Regenerate.
5553 * config.in: Regenerate.
5557 * scripttempl/elf.sc: Add .gnu.linkonce.wi.* to .debug_info
5559 * scripttempl/elf32avr.sc: Ditto.
5560 * scripttempl/elfd10v.sc: Ditto.
5561 * scripttempl/elfd30v.sc: Ditto.
5562 * scripttempl/elfi370.sc: Ditto.
5563 * scripttempl/elfm68hc11.sc: Ditto.
5564 * scripttempl/elfm68hc12.sc: Ditto.
5565 * scripttempl/elfi386beos.sc: Ditto.
5566 * scripttempl/v850.sc: Ditto.
5570 * acinclude.m4: Include libtool and gettext macros from the
5572 * aclocal.m4, configure: Rebuilt.
5576 * ldlang.c (open_output): When choosing the target for a
5577 particular endianness, do nothing if the target is not
5582 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
5583 check -rpath nor LD_RUN_PATH for cross link.
5584 * ld.texinfo: Document the change.
5588 * NEWS: Mention support for CRIS.
5592 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Get
5593 the current runpath list from bfd_elf_get_runpath_list ()
5598 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search
5599 the DT_RPATH/DT_RUNPATH entries for DT_NEEDED after
5600 LD_LIBRARY_PATH for native linker. Display the needed DSO if
5601 trace_file_tries is non-zero.
5602 (gld${EMULATION_NAME}_try_needed): Report the needed DSO found
5603 if trace_file_tries is non-zero.
5605 * ld.texinfo: Document the usage of DT_RPATH/DT_RUNPATH.
5610 * NEWS: Mention i860 support.
5614 * scripttempl/elf.sc: Fix last change to use correct comment
5619 * scripttempl/elf.sc: Add a comment giving the correspondence
5620 between sections, per-datum sections, and linkonce sections. Make
5621 the comment true even for .bss, .sdata, .sdata2, .sbss, and
5626 * emulparams/elf32_i860.sh: New file.
5627 * configure.tgt: Recognize new target i860-stardent-{sysv4*|elf*}.
5628 * Makefile.am (ALL_EMULATIONS): Add eelf32_i860.o.
5629 (eelf32_i860.c): New rule.
5630 * Makefile.in: Regenerate.
5634 * emulparams/mipspe.sh (ENTRY): Add definition.
5638 * emultempl/elf32.em (_after_close): Refer to -rpath not --rpath
5643 * scripttempl/elfm68hc11.sc: Define __bss_size symbol to indicate
5644 the final size of .bss section.
5645 * scripttempl/elfm68hc12.sc: Likewise.
5649 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Rename to
5650 gld${EMULATION_NAME}_parse_args for consistency. Combine
5651 lastoptind and prevoptind vars, and keep track of last optind.
5652 (gld_${EMULATION_NAME}_list_options): Rename to
5653 gld${EMULATION_NAME}_list_options.
5657 * configure.tgt: Select targ_emul=elf_i386 for Unixware 7
5658 (i586-sco-sysv5uw7.1.0).
5662 * emulparams/elf64alpha.sh (PARSE_AND_LIST_ARGS): Removed.
5663 (PARSE_AND_LIST_PROLOGUE): New.
5664 (PARSE_AND_LIST_LONGOPTS): Likewise.
5665 (PARSE_AND_LIST_OPTIONS): Likewise.
5666 (PARSE_AND_LIST_ARGS_CASES): Likewise.
5667 (PARSE_AND_LIST_EPILOGUE): Likewise.
5671 * emultempl/armelf.em: Elide functions common to elf32.em,
5672 ie. most of the file.
5673 (arm_elf_after_open): New. Do arm specific things then call
5674 gld${EMULATION_NAME}_after_open.
5675 (arm_elf_before_allocation): New. Call
5676 gld${EMULATION_NAME}_before_allocation then do arm specifics.
5677 (PARSE_AND_LIST_PROLOGUE): Define.
5678 (PARSE_AND_LIST_SHORTOPTS): Define.
5679 (PARSE_AND_LIST_LONGOPTS): Define.
5680 (PARSE_AND_LIST_OPTIONS): Define.
5681 (PARSE_AND_LIST_ARGS_CASES): Define.
5682 (LDEMUL_AFTER_OPEN): Define.
5683 (LDEMUL_BEFORE_ALLOCATION): Define.
5684 (LDEMUL_BEFORE_PARSE): Define.
5685 (LDEMUL_FINISH): Define.
5687 * emultempl/hppaelf.em: Similarly zap most of this file.
5688 (hppaelf_add_stub_section): Prototype.
5689 (hppaelf_layaout_sections_again): Prototype.
5690 (hook_in_stub): Prototype.
5691 (LDEMUL_SET_OUTPUT_ARCH): Define.
5692 (LDEMUL_FINISH): Define.
5693 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
5695 * emulparams/armelf.sh (TEMPLATE_NAME): Use elf32.
5696 (EXTRA_EM_FILE): New.
5697 * emulparams/armelf_linux.sh: Likewise.
5698 * emulparams/armelf_linux26.sh: Likewise.
5699 * emulparams/hppalinux.sh: Likewise.
5700 * emulparams/hppaelf.sh: Likewise.
5703 * emultempl/elf32.em: Fix formatting.
5704 (EXTRA_EM_FILE): Source it.
5705 (LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
5706 LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
5707 LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
5708 LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
5709 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
5710 LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
5711 LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
5712 LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
5713 LDEMUL_FIND_POTENTIAL_LIBRARIES): New shell vars. Add code to
5714 allow functions in this file to be overridden.
5715 (PARSE_AND_LIST_SHORTOPTS): Handle it.
5717 * emultempl/m68kcoff.em: Include ldfile.h before ldemul.h.
5719 * emultempl/elf32.em: Reorganize file.
5723 * emulparams/elf64alpha.sh: Implement "-taso" emulation
5724 specific option to fit 64-bit executable in the lower
5725 31-bit address range. This is done by changing start
5726 address of .interp (the very first section of executable)
5727 and then setting EF_ALPHA_32BIT elf header flag.
5731 * emultempl/m68kcoff.em: New file.
5732 * emulparams/m68kcoff.sh (TEMPLATE_NAME): Use m68kcoff template.
5733 * Makefile.am (em68kcoff.c): Depend on m68kcoff.em rather than
5735 * Makefile.in: Regenerate.
5739 * emultempl/elf32.em (longopts): Duplicate "disable-new-dtags"
5740 and "disable-new-dtags" to stop getopt from treating -d/-e as
5741 abbreviations for these options.
5745 * ld.texinfo: Add documentation for --disable-new-dtags and
5748 * ldmain.c (main): Initialize link_info.new_dtags to false.
5750 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Add
5751 --disable-new-dtags and --enable-new-dtags.
5752 (gld_${EMULATION_NAME}_list_options): Likewise.
5756 * lexsup.c: Add optional style to demangle switch
5757 * ld.texinfo: Document optional style to demangle switch.
5761 * Makefile.am (ALL_EMULATIONS): Add ecrisaout.o, ecriself.o,
5763 (ecrisaout.c, ecriself.c, ecrislinux.c): New rules.
5764 Regenerate dependencies.
5765 * Makefile.in: Rebuild.
5766 * configure.tgt (cris-*-*): New target.
5767 * emulparams/crisaout.sh, emulparams/criself.sh,
5768 emulparams/crislinux.sh, scripttempl/crisaout.sc: New files.
5769 * po/POTFILES.in, po/ld.pot: Regenerate.
5773 * emultempl/elf32.em (gld_${EMULATION_NAME}_list_options):
5774 Print out ignored -z options.
5778 * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Removed.
5779 (PARSE_AND_LIST_PROLOGUE): New.
5780 (PARSE_AND_LIST_LONGOPTS): Likewise.
5781 (PARSE_AND_LIST_OPTIONS): Likewise.
5782 (PARSE_AND_LIST_ARGS_CASES): Likewise.
5784 * ldmain.c (main): Clear link_info.flags and link_info.flags_1.
5786 * lexsup.c (ld_options): Comment out 'z'.
5787 (parse_args): Likewise.
5789 * emultempl/elf32.em: Include "elf/common.h".
5790 (gld_${EMULATION_NAME}_parse_args): Defined. Handle some -z
5792 (gld_${EMULATION_NAME}_list_options): Likewise.
5794 * ld.texinfo: Add documentation for the recognized -z options.
5798 * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call
5799 bfd_elf_set_dt_needed_soname ().
5803 * pe-dll.c (pe_dll_id_target): check object target name also
5807 * scripttempl/elf.sc (.init): Only do ${INIT_START} and
5808 ${INIT_END} if relocating.
5809 (.fini): Likewise ${FINI_START} and ${FINI_END}.
5813 * emultempl/pe.em (gld_*_open_dynamic_archive): New search
5814 order for dynamic library '-lfoo' on pei386: libfoo.dll.a,
5815 foo.dll.a, libfoo.a, libfoo.dll, foo.dll. This fixes compatibility
5816 errors introduced by the old dynamic lib search order.
5820 * pe-dll.c (process_def_file): auto-export data items also
5821 (pe_process_import_defs): also see if _imp_ form needed
5825 * pe-dll.c (make_one): fix a typo in the __imp_ name decoration
5826 for dll import libraries
5830 * scripttempl/i386go32.sc: Support the g++ attribute init_priority in
5831 gcc 2.95.2 and later.
5835 * ldfile.c (ldfile_try_open_bfd): Output '\n' after an error
5840 * ldemul.h (struct lang_input_statement_struct): Remove forward
5842 (struct search_dirs): Likewise.
5843 * ldfile.h (struct lang_input_statement_struct): Likewise.
5844 Protect file from multiple inclusion.
5845 * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Move file_chain
5846 declaration from macro to file scope.
5848 * ldemul.c: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this order.
5849 * ldgram.y: Likewise here.
5850 * ldlang.c: And here.
5851 * ldmain.c: And here.
5852 * mpw-elfmips.c: And here.
5853 * mpw-eppcmac.c: And here.
5854 * emultempl/aix.em: And here.
5855 * emultempl/armcoff.em: And here.
5856 * emultempl/armelf.em: And here.
5857 * emultempl/armelf_oabi.em: And here.
5858 * emultempl/beos.em: And here.
5859 * emultempl/elf32.em: And here.
5860 * emultempl/hppaelf.em: And here.
5861 * emultempl/linux.em: And here.
5862 * emultempl/lnk960.em: And here.
5863 * emultempl/pe.em: And here.
5864 * emultempl/sunos.em: And here.
5865 * mpw-esh.c: And here. Include ldexp.h and ldlang.h too.
5866 * mpw-idtmips.c: Ditto.
5867 * emultempl/generic.em: Ditto.
5868 * emultempl/gld960.em: Ditto.
5869 * emultempl/gld960c.em: Ditto.
5870 * emultempl/mipsecoff.em: Ditto.
5871 * emultempl/ticoff.em: Ditto.
5872 * emultempl/vanilla.em: Ditto.
5874 * pe-dll.c: Include ldfile.h
5875 * ldver.c: Include ldexp.h, ldlang.h, ldfile.h
5877 * mpw-elfmips.c: (gldelf32ebmip_before_allocation): Add missing
5878 arguments to bfd_elf32_size_dynamic_sections call.
5879 (gldelf32ebmip_place_orphan): Add missing arguments to
5880 lang_leave_output_section_statement call.
5884 * emultempl/pe.em (pe_enable_stdcall_fixup): Protect with
5886 (strhash): Likewise.
5887 (compute_dll_image_base): Likewise.
5888 (pe_undef_found_sym): Likewise.
5889 (pe_undef_cdecl_match): Likewise.
5890 (gld_${EMULATION_NAME}_open_dynamic_archive): Mark the
5891 argument "arch" with ATTRIBUTE_UNUSED.
5895 * configure.tgt: Remove extraneous hppa*-*-linux-gnu*.
5898 * ldwrite.c (SSIZE): Remove to cure macro redefinition warning.
5902 Changes to create multiple linker stubs, positioned immediately
5903 before the section where they are required.
5904 * emultempl/hppaelf.em: Include elf32-hppa.h.
5905 (stub_sec, file_chain): Delete.
5906 (hppaelf_create_output_section_statements): Don't make a stub
5908 (hook_stub_info): New struct.
5909 (hook_in_stub): New function.
5910 (hppaelf_add_stub_section): New function.
5911 (hppaelf_finish): Do nothing for relocateable links. Modify the
5912 call to elf32_hppa_size_stubs. Move code for updating section
5914 (hppaelf_layaout_sections_again): ..to here, a new function.
5916 * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Fix
5917 broken list handling. Pass in a pointer to the list.
5918 (hppaelf_finish): Update call to hppaelf_delete_padding_statements
5920 (hppaelf_before_parse): Prototype.
5921 (hppaelf_set_output_arch): Prototype.
5922 (hppaelf_create_output_section_statements): Prototype.
5923 (hppaelf_delete_padding_statements): Prototype.
5924 (hppaelf_finish): Prototype.
5927 * emultempl/hppaelf.em: Include ctype.h.
5928 (struct orphan_save): New.
5929 (gld${EMULATION_NAME}_place_orphan): New.
5930 (output_rel_find): New.
5931 (hppaelf_get_script): Update from elf32.em.
5932 (ld_hppaelf_emulation): Rename to ld_${EMULATION_NAME}_emulation.
5933 Change emulation_name field to "${EMULATION_NAME}". Add
5934 gld${EMULATION_NAME}_place_orphan.
5936 * Makefile.am (ALL_EMULATIONS): Reinstate ehppaelf.o, add
5937 ehppalinux.o, sort it. Regenerate dependencies.
5938 (ehppalinux.c): Depend on hppaelf.em
5939 * Makefile.in: Regenerate.
5941 * configure.tgt: targ_emul=hppalinux for hppa*linux
5943 * emulparams/hppalinux.sh: New.
5944 * emulparams/hppaelf.sh (TARGET_PAGE_SIZE): Write in hex.
5948 * lexsup.c (parse_args): Copy section name.
5952 * emultempl/pe.em: institute the following search order for
5953 dynamic libraries on pei386: libfoo.dll.a, foo.dll.a (import
5954 libs), libfoo.dll, foo.dll (link direct to dll). Fall back to
5955 static lib (libfoo.a) if none of the above are found.
5959 * emultempl/pe.em (pe_enable_auto_image_base): New variable.
5960 (longopts): New --{enable,disable}-auto-image-base options.
5961 (gld_${EMULATION_NAME}_list_options): Document.
5962 (gld_${EMULATION_NAME}_parse): Handle.
5963 (strhash): New static function.
5964 (compute_dll_image_base): New static function.
5965 (gld_${EMULATION_NAME}_set_symbols): Use.
5973 * configure.tgt: Add traditional mips (mips*-*-sysv4*) target.
5974 * emulparams/elf32btsmip.sh: New file.
5975 * Makefile.am: Add traditional mips target.
5976 * Makefile.in: Rebuild.
5980 * Makefile.am (EXTRA_ld_new_SOURCES): Set to deffilep.y for
5981 automake to use YLWRAP.
5982 * Makefile.in: Rebuild.
5986 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
5987 (CLEANFILES): Add DEPA.
5988 * Makefile.in: Regenerate.
5990 2000-06-30 Timothy Wall <twall@ppc>
5992 * scripttempl/tic54xcoff.sc: PAGE N is not implemented, so encode
5993 the page in the upper octet of the address.
5997 * emulparams/avrmega161.sh (ARCH): Change to avr:5.
6001 * NEWS: arm-elf does --gc-sections too.
6005 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
6007 * Makefile.in: Regenerate.
6011 * Makefile.am: Rebuild dependency.
6012 * Makefile.in: Rebuild.
6016 * Makefile.am: Rebuild dependency.
6017 * Makefile.in: Rebuild.
6021 * scripttempl/tic54xcoff.sc: New.
6022 * ldlang.c (wild_doit): Propagate SEC_BLOCK flag.
6023 * gen-doc.texi: Add flag for TI COFF.
6024 * ld.texinfo: Add documentation for TI COFF handling switches.
6025 * emultempl/ticoff.em: New. TI COFF handling.
6026 * configure.tgt: Add tic54x target.
6027 * Makefile.am: Add tic54x target.
6028 * Makefile.in: Ditto.
6032 * ldmain.c (set_scripts_dir): Correct pointer comparison when
6033 checking for backslashes.
6037 * NEWS: Move entries not in 2.10 above "Changes in version 2.10".
6041 * NEWS: Update list of targets supporting --gc-sections.
6043 * scripttempl/elf.sc: KEEP .eh_frame contents.
6044 * scripttempl/elfd30v.sc: Same here.
6048 * Makefile.am (ALL_EMULATIONS): Added new emulation for m68hc12
6050 * Makefile.in: Rebuild.
6051 * configure.tgt: Recognize m68hc12 and m68hc11.
6052 * scripttempl/elfm68hc12.sc: New file.
6053 * emulparams/m68hc12elfb: New emulation.
6054 * emulparams/m68hc12elf: New emulation.
6055 * emulparams/m68hc11elfb.sh: New file. User configurable emulation
6056 (includes a memory.x script to define the ROM and RAM banks).
6057 * scripttempl/elfm68hc11.sc, emulparams/m68hc11elf.sh:
6058 New configuration files for support of Motorola 68hc11
6062 * ldmain.c (main): Only change SEC_READONLY for final link.
6066 * configure: Regenerate.
6070 * configure.in (VERSION): Update to show this is the CVS mainline.
6074 * emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all
6075 input objects to be ECOFF.
6076 (check_sections): einfo takes %B, not %P, to print a BFD name.
6080 * ldgram.y (vers_defns): Handle 'extern "C++" { ... }' in
6083 * ldlex.l (V_IDENTIFIER): Accept `::' in symbols.
6087 * emulparams/avr1200.sh (STACK): Define as 0.
6088 * emulparams/avr23xx.sh (STACK): Define as last internal SRAM address.
6089 * emulparams/avr4433.sh (STACK): Likewise.
6090 * emulparams/avr44x4.sh (STACK): Likewise.
6091 * emulparams/avr85xx.sh (STACK): Likewise.
6092 * emulparams/avrmega103.sh (STACK): Likewise.
6093 * emulparams/avrmega161.sh (STACK): Likewise.
6094 * emulparams/avrmega603.sh (STACK): Likewise.
6095 * scripttempl/elf32avr.sc (__data_start): Define for gcrt1.
6096 (__stack): Define from ${STACK} for main().
6100 * Makefile.am: Update dependencies with "make dep-am"
6101 * Makefile.in: Regenerate.
6105 * ldmain.c: Include filenames.h.
6106 (set_scripts_dir): Support backslashes in program name.
6110 * ldmain.c (main): When deciding if ".text" section should be
6111 read-only, don't forget to reset SEC_READONLY because it
6112 could be already set.
6116 * ld.1: Add documentation for new command line option:
6117 --section-start <sectionname>=<sectionorg>
6118 This is a generic version of -Ttext etc. which accepts
6119 any section name as a parameter instead of just text/data/
6121 * ld.texinfo: More docs.
6123 * lexsup.c: (parse_args): Recognize new command line option.
6124 (ld_options): Add new option.
6128 * lexsup.c (parse_args): `i' == `r', not `q'.
6132 * configure.tgt (hppa*64*-*-*): Enable PA64 target.
6137 Add support for '-q' == '--emit-relocs' switch.
6138 * ldmain.c (main): Default to false.
6139 * lexsup.c (parse_args): Turn on emitrelocations flag if set.
6140 * NEWS: Describe the emitrelocations switch.
6141 * ld.texinfo: Describe the emitrelocations switch.
6145 * emultempl/pe.em (_open_dynamic_archive): New function: Search
6146 the library path for "foo.dll" and "libfoo.dll" dynamic libraries
6147 before searching for 'libfoo.a' in response to a '-Bdynamic -lfoo'
6152 * lexsup.c (parse_args): Update the year in the copyright notice.
6156 * ld.h (gettext, dgettext, dcgettext, textdomain, bindtextdomain):
6157 Replace defines with those from intl/libgettext.h to quieten gcc
6162 * ldlang.c (open_input_bfds): Don't load the same file within
6163 a group again if the whole archive has been loaded already.
6168 * lexsup.c (set_section_start): Use bfd_scan_vma rather than
6173 * configure.host (ia64-*-linux-gnu*): Change gcc to ${CC}.
6175 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
6176 host "ia64-*-linux-gnu*".
6180 * ld.h: Correctly check GCC version.
6184 * Makefile.am: Add PA64 support. Add missing dependencies for
6186 * Makefile.in: Rebuilt.
6187 * configure.tgt: Add PA64 support (currently disabled).
6191 * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Delete.
6192 (output_rel_find): New function.
6193 (hold_section, hold_use): Delete.
6194 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
6195 hold_interp): Make local to place_orphan.
6196 (gld${EMULATION_NAME}_place_orphan): Use lang_output_section_find
6197 rather than place_section to find possible previous use of orphan.
6198 Similarly find the place-holder output sections. Use returned
6199 value from lang_enter_output_section_statement rather than calling
6200 lang_output_section_statement_lookup.
6201 * emultempl/armelf.em: Same here.
6202 * emultempl/pe.em: Similar to above, but no need for output_rel_find.
6204 * ldlang.c (lang_enter_output_section_statement): Return output
6206 * ldlang.h (lang_enter_output_section_statement): Change
6209 * ldlang.h (lang_output_section_statement): Export it.
6210 * ldlang.c (lang_output_section_statement): Ditto.
6214 * ld.texinfo (Output Section Data): Add note that section data
6215 commands cannot appear outside of section directives.
6219 * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support.
6224 * Makefile.am (ALL_64_EMULATIONS): Add eelf64_ia64.o.
6225 (eelf64_ia64.c): New rule.
6226 * Makefile.in: Rebuild.
6227 * configure.tgt (ia64-*-elf*, ia64-*-linux*): New targets.
6228 * emulparams/elf64_ia64.sh: New file.
6232 * scripttempl/elfd30v.sc: Place .gcc_except_table.
6236 * dep-in.sed: Match space at start of file name, not at end.
6240 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
6241 lang_leave_output_section_statement () after calling
6242 lang_enter_output_section_statement ().
6243 * emultempl/armelf.em: Likewise.
6247 * emultempl/elf32.em (struct orphan_save): Add section field.
6248 (gld${EMULATION_NAME}_place_orphan): Use above to keep sections in
6249 better order, and place first orphan section as we did before the
6250 2000-04-12 patch. Ignore ~SEC_ALLOC sections when choosing place.
6251 Don't call make_bfd_section here, let wild_doit do the job for us.
6252 Don't build a statement list when we'll only throw it away.
6253 * emultempl/armelf.em: Ditto.
6254 * emultempl/pe.em: Similarly.
6258 * scripttempl/elfppc.sc: Remove.
6259 * emulparams/elf32ppc.sh: Use elf.sc.
6260 * emulparams/elf32lppc.sh: Use elf.sc.
6261 * emulparams/elf32ppclinux.sh: Use elf.sc.
6262 * emulparams/elf32ppcsim.sh: New file.
6263 * emulparams/elf32lppcsim.sh: New file.
6264 * Makefile.am: Update dependencies. Add elf32ppcsim ad elf32lppcsim.
6265 (ALL_EMULATIONS): Add elf32ppcsim ad elf32lppcsim.
6266 * Makefile.in: Regenerate.
6267 * configure.tgt (powerpc-*): Add elf32ppcsim and elf32lppcsim.
6271 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Process
6272 ~SEC_ALLOC sections too. Init start address of debug sections.
6273 * emultempl/armelf.em (gld${EMULATION_NAME}_place_orphan): Ditto.
6274 * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Ditto.
6275 Also set all relocateable section start addresses.
6279 * scripttempl/elf.sc: Add support for .sbss2 and .sdata2 sections.
6280 Add new BSS_PLT variable for when .plt need not be contained in
6281 the file. Move _etext so that it is also after .fini, and provide
6282 both etext and _etext with a leading underscore. Mark the start
6287 * emultempl/elf32.em (struct orphan_save): New.
6288 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
6289 hold_interp): Make them struct orphan_save.
6290 (gld${EMULATION_NAME}_place_section): Modify for new hold_*.
6291 (gld${EMULATION_NAME}_place_orphan): Add new orphan sections to
6292 the end of the relevant section list. Also add associated section
6293 statements to the end of any previous orphan statements.
6294 * emultempl/armelf.em: Similarly.
6295 * emultempl/pe.em: Similarly.
6299 * ld.texinfo (Simple Example): Remove extraneous paragraph.
6303 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
6304 --enable-build-warnings option.
6305 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
6306 * Makefile.in, configure: Re-generate.
6310 * po/ld.pot: Regenerate.
6312 * lexsup.c (help): Restore translated part of bug string.
6314 * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
6315 (DEP): Quote when passing vars to sub-make. Add warning message
6317 (DEP1): Rewrite for "gcc -MM".
6318 (CLEANFILES): Add DEP2.
6319 Update dependencies.
6320 * Makefile.in: Regenerate.
6324 * ld.h: #include "bin-bugs.h"
6325 * lexsup.c (help): Use REPORT_BUGS_TO.
6329 * configure.tgt (avr-*-*): New target support.
6330 * Makefile.am: Likewise.
6331 * scripttempl/elf32avr.sc: New script file.
6332 * emulparams/avr1200.sh: New file.
6333 * emulparams/avr23xx.sh: New file.
6334 * emulparams/avr4433.sh New file.
6335 * emulparams/avr44x4.sh New file.
6336 * emulparams/avr85xx.sh New file.
6337 * emulparams/avrmega103.sh New file.
6338 * emulparams/avrmega161.sh New file.
6339 * emulparams/avrmega603.sh New file.
6340 * Makefile.in: Regenerate.
6344 * Makefile.am (check-DEJAGNU): Also unset LANG.
6345 * Makefile.in: Rebuild.
6349 * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
6354 * emulparams/elf32mcore.sh: Include "getopt.h".
6358 * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware.
6362 * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR.
6363 * emulparams/shpe.sh: Likewise.
6367 * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED
6368 to unused parameters.
6370 * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static
6371 functions only used by DLL code.
6372 (_place_orphan): Initialise 'dollar'.
6376 * ldmain.c (undefined_symbol): Take one more arg, fatal, to
6377 indicate if the undefined symbol is a fatal error or not.
6378 Don't delete the output file if "fatal" is false.
6382 * Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)".
6383 Set LC_COLLATE and LC_ALL to null and export them. It is for
6384 sort which expects the C locale.
6385 Add $(LIBS) to all $(HOSTING_LIBS).
6386 * Makefile.in: Rebuild.
6390 * emultempl/{aix.em, armcoff.em, armelf.em, armelf_oabi.em,
6391 beos.em, elf32.em, generic.em, gld960.em, gld960c.em, hppaelf.em,
6392 linux.em, lnk960.em, mipsecoff.em, sunos.em, vanilla.em}
6393 (ld_emulation_xfer_struct): Add missing NULL initialiser for
6394 find_potential_libraries.
6398 * ldgram.y (exclude_name_list): Don't require a comma to separate
6399 list entries; the lexer considers commas to be valid part of a
6400 filename, so in something like `foo, bar' the comma is considered
6401 part of the first filename, `foo,'.
6402 * ld.texinfo: Update section on EXCLUDE_FILE lists.
6406 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
6407 host "i[3456]86-*-freebsdelf*".
6411 * scripttempl/i386go32.sc: Move misplaced semicolons.
6415 * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o.
6416 (ALL_64_EMULATIONS): Remove eelf64hppa.o.
6417 (eelf64hppa.c, ehppaelf.c): Remove targets.
6418 * Makefile.in: Rebuild.
6422 * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on
6423 GNU/Linux/sparc, but keep the default as 32.
6425 * configure.tgt: Enable elf64_sparc on Solaris7+/sparc. And make
6426 it default if sparcv9 or sparc64.
6430 * Makefile.am: Add rules to build emipspe.o and earmpe.o.
6431 * Makefile.in: Regenerate.
6432 * configure.tgt: Add targets for arm-wince, sh-pe and mips-pe.
6434 * ldemul.h (ld_emulation_xfer_struct): Add new field:
6435 find_potential_libraries.
6436 * ldemul.c (ldemul_find_potential_libraries): New function.
6438 * ldfile.c (ldfile_open_file_search): Allow function to be
6440 (ldfile_open_file): Call ldemul_find_potential_libraries.
6441 * ldfile.h: Add prototype for ldfile_open_file_search.
6443 * pe-dll.c: Add support for ARM, MIPS and SH targets.
6445 * emulparams/mipspe.sh: New file. Parameters for mips-pe target.
6446 * emulparams/shpe.sh: New file. Parameters for sh-pe target.
6448 * emultempl/pe.em: Add support for ARM, MIPS and SH DLLs.
6449 (gld_X_find_potential_libraries): New function. Search for
6450 libraries called "*.lib".
6452 * scripttempl/pe.sc: Add .pdata section.
6456 * scripttempl/elfd10v.sc: Remove dynamic linking hooks.
6457 Add and use memory regions.
6461 * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New.
6463 * Makefile.am: Add support for Linux/IBM 370.
6464 * configure.tgt: Likewise.
6466 * Makefile.in: Regenerate.
6470 * ldlang.c (print_input_section, print_data_statement,
6471 print_reloc_statement, print_padding_statement, insert_pad,
6472 size_input_section, lang_check_section_addresses,
6473 lang_size_sections, lang_do_assignments, lang_set_startof,
6474 lang_one_common): Change `opb' to unsigned.
6475 (lang_do_assignments): Also change `size' to unsigned.
6479 * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION.
6483 * mri.c (mri_draw_tree): Add default LMA region argument to call
6484 to lang_leave_output_section_statement.
6485 * ldlang.h: Update prototypes with LMA region arguments.
6486 * ldlang.c (lang_size_sections): Encapsulate region bounds
6487 checking in os_check_region call.
6488 (os_check_region): New function.
6489 (lang_output_section_statement_lookup): Initialize lma_region.
6490 (lang_leave_output_section_statement): Add LMA region argument.
6491 (lang_leave_overlay): Ditto.
6492 * ldgram.y: Handle LMA region syntax.
6493 * ld.texinfo (Output Section Description): Describe LMA region usage.
6494 * emultempl/armelf.em (gld$place_orphan): Add default value for
6495 lma region in call to lang_leave_output_section_statement.
6496 * emultempl/elf32.em (gld$place_orphan): Add default value for
6497 lma region in call to lang_leave_output_section_statement.
6498 * emultempl/pe.em (gld$place_orphan): Add default value for
6499 lma region in call to lang_leave_output_section_statement.
6504 * ldlang.c (lang_check_section_addresses): Use bytes instead of
6505 octets when calculating section end addresses.
6509 * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation.
6513 * ldexp.c (fold_name): Make SIZEOF operator return byte count, not
6515 * ldlang.c (print_input_section, print_data_statement,
6516 print_reloc_statement, print_padding_statement): Print target
6517 address values and section sizes as bytes, not octets.
6518 (insert_pad) Calculate padding size in octets, and adjust "dot"
6520 (size_input_section) Always adjust "dot" by bytes, not octets.
6521 (lang_check_section_addresses, lang_do_assignments) Adjust
6522 "dot" by bytes, not octets. Use the larger of the directive size
6523 or octets_per_byte for the number of octets actually allocated in
6525 (lang_set_startof) Make sure STARTOF returns a target address.
6526 (lang_one_common) Record size changes in octets.
6527 (lang_abs_symbol_at_end_of) Section end symbol's value is
6528 recorded in target bytes.
6529 * ld.texinfo: Updated description of BYTE, SHORT, LONG, etc.
6530 to be clear about behavior when an octet is smaller than one byte.
6534 * ldcref.c (output_cref): Don't pass message strings to printf
6538 * ldmisc.c (vfinfo): Same here.
6543 * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em,
6544 generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em,
6545 mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct):
6546 Add missing NULL initialisers, and comments.
6550 * ldlang.c (lang_size_sections): Fix typo in comment.
6554 * ldlang.c (lang_size_sections): Also update the current
6555 address of a region if the SEC_NEVER_LOAD bit is not set.
6559 * configure.tgt (arm*-*-conix*): New target.
6563 * ld.texinfo (Options): Remind users to preceed linker command
6564 line switches with -Wl, (or whatever is appropriate) if it is
6565 being invoked by a comnpiler driver program.
6566 Fix description of the behaviour of the -n command line switch.
6570 * ld.h (wildcard_spec): Change exclude_name to exclude_name_list.
6572 * ld.texinfo (EXCLUDE_FILE): Update documentation.
6573 * ldgram.y (wildcard_spec): Support a list of excluded_files.
6574 (exclude_name_list): New.
6575 ldlang.c (walk_wild_section): Support list of excluded files.
6576 (print_wild_statement): Likewise.
6577 (lang_add_wild): Likewise.
6578 * ldlang.h (lang_wild_statement_type): Likewise.
6579 * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support.
6583 * pe-dll.c (pe_dll_warn_dup_exports): New variable.
6584 (process_def_file): Use.
6585 (pe_dll_compat_implib): New variable.
6588 * pe-dll.h: Add exports of pe_dll_warn_dup_exports and
6589 pe_dll_compat_implib.
6591 * emultempl/pe.em (longopts): Add warn-duplicate-exports and
6592 compat-implib options.
6593 (gld_${EMULATION_NAME}_list_options): List new options.
6594 (gld_${EMULATION_NAME}_parse_args): Handle.
6596 * pe-dll.c (pe_dll_generate_implib): Use the correct name for output
6599 * deffilep.y (opt_name): Allow "." in name.
6601 For older changes see ChangeLog-9899
6607 version-control: never