3 * ldlang.c (section_already_linked): Call bfd_discard_group. Typo fix.
7 * scripttempl/avr.sc: Changes to support current GCC and avr-libc,
8 C++ constructors/destructors, loosely based on the m68hc11 port.
12 * Makefile.in: Regenerate.
13 * aclocal.m4: Regenerate.
14 * config.in: Regenerate.
15 * configure: Regenerate.
19 * Makefile.am (ALL_EMULATIONS): Add ei386nto.o.
20 (ei386nto.c): Add rule.
21 * Makefile.in: Regenerate.
22 * configure.tgt: Add i[3456]86-*-nto-qnx*.
23 * emulparams/i386nto.sh: New file.
27 * NEWS: Add entry for VAX ELF support.
32 * Makefile.am (ALL_EMULATIONS): Add eelf32vax.o and evaxnbsd.o.
34 (evaxnbsd.c): New rules.
35 * Makefile.in: Regenerate.
36 * configure.tgt (vax-*-netbsdelf*)
38 (vax-*-netbsd*): New targets.
39 * emulparams/elf32vax.sh: New file.
40 * emulparams/vaxnbsd.sh: New file.
44 * emultempl/armelf.em (arm_elf_after_open): Don't determine
45 bfd_for_interwork, instead add glue sections to each input bfd.
46 (bfd_for_interwork): New global.
47 (arm_elf_set_bfd_for_interworking): New function.
48 (arm_elf_before_allocation): Use it.
52 * Makefile.am: Add DLX make target.
53 * configure.tgt: Add DLX configuration.
54 * Makefile.in: Regenerate.
55 * emulparams/elf32_dlx.sh: New file
56 * scripttempl/dlx.sc: New file
60 * Makefile.am (eelf_i386_chaos): Use elf_chaos.sc script.
61 * Makefile.in: Regenerate.
62 * emulparams/elf_chaos.sh: Use elf_chaos script.
63 * scripttempl/elf_chaos.sc: New file.
67 * ldlang.c (lang_size_sections_1): Move check for conflicting load
68 addresses and regions from here...
69 (lang_get_regions): ...to this new function.
70 (lang_leave_output_section_statement): Use lang_get_regions.
71 (lang_leave_overlay): Likewise.
72 * mri.c (mri_draw_tree): Pass null as last argument to
73 lang_leave_output_section_statement.
74 * emultempl/elf32.em (gld*_place_orphan): Likewise.
75 * emultempl/mmo.em (mmo_place_orphan): Likewise.
76 * emultempl/pe.em (gld*_place_orphan): Likewise.
80 * configure.tgt: Use ns32k-*-netbsd* instead of ns32k-pc532-netbsd*.
84 * ldemul.c: Fix formatting.
91 * ldlang.c (lang_process): Formatting, grammar.
93 * ldlex.l: Use #include "" instead of <> for local header files.
97 * configure.tgt: Add a target for i386-netbsdpe.
101 * scripttempl/elf.sc: Add .rel{,a}.t{bss,data}, .tdata and .tbss.
102 * ldlang.c (lang_add_section): Set SEC_THREAD_LOCAL for
103 output section if necessary. Handle .tbss.
104 (lang_size_sections): Clear _raw_size for .tbss section
105 (it allocates space in PT_TLS segment only).
106 * ldwrite.c (build_link_order): Build link order for .tbss too.
110 * configure.in: Correct spelling of AC_PREREQ.
114 * pe-dll.c (autofilter_liblist): Add more system libs excluded by
116 (autofilter_objlist): Add crtbegin.o, crtend.o.
120 * emultempl/pe.em (OPTION_EXCLUDE_LIBS): Add new define.
121 (longopts): Add new option --exclude-libs.
122 (gld_${EMULATION_NAME}_list_options): Give quick help about it.
123 (gld_${EMULATION_NAME}_parse_args): Use it.
124 * pe-dll.h (pe_dll_add_excludes): Add second param to prototype.
125 * pe-dll.c (exclude_list_struct): Add field type to distinguish symbols
127 (pe_dll_add_excludes): Set excludes->type.
128 (auto_export): Add new variable libname and set to archive basename if
129 abfd. Use it when filtering default and user-specified libarary
130 excludes. Let string "ALL" mean all libs when filtering user-specified
132 * ld.texinfo: Document --exclude-libs.
136 * ldemul.c (ldemul_new_vers_pattern): New function.
137 * ldemul.h (ldemul_new_vers_pattern): Declare.
138 (struct ld_emulation_xfer_struct): Add new_vers_pattern.
139 * ldlang.c (lang_new_vers_pattern): Call ldemul_new_vers_pattern.
140 * emultempl/ppc64elf.em (dotsyms): New static var.
141 (gld${EMULATION_NAME}_new_vers_pattern): New function.
142 (LDEMUL_NEW_VERS_PATTERN): Define.
143 (PARSE_AND_LIST_PROLOGUE): Add OPTION_DOTSYMS, OPTION_NO_DOTSYMS.
144 (PARSE_AND_LIST_LONGOPTS): Likewise.
145 (PARSE_AND_LIST_ARGS_CASES): Handle them.
146 * emultempl/aix.em (ld_${EMULATION_NAME}_emulation): Update
148 * emultempl/armcoff.em: Likewise.
149 * emultempl/armelf_oabi.em: Likewise.
150 * emultempl/beos.em: Likewise.
151 * emultempl/elf32.em: Likewise.
152 * emultempl/generic.em: Likewise.
153 * emultempl/gld960.em: Likewise.
154 * emultempl/gld960c.em: Likewise.
155 * emultempl/linux.em: Likewise.
156 * emultempl/lnk960.em: Likewise.
157 * emultempl/m68kcoff.em: Likewise.
158 * emultempl/mipsecoff.em: Likewise.
159 * emultempl/pe.em: Likewise.
160 * emultempl/sunos.em: Likewise.
161 * emultempl/ticoff.em: Likewise.
162 * emultempl/vanilla.em: Likewise.
166 * genscripts.sh (LIB_PATH): For native targets, concatenate $libdir
167 and $NATIVE_LIB_DIRS. Add $tool_lib before other libs.
168 (LIB_SEARCH_DIRS): No need to use "tr".
169 (COMPILE_IN): Only set for native targets.
170 * configure.host (NATIVE_LIB_DIRS): Specify all native search dirs
171 here, rather than adding lib:/usr/lib:/usr/local/lib in genscripts.sh.
172 * configure.tgt (powerpc*): Set tdir_*.
173 (powerpcle*): Correct targ_extra_emuls.
174 * emulparams/elf32ppc.sh (LIB_PATH): Set up native 64 bit dirs.
175 * emulparams/elf64ppc.sh (LIB_PATH): Likewise.
179 * emultempl/pe.em (set_pe_subsystem): Don't set "cmdline" when
180 calling lang_add_entry.
184 * emultempl/elf32.em (gld${EMULATION_NAME}_parse_args): Handle
186 (gld${EMULATION_NAME}_list_options): Add "-z muldefs".
188 * ld.texinfo: Updated for --allow-multiple-definition and
191 * ldmain.c (main): Initialize the allow_multiple_definition
194 * lexsup.c (OPTION_ALLOW_MULTIPLE_DEFINITION): New.
195 (ld_options): Add --allow-multiple-definition.
196 (parse_args): Support OPTION_ALLOW_MULTIPLE_DEFINITION.
200 * Makefile.am (ALL_EMULATIONS): Add earmelfb_nbsd.o.
201 (earmelfb_nbsd.c): New rule.
202 * Makefile.in: Regenerate.
203 * configure.tgt (armeb-*-netbsdelf*): New target.
204 (arm-*-netbsdelf*): Add armelfb_nbsd to targ_extra_emuls.
205 (arm-*-netbsd*): Likewise.
206 * emulparams/armelfb_nbsd.sh: New file.
210 * emultempl/aix.em (gld*_parse_args): Add -bnortl and -bnortllib
215 * Makefile.am: Add new emulations avr1, avr2, avr3, avr4, avr5.
216 * Makefile.in: Regenerate.
217 * configure.tgt (avr-*-*): Add avr[1-5] to targ_extra_emuls.
221 * emulparams/avr1.sh: New file.
222 * emulparams/avr2.sh: New file.
223 * emulparams/avr3.sh: New file.
224 * emulparams/avr4.sh: New file.
225 * emulparams/avr5.sh: New file.
226 * scripttempl/avr.sc: New file.
230 * ldlang.c (section_already_linked): Call bfd_link_just_syms.
231 (lang_place_orphans): Abort if just_syms_flag.
235 * emultempl/aix.em: (gld*_set_output_arch): New function. Use
236 architecture and machine information in the output bfd.
237 (gld*_before_parse): Remove old arch and machine code.
238 (choose_target): Rename to gld*_choose_target.
239 (rtld): Change type to int.
240 * ldfile.c (ldfile_try_open_bfd): Disable compatiblity check for
241 objects in XCOFF archives.
242 * ldfile.h: Update copyright date.
246 * ldmain.c (main): Enable -z combreloc by default.
250 * Makefile.am: Honour DESTDIR.
251 * Makefile.in: Regenerate.
255 * ldlang.h (lang_output_section_statement_type): Add update_dot_tree.
256 (lang_enter_overlay): Remove the last two parameters.
257 (lang_leave_overlay): Take them here instead.
258 * ldgram.y (memspec_at_opt): Set $$ to null if no region is given.
259 (section): Pass LMA and crossref flag to lang_leave_overlay rather
260 than lang_enter_overlay.
261 * ldlang.c (lang_memory_region_lookup): Return null for null names.
262 (lang_output_section_statement_lookup): Initialize update_dot_tree.
263 (lang_size_sections_1): Evaluate it.
264 (lang_leave_output_section_statement): Rework LMA lookup.
265 (overlay_lma, overlay_nocrossrefs): Remove.
266 (lang_enter_overlay): Remove LMA and crossref arguments.
267 (lang_enter_overlay_section): Don't set the LMA here.
268 (lang_leave_overlay): Take LMA and crossref arguments. Move the '.'
269 assignment to the last section's update_dot_tree. Unconditionally
270 use the load and run-time regions specified in the OVERLAY statement.
271 Likewise the first section's LMA. Only set the other sections' LMAs
272 when no load region is given.
276 * po/sv.po: New translation.
280 * emultempl/hppaelf.em (build_section_lists): New function.
281 (gld${EMULATION_NAME}_finish): Call elf32_hppa_setup_section_lists
282 and build_section_lists.
286 * ld.h: Fix formatting.
288 * ldfile.c: Likewise.
289 * ldlang.c: Likewise.
290 * ldmain.c: Likewise.
291 * lexsup.c: Likewise.
292 * pe-dll.c: Likewise.
296 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation):
297 Adjust for ppc64_elf_set_toc change. #include libbfd.h.
298 (build_section_lists): Do output_section tests here.
302 * emultempl/aix.em : (gld*_parse_arge): Formatting changes.
306 Long branch stubs, multiple stub sections.
307 * emultempl/ppc64elf.em: Include ldctor.h.
308 (stub_file): New var.
309 (group_size): New var.
310 (ppc_create_output_section_statements): New function.
311 (struct hook_stub_info): New.
312 (hook_in_stub): New function.
313 (ppc_add_stub_section): New function.
314 (ppc_layout_sections_again): New function.
315 (build_section_lists): New function.
316 (gld${EMULATION_NAME}_finish): Rewrite.
317 (real_func): New var.
318 (ppc_for_each_input_file_wrapper): New function.
319 (ppc_lang_for_each_input_file): New function.
320 (lang_for_each_input_file): Define.
321 (PARSE_AND_LIST_PROLOGUE): Define.
322 (PARSE_AND_LIST_LONGOPTS): Define.
323 (PARSE_AND_LIST_OPTIONS): Define.
324 (PARSE_AND_LIST_ARGS_CASES): Define.
325 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
329 * emultempl/aix.em (gld*_parse_arge, gld*_before_allocation): Add
330 -blibpath, -bnolibpath support.
334 * Makefile.am (ALL_EMULATIONS): Add elf32ppcwindiss.o.
335 (eelf32ppcwindiss.c): New target.
336 * Makefile.in: Regenerated.
337 * configure.tgt: Add support for powerpc-*-windiss.
338 * emulparams/elf32ppcwindiss.sh: New file.
342 * ldlang.c (print_assignment): Update print_dot for assignments to ".".
343 * ldexp.c (exp_print_token): Add "infix_p" argument.
344 (exp_print_tree): Update accordingly.
348 * Makefile.am (mpw): New maintainer mode rule to make mpw-*.c files.
349 * Makefile.in: Regenerate.
350 * mpw-elfmips.c: Delete.
351 * mpw-eppcmac.c: Delete.
353 * mpw-idtmips.c: Delete.
357 * emulparams/shelf32.sh (MACHINE): Now sh5.
361 * ldgram.y: Fix syntax warning.
365 * emultempl/armelf.em (PARSE_AND_LIST_SHORTOPTS): Add 'n' in order
366 to prevent "-n" from being taken as an abbreviation for
367 "--no-pipeline-knowledge".
371 * ldlang.c (lang_size_sections_1): Don't complain about
372 SEC_NEVER_LOAD sections having no memory region specified.
374 * ld.texinfo (Format Commands <OUTPUT_FORMAT>): Typo fix.
378 * ld/configure.host (*-*-netbsd*): Add support for NetBSD/ELF.
382 * dep-in.sed: Cope with absolute paths.
383 * Makefile.am (dep.sed): Subst TOPDIR and BFDDIR.
385 * Makefile.in: Regenerate.
389 * emulparams/elf64btsmip.sh: n64 replaces .reginfo with .MIPS.options.
393 * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: If common page size
394 is smaller than maximum, round dot up to common page boundary.
398 * configure.host: Set up for generic hosts first, then tweak as
399 necessary in more specific targets.
400 (HOSTING_LIBS): Include libgcc_eh.a if found.
404 * emulparams/elf_x86_64.sh (COMMONPAGESIZE): Set it.
408 * Makefile.am: Run "make dep-am".
409 * Makefile.in: Regenerate.
413 * genscripts.sh (LIB_SEARCH_DIRS): Quote path.
417 * ldlang.c (ldlang_add_undef): If the output bfd has been opened,
418 add the symbol to the linker hash table immediately.
419 (lang_place_undefineds): Split symbol creation out..
420 (insert_undefined): ..to here.
424 * emultempl/elf32.em: Use lbasename vs. basename to fix problem where
425 the contents of the buffer returned from basename function will are
426 getting overwritten while still being used.
432 * configure.tgt (x86_64-*-linux-gnu*): Configure i386 as native.
433 * elf_x86_64.sh (ARCH): Set to i386:x86-64
434 set libraries to default to lib64 paths.
438 * Makefile.am : Add eaix5ppc and eaix5rs6, AIX 5 support.
439 * configure.tgt : Same.
440 * emulparms/aix5ppc.sh : New file. For eaix5ppc.
441 * emulparms/aix5rs6.sh : New file. For eaix5rs6.
442 * emulparms/aixppc.sh : OUPUT_FORMAT_32BIT and OUTPUT_FORMAT_64BIT
443 emulation parameters for better -b32, -b64 support.
444 * emulparms/aixrs6.sh : Same.
445 * emulparms/ppcmacos.sh : Same.
446 * emultempl/aix.em (choose_target) : Use new emulation parameters
447 OUTPUT_FORMAT_32BIT and OUTPUT_FORMAT_64BIT.
448 * Makefile.in : Regenerate.
452 * po/fr.po: Updated version.
456 * ldmain.c (main): Move .text readonly flag fudges from here..
457 * ldlang.c (lang_process): ..to here.
461 * ldlang.c (lang_check): Remove the word size check added in last
462 change. Treat emitrelocations case as for relocatable links.
466 * po/fr.po: Updated version.
470 * ldlang.c (lang_check): Do relocatable link checks first, so that
471 warn_mismatch can't override. Check compatible and word size too.
475 * ld.texinfo: Wrap @menu in @ifnottex, not @ifinfo.
479 * scripttempl/elf.sc: Only use DATA_SEGMENT_END() together with
484 * scripttempl/elf.sc: Put .preinit_array, .init_array and
485 .fini_array in the data segment.
489 * scripttempl/elf.sc: Correct syntax errors in 2002-03-01 commit.
493 * scripttempl/elf.sc (SECTIONS): Add entries for .preinit_array,
494 .init_array, and .fini_array.
498 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't fold
499 .IA64_unwind* in a relocatable link.
503 * NEWS: Mark 2.12 branch.
507 * emulparams/elf64_s390.sh (ARCH): Change to "s390:64-bit".
508 * emulparams/elf_s390.sh (ARCH): Change to "s390:31-bit".
512 * emultempl/aix.em (gld*_parse_args): Add -brtl support.
513 (gld*_before_allocation): Same.
514 (gld*_create_output_section_statements): Generate
515 __rtinit if run time linking. Add librtl.a to the link.
516 (gld*_read_file): Clean.
520 * emulparams/elf64ppc.sh (OTHER_TEXT_SECTIONS): Define.
524 * Makefile.am: Add new files earmelf_fbsd, eelf32ppc_fbsd,
525 eelf_i386_fbsd, eelf64_ia64_fbsd, eelf_x86_64_fbsd, eelf64_sparc_fbsd,
526 and eelf64alpha_fbsd.
527 * Makefile.in: Regenerate.
528 * configure.tgt(sparc64-*-freebsd, ia64-*-freebsd, i[3456]86-*-freebsd,
529 x86_64-*-freebsd, arm-*-freebsd, alpha*-*-freebsd, powerpc-*-freebsd):
530 use a FreeBSD-specific emulation rather than the psABI one.
531 * emulparams/elf_fbsd.sh (ELF_INTERPRETER_NAME): Set appropriate value
532 for all FreeBSD ELF systems.
533 * emulparams/armelf_fbsd.sh: Bridge elf_fbsd.sh and the "native" psABI
535 * emulparams/elf32ppc_fbsd.sh: Likewise.
536 * emulparams/elf64_ia64_fbsd.sh: Likewise.
537 * emulparams/elf64_sparc_fbsd.sh: Likewise.
538 * emulparams/elf64alpha_fbsd.sh: Likewise.
539 * emulparams/elf_i386_fbsd.sh: Likewise.
540 * emulparams/elf_x86_64_fbsd.sh: Likewise.
544 * po/tr.po: Updated version.
548 * ld.texinfo (Output Section Fill): Fix amateur texinfo.
553 * emultempl/mmo.em (mmo_after_open): Don't call
554 _bfd_mmix_check_all_relocs when producing ELF output.
558 * emulparams/elf64alpha.sh (NOP): Adjust for big-endian
559 definition. Emit a unop+nop pair.
563 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Also check
564 for presence of .MMIX.reg_contents.linker_allocated before early
567 * NEWS: Mention support for MMIX.
571 Support arbitrary length fill patterns.
572 * ld.texinfo (Output Section Fill): Describe fill expressions.
573 (FILL): Refer to the above.
574 * ldexp.h (etree_value_type): Add "str" field.
575 (union etree_union): Add "str" to "value" struct.
576 (exp_bigintop): Declare.
577 (exp_get_fill): Declare.
578 * ldexp.c: Include "safe-ctype.h".
579 (exp_intop): Set value.str to NULL.
580 (exp_bigintop): New function.
581 (new_rel): Pass in "str", and set new.str from it.
582 (new_rel_from_section): Set new.str to NULL.
583 (fold_name): Adjust calls to new_rel.
584 (exp_fold_tree): Likewise.
585 (exp_get_fill): New function.
586 * ldgram.y (struct big_int bigint, fill_type *fill): New.
587 (INT): Returns a "bigint". Adjust all code handling INTs.
588 (fill_opt): Returns a "fill".
589 (fill_exp): Split out of fill_opt, use for FILL.
590 * ldlang.h (struct _fill_type): New.
591 (fill_type): Move typedef to ldexp.h.
592 (lang_output_section_statement_type): "fill" is now a pointer.
593 (lang_fill_statement_type): Likewise.
594 (lang_padding_statement_type): Likewise.
595 (lang_add_fill): Now takes a "fill_type *" param.
596 (lang_leave_output_section_statement): Likewise.
597 (lang_do_assignments): Likewise.
598 (lang_size_sections): Likewise.
599 (lang_leave_overlay_section): Likewise.
600 (lang_leave_overlay): Likewise.
601 * ldlang.c: Include ldgram.h after ldexp.h.
602 (lang_output_section_statement_lookup): Adjust for fill_type change.
603 (print_fill_statement): Likewise.
604 (print_padding_statement): Likewise.
605 (insert_pad): Now takes a "fill_type *" arg.
606 (size_input_section): Likewise.
607 (lang_size_sections_1): Likewise.
608 (lang_size_sections): Likewise.
609 (lang_do_assignments): Likewise.
610 (lang_add_fill): Likewise.
611 (lang_leave_output_section_statement): Likewise.
612 (lang_leave_overlay_section): Likewise.
613 (lang_leave_overlay): Likewise.
614 Adjust all callers of the above function.
615 * ldlex.l: Include ldgram.h after ldexp.h. Allow hex numbers
616 starting with "0X" as well as "0x". Return bigint.str for hex
617 numbers starting with "0x" or "0X", zero bigint.str otherwise.
618 Always use base 16 for numbers starting with "$".
619 * ldmain.c: Include ldgram.h after ldexp.h.
620 * ldwrite.c (build_link_order): Use bfd_data_link_order in place
621 of bfd_fill_link_order.
622 * pe-dll.c: Adjust lang_do_assignments calls.
623 * emultempl/elf32.em: Likewise.
624 * emultempl/hppaelf.em: Likewise.
625 * emultempl/ppc64elf.em: Likewise.
626 * emultempl/beos.em: Include ldgram.h after ldexp.h, adjust
627 lang_add_assignment call.
628 * emultempl/pe.em: Likewise.
632 * ld.texinfo (VERSION scripts): Symbol names are globbing patterns.
633 * ldgram.y (lang_new_vers_regex): Rename to lang_new_vers_pattern;
634 the pattern in question is not a regexp.
635 * ldlang.c: Likewise.
636 * ldlang.h: Likewise.
637 * ldlex.l (V_IDENTIFIER): Allow '[', ']', '-', '!', and '^' also.
641 * ldlex.l (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
642 * ldgram.y (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
643 (exp): Add DATA_SEGMENT_ALIGN (exp, exp) and DATA_SEGMENT_END (exp).
644 * ldexp.c (exp_data_seg): New variable.
645 (exp_print_token): Handle DATA_SEGMENT_ALIGN and DATA_SEGMENT_END.
646 (fold_binary): Handle DATA_SEGMENT_ALIGN.
647 (exp_fold_tree): Handle DATA_SEGMENT_END.
648 Pass allocation_done when recursing instead of hardcoding
649 lang_allocating_phase_enum.
650 * ldexp.h (exp_data_seg): New.
651 * ldlang.c (lang_size_sections_1): Renamed from lang_size_sections.
652 (lang_size_sections): New.
653 * ld.texinfo (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): Document.
654 * scripttempl/elf.sc: Use DATA_SEGMENT_ALIGN and DATA_SEGMENT_END
655 if COMMONPAGESIZE is defined.
656 * emulparams/elf_i386.sh (COMMONPAGESIZE): Set to 4K.
657 * emulparams/elf32_sparc.sh (COMMONPAGESIZE): Set to 8K.
658 * emulparams/elf64_sparc.sh (COMMONPAGESIZE): Set to 8K.
659 * emulparams/elf64alpha.sh (COMMONPAGESIZE): Set to 8K.
660 * emulparams/elf64_ia64.sh (COMMONPAGESIZE): Set to 16K for shared
665 * Makefile.in: Regenerate.
669 * lexsup.c: Remove strtoul declaration.
673 * ldmain.c: Add prototype for main ().
674 * lexsup.c: Guard declaration of strtoul with HAVE_STDLIB_H.
675 * emultempl/lnk960.em (lnk960_choose_target): Function should
680 * ldlang.c (entry_section): New initialised variable.
681 (lang_finish): Use it.
682 * ldlang.h (entry_section): Declare.
683 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Set
684 entry_section to ".opd".
688 * ld.texinfo (Options): Add back in -nostdlib documentation,
689 which had been inadvertently removed.
693 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Adjust
694 register section vma to a sane value after emitting error. Make
695 fatal conditions cause program exit when emitting message.
699 * configure.tgt: Add or32-*-rtems target.
705 * emulparams/shelf32.sh (STACK_ADDR): Define as formerly defined
706 in OTHER_RELOCATABLE_SECTIONS.
708 * emulparams/shelf32.sh (STACK_ADDR): Define.
709 (OTHER_RELOCATABLE_SECTIONS): Renamed to...
710 (OTHER_SECTIONS): this. Removed stack settings.
711 * emulparams/shelf64.sh (OTHER_RELOCATABLE_SECTIONS): Do not set.
712 (OTHER_SECTIONS): Reset after sourcing shelf32.sh.
714 * emultempl/sh64elf.em (sh64_elf_$_before_allocation): Disable
715 relaxing if any shmedia or mixed sections are found.
717 * emultempl/sh64elf.em (sh64_elf_before_allocation): Pass f to
718 einfo. Gracefully decline to output to non-elf formats.
720 * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS) <.stack>:
721 Default to _end aligned to next multiple of 0x40000, plus 0x40000.
722 * emulparams/shelf32.sh: Ditto.
724 * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Tweak
727 * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Avoid
728 non-portable shell constructs. From Hans-Peter Nilsson.
730 * emulparams/shelf64.sh (EXTRA_EM_FILE): Define empty.
731 * Makefile.am (eshelf64.c, eshlelf64.c, eshlelf32.c): Adjust
732 dependencies to the shell script include chain.
733 * Makefile.in: Regenerate.
735 * emultempl/sh64elf.em: Update and tweak comments.
736 (sh64_elf_${EMULATION_NAME}_after_allocation): Always allocate and
737 make a .cranges section SEC_IN_MEMORY.
739 * emultempl/sh64elf.em
740 (sh64_elf_${EMULATION_NAME}_before_allocation): Don't stop when
741 .cranges section found to be necessary; continue and set stored
742 section contents flags for sections with non-mixed contents.
743 Use a struct sh64_section_data container and sh64_elf_section_data
744 to store contents-type flags.
745 Remove unused update of "isec".
746 (sh64_elf_${EMULATION_NAME}_after_allocation): Only process
747 sections marked SHF_SH5_ISA32_MIXED. Use sh64_elf_section_data to
748 access contents-type flags. Assert that the associated container
749 is initialized. Use that container, not elf_gp_size, to hold size
750 of linker-generated cranges contents.
752 * emultempl/sh64elf.em
753 (sh64_elf_${EMULATION_NAME}_before_allocation): Exit early if
754 there's already a .cranges section. When section flag difference
755 is found, don't NULL-check cranges a second time. Tweak comments.
756 (sh64_elf_${EMULATION_NAME}_after_allocation): Use size after
757 merging, not max size, as size of ld-generated .cranges contents.
758 Don't set ELF section flags in output section. When checking for
759 needed .cranges descriptors, don't use a variable; compare
760 incoming ELF section flags directly to SHF_SH5_ISA32_MIXED. Tweak
763 * emultempl/sh64elf.em: New file.
764 * Makefile.am (eshelf32.c, eshlelf32.c): Adjust dependencies.
765 * Makefile.in: Regenerate.
766 * emulparams/shelf32.sh (OUTPUT_FORMAT): Only set if not set.
767 (OTHER_RELOCATING_SECTIONS): Ditto.
768 (EXTRA_EM_FILE): New, set to sh64elf if not set.
769 * emulparams/shlelf32.sh: Stub out all settings except
770 OUTPUT_FORMAT. Source shelf32.sh.
771 * emulparams/shelf64.sh: Similar, but also keep ELF_SIZE and
772 OTHER_RELOCATING_SECTIONS.
773 (OTHER_RELOCATING_SECTIONS): Remove .cranges.
774 * emulparams/shlelf64.sh: Stub out all settings except
775 OUTPUT_FORMAT. Source shelf64.sh.
777 * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS): Include
779 (DATA_START_SYMBOLS): Define, provide ___data.
780 (OTHER_READONLY_SYMBOLS): Define, provide ___rodata and align to 8
781 for consecutive .data section.
782 (OTHER_GOT_SECTIONS): Define, align to 8 for consecutive .bss
783 section after .data section.
784 * emulparams/shlelf64.sh: Ditto.
785 * emulparams/shelf32.sh: Ditto.
786 (ALIGNMENT): Define to 8.
787 * emulparams/shelf32.sh: Ditto.
789 * configure.tgt (sh64-*-elf*): Assign targ_extra_libpath to get
790 built-in linker scripts.
792 * emulparams/shlelf64.sh: New.
793 * emulparams/shelf64.sh: New.
794 * configure.tgt (sh64-*-elf*): Add shelf64 and shlelf64 to
796 * Makefile.am: Add support for shlelf64 and shelf64.
797 * Makefile.in: Regenerate.
799 * configure.tgt (sh64-*-elf*): Add shelf as default.
800 Add shlelf to targ_extra_emuls.
802 * emulparams/shelf32.sh: New file.
803 * emulparams/shlelf32.sh: New file.
804 * Makefile.am: Add support for shlelf32 and shelf32.
805 * configure.tgt: Map sh64-*-elf* to shlelf32 and shelf32.
806 * Makefile.in: Regenerate.
810 * ldlang.c (lang_reset_memory_regions): Rename from
811 reset_memory_regions. Change all callers. Make public.
812 * ldlang.h (lang_reset_memory_regions): Prototype.
813 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Call
814 lang_reset_memory_regions before lang_size_sections.
815 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
816 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Likewise.
820 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Use signed
821 arithmetic when checking for too many global registers.
825 * Makefile.am (ALL_EMULATIONS): Add ehppanbsd.o.
826 (ehppanbsd.c): New rule.
827 * Makefile.in: Regenerate.
828 * configure.tgt (hppa*-*-netbsd*): New target.
829 * emulparams/hppalinux.sh: Add comment to check other files
830 that source this file it is modified, and list which
832 * emulparams/hppanbsd.sh: New file.
836 * scripttempl/xstormy16.sc: Don't allocate extra space for the
841 Support on-demand global register allocation from
842 R_MMIX_BASE_PLUS_OFFSET relocs.
843 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Rename from
844 mmix_set_reg_section_vma. Call
845 _bfd_mmix_finalize_linker_allocated_gregs.
846 (mmix_before_allocation): New function.
847 (LDEMUL_AFTER_ALLOCATION): Set to mmix_after_allocation.
848 (LDEMUL_BEFORE_ALLOCATION): Define to mmix_before_allocation.
849 * scripttempl/mmo.sc (.text): Mark .init, .fini as KEEP.
850 (.MMIX.reg_contents): Add .MMIX.reg_contents.linker_allocated
851 before .MMIX.reg_contents.
852 * emultempl/mmo.em (gldmmo_before_allocation): Define to default.
853 (mmo_after_open): New function.
854 (LDEMUL_AFTER_OPEN): Define to mmo_after_open.
855 * emulparams/elf64mmix.sh (OTHER_SECTIONS): Tweak formatting. Add
856 .MMIX.reg_contents.linker_allocated before .MMIX.reg_contents.
860 * emulparams/or32.sh: New file.
861 * emulparams/or32elf.sh: New file.
862 * scripttempl/or32.sc: New file.
863 * configure.tgt : Add support for or32.
864 * configure: Regenerate
865 * Makefile.am: Add support for or32.
866 * Makefile.in: Regenerate.
867 * NEWS: Mention support for or32.
868 * po/ld.pot: Regenerate.
873 * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Define to be mipself.
874 * emultempl/mipself.em: New file to handle MIPS ELF embedded
875 reloc creation (ld --embedded-relocs).
879 * configure: Regenerated.
883 * Makefile.am (install): Depend on install-info.
884 * Makefile.in: Regenerate.
888 * ldmain.c (main): Use full sentences to ease translation.
892 * po/fr.po: Updated version.
896 * po/es.po: Updated version.
900 * ldlex.l (yy_input): Correct error check.
904 * ldmisc.c (demangle): Put back dots when string not demangled.
908 * emulparams/elf64alpha.sh (NOP): Use unop.
912 * ldlex.l: Use fread instead of read.
916 * configure.tgt (ia64-*-netbsd*): New target.
920 * emulparams/elf32btsmip.sh (SHLIB_TEXT_START_ADDR): Change to
922 * emulparams/elf64btsmip.sh (SHLIB_TEXT_START_ADDR): Likewise.
926 * ldver.c (ldversion): Update year.
930 * po/ld.pot: Regenerate.
934 * Makefile.am (eelf64ppc.c, eelf64lppc.c): Depend on ppc64elf.em.
935 * Makefile.in: Regenerate.
936 * emulparams/elf64ppc.sh (EXTRA_EM_FILE): Define.
937 * emultempl/ppc64elf.em: New file.
941 * scripttempl/pe.sc: Add support for constructor priorities.
945 * emulparams/avr1200.sh (DATA_START): Define as 0x60.
946 * emulparams/avr23xx.sh: Likewise.
947 * emulparams/avr4433.sh: Likewise.
948 * emulparams/avr44x4.sh: Likewise.
949 * emulparams/avr85xx.sh: Likewise.
950 * emulparams/avrmega103.sh: Likewise.
951 * emulparams/avrmega161.sh: Likewise.
952 * emulparams/avrmega603.sh: Likewise.
953 * scripttempl/elf32avr.sc: Use DATA_START instead of 0x60.
957 * ldlang.c (walk_wild_section): Exclude object file if enclosing
962 * Makefile.am (ALL_EMULATIONS): Add eshelf_nbsd.o and eshlelf_nbsd.o.
963 (eshelf_nbsd.c): New rule.
964 (eshlelf_nbsd.c): New rule.
965 * Makefile.in: Regenerate.
966 * configure.tgt (sh*le-*-netbsdelf*): New target.
967 (sh*-*-netbsdelf*): New target.
968 * emulparams/shelf.sh: Document that shelf_nbsd.sh sources this file.
969 * ld/emulparams/shelf_nbsd.sh: New emulation.
970 * ld/emulparams/shlelf_nbsd.sh: New emulation.
974 * po/es.po: New file: Spanish translation.
975 * configure.in (ALL_LINGUAS): Add es.
976 * configure: Regenerate.
980 * ld.texinfo: Note that --emit-relocs is currently only
985 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Make use
986 of bfd_section_list_remove and bfd_section_list_insert macros.
987 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
988 * emultempl/mmo.em (mmo_place_orphan): Likewise.
992 * configure.tgt (x86_64-*-netbsd*): New target.
996 (gld*_create_output_section_statements): New function.
997 For -binitfini support.
998 * emultempl/aix.em (gld*_before_parse): Fix comment.
999 * emultempl/aix.em (gld*_parse_args): Fix comment.
1003 * configure.tgt (mips*-dec-netbsd*): Delete alias for
1005 (sparc64-*-netbsd*): Add elf32_sparc to targ_extra_emuls.
1007 * configure.tgt (arm-*-netbsdelf*): Add target.
1008 (arm-*-netbsd*): Add armelf and armelf_nbsd to targ_extra_emuls.
1009 * emulparams/armelf_nbsd.sh: Added.
1010 * Makefile.am: Add rules for earmelf_nbsd.
1011 * Makefile.in: Regenerate.
1016 * configure.host: Add rules for x86_64-*linux-gnu. Change
1017 s390x-linux entry to use gcc to report configuration, replace gcc
1018 with $CC in s390-linux
1022 * ld.texinfo (VERSION): Fix markup.
1026 * Makefile.am (ALL_EMULATIONS): Add m68kelfnbsd.o.
1027 (m68kelfnbsd.c): New rule.
1028 * Makefile.in: Regenerate.
1029 * configure.tgt (m68*-hp-netbsd*): Renamed to ..
1030 (m68*-*-netbsd*4k*): .. this.
1031 (m68*-*-netbsdelf*): New target.
1032 (m68*-*-netbsd*): Also include ELF support.
1033 (m68*-*-netbsdaout*): New alias for m68*-*-netbsd*.
1034 * emulparams/m68kelfnbsd.sh: New emulation.
1038 * ldgram.y (vers_node): Support anonymous version tags.
1039 * ldlang.c (lang_register_vers_node): Ensure anonymous version
1040 tag is not defined together with non-anonymous versions.
1041 * ld.texinfo: Document it.
1045 * po/tr.po: New file: Turkish translation.
1046 * configure.in (ALL_LINGUAS): Add tr.
1047 * configure: Regenerate.
1051 * Makefile.am: Add rules for eelf64alpha_nbsd.
1052 * Makefile.in: Regenerate.
1053 * configure.tgt (alpha*-*-netbsd*): Set
1054 targ_emul to elf64alpha_nbsd.
1055 * emulparams/elf64alpha_nbsd.sh: Added.
1059 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust
1060 section_tail when fiddling with section list.
1061 (gld${EMULATION_NAME}_list_options): Ensure sentences aren't
1062 broken into separate strings to make translation easier.
1063 * emultempl/mmo.em (mmo_place_orphan): Adjust section_tail when
1064 fiddling with section list.
1065 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
1069 * scripttempl/mmo.sc: Add .debug_ranges to listed sections.
1073 * ldmain.c (main): Initialise link_info.eh_frame_hdr.
1077 * emultempl/elf32.em (finish): Supply output_bfd
1078 to bfd_elf*_discard_info.
1079 (OPTION_EH_FRAME_HDR): Define.
1080 (longopts): Add --eh-frame-hdr.
1081 (parse_args): Handle it.
1082 (list_options): Add --eh-frame-hdr to help.
1083 * emultempl/hppaelf.em (finish): Supply output_bfd
1084 to bfd_elf*_discard_info.
1085 * scripttempl/elf.sc (.eh_frame_hdr): Add.
1089 * lexsup.c (parse_args): Don't pass shortopts to second call to
1090 getopt functions. Restore optind rather than decrementing before
1091 second call. Remove errind as it now duplicates last_optind.
1095 * emultempl/pe.em (gld_${EMULATION_NAME}_list_options): Fix typo.
1100 * Makefile.am: Add support for xstormy16.
1101 * configure.tgt: Add support for xstormy16.
1102 * Makefile.in: Regenerate.
1103 * emulparams/elf32xstormy16.sh: New file.
1104 * scripttempl/xstormy16.sc: New file.
1108 * Makefile.in (LIB_PATH): Make configurable.
1109 (GENSCRIPTS): Set LIB_PATH in environment.
1110 * configure.in: Substitute LIB_PATH.
1111 * configure: Regenerate.
1112 * configure.tgt (*cygwin): Set LIB_PATH for cross build.
1113 * configure.host (*cygwin): Add /usr/lib/w32api to NATIVE_LIB_DIRS.
1117 * lexsup.c (ld_options): Insert 'PROGRAM' into the text string
1118 describing the -N option so that it is easier to translate into
1123 * emultempl/pe.em (..._list_options): Replace multiple fprintf
1124 statements describing a single option with a single, newline
1125 escaped fprintf. This allows better translation into other
1128 * ldmain.c (add_archive_element): Combine multiple strings
1129 into a single string to permit better translation into other
1134 * Makefile.am: Remove eaixppc64.
1135 * Makefile.in: Regenerate.
1139 * emultempl/aix.em (choose_target): Change default target to
1140 OUTPUT_FORMAT for ppcmacos. Add braces to remove compiler
1142 (gld*_read_file): Fix typo.
1143 (change_symbol_mode): Add prototype.
1146 * emulparams/aixppc.sh (SYSCALL_MASK, SYMBOL_MODE_MASK): Delete.
1147 * emulparams/aixrs6.sh : Same.
1148 * emulparams/ppcmacos.sh : Same.
1149 * emulparams/aixppc64.sh : Delete file.
1150 * emultempl/aix.em : Formatting changes.
1154 * emulparams/criself.sh (NO_SMALL_DATA): Set, to yes.
1155 (OTHER_BSS_END_SYMBOLS): Don't refer to .sbss when setting
1157 (OTHER_END_SYMBOLS): Fix formatting.
1158 * emulparams/crislinux.sh (NO_SMALL_DATA): Set, to yes.
1159 (OTHER_END_SYMBOLS): Fix formatting.
1163 * ldexp.c (exp_print_token): Correct "table" entry for RSHIFT.
1167 * configure.tgt : Remove eaixppc64 emulations.
1168 * Makefile.in : Remove eaixppc64.c
1169 * ldemul.c (ldemul_choose_target): New parameters argc, argv.
1170 (ldemul_default_target): Same.
1171 * emultempl/gld960.em (gld960_choose_target): Same.
1172 * emultempl/gld960c.em (gld960_choose_target): Same.
1173 * scripttempl/aix.sc: Remove OUTPUT_FORMAT.
1174 * emultempl/aix.em (is_syscall): syscall_mask now a variable.
1175 * emultempl/aix.em (gld*_read_file): symbol_mode_mask now a variable.
1176 * emultempl/aix.em (gld*_parse_args): Handle -b32 -b64 emulation.
1177 * emultempl/aix.em (choose_target): New function. Handle emulation of
1182 * emulparams/elf_i386.sh (NO_SMALL_DATA): Set to yes.
1183 * emulparams/elf_i386_be.sh (NO_SMALL_DATA): Likewise.
1184 * emulparams/elf_i386_chaos.sh (NO_SMALL_DATA): Likewise.
1185 * emulparams/elf_i386_ldso.sh (NO_SMALL_DATA): Likewise.
1186 * emulparams/elf_x86_64.sh (NO_SMALL_DATA): Likewise.
1187 * emulparams/m68kelf.sh (NO_SMALL_DATA): Likewise.
1188 * emulparams/elf32_sparc.sh (NO_SMALL_DATA): Likewise.
1189 * emulparams/elf64_sparc.sh (NO_SMALL_DATA): Likewise.
1191 * scripttempl/elf.sc (SBSS): New. Define if ${NO_SMALL_DATA}
1194 (REL_SDATA): Likewise.
1195 (REL_SBSS): Likewise.
1196 (REL_SDATA2): Likewise.
1197 (REL_SBSS2): Likewise.
1198 (SBSS2): Define if ${NO_SMALL_DATA} is not empty.
1203 * scripttempl/elfm68hc11.sc (CTOR, DTOR): Put constructor and
1205 * scripttempl/elfm68hc12.sc (CTOR, DTOR): Likewise.
1209 * Makefile.in: Regenerated with automake based on automake
1210 1.4-8 in RedHat 7.1.
1214 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Define.
1215 (config.status): Delete rule.
1216 Add extra dependencies to cover sourced emulparams files.
1217 * Makefile.in: Regenerate.
1219 * scripttempl/elf.sc: Order <section>, <section>.* and
1220 corresponding linkonce sections as seen in input files.
1221 Formatting fixes. Zero vma of all sections if not relocating.
1222 (STACK): Define and insert if STACK_ADDR defined.
1223 (OTHER_RELOCATING_SECTIONS): Delete.
1224 (OTHER_END_SYMBOLS): Define.
1225 (OTHER_READONLY_SECTIONS): Always insert, not just when relocating.
1226 (OTHER_READWRITE_SECTIONS): Likewise.
1227 (OTHER_GOT_SECTIONS): Likewise.
1228 (OTHER_SDATA_SECTIONS): Likewise.
1229 (OTHER_BSS_SECTIONS): Likewise.
1230 * scripttempl/elfi370.sc (OTHER_READONLY_SECTIONS): Likewise.
1231 (OTHER_READWRITE_SECTIONS): Likewise.
1232 * scripttempl/nw.sc (OTHER_READONLY_SECTIONS): Likewise.
1233 (OTHER_READWRITE_SECTIONS): Likewise
1235 * emulparams/armelf.sh (OTHER_RELOCATING_SECTIONS): Delete.
1236 (STACK_ADDR): Define.
1237 * emulparams/armelf_oabi.sh: As for armelf.sh.
1238 * emulparams/elf32mcore.sh: As for armelf.sh.
1239 * emulparams/h8300elf.sh: As for armelf.sh.
1240 * emulparams/mn10200.sh: As for armelf.sh.
1241 * emulparams/shelf.sh: As for armelf.sh.
1243 * emulparams/elf32fr30.sh (OTHER_RELOCATING_SECTIONS): Delete.
1244 (OTHER_END_SYMBOLS): Define.
1245 * emulparams/m32relf.sh: As for elf32fr30.sh.
1246 * emulparams/h8300helf.sh: As for elf32fr30.sh.
1247 * emulparams/h8300self.sh: As for elf32fr30.sh.
1249 * emulparams/criself.sh (OTHER_READONLY_SECTIONS): Protect symbol
1250 defines with RELOCATING test.
1251 (OTHER_SDATA_SECTIONS): Likewise.
1252 (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
1253 (OTHER_END_SYMBOLS): ..this.
1254 * emulparams/crislinux.sh: As for criself.sh.
1256 * emulparams/elf32bmipn32.sh (OTHER_SDATA_SECTIONS): Zero vma
1258 (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
1259 (OTHER_SECTIONS): ..this. Zero vma if not relocating. Order
1260 normal and linkonce sections as seen in input files.
1261 * emulparams/elf32bmip.sh (DATA_ADDR): Don't define if EMBEDDED.
1262 (TEXT_DYNAMIC): Likewise.
1263 (INITIAL_READONLY_SECTIONS): Zero vma if not relocating.
1264 (OTHER_SDATA_SECTIONS): Likewise.
1265 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
1266 * emulparams/shlelf_linux.sh (OTHER_READWRITE_SECTIONS): Likewise.
1267 * emulparams/elf64alpha.sh (OTHER_READONLY_SECTIONS): Likewise.
1268 * emulparams/hppalinux.sh (OTHER_READONLY_SECTIONS): Likewise.
1269 * emulparams/elf64_aix.sh (OTHER_GOT_SECTIONS): Likewise.
1270 (OTHER_PLT_RELOC_SECTIONS): Likewise.
1271 (OTHER_READONLY_SECTIONS): Likewise. Order normal and linkonce
1272 sections as seen in input files.
1273 * emulparams/elf64_ia64.sh: As for emulparams/elf64_aix.sh.
1274 * emulparams/hppa64linux.sh (OTHER_READONLY_SECTIONS): Zero vma
1276 (OTHER_READWRITE_SECTIONS, OTHER_BSS_SECTIONS): Likewise.
1277 (OTHER_BSS_END_SYMBOLS): Merge from elf64hppa.sh.
1278 * emulparams/elf64mmix.sh (OTHER_RELOCATING_SECTIONS): Delete.
1279 (OTHER_SECTIONS): Instead, use this..
1280 (OTHER_END_SYMBOLS): ..and this.
1282 * emulparams/elf32b4300.sh: Source elf32bmip.sh, remove duplicates.
1283 * emulparams/elf32bsmip.sh: Likewise.
1284 * emulparams/elf32btsmip.sh: Likewise.
1285 * emulparams/elf32ebmip.sh: Likewise.
1286 * emulparams/elf32lmip.sh: Likewise.
1287 * emulparams/elf32elmip.sh: Source elf32lmip.sh, remove duplicates.
1288 * emulparams/elf32lsmip.sh: Likewise.
1289 * emulparams/elf32ltsmip.sh: Source elf32btsmip.sh, remove duplicates.
1290 * emulparams/elf32l4300.sh: Source elf32b4300.sh, remove duplicates.
1291 * emulparams/elf64bmip.sh: Source elf32bmipn32.sh, remove duplicates.
1292 * emulparams/elf64btsmip.sh: Likewise.
1293 * emulparams/elf64ltsmip.sh: Source elf64btsmip.sh, remove duplicates.
1294 * emulparams/elf32lppc.sh: Source elf32ppc.sh, remove duplicates.
1295 * emulparams/elf32ppclinux.sh: Likewise.
1296 * emulparams/elf32ppcsim.sh: Likewise.
1297 * emulparams/elf32lppcsim.sh: Source elf32lppc.sh, remove duplicates.
1298 * emulparams/elf64hppa.sh: Source hppa64linux.sh, remove duplicates.
1299 * emulparams/h8300helf.sh: Source h8300elf.sh, remove duplicates.
1300 * emulparams/h8300self.sh: Likewise.
1301 * emulparams/mn10300.sh: Source mn10200.sh, remove duplicates.
1302 * emulparams/sh.sh: Comment.
1303 * emulparams/shl.sh: Source sh.sh, remove duplicates.
1304 * emulparams/shlelf.sh: Source shelf.sh, remove duplicates.
1305 * emulparams/shelf_linux.sh: Source shlelf_linux.sh, remove duplicates.
1310 * ldlang.c (map_input_to_output_sections): Replace "break"
1311 accidentally removed with 2001-08-03 change.
1312 (lang_gc_sections_1): Likewise.
1316 * ldlang.c (walk_wild_section): Move sec == NULL case out of loop.
1320 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Use NULL instead
1321 of false when calling lang_size_sections.
1322 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
1326 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Only emit this
1327 function when LDEMUL_FINISH isn't set to the same name. Don't
1328 call ${LDEMUL_FINISH}.
1329 (ld_${EMULATION_NAME}_emulation): Call $LDEMUL_FINISH if defined.
1330 * emultempl/armelf.em (arm_elf_finish): Call
1331 gld${EMULATION_NAME}_finish.
1332 * emultempl/hppaelf.em (hppaelf_finish): Rename to
1333 gld${EMULATION_NAME}_finish. Call bfd_elf32_discard_info and
1334 hppaelf_layout_sections_again if necessary.
1335 (need_laying_out): New var.
1336 (hppaelf_layaout_sections_again): Rename to
1337 hppaelf_layout_sections_again. Clear need_laying_out.
1338 (PARSE_AND_LIST_OPTIONS): Format text.
1342 * emultempl/armelf.em (arm_elf_finish): Renamed from
1343 gld${EMULATION_NAME}_finish.
1344 (LDEMUL_FINISH): Set to arm_elf_finish.
1348 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): New.
1349 (struct ld_emulation_xfer_struct): Use it.
1353 * emulparams/elf64hppa.sh (OTHER_BSS_END_SYMBOLS): Add
1354 additional symbols referenced by newer crt0.o files from HP.
1358 * emulparams/armelf.sh (DATA_START_SYMBOLS): New symbol.
1362 * Makefile.am (GENSCRIPTS): Quote ${exec_prefix}.
1363 * Makefile.in: Regenerate.
1367 * ld.texinfo: Use @command for commands, @option for options.
1368 * Makefile.am (POD2MAN): Use 'GNU Development Tools' for
1370 * Makefile.in: Rebuild.
1374 * configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
1375 Add support for targets.
1379 * configure.in (ALL_LINGUAS): Add "fr" and "sv"
1380 * configure: Regernate.
1381 * po/fr.po: New file.
1382 * po/sv.po: New file.
1386 * configure.tgt (sh-*-linux): Set targ_emul, targ_extra_emuls
1387 as little endian default and to support big endian.
1391 * ld.texinfo (Options): Document new option, -nostdlib.
1392 * lexsup.c (OPTION_NOSTDLIB): New definition.
1393 (ld_options): Add entry for "nostdlib".
1394 (parse_args): Handle OPTIONS_NOSTDLIB.
1395 * ldfile.c (ldfile_add_library_path): Don't add directories
1396 to the search path if they weren't specified on the command line
1397 and -nostdlib was specified.
1398 * ld.h (ld_config_type): New member only_cmd_line_lib_dirs.
1402 * lexsup.c (parse_args): Prevent infinite parsing loop when
1403 "-rpath.a" is specified on the command line.
1404 Replace calls to fprintf with calls to einfo.
1408 * ld.texinfo: A historical requirement that MEMORY and SECTIONS
1409 appear only once across all the linker scripts involved in a link
1410 invocation no longer applies. Make the documentation reflect
1415 * configure.tgt: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
1417 (sh-*-linux*): Added targ_extra_libpath.
1421 * ldlang.c (lang_size_sections): Keep a valid output_offset field
1422 for padding statements.
1426 * configure.tgt (mmix-*-*): New target.
1427 * Makefile.am (ALL_EMULATIONS): Add eelf64mmix.o and emmo.o.
1428 Add dependencies to match.
1429 * emulparams/mmo.sh, emulparams/elf64mmix.sh, emultempl/mmo.em,
1430 emultempl/mmix-elfnmmo.em, emultempl/mmixelf.em,
1431 scripttempl/mmo.sc: New files.
1432 * gen-doc.texi: @set MMIX.
1433 * ld.texinfo: Ditto.
1434 [MMIX] Add MMIX node.
1435 * Makefile.in: Regenerate.
1439 * ldlang.c: Fix a comment typo.
1443 * configure.host: Move alpha*-*-linux-gnu* entry to generic
1444 entries, and match *-*-linux*.
1448 * ldgram.y (mri_script_command): Surround processing of INCLUDE
1449 with ldlex_script, ldlex_popstate.
1450 (ifile_p1): Likewise.
1451 * ldlex.l (EOF): Don't BEGIN(SCRIPT). Restore lineno from the
1453 (lex_push_file): Save current lineno to lineno_stack. Set lineno
1454 to 1. Don't BEGIN(SCRIPT).
1455 (lex_redirect): Similarly.
1456 * ldmain.c (main): Set yydebug non-zero if YYDEBUG.
1460 * scripttempl/armcoff.sc: Define __EH_FRAME_BEGIN__ and
1461 __EH_FRAME_END__ and accept eh frames into data section.
1462 Add ctor and dtor sections.
1466 * pe-dll.c (autofilter_objectlist): Add gcrt0.o.
1467 (auto-export): Fix indentation.
1471 * pe-dll.c (autofilter_objectlist): Add startup objects
1473 (auto-export): Constify char * p.
1474 Extract file basename and use strcmp rather than ststr
1479 * ldmain.c (get_emulation): Improve comment about the handling
1484 * po/POTFILES.in: Regenerate.
1488 * emultempl/elf32.em (gld*_list_options): Remove extra '\t' from
1489 -z nocopyreloc and -z nocombreloc usage strings.
1493 * emultempl/elf32.em (gld*_list_options): Include -z nocopyreloc
1498 * scripttempl/armaout.sc: Place .bss section after end of aligned
1499 data section to match behaviour of aout code in constructrion of
1504 * pe-dll.c (autofilter_entry_type autofilter_liblist: Add
1505 startup files for mingw32 dlls to list.
1509 * emultempl/elf32.em: Fix shell 'if' usage for portability.
1513 * configure.tgt (targ): Add arm9e-*-elf.
1517 * genscripts.sh: Fix a typo in the last change.
1521 * emultempl/elf32.em (gld_*_list_options): Include -z combreloc and
1522 -z nocombreloc in usage.
1526 * genscripts.sh: Include a comment at the top of each generated
1527 script, explaining its purpose.
1531 * emultempl/elf32.em (parse_args): Handle -z nocopyreloc.
1532 * NEWS: Mention -z nocopyreloc.
1533 * ld.texinfo (Options): Describe nocopyreloc.
1537 * configure: Regenerate.
1541 * ldver.h (ld_program_version): Remove declaration.
1542 * lexsup.c (parse_args): Move printing of copyright message..
1543 * ldver.c (ldversion): .. to here.
1544 Use BFD_VERSION_STRING in place of BFD_VERSION.
1545 (ld_program_version): Remove.
1546 * Makefile.am (Makefile): Depend on bfd/configure.in.
1548 * Makefile.in: Regenerate.
1552 * Makefile.am: Update dependencies with "make dep-am".
1553 * Makefile.in: Regenerate.
1557 * ldlang.c (lang_common): Conditionally inhibit Common allocation.
1558 * lexsup.c: Add --no-define-common commandline option.
1559 * ldgram.y: Add INHIBIT_COMMON_ALLOCATION script command.
1560 * ldlex.l: Likewise.
1561 * ld.h: Add command_line.inhibit_common_definition.
1562 * ldmain.c (main): Initialize.
1563 * ld.texinfo: Document.
1567 * ldmisc.c (USE_STDARG): Remove.
1568 (info_msg): Define using VPARAMS, VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1573 * ldmisc.h: Remove #ifdef ANSI_PROTOTYPES and non-ansi
1574 declarations. Update copyright.
1578 * pe-dll.c: Remove obsoleted declaration of
1579 pe_get_data_import_dll_name.
1580 (pe_create_import_fixup): Fix thinko.
1582 * ld.texinfo(enable-auto-import): Clarify the explanation.
1586 * pe-dll.c (pe_create_import_fixup): Revert previous patch.
1587 * emultemp/pe.em (pe_data_import_dll): Move definition outside of
1588 DLL_SUPPORT controlled code.
1592 * emultempl/pe.em(pe_data_import_dll): Make static.
1593 (pe_get_data_import_dll_name): New accessor function.
1594 * pe-dll.c(pe_create_import_fixup): call
1595 pe_get_data_import_dll_name() from pe.em, instead of
1596 directly accessing pe_data_import_dll variable from pe.em.
1600 * deffilep.y: Include "safe-ctype.h" instead of <ctype.h>.
1601 (def_file_add_directive): Use ISSPACE instead of isspace.
1602 (def_lex): Use ISDIGIT/ISXDIGIT/ISALPHA/ISALNUM instead of
1603 isdigit/isxdigit/isalpha/isalnum.
1604 * emultempl/aix.em: Include "safe-ctype.h" instead of <ctype.h>.
1605 (gld${EMULATION_NAME}_read_file): Use ISSPACE instead of isspace.
1606 * emultempl/elf32.em: Include "safe-ctype.h" instead of <ctype.h>.
1607 (gld${EMULATION_NAME}_place_orphan): Use ISALNUM instead of
1609 * emultempl/gld960c.em: Include "safe-ctype.h" instead of <ctype.h>.
1610 (gld960_set_output_arch): Use ISUPPER/TOLOWER instead of
1612 * emultempl/sunos.em: Include "safe-ctype.h" instead of <ctype.h>.
1613 (gld${EMULATION_NAME}_search_dir): Use ISDIGIT instead of isdigit.
1614 * ldctor.c: Include "safe-ctype.h" instead of <ctype.h>.
1615 (ctor_prio): Use ISDIGIT instead of isdigit.
1616 * ldfile.c: Include "safe-ctype.h" instead of <ctype.h>.
1617 (ldfile_open_file_search): Use ISALPHA instead of isalpha.
1618 (ldfile_add_arch): Use ISUPPER/TOLOWER instead of
1620 * ldlang.c: Include "safe-ctype.h" instead of <ctype.h>.
1621 (stricpy): Use TOLOWER instead of isupper/tolower.
1622 (lang_leave_overlay_section): Use ISALNUM instead of isalnum.
1623 * ldlex.l: Include "safe-ctype.h" instead of <ctype.h>.
1624 (lex_warn_invalid): Use ISPRINT instead of isprint.
1625 * ldmain.c: Include "safe-ctype.h" instead of <ctype.h>.
1626 (main): For gettext, also set the LC_CTYPE locate facet.
1627 (add_keepsyms_file): Use ISSPACE instead of isspace.
1628 * lexsup.c: Include "safe-ctype.h" instead of <ctype.h>.
1629 (is_num, parse_args): Use ISDIGIT instead of isdigit.
1630 * mpw-elfmips.c: Include "safe-ctype.h" instead of <ctype.h>.
1631 (gldelf32ebmip_place_orphan): Use ISALNUM instead of isalnum.
1632 * mpw-eppcmac.c: Include "safe-ctype.h" instead of <ctype.h>.
1633 (gldppcmacos_read_file): Use ISSPACE instead of isspace.
1634 * pe-dll.c: Include "safe-ctype.h" instead of <ctype.h>.
1635 (quoteput): Use ISSPACE instead of isspace.
1636 (pe_dll_generate_implib, pe_process_import_defs): Use ISALNUM
1641 * deffilep.y (def_stash_module): Constify "name" param.
1643 * pe-dll.c: Replace CONST with const throughout.
1644 (quick_symbol): Constify "n1", "n2", "n3" params.
1645 (make_singleton_name_thunk): Constify "import" param. Make
1646 "buffer_len" a size_t.
1647 (make_import_fixup_entry): Constify "name", "fixup_name",
1648 "dll_symname" params.
1649 (pe_get16): Cast args of bfd_seek. Replace bfd_read with bfd_bread.
1650 (pe_get32): Likewise.
1651 (pe_implied_import_dll): Likewise.
1653 * emultempl/beos.em (sort_by_file_name): Constify "ra", "rb".
1654 (sort_by_section_name): Likewise.
1656 * emultempl/pe.em: Move defines for arm_epoc_pe before bfd.h included.
1657 (make_import_fixup): Cast printf arg, rel->address to long rather
1659 (gld_${EMULATION_NAME}_after_open): Don't compare NULL against int.
1663 * ldmain.c (main): Rename BufferSize to ld_bufsz because HPUX
1664 defines BufferSize. Increase buffer size by one.
1668 * pe-dll.c (pe_walk_relocs_of_symbol): Fix memory leak.
1672 * configure.tgt: Add arm-openbsd target.
1676 * Makefile.am (ALL_EMULATIONS): Move eelf64ppc.o and
1678 (ALL_64_EMULATIONS): Here.
1679 * Makefile.in: Regenerated.
1683 * emultempl/pe.em(make_import_fixup): change signature to
1684 take asection as well as arelec; we need this for proper
1685 error reporting. Only call pe_create_import_fixup() if
1686 there is no attempt to add a constant addend to the reloc;
1687 otherwise, report error condition.
1688 * pe-dll.c(pe_walk_relocs_of_symbol): change signature,
1689 since final argument is a pointer to make_import_fixup().
1690 Change call to cb() to match make_import_fixup() signature.
1691 (make_import_fixup_mark): make buffer_len unsigned.
1692 * pe-dll.h: change signature of pe_walk_relocs_of_symbol.
1696 * ld.texinfo: add verbose documentation for auto-import
1697 direct-addressing workaround, to compliment the terse
1702 * scripttempl/v850.sc: Add gcc_except_table sections.
1706 * emulparams/h8300helf.sh: Move stack to a much higher memory address.
1707 * emulparams/h8300self.sh: Similarly.
1711 * ld.texinfo (Options, --stack): Correct default value for stack
1716 * emultempl/aix.em : Handle import file XMC_XO and syscall symbols.
1720 * emultempl/beos.em: Declare prototypes for comparions functions,
1725 * emultempl/aix.em: Add missing prototype.
1726 * emultempl/lnk960.em: Likewise.
1727 * emultempl/vanilla.em: Likewise.
1728 * emultempl/armcoff.em: Likewise.
1729 * emultempl/armelf_oabi.em: Likewise.
1730 * emultempl/beos.em: Likewise.
1731 * emultempl/gld960c.em: Likewise.
1732 * emultempl/gld960.em: Likewise.
1734 * emulparams/elf64alpha.sh (PARSE_AND_LIST_PROLOGUE): Add parameter
1735 for prototype declaration.
1740 * ldmain.c (get_emulation): Add support for -mips32 and -mips64.
1744 * emultempl/pe.em: Add missing prototypes.
1745 (gld_${EMULATION_NAME}_after_open): Remove extra args to
1746 pe_find_data_imports.
1747 (pr_sym): Add unused attribute.
1751 * configure.tgt (i[3456]86-*-rtems*, m68*-*-rtems*): Change
1752 default from coff to elf.
1756 * emulparams/h8300helf.sh: Resync with h8300elf.sh. Update
1758 * emulparams/h8300self.sh: Similarly.
1762 * Makefile.am (ALL_EMULATIONS): Add eh8300elf.o, eh8300elf.o and
1764 (eh8300elf.c, eh8300helf.c, eh8300self.c): New targets.
1765 * configure.tgt (h8300-*-elf*): New case.
1766 * emulparams/h8300elf.sh, emulparams/h8300helf.sh: New files.
1767 * emulparams/h8300self.sh: New file.
1768 * Makefile.in: Regenerated.
1772 * ldmain.c (main): Rename BSIZE to BufferSize to avoid collision
1778 * Makefile.am (ALL_EMULATIONS): Add eelf64ppc.o and eelf64lppc.o.
1779 (eelf64ppc.c, eelf64lppc.c): Add make targets.
1781 * Makefile.in: Regenerate.
1782 * configure.tgt: Add powerpc64 support. Move pdp11, pjl, pj
1783 entries to correct alphabetical position.
1784 * emulparams/elf64ppc.sh: New.
1785 * emulparams/elf64lppc.sh: New.
1789 * ldmain.c (main): Declare BSIZE as static.
1793 * emultempl/elf32.em (place_orphan): Place orphan .rel* sections
1794 into .rel.dyn resp. .rela.dyn if combreloc.
1795 (get_script): If .x linker script is equal to .xn, only put it
1796 once into the binary.
1797 Add .xc and .xsc scripts.
1798 (parse_args): Handle -z combreloc and -z nocombreloc.
1799 * scripttempl/elf.sc (.rela.sbss): Fix a typo.
1800 For .xc and .xsc scripts put all .rel* or .rela* input sections
1801 but .rel*.plt and PLT-like sections into .rel.dyn resp. .rela.dyn.
1802 * genscripts.sh (GENERATE_COMBRELOC_SCRIPT): Set if SCRIPT_NAME
1804 Strip trailing whitespace from script.
1805 Generate .xc and .xsc scripts if requested.
1806 * ldmain.c (main): Initialize link_info.combreloc and
1807 link_info.spare_dynamic_tags.
1808 * lexsup.c (OPTION_SPARE_DYNAMIC_TAGS): Define.
1809 (ld_options): Add --spare-dynamic-tags option.
1810 (parse_args): Likewise.
1811 * ld.texinfo: Document -z combreloc and -z nocombreloc.
1812 * ldint.texinfo: Document .xc and .xsc linker scripts.
1813 * NEWS: Add notes about -z combreloc and SHF_MERGE.
1817 * emulparams/elf32fr30.sh: Add a newline.
1821 * deffilep.y: Add missing prototypes.
1822 * pe-dll.c: Likewise.
1826 * ldlang.c (insert_pad): Fix typos in last patch.
1828 * ldlang.c: When traversing lang_statement_union_type lists,
1829 consistently use "header.next" rather than "next".
1830 * mpw-eppcmac.c: Likewise.
1831 * emultempl/beos.em: Likewise.
1832 * emultempl/hppaelf.em: Likewise.
1833 * emultempl/pe.em: Likewise.
1834 * ldlang.h (union lang_statement_union): Remove "next" field.
1836 * ldlang.c (insert_pad): Use offsetof macro.
1837 (lang_size_sections): Always neuter padding statements.
1838 * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Delete.
1840 * pe-dll.c (pe_dll_fill_sections): Correct type of "relax" param
1841 passed to lang_size_sections.
1842 (pe_exe_fill_sections): Likewise.
1843 * emultempl/pe.em (output_prev_sec_find): Copied from elf32.em.
1844 (gld_${EMULATION_NAME}_place_orphan): Merge from elf32.em.
1848 * emultempl/aix.em: Formatting fixes.
1852 * ldlang.c (insert_pad): Make use of an existing pad statement if
1853 available. Move code calculating alignment, adjusting section
1854 alignment power, and adjusting dot to ..
1855 (size_input_section): .. here. Remove unused relax param.
1856 (lang_size_sections): Change boolean `relax' param to boolean *.
1857 Adjust call to size_input_section. Make use of insert_pad to
1858 place pad after the assignment statement. If relaxing, zap
1860 (reset_memory_regions): Reset output_bfd section sizes too.
1861 (relax_again): Move to..
1862 (lang_process): ..here. Adjust call to lang_size_sections, and
1863 remove duplicated code.
1864 * ldlang.h (lang_size_sections): Change `relax' param to boolean *.
1868 * ld.texinfo: Document that fill values now use the four least
1870 * emulparams/elf32fr30.sh (NOP): Update.
1871 * emulparams/elf32mcore.sh: Likewise.
1872 * emulparams/elf64_s390.sh: Likewise.
1873 * emulparams/elf_i386.sh: Likewise.
1874 * emulparams/elf_i386_be.sh: Likewise.
1875 * emulparams/elf_i386_chaos.sh: Likewise.
1876 * emulparams/elf_i386_ldso.sh: Likewise.
1877 * emulparams/elf_s390.sh: Likewise.
1878 * emulparams/elf_x86_64.sh: Likewise.
1879 * emulparams/i386moss.sh: Likewise.
1880 * emulparams/i386nw.sh: Likewise.
1881 * emulparams/m68kelf.sh: Likewise.
1882 * scripttempl/elf.sc: Update NOP comment.
1883 * scripttempl/elfi370.sc: Likewise.
1884 * scripttempl/elfm68hc11.sc: Likewise.
1885 * scripttempl/elfm68hc12.sc: Likewise.
1886 * scripttempl/nw.sc: Likewise.
1890 * ldgram.y (saved_script_handle): Initialize to NULL.
1891 * ldmain.c (main): Change check on saved_script_handle.
1895 * emultempl/elf32.em: Formatting fixes.
1896 (output_prev_sec_find): Test for bfd_ind_section too; do so by
1897 looking at sec->owner.
1898 (output_rel_find): Move function inside LDEMUL_PLACE_ORPHAN test.
1899 (gld${EMULATION_NAME}_place_orphan): Add a few comments. Remove
1900 unused code, and reorganize orphan section placement code.
1902 * ldlang.c (wild_doit): Rename to lang_add_section.
1903 * ldlang.h: Here too.
1904 * mpw-elfmips.c: And here.
1905 * emultempl/beos.em: And here.
1906 * emultempl/elf32.em: And here.
1907 * emultempl/hppaelf.em: And here.
1908 * emultempl/pe.em: And here.
1912 * emultempl/needrelax.em: New file.
1913 * emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Reference it.
1914 * Makefile.am (eelf64_ia64.c): Depend on it.
1915 * Makefile.in: Rebuild.
1919 * emultempl/elf32.em: For SEC_EXCLUDE sections, ensure that
1920 output_section is set non-NULL.
1922 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Return
1923 `true' for SEC_EXCLUDE sections so that the generic code doesn't
1924 needlessly create an output_section_statement. Treat a correctly
1925 named output_section_statement with NULL bfd_section as compatible.
1929 * emultempl/generic.em: Support EXTRA_EM_FILE.
1930 (ld_${EMULATION_NAME}_emulation): Support emulation parameters
1931 LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
1932 LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
1933 LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
1934 LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
1935 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
1936 LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
1937 LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
1938 LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
1939 LDEMUL_FIND_POTENTIAL_LIBRARIES.
1943 * scripttempl/elf.sc, scripttempl/elfd30v.sc,
1944 scripttempl/elfm68hc11.sc, scripttempl/elfm68hc12.sc,
1945 scripttempl/v850.sc: Keep .jcr data.
1951 * ldgram.y (had_script): Change name to saved_script_handle.
1952 Change type to file handle.
1953 * ld.h (had_script): Rename and retype.
1954 * ldfile.c (ldfile_open_command_file): Save the file handle
1955 used in saved_script_handle.
1956 * lexsup.c (parse_args): Do not allow -c option to alter
1957 saved_script_handle.
1958 * ldmain.c (main): Print out the linker script used if
1959 --verbose is given. Check saved_script_handle to obtain the
1960 external linker script used, or if NULL, dump the builtin
1962 * ld.texinfo: Document that --verbose now dumps the linker
1963 script used, regardless of whether it was an internal or an
1968 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
1970 * configure: Regenerate.
1974 * emultempl/elf32.em (output_prev_sec_find): Add missing prototype.
1976 * scripttempl/elf.sc: Move non-text .dynamic section before
1977 .plt/.got/.sdata* group.
1978 (OTHER_GOT_SECTIONS): Move to immediately after .got.
1979 (OTHER_SDATA_SECTIONS): Add.
1980 * emulparams/criself.sh: Use OTHER_SDATA_SECTIONS rather than
1982 * emulparams/crislinux.sh: Likewise.
1983 * emulparams/elf32b4300.sh: Likewise.
1984 * emulparams/elf32bmip.sh: Likewise.
1985 * emulparams/elf32bmipn32.sh: Likewise.
1986 * emulparams/elf32bsmip.sh: Likewise.
1987 * emulparams/elf32btsmip.sh: Likewise.
1988 * emulparams/elf32ebmip.sh: Likewise.
1989 * emulparams/elf32elmip.sh: Likewise.
1990 * emulparams/elf32l4300.sh: Likewise.
1991 * emulparams/elf32lmip.sh: Likewise.
1992 * emulparams/elf32lsmip.sh: Likewise.
1993 * emulparams/elf32ltsmip.sh: Likewise.
1994 * emulparams/elf64bmip.sh: Likewise.
1995 * emulparams/elf64btsmip.sh: Likewise.
1996 * emulparams/elf64ltsmip.sh: Likewise.
2000 * genscripts.sh: Source the emulparams script before each output
2001 script is generated so that variables like `RELOCATING' may affect
2002 variables defined in the emulparams script.
2006 * emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this
2009 * emultempl/beos.em (sort_sections): Modify for 2001-08-03 change,
2010 ie. iterate over wild_statement.section_list.
2011 (gld${EMULATION_NAME}_place_orphan): Likewise.
2015 * scripttempl/elfm68hc12.sc (FINISH_CODE, FINISH_RELOC): New to handle
2016 .fini[0-4] sections used by _exit
2017 (CTOR, DTOR): Export ctor/dtor symbols; move them to ROM.
2018 (*.text,*.data,*.bss): Take into account .text.*, .data.*, .bss.*.
2019 * scripttempl/elfm68hc11.sc: Likewise.
2023 * emultempl/beos.em (init): Add the missing initialization.
2027 * ld.texinfo (Input Section Basics): Clarify ordering of output
2029 * ldlang.c (callback_t): Add wildcard_list param.
2030 (walk_wild_section): Remove "section" param. Rewrite for
2031 lang_wild_statement_type change. Remove unique_section_p test.
2032 (walk_wild_file): Remove "section" param.
2033 (walk_wild): Remove "section" and "file" params.
2034 (lang_gc_wild): Likewise.
2035 (wild): Likewise. Modify for lang_wild_statement_type change.
2036 (wild_sort): Likewise. Add "sec" param.
2037 (gc_section_callback): Likewise.
2038 (output_section_callback): Likewise. Do unique_section_p test.
2039 (map_input_to_output_sections): Modify call to wild.
2040 (lang_gc_sections_1): Likewise.
2041 (print_wild_statement): Modify for lang_wild_statement_type
2043 (lang_add_wild): Replace filename, filenames_sorted param with
2044 filespec. Replace section_name, sections_sorted,
2045 exclude_filename_list with section_list.
2046 * ldlang.h (lang_add_wild): Here too.
2047 (lang_wild_statement_type): Replace section_name, sections_sorted,
2048 and exclude_filename_list with section_list.
2049 * ldgram.y (current_file): Delete.
2050 (%union): Add wildcard_list.
2051 (file_NAME_list): Set type to wildcard_list. Build a linked list
2052 rather than calling lang_add_wild for each entry.
2053 (input_section_spec_no_keep): Call lang_add_wild here instead.
2054 * ld.h (struct wildcard_list): Declare.
2055 * mri.c (mri_draw_tree): Modify to suit new lang_add_wild.
2059 * ldmain.c (main): initialize link_info.pei386_auto_import
2060 * pe-dll.c: new tables for auto-export filtering
2061 (auto_export): change API, pass abfd for contextual filtering.
2062 Loop thru tables of excluded symbols instead of comparing
2067 * pe-dll.c: new variable pe_dll_enable_extra_debug. New
2068 static variable current_sec (static struct sec *). Add
2069 forward declaration for add_bfd_to_link.
2070 (process_def_file): Don't export undefined symbols. Do not
2071 export symbols starting with "_imp__". Call auto_export()
2073 (pe_walk_relocs_of_symbol): New function.
2074 (generate_reloc): add optional extra debugging
2075 (pe_dll_generate_def_file): eliminate extraneous initial blank
2077 (make_one): enlarge symtab to make room for __nm__ symbols
2078 (DATA auto-import support).
2079 (make_singleton_name_thunk): New function.
2080 (make_import_fixup_mark): New function.
2081 (make_import_fixup_entry): New function.
2082 (pe_create_import_fixup): New function.
2083 (add_bfd_to_link): Specify that 'name' argument is a CONST
2085 * pe-dll.h: declare new variable pe_dll_extra_pe_debug;
2086 declare new functions pe_walk_relocs_of_symbol and
2087 pe_create_import_fixup.
2088 * emultempl/pe.em: add new options --enable-auto-import,
2089 --disable-auto-import, and --enable-extra-pe-debug.
2090 (make_import_fixup): New function.
2091 (pe_find_data_imports): New function.
2092 (pr_sym): New function.
2093 (gld_${EMULATION_NAME}_after_open): Add optional extra pe
2094 debugging. Call pe_find_data_imports. Mark .idata as DATA, not
2099 * ld.texinfo: add additional documentation for
2100 --export-all-symbols. Document --out-implib,
2101 --enable-auto-image-base, --disable-auto-image-base,
2102 --dll-search-prefix, --enable-auto-import, and
2103 --disable-auto-import.
2104 * ldint.texinfo: Add detailed documentation on auto-import
2109 * ld.texinfo (Simple Assignments): Fix computation in SECTIONS
2114 * Makefile.am: Update dependencies with "make dep-am".
2115 * Makefile.in: Regenerate
2119 * ldcref.c (check_section_sym_xref): New function.
2120 (check_nocrossrefs): Call it.
2121 (check_nocrossref): Interate over h->refs here instead of..
2122 (check_refs): ..here. Pass in the symbol name, section, and bfd
2123 rather than hash_entry pointers.
2124 (struct check_refs_info): Keep symbol name rather than hash entry.
2126 (check_reloc_refs): Tweak for above changes in check_refs_info.
2127 Only report references to section syms when symname is NULL to
2128 prevent duplicate messages for the same reloc.
2132 * ldexp.c (exp_print_tree): Use stderr if config.map_file is not
2133 available. Do not print NULL trees.
2134 (exp_print_token): Print unknown tokens with values > 126 as
2135 decimal values not ASCII characters.
2137 * ldlang.c (lang_leave_overlay): If a region is specified assign
2138 it to all sections inside the overlay unless they have been
2139 assigned to the own, non-default, memory region.
2141 * README: Add header for consistency with other README files.
2145 * emultempl/elf32.em (output_prev_sec_find): Never return
2146 bfd_abs_section_ptr, bfd_com_section_ptr nor
2147 bfd_und_section_ptr.
2151 * Makefile.am (em32relf.c): Change dependency from generic.em to
2153 * Makefile.in: Regenerate.
2157 * configure.tgt (i386-*-netbsdelf*): New target.
2158 (i386-*-netbsd*): Set targ_extra_emuls to `elf_i386'
2162 * emultempl/elf32.em (output_prev_sec_find): New.
2163 (place_orphan): Use it.
2167 * ldmain.c (main): Fix typos in the last change.
2171 * ldmain.c (main): Disallow -F and -f without -shared.
2175 * emultempl/pe.em (after_open): Check for the output_bfd not
2176 having any coff_data structure allocated to it.
2180 * emultempl/elf32.em: Do not assuming that contents of the buffer
2181 returned from basename function will remain unchanged accross other
2186 * scripttempl/elf.sc (DYNAMIC_PAD): Revert the change made on
2187 2001-07-03. It creates dynamic entries even for static binaries.
2191 * scripttempl/elf.sc (DYNAMIC_PAD): New variable.
2192 (DYNAMIC): Use it to reserve few dynamic entries for
2197 * emulparams/hppa64linux.sh: New file.
2198 * configure.tgt: hppa*64*-*-linux* uses hppa64linux.sh
2199 * Makefile.am (ALL_64_EMULATIONS): Add ehppa64linux.o
2200 (ehppa64linux.c): Add rule to make it.
2202 * Makefile.in: Regenerate.
2206 * ld.texinfo (Options, -r): Mention restrictions when using
2207 different object formats.
2211 * ldlang.c (lang_check): Emit fatal error if relocatable link
2212 between different object flavours with relocations in input.
2216 * ld.texinfo (-E, --export-dynamic): Mention --version-script.
2217 (--version-script): Mention the language support.
2221 * ldlang.c (lang_check): Revert the change mode on 2001-06-15.
2225 * Makefile.am (ld.1): Remove the prefix `$(srcdir)/'.
2226 (diststuff): Add $(MANS).
2227 * Makefile.in: Regenerated.
2233 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
2234 Update for API change in bfd_elf${ELFSIZE}_size_dynamic_sections.
2235 * mpw-elfmips.c (gldelf32ebmip_before_allocation): Ditto.
2236 * ld.h (args_type): Remove member export_dynamic. All users
2237 changed to use struct bfd_link_info member.
2239 * Makefile.am (ecriself.c, ed10velf.c, ei386moss.c): Depend on
2240 $(srcdir)/emultempl/elf32.em, not $(srcdir)/emultempl/generic.em.
2241 * Makefile.in: Regenerate.
2245 * ldlang.c (init_os): Add the newline to the einfo call.
2246 (lang_check): Likewise.
2247 (lang_do_version_exports_section): Likewise.
2251 * lexsup.c (parse_args); Save optind to report unrecognized
2256 * ldlang.c (lang_check): Emit fatal error if relocatable link
2257 between different object flavours.
2259 * lexsup.c (parse_args) <case OPTION_EXPORT_DYNAMIC, case 'E'>:
2260 Set new link_info member export_dynamic.
2261 * ldmain.c (main): Initialize new link_info member export_dynamic.
2265 * ldlang.c (walk_wild): Only call walk_wild_file if
2266 lookup_name returns something.
2267 (lookup_name): If load_symbols fails, return NULL.
2268 (load_symbols): Change to a boolean function.
2269 (open_input_bfds): If load_symbols fails then do not make the
2274 * ldlang.c (record_bfd_errors): Remove.
2276 * emultempl/aix.em: Fix copyright dates.
2280 * elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase.
2281 (TEXT_START_ADDR): Likewise.
2285 * configure.host: Set HOSTING_CRT0/HOSTING_LIBS correctly for s/390.
2289 * emultempl/pe.em (init): Reduce default stack reserve to 0x200000.
2293 * ldlang.c (open_input_bfds): Don't change the bfd error
2294 handler whilst loading symbols.
2298 * configure.tgt: Remove i370-mvs architecture, it is not currently
2303 * emulparams/ppcmacos.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
2304 like emulparams/aixppc.sh.
2308 * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Move
2309 setting of output_filename after bfd_scan_arch.
2310 * emultempl/pe.em: Likewise.
2314 * emulparams/aixrs6.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
2315 like emulparams/aixppc.sh.
2317 * emultempl/aix.em (sc): Use ${srcdir}/emultempl/ostring.sed
2318 instead of ${srcdir}/emultempl/stringify.sed.
2322 * emulparams/elf64_aix.sh: Change settings to match IBM linker
2327 * configure.host: Replace linuxoldld with linux*oldld.
2328 * configure.tgt: Likewise.
2332 * emultempl/stringify.sed: Removed again.
2336 * emultempl/aix.em (OUTPUT_ARCH): Defined.
2337 (gld${EMULATION_NAME}_before_parse): Initialize
2338 ldfile_output_architecture, ldfile_output_machine and
2339 ldfile_output_machine_name from ${OUTPUT_ARCH} if possible.
2340 * emultempl/beos.em: Likewise.
2341 * emultempl/elf32.em: Likewise.
2342 * emultempl/linux.em: Likewise.
2343 * emultempl/mipsecoff.em: Likewise.
2344 * emultempl/pe.em: Likewise.
2345 * emultempl/sunos.em: Likewise.
2349 * emultempl/aix.em : (gld${EMULATION_NAME}_read_file)
2350 udate import file format.
2351 (change_symbol_mode) New, same
2352 (is_syscall) New, same
2353 * emulparams/aixppc.sh : add SYSCALL_MASK and SYMBOL_MODE_MASK
2354 * emulparams/aixppc64.sh : same
2355 * emulparams/aixrs6.sh : same
2356 * emulparams/ppcmacos.sh : same
2357 * emultempl/aix.em : use strtoull to parse options
2358 * Makefile.am : add eaixppc64 emulation for xcoff64
2359 * Makefile.in : same
2360 * configure.tgt : same
2362 * scripttempl/aix.sc : default text section offset to 0x10000000
2363 default data section offset to 0x20000000
2364 add .sv3264 and .sv64 pseudo sections
2365 loader and debug sections use the currect section offset.
2367 * emultempl/aix.em : Add xcoff64 support
2368 Add -binitfini support
2369 (gld${EMULATION_NAME}_before_parse) -binitfini
2370 (gld${EMULATION_NAME}_parse_args) same
2371 (gld${EMULATION_NAME}_before_allocation) format change for special
2374 * emulparams/aixppc64.sh : New file for xcoff64 support
2378 * emultempl/elf32.em (ELF_INTERPRETER_SET_DEFAULT): Use this new
2379 variable to avoid non-portable shell construct.
2383 * ldmain.c (get_emulation): Add -mips5 command line argument.
2387 * emulparams/elf_i386_ldso.sh: New, copied from elf_i386.sh.
2388 (ELF_INTERPRETER_NAME): Define it.
2389 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Use
2391 * configure.tgt (targ_emul, targ_extra_emuls)
2392 [i[3456]86-*-solaris2*, i[3456]86-*-solaris*]: Use elf_i386_ldso
2393 as primary, elf_i386 as extra.
2394 * Makefile.am (ALL_EMULATIONS): Added eelf_i386_ldso.o.
2395 (eelf_i386_ldso.c): New rule.
2396 * Makefile.in: Rebuilt.
2400 * lexsup.c (ld_options): Allow -I to be an alias for
2401 --dynamic-linker. This is for Solaris compatability.
2402 * ld.texinfo: Document that -I can be used.
2407 * ldlang.c (wild_doit): Use linker_has_input to reliably determine
2408 whether an input section is the first one assigned to an output
2410 Assorted formatting fixes.
2414 * Makefile.am (ld.dvi): Search bfd/doc for texinfo files.
2415 * Makefile.in: Ditto.
2419 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Put
2420 .gnu.linkonce.ia64unw{,i} sections into corresponding .IA_64.unwind*
2422 * emulparams/elf64_aix.sh (OTHER_READONLY_SECTIONS): Likewise.
2426 * ldlang.c (lang_process): Call bfd_merge_sections.
2430 * ldgram.y: Fix typo.
2434 * emultempl/elf32.em: Include "libiberty.h".
2435 (gld${EMULATION_NAME}_vercheck): Call basename () to get the
2436 basename of the bfd filename.
2437 (gld${EMULATION_NAME}_stat_needed): Likewise.
2438 (gld${EMULATION_NAME}_try_needed): Likewise.
2439 (gld${EMULATION_NAME}_open_dynamic_archive): Likewise.
2443 * emultempl/pe.em: Include <ctype.h>.
2447 * emulparams/elf32openrisc.sh: New file.
2449 * Makefile.am: Add OpenRISC target.
2450 * Makefile.in: Regenerated.
2452 * configure.tgt: Add openrisc-*-* mapping.
2456 * emultempl/aix.em: Replace buystring with xstrdup.
2457 * emultempl/beos.em: Replace buystring with xstrdup.
2461 * ldfile.c: Include "libiberty.h".
2462 * ldlex.l: Likewise.
2464 * ldmisc.c (buystring): Removed.
2465 * ldmisc.h: Likewise.
2467 * ldfile.c: Replace buystring with xstrdup.
2468 * ldlang.c: Likewise.
2469 * ldlex.l: Likewise.
2470 * ldmain.c: Likewise.
2471 * ldmisc.c: Likewise.
2472 * lexsup.c: Likewise.
2473 * mpw-eppcmac.c: Likewise.
2477 * emulparms/elf_x86_64.sh (MAXPAGESIZE): Fix value.
2481 * ldlang.c (load_symbols): Give emulation a chance
2482 to process unrecognized file before fatal error is
2483 reported, not after.
2487 * configure.tgt: Add arm-vxworks target.
2488 * scripttempl/armcoff.sc: Support .text or .data as a section name
2494 * ld.texinfo: Document --fatal-warnings.
2497 * ldmisc.c (vfinfo): Set flag to inhibit making executable if
2498 warnings have been turned into errors.
2499 * lexsup.c (OPTION_WARN_FATAL): Define.
2500 (ld_options): Entry for --fatal-warnings.
2501 (parse_args): Handle OPTION_WARN_FATAL.
2502 * ld.h (ld_config_type): Add fatal_warnings field.
2506 * ldmain.c (main): Default to discard_sec_merge.
2507 * lexsup.c (OPTION_DISCARD_NONE): Define.
2508 (ld_options): Add --discard-none.
2509 (parse_args): Handle OPTION_DISCARD_NONE.
2510 * ldlang.c (wild_doit): SEC_MERGE should be set in the output
2511 section only if SEC_MERGE and SEC_STRINGS flags and entsize of
2512 all its input sections match.
2516 * Makefile.am (ALL_EMULATIONS): Add eelf32ltsmip.o.
2517 (ALL_64_EMULATIONS): Add eelf64btsmip.o and eelf64ltsmip.o.
2518 (eelf32ltsmip.c): New target.
2519 (eelf64btsmip.c): Likewise.
2520 (eelf64ltsmip.c): Likewise.
2521 * Makefile.in: Regenerated.
2523 * configure.tgt (mips*el-*-linux-gnu): Uses traditional MIPS
2525 (mips*-*-linux-gnu*): Likewise.
2527 * emulparams/elf32ltsmip.sh: New. Traditional little endian
2529 * emulparams/elf64btsmip.sh: New. Traditional 64bit big endian
2531 * emulparams/elf64ltsmip.sh: New. Traditional 64bit little
2536 * emulparams/criself.sh (EXECUTABLE_SYMBOLS): Cannot provide
2537 correct value of __Stext here.
2538 (TEXT_START_SYMBOLS): Define; always define __Stext, to start of
2541 * emulparams/crislinux.sh: Remove FIXME.
2545 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 64k.
2546 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Likewise.
2550 * configure.tgt (cris-*-*): Change default emulation to criself.
2551 (cris-*-*aout*): New rule.
2555 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 0x4000.
2556 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
2560 * ld.texinfo (Overview): Fix syntax in texi code.
2564 * ld.texinfo: Put @c man indications to generate the ld man page.
2565 When generating man, define all the variables. Define SEEALSO
2566 and SYNOPSIS. Re-organize some lines to avoid the cross references.
2567 * Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variables.
2568 (ld.1): Generate from ld.texinfo.
2569 * Makefile.in: Regenerate.
2573 * scripttempl/i386go32.sc: Support the GCC flags '-ffunction-sections'
2574 and '-fdata-sections'. Set the VMA of STABS sections to zero.
2578 * emultmpl/elf32.em (gld${EMULATION_NAME}_search_needed): If NAME
2579 is an absolute path look only for this file and not along the path.
2583 * emultempl/elf32.em (OPTION_GROUP): New macro.
2584 Add new option Bgroup to longopts.
2585 (gld*_parse_args): Handle GROUP_OPTION and recognize -z defs.
2586 (gld*_list_options): Add -Bgroup and -z defs.
2587 * ld.1: Document -Bgroup and -z defs.
2588 * ld.texinfo: Likewise.
2592 * scripttempl/elfd10v.sc (.rodata,.rodata1,.data1,.sdata): Deal
2593 with sections created by -fdata-sections.
2594 (.dynbss,.bss): Ditto.
2598 * emultempl/m68kelf.em (m68k_elf_after_allocation): Call
2599 after_allocation_default, not gld..._before_allocation.
2603 * configure.in (BFD_VERSION): New.
2604 (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
2605 * configure: Regenerate.
2606 * Makefile.am: Run "make dep-am"
2607 * Makefile.in: Regenerate.
2611 * emulparams/elf64_aix.sh: Add additional read-only sections;
2612 uncomment lines which are now required.
2616 * ldlang.c (open_input_bfds): Set the bfd error handler so
2617 that problems can be caught whilst loading symbols.
2618 (record_bfd_errors): New function: Report BFD errors and mark
2619 the executable output as being invalid.
2623 * configure.host: Add configuration for ia64-*-aix*.
2624 * Makefile.am (ALL_64_EMULATIONS): Add emulation for ia64-*-aix*.
2625 Add dependencies for eelf64_aix.c.
2626 * Makefile.in: Regenerate.
2627 * configure.tgt: Add ia64-*-aix* mapping.
2628 * emulparams/elf64_aix.sh: Add settings for elf64 on aix5.
2629 * testsuite/ld-bootstrap/bootstrap.exp: Exclude ia64 flavor from
2634 * ldfile.c (ldfile_open_file): Set entry->search_dirs_flag to
2635 false if we found the file.
2639 * configure.tgt: Add FreeBSD/Alpha, FreeBSD/x86-64, FreeBSD/ia64,
2640 FreeBSD/PowerPC, FreeBSD/arm, and FreeBSD/sparc64 entries.
2644 * Makefile.am: Add PDP-11 target.
2645 * configure.tgt: Likewise.
2646 * emulparams/pdp11.sh: New file.
2650 * configure.host: Add a generic FreeBSD configuration entry such that
2651 all [modern] FreeBSD systems on all platforms will look the same.
2655 * configure.tgt: Remove mention of earmelf_linux26.
2659 * emulparams/elf64_ia64.sh (OTHER_GOT_SYMBOLS): Remove.
2663 * ldexp.h (node_type): Add etree_provided.
2664 * ldexp.c (exp_fold_tree): Handle etree_provided. Set the node
2665 type to etree_provided if defined by PROVIDE. Allow updating
2667 (exp_print_tree): Handle etree_provided.
2668 * mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle
2673 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add
2674 .IA_64.unwind.* pattern to unwind table section and
2675 .IA_64.unwind_info* pattern to unwind info section.
2679 * Makefile.am: Add linux target for S/390.
2680 * Makefile.in: Likewise.
2681 * configure.host: Likewise.
2682 * configure.tgt: Likewise.
2683 * emulparams/elf64_s390.sh: New file.
2684 * emulparams/elf_s390.sh: New file.
2688 * configure.tgt (sparc64-*-linux-gnu*): Add elf32_sparc into
2690 (sparc-*-linux-gnu*): Add elf64_sparc into targ_extra_libpath.
2694 * Makefile.am: Remove mention of earmelf_linux26.
2695 * Makefile.in: Regenerate.
2699 * emulparams/armelf_linux.sh (TEXT_START_ADDR): Set to 0x8000.
2700 * emulparams/armelf_linux26.sh: Delete.
2701 * configure.tgt: Remove mention of armelf_linux26 emulation.
2705 * ld.1: Replace occurances of -oformat with --oformat.
2709 * ldlang.c (lang_leave_overlay): Don't set lma_region when
2710 load_base is specified.
2714 * emultempl/elf32.em: Correct spelling in comments and listed
2719 * ldlang.c (lang_leave_overlay): Only set lma_region from the
2720 default for the first section of a group of overlay sections.
2724 * Makefile.am (GENSCRIPTS): Pass exec_prefix.
2725 * Makefile.in: Regenerate.
2726 * genscripts.sh: Use exec_prefix parameter to specify tool lib.
2727 Check for null tool_dir.
2731 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add IA_64.unwind
2732 and IA_64.unwind.info.
2736 * ldlang.c (lang_check): Merge the private data only if the
2737 input file has contents.
2741 * emulparams/hppalinux.sh (OUTPUT_FORMAT): Set to elf32-hppa-linux.
2743 * emultempl/hppaelf.em (hppaelf_after_parse): New function,
2744 enabling search for libmilli. On a relocatable link, make .text
2746 (LDEMUL_AFTER_PARSE): Define.
2747 (hppaelf_finish): Correct spelling of relocatable in comments.
2749 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
2750 rummage through the script for sections on the unique list.
2751 Correct length of strncmp for ".note".
2752 (gld${EMULATION_NAME}_check_needed): Rearrange function.
2754 * ldlang.c (unique_section_list): New var.
2755 (unique_section_p): New function.
2756 (walk_wild_section): Don't match sections on unique_section_list.
2757 (lang_add_unique): New function.
2758 Correct spelling of relocatable in comments.
2760 * ldlang.h (struct unique_sections): Declare.
2761 (unique_section_list): Declare.
2762 (unique_section_p): Declare.
2763 (lang_add_unique): Declare.
2765 * lexsup.c (ld_options): Allow --unique to take an optional arg.
2766 (parse_args [OPTION_UNIQUE]): Call lang_add_unique.
2768 * ld.texinfo (--unique): Update.
2772 * lexsup.c (parse_args): Remove spurious white space.
2776 * lexsup.c (parse_args): Update copyright date.
2780 * configure.host: Set HOSTING_LIBS appropriately for ix86-cygwin.
2784 * scripttempl/h8300.sc: Fix formatting. Fix a comment typo.
2785 * scripttempl/h8300h.sc: Fix formatting.
2786 * scripttempl/h8300s.sc: Likewise.
2787 * scripttempl/h8500.sc: Likewise.
2788 * scripttempl/h8500b.sc: Likewise.
2789 * scripttempl/h8500c.sc: Likewise.
2790 * scripttempl/h8500m.sc: Likewise.
2791 * scripttempl/h8500s.sc: Likewise.
2795 * emultempl/elf32.em: Only perform Linux ld hints processing when
2800 * ld.texinfo (Bug Reporting): Update email address for reports.
2804 * lexsup.c (parse_args): Set opterr to 0 and detect unparsed long
2805 options by checking for a return value of '?' not -1.
2809 * lexsup.c (struct ld_option): Add new enum value:
2811 (ld_options[]): Change -omagic, -output and -oformat options
2812 to be EXACTLY_TWO_DASHES.
2813 (OUTPUT_COUNT): Use ARRAY_SIZE.
2814 (parse_args): Change parameter 'argc' to unsigned.
2815 Place EXACTLY_TWO_DASHES options into new really_longopts
2817 If getopt_long_only fails, try calling getopt_long using the
2818 really_longopts array.
2819 (help): Print a double dash for both EXACTLY_TWO_DASHES and
2822 * ldlex.h: Fix prototype of parse_args.
2824 * ld.texinfo: Document that long options starting with 'o'
2825 must be preceeded by two dashes. Change example of a single
2826 dashed long option from -oformat to -trace-symbol.
2830 * emultempl/pe.em (OPTION_NO_DEFAULT_EXCLUDES): Define.
2831 (longopts[]): New --no-default-excludes option.
2832 (gld_${EMULATION_NAME}_list_options): Document.
2833 (gld_${EMULATION_NAME}_parse_args): Handle.
2837 * ldlang.c (new_stat): Revert the last beautification with "innocent"
2838 whitespace, it breaks the K&R C preprocessor.
2842 * ld.texinfo: Add notes about --whole-archive and gcc.
2846 * lexsup.c (OPTION_ALLOW_SHLIB_UNDEFINED): Define.
2847 (ld_options): Entry for --allow-shlib-undefined.
2848 (parse_args): Handle OPTION_ALLOW_SHLIB_UNDEFINED.
2849 * ldmain.c (main): Initialize link_info.allow_shlib_undefined
2851 * ld.texinfo: Document new command line switch.
2855 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS):
2856 .fixup is actually read/write.
2857 * emulparams/elf32lppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
2858 * emulparams/elf32ppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
2859 * emulparams/elf32lppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
2863 * NEWS: Add note about x86_64 architecture.
2867 * scripttempl/i386go32.sc: Use PROVIDE with _etext, _edata, _end.
2868 Set DWARF2 sections to a VMA of zero.
2872 * configure.tgt (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
2874 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
2875 (sparc*-*-rtems*): Switched from a.out to ELF.
2879 * Makefile.am (ALL_EMULATIONS): Add eelf_x86_64.o
2880 (eelf_x86_64.c): New.
2881 * Makefile.in: Regenerate.
2882 * configure.tgt: Add support for x86_64-*-linux-gnu*.
2883 * emulparams/elf_x86_64.sh: New.
2887 * emulparams/crislinux.sh (ENTRY): Change back to _start.
2888 (TEXT_START_SYMBOLS): Remove conditional setting of __start.
2890 * scripttempl/crisaout.sc: Change all RELOCATING not related to
2891 merging non-a.out sections into CONSTRUCTING.
2895 * ld.1 (COPYING): Mention that the GNU Free Documentation
2896 License is present in the sources, but not the output, and
2897 also available from the GNU website.
2898 (GNU Free Documentation License): Comment out this section.
2902 * emulparams/elf64alpha.sh (ENTRY): Remove leading underscore as ELF
2907 * ld.1: Remove old date so it does not give the impression the manpage
2912 * configure.tgt (xscale-coff): Add target.
2913 (xscale-elf): Add target.
2917 * ldmain.c (main): Remove redundant init of config.make_executable
2922 * emulparams/elf64alpha.sh (MAXPAGESIZE): Typo -- 64k, not 1M.
2926 * scripttempl/h8300.sc: Fix formatting.
2927 * scripttempl/h8300h.sc: Likewise.
2928 * scripttempl/h8300s.sc: Likewise.
2932 * scripttempl/elf32avr.sc: Fix bug in .eeprom segment.
2936 * emultempl/pe.em: Define ___start_SECNAME and ___stop_SECNAME
2937 around orphan sections whose names can be represented in C.
2941 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): New local
2942 hold_sdata. If SEC_SMALL_DATA set, set place to hold_sdata.
2946 * ld.texinfo: Add GNU Free Documentation License.
2947 * ldint.texinfo: Add GNU Free Documentation License.
2948 * ld.1: Add GNU Free Documentation License.
2952 * ldlex.l (yy_create_string_buffer): Init yy_is_our_buffer,
2953 yy_is_interactive, yy_at_bol, and yy_fill_buffer.
2955 * Makefile.am (DISTCLEANFILES): Add stringify.sed.
2956 Move 2000-11-02 Makefile.in changes to this file.
2957 * Makefile.in: Regenerate.
2961 * scripttempl/h8300.sc: Use ${CONSTRUCTING...} to enclose
2962 constructors and destructors.
2963 * scripttempl/h8300h.sc: Ditto.
2964 * scripttempl/h8300s.sc: Ditto.
2965 * scripttempl/h8500.sc: Ditto.
2966 * scripttempl/h8500b.sc: Ditto.
2967 * scripttempl/h8500c.sc: Ditto.
2968 * scripttempl/h8500m.sc: Ditto.
2969 * scripttempl/h8500s.sc: Ditto.
2970 * scripttempl/v850.sc: Ditto.
2971 * scripttempl/w65.sc: Ditto.
2972 * scripttempl/z8000.sc: Ditto.
2976 * Makefile.in (e_i386_chaos.c): New rule.
2977 (ALL_EMULATIONS): Added e_i386_chaos.o.
2978 * emulparams/elf_i386_chaos.sh: New file.
2979 * configure.tgt: Recognise i[3456]86-chaosdev-storm-chaos.
2983 * emulparams/elf64_sparc.sh (TEXT_START_ADDR,
2984 NONPAGED_TEXT_START_ADDR): Set to 4GB for Solaris targets.
2985 Fix sed invocation, so that it coped with '/' in Solaris 64bit
2986 library path suffix.
2991 * scripttempl/crisaout.sc (.text, .data): Pad, with ALIGN (32),
2992 for consecutive sections.
2996 * lexsup.c: New option OPTION_TARGET_HELP. Prints all target specific
2998 * ld.texinfo: Added notes about this new option.
3002 * emultempl/pe.em (_after_open): Add tests of return values from
3003 bfd functions. Emit appropriate error messages if necessary.
3007 * emultempl/pe.em (_after_open): Delete 'is2' and 'nsyms'
3008 local variables - they are not used, but leave in the call to
3009 bfd_canonicalize_symtab.
3010 (_open_dynamic_archive): Add #ifdef DLL_SUPPORT around use of
3011 pe_dll_search_prefix.
3015 * emultempl/pe.em (pe_dll_search_prefix): New variable,
3016 (longopts): New --dll-search-prefix option.
3017 (gld_${EMULATION_NAME}_list_options): Document.
3018 (gld_${EMULATION_NAME}_parse_args): Handle.
3019 (gld_${EMULATION_NAME}_open_dynamic_archive): When linking
3020 dynamically, search for a dll named '<prefix><basename>.dll'
3021 in preference to 'lib<basename>.dll' if --dll-search-prefix
3026 * ldlang.c (section_already_linked): Set kept_section instead of
3031 * deffile.h: Fix formatting.
3032 * lexsup.c: Likewise.
3037 * pe-dll.c (make_one): Do not generate code thunk for DATA
3039 (process_def_file): deduce DATA flag for auto-export sumbols.
3043 * ld.h: Fix formatting.
3044 * ldcref.c: Likewise.
3045 * ldctor.h: Likewise.
3046 * ldemul.c: Likewise.
3047 * ldemul.h: Likewise.
3048 * ldexp.c: Likewise.
3049 * ldexp.h: Likewise.
3050 * ldfile.c: Likewise.
3051 * ldfile.h: Likewise.
3052 * ldlang.c: Likewise.
3053 * ldlang.h: Likewise.
3054 * ldmain.c: Likewise.
3055 * pe-dll.c: Likewise.
3057 * pe-dll.c: Revert some formatting fixes.
3061 * pe-dll.c: Fix formatting.
3065 * ldlang.c: Fix formatting.
3069 * pe-dll.c (fill_edata): initialize entire block
3070 (make_one): fill in correct section.
3074 * ldexp.c: Fix formatting.
3078 * emultempl/pe.em (gld_*_after_open): detect case where there two
3079 import libraries for same dll; rename one to ensure proper link
3082 * pe-dll.c (process_def_file): compare ordinals to -1, not 0; fix
3084 (generate_edata): fix typo
3088 * scripttempl/crisaout.sc (ENTRY): Now __start.
3089 (.text): Add default setting for __start.
3090 Remove CONSTRUCTORS handling.
3091 (/DISCARD/): Add .gnu.warning.*.
3092 * emulparams/crislinux.sh (ENTRY): Now __start.
3093 (TEXT_START_SYMBOLS): New; provide __Stext and __start default.
3094 * emulparams/criself.sh (OUTPUT_FORMAT): Now elf32-us-cris.
3095 (ENTRY): Now __start.
3096 (INITIAL_READONLY_SECTIONS): Add KEEP for .startup.
3097 (EXECUTABLE_SYMBOLS): Add default setting for __start.
3101 * deffile.h: Fix formatting.
3103 * ldcref.c: Likewise.
3104 * ldctor.c: Likewise.
3105 * ldctor.h: Likewise.
3106 * ldemul.c: Likewise.
3107 * ldemul.h: Likewise.
3108 * ldexp.c: Likewise.
3109 * ldexp.h: Likewise.
3110 * ldfile.c: Likewise.
3111 * ldfile.h: Likewise.
3112 * ldlang.c: Likewise.
3113 * ldlang.h: Likewise.
3114 * lexsup.c: Likewise.
3116 * pe-dll.c: Likewise.
3120 * pe-dll.c (process_def_file): Uninitialized data wasn't
3121 exported with --export-all-symbols switch.
3125 * pe-dll.c (fill_edata): rearrange the data so that ordinals and
3126 noname work properly.
3130 * ld.texinfo (HPPA ELF32): New section.
3132 * emultempl/hppaelf.em (group_size): New.
3133 (hppaelf_finish): Pass group_size to elf32_hppa_size_stubs.
3134 (PARSE_AND_LIST_PROLOGUE): Add OPTION_STUBGROUP_SIZE.
3135 (PARSE_AND_LIST_LONGOPTS): Add --stub-group-size. Duplicate
3136 options to prevent abbreviations matching.
3137 (PARSE_AND_LIST_OPTIONS): Describe the above. Reformat.
3138 (PARSE_AND_LIST_ARGS_CASES): Handle it.
3142 * emultempl/m68kelf.em: Conditionalise the embedded relocs feature
3143 on the m68*-*-elf target. Make it support COFF input objects.
3147 * ldmain.c: Fix formatting.
3148 * ldmisc.c: Likewise.
3149 * ldver.c: Likewise.
3150 * ldwrite.c: Likewise.
3154 * ldwrite.c (clone_section): Silence gcc warnings.
3158 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Handle
3159 out of memory failure.
3161 * ldwrite.c (ldwrite): Remove unnecessary einfo arg.
3162 (clone_section): Handle out of memory failures. Rename var to
3163 avoid c++ reserved word.
3167 * emultempl/hppaelf.em (hppaelf_add_stub_section): Rename
3168 stub_name param to stub_sec_name.
3169 (hppaelf_finish): Modify call to elf32_hppa_size_stubs.
3173 * emultempl/m68kelf.em: New file.
3174 * emulparams/m68kelf.sh (EXTRA_EM_FILE): Use it.
3175 * Makefile.am (em68kelf.c): Add dependency on m68kelf.em.
3176 * Makefile.in: Regenerate.
3180 * emulparams/hppalinux.sh (DATA_START_SYMBOLS): Provide $global$
3185 * ldmain.c (multiple_definition): Disable relaxation if
3186 multiple symbol definitions are encountered - otherwise the
3187 linker could abort with an assertion failure.
3191 * mri.c: Fix formatting.
3195 * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
3196 * configure: Rebuild.
3200 * Makefile.am (lexsup.o): Also depend on $(INCDIR)/demangle.h.
3201 * Makefile.in: Rebuild.
3205 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Fix
3206 broken list handling. Create __start_SECNAME and __stop_SECNAME
3207 when no place-holder. Add some comments. Test both SEC_CODE and
3208 SEC_READONLY for hold_text to prevent .rodata orphan poisoning.
3209 Handle case where no output section statement created.
3213 * configure.tgt (sh-*-linux*): Added.
3214 * Makefile.am: Added eshelf_linux and eshlelf_linux.
3215 * Makefile.in: Rebuilt.
3216 * emulparams/shelf_linux.sh: New file.
3217 * emulparams/shlelf_linux.sh: New file.
3221 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
3222 try shuffling sections when the orphan happens to be the place
3223 holder. Keep count of unique section names generated so we speed
3224 the search for a new name.
3228 * configure: Rebuilt with new libtool.m4.
3232 * Makefile.in: Regenerate.
3233 * aclocal.m4: Regenerate.
3234 * configure: Regenerate.
3235 * config.in: Regenerate.
3236 * po/ld.pot: Regenerate.
3238 * ldint.texinfo: Remove CVS revision marker - it foils local
3241 * emultempl/ticoff.em: Remove extraneous comma.
3245 * emultempl/hppaelf.em (hppaelf_add_stub_section): Add SEC_RELOC
3246 to stub section flags.
3247 (hppa_for_each_input_file_wrapper): New.
3248 (hppa_lang_for_each_input_file): New.
3249 (lang_for_each_input_file): Define to call above.
3250 (multi_subspace): New.
3251 (hppaelf_finish): Pass multi_subspace to elf32_hppa_size_stubs.
3252 (PARSE_AND_LIST_PROLOGUE): Define.
3253 (PARSE_AND_LIST_LONGOPTS): Define.
3254 (PARSE_AND_LIST_OPTIONS): Define.
3255 (PARSE_AND_LIST_ARGS_CASES): Define.
3256 (hppaelf_finish): Call elf32_hppa_set_gp.
3257 (hppaelf_set_output_arch): Remove.
3258 (LDEMUL_SET_OUTPUT_ARCH): Remove.
3260 * emulparams/hppalinux.sh (ELFSIZE): Define.
3262 (OTHER_READONLY_SECTIONS): Define.
3264 (GENERATE_SHLIB_SCRIPT): Define.
3266 * ldlang.c: Add missing prototypes, and tidy others. Change CONST
3267 to const throughout. Change `void *' to `PTR' throughout.
3268 (lang_memory_default): Function is local to file, add `static'.
3270 * Makefile.am (ehppaelf.c): Depend on emultempl/elf32.em.
3271 (ehppalinux.c): Likewise.
3272 (earmelf.c): Likewise.
3273 (earmelf_linux.c): Likewise.
3274 (earmelf_linux26.c): Likewise.
3275 * Makefile.in: Regenerate.
3277 * ld.h (ld_config_type): Add unique_orphan_sections.
3278 * lexsup.c (OPTION_UNIQUE): Define.
3279 (ld_options): Add "--unique".
3280 (parse_args): Handle it.
3281 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
3282 search for an existing output section if unique_orphan_sections is
3283 set. Make use of bfd_get_unique_section_name rather than
3284 duplicating code here.
3285 * ld.texinfo: Describe --unique.
3287 * lexsup.c (ld_options): Make split-by-reloc arg optional. Add
3288 optional arg to split-by-file.
3289 (parse_args): Handle them.
3290 * ld.texinfo: Update description of these options.
3291 * ldwrite.c (clone_section): Pass in the section name. Replace
3292 local code with bfd_get_unique_section_name.
3293 (split_sections): Tidy code and comments. Use a list traversal
3294 more appropriate to the list construction. Handle cooked section
3295 sizes. Split when split_by_reloc reached rather than exceeded.
3296 Track section size and split when split_by_file reached. Fix
3297 link_order_tail (even though it's not used).
3298 (ldwrite): Modify condition for calling split_sections to suit
3299 changed split_by_reloc and split_by_file.
3300 * ldmain.c (main): Init config.split_by_reloc and
3301 config.split_by_file to -1.
3302 * ld.h (ld_config_type): Change split_by_reloc to unsigned.
3303 Change split_by_file to bfd_size_type.
3307 * configure.in: Increase version number to 2.10.91.
3308 * NEWS: Mention new ability to support removal of duplicate DWARF2
3310 * configure: Regenerate.
3311 * aclocal.m4: Regenerate.
3312 * config.in: Regenerate.
3316 * scripttempl/elf.sc: Add .gnu.linkonce.wi.* to .debug_info
3318 * scripttempl/elf32avr.sc: Ditto.
3319 * scripttempl/elfd10v.sc: Ditto.
3320 * scripttempl/elfd30v.sc: Ditto.
3321 * scripttempl/elfi370.sc: Ditto.
3322 * scripttempl/elfm68hc11.sc: Ditto.
3323 * scripttempl/elfm68hc12.sc: Ditto.
3324 * scripttempl/elfi386beos.sc: Ditto.
3325 * scripttempl/v850.sc: Ditto.
3329 * acinclude.m4: Include libtool and gettext macros from the
3331 * aclocal.m4, configure: Rebuilt.
3335 * ldlang.c (open_output): When choosing the target for a
3336 particular endianness, do nothing if the target is not
3341 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
3342 check -rpath nor LD_RUN_PATH for cross link.
3343 * ld.texinfo: Document the change.
3347 * NEWS: Mention support for CRIS.
3351 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Get
3352 the current runpath list from bfd_elf_get_runpath_list ()
3357 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search
3358 the DT_RPATH/DT_RUNPATH entries for DT_NEEDED after
3359 LD_LIBRARY_PATH for native linker. Display the needed DSO if
3360 trace_file_tries is non-zero.
3361 (gld${EMULATION_NAME}_try_needed): Report the needed DSO found
3362 if trace_file_tries is non-zero.
3364 * ld.texinfo: Document the usage of DT_RPATH/DT_RUNPATH.
3369 * NEWS: Mention i860 support.
3373 * scripttempl/elf.sc: Fix last change to use correct comment
3378 * scripttempl/elf.sc: Add a comment giving the correspondence
3379 between sections, per-datum sections, and linkonce sections. Make
3380 the comment true even for .bss, .sdata, .sdata2, .sbss, and
3385 * emulparams/elf32_i860.sh: New file.
3386 * configure.tgt: Recognize new target i860-stardent-{sysv4*|elf*}.
3387 * Makefile.am (ALL_EMULATIONS): Add eelf32_i860.o.
3388 (eelf32_i860.c): New rule.
3389 * Makefile.in: Regenerate.
3393 * emulparams/mipspe.sh (ENTRY): Add definition.
3397 * emultempl/elf32.em (_after_close): Refer to -rpath not --rpath
3402 * scripttempl/elfm68hc11.sc: Define __bss_size symbol to indicate
3403 the final size of .bss section.
3404 * scripttempl/elfm68hc12.sc: Likewise.
3408 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Rename to
3409 gld${EMULATION_NAME}_parse_args for consistency. Combine
3410 lastoptind and prevoptind vars, and keep track of last optind.
3411 (gld_${EMULATION_NAME}_list_options): Rename to
3412 gld${EMULATION_NAME}_list_options.
3416 * configure.tgt: Select targ_emul=elf_i386 for Unixware 7
3417 (i586-sco-sysv5uw7.1.0).
3421 * emulparams/elf64alpha.sh (PARSE_AND_LIST_ARGS): Removed.
3422 (PARSE_AND_LIST_PROLOGUE): New.
3423 (PARSE_AND_LIST_LONGOPTS): Likewise.
3424 (PARSE_AND_LIST_OPTIONS): Likewise.
3425 (PARSE_AND_LIST_ARGS_CASES): Likewise.
3426 (PARSE_AND_LIST_EPILOGUE): Likewise.
3430 * emultempl/armelf.em: Elide functions common to elf32.em,
3431 ie. most of the file.
3432 (arm_elf_after_open): New. Do arm specific things then call
3433 gld${EMULATION_NAME}_after_open.
3434 (arm_elf_before_allocation): New. Call
3435 gld${EMULATION_NAME}_before_allocation then do arm specifics.
3436 (PARSE_AND_LIST_PROLOGUE): Define.
3437 (PARSE_AND_LIST_SHORTOPTS): Define.
3438 (PARSE_AND_LIST_LONGOPTS): Define.
3439 (PARSE_AND_LIST_OPTIONS): Define.
3440 (PARSE_AND_LIST_ARGS_CASES): Define.
3441 (LDEMUL_AFTER_OPEN): Define.
3442 (LDEMUL_BEFORE_ALLOCATION): Define.
3443 (LDEMUL_BEFORE_PARSE): Define.
3444 (LDEMUL_FINISH): Define.
3446 * emultempl/hppaelf.em: Similarly zap most of this file.
3447 (hppaelf_add_stub_section): Prototype.
3448 (hppaelf_layaout_sections_again): Prototype.
3449 (hook_in_stub): Prototype.
3450 (LDEMUL_SET_OUTPUT_ARCH): Define.
3451 (LDEMUL_FINISH): Define.
3452 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
3454 * emulparams/armelf.sh (TEMPLATE_NAME): Use elf32.
3455 (EXTRA_EM_FILE): New.
3456 * emulparams/armelf_linux.sh: Likewise.
3457 * emulparams/armelf_linux26.sh: Likewise.
3458 * emulparams/hppalinux.sh: Likewise.
3459 * emulparams/hppaelf.sh: Likewise.
3462 * emultempl/elf32.em: Fix formatting.
3463 (EXTRA_EM_FILE): Source it.
3464 (LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
3465 LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
3466 LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
3467 LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
3468 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
3469 LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
3470 LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
3471 LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
3472 LDEMUL_FIND_POTENTIAL_LIBRARIES): New shell vars. Add code to
3473 allow functions in this file to be overridden.
3474 (PARSE_AND_LIST_SHORTOPTS): Handle it.
3476 * emultempl/m68kcoff.em: Include ldfile.h before ldemul.h.
3478 * emultempl/elf32.em: Reorganize file.
3482 * emulparams/elf64alpha.sh: Implement "-taso" emulation
3483 specific option to fit 64-bit executable in the lower
3484 31-bit address range. This is done by changing start
3485 address of .interp (the very first section of executable)
3486 and then setting EF_ALPHA_32BIT elf header flag.
3490 * emultempl/m68kcoff.em: New file.
3491 * emulparams/m68kcoff.sh (TEMPLATE_NAME): Use m68kcoff template.
3492 * Makefile.am (em68kcoff.c): Depend on m68kcoff.em rather than
3494 * Makefile.in: Regenerate.
3498 * emultempl/elf32.em (longopts): Duplicate "disable-new-dtags"
3499 and "disable-new-dtags" to stop getopt from treating -d/-e as
3500 abbreviations for these options.
3504 * ld.texinfo: Add documentation for --disable-new-dtags and
3507 * ldmain.c (main): Initialize link_info.new_dtags to false.
3509 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Add
3510 --disable-new-dtags and --enable-new-dtags.
3511 (gld_${EMULATION_NAME}_list_options): Likewise.
3515 * lexsup.c: Add optional style to demangle switch
3516 * ld.texinfo: Document optional style to demangle switch.
3520 * Makefile.am (ALL_EMULATIONS): Add ecrisaout.o, ecriself.o,
3522 (ecrisaout.c, ecriself.c, ecrislinux.c): New rules.
3523 Regenerate dependencies.
3524 * Makefile.in: Rebuild.
3525 * configure.tgt (cris-*-*): New target.
3526 * emulparams/crisaout.sh, emulparams/criself.sh,
3527 emulparams/crislinux.sh, scripttempl/crisaout.sc: New files.
3528 * po/POTFILES.in, po/ld.pot: Regenerate.
3532 * emultempl/elf32.em (gld_${EMULATION_NAME}_list_options):
3533 Print out ignored -z options.
3537 * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Removed.
3538 (PARSE_AND_LIST_PROLOGUE): New.
3539 (PARSE_AND_LIST_LONGOPTS): Likewise.
3540 (PARSE_AND_LIST_OPTIONS): Likewise.
3541 (PARSE_AND_LIST_ARGS_CASES): Likewise.
3543 * ldmain.c (main): Clear link_info.flags and link_info.flags_1.
3545 * lexsup.c (ld_options): Comment out 'z'.
3546 (parse_args): Likewise.
3548 * emultempl/elf32.em: Include "elf/common.h".
3549 (gld_${EMULATION_NAME}_parse_args): Defined. Handle some -z
3551 (gld_${EMULATION_NAME}_list_options): Likewise.
3553 * ld.texinfo: Add documentation for the recognized -z options.
3557 * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call
3558 bfd_elf_set_dt_needed_soname ().
3562 * pe-dll.c (pe_dll_id_target): check object target name also
3566 * scripttempl/elf.sc (.init): Only do ${INIT_START} and
3567 ${INIT_END} if relocating.
3568 (.fini): Likewise ${FINI_START} and ${FINI_END}.
3572 * emultempl/pe.em (gld_*_open_dynamic_archive): New search
3573 order for dynamic library '-lfoo' on pei386: libfoo.dll.a,
3574 foo.dll.a, libfoo.a, libfoo.dll, foo.dll. This fixes compatibility
3575 errors introduced by the old dynamic lib search order.
3579 * pe-dll.c (process_def_file): auto-export data items also
3580 (pe_process_import_defs): also see if _imp_ form needed
3584 * pe-dll.c (make_one): fix a typo in the __imp_ name decoration
3585 for dll import libraries
3589 * scripttempl/i386go32.sc: Support the g++ attribute init_priority in
3590 gcc 2.95.2 and later.
3594 * ldfile.c (ldfile_try_open_bfd): Output '\n' after an error
3599 * ldemul.h (struct lang_input_statement_struct): Remove forward
3601 (struct search_dirs): Likewise.
3602 * ldfile.h (struct lang_input_statement_struct): Likewise.
3603 Protect file from multiple inclusion.
3604 * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Move file_chain
3605 declaration from macro to file scope.
3607 * ldemul.c: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this order.
3608 * ldgram.y: Likewise here.
3609 * ldlang.c: And here.
3610 * ldmain.c: And here.
3611 * mpw-elfmips.c: And here.
3612 * mpw-eppcmac.c: And here.
3613 * emultempl/aix.em: And here.
3614 * emultempl/armcoff.em: And here.
3615 * emultempl/armelf.em: And here.
3616 * emultempl/armelf_oabi.em: And here.
3617 * emultempl/beos.em: And here.
3618 * emultempl/elf32.em: And here.
3619 * emultempl/hppaelf.em: And here.
3620 * emultempl/linux.em: And here.
3621 * emultempl/lnk960.em: And here.
3622 * emultempl/pe.em: And here.
3623 * emultempl/sunos.em: And here.
3624 * mpw-esh.c: And here. Include ldexp.h and ldlang.h too.
3625 * mpw-idtmips.c: Ditto.
3626 * emultempl/generic.em: Ditto.
3627 * emultempl/gld960.em: Ditto.
3628 * emultempl/gld960c.em: Ditto.
3629 * emultempl/mipsecoff.em: Ditto.
3630 * emultempl/ticoff.em: Ditto.
3631 * emultempl/vanilla.em: Ditto.
3633 * pe-dll.c: Include ldfile.h
3634 * ldver.c: Include ldexp.h, ldlang.h, ldfile.h
3636 * mpw-elfmips.c: (gldelf32ebmip_before_allocation): Add missing
3637 arguments to bfd_elf32_size_dynamic_sections call.
3638 (gldelf32ebmip_place_orphan): Add missing arguments to
3639 lang_leave_output_section_statement call.
3643 * emultempl/pe.em (pe_enable_stdcall_fixup): Protect with
3645 (strhash): Likewise.
3646 (compute_dll_image_base): Likewise.
3647 (pe_undef_found_sym): Likewise.
3648 (pe_undef_cdecl_match): Likewise.
3649 (gld_${EMULATION_NAME}_open_dynamic_archive): Mark the
3650 argument "arch" with ATTRIBUTE_UNUSED.
3654 * configure.tgt: Remove extraneous hppa*-*-linux-gnu*.
3657 * ldwrite.c (SSIZE): Remove to cure macro redefinition warning.
3661 Changes to create multiple linker stubs, positioned immediately
3662 before the section where they are required.
3663 * emultempl/hppaelf.em: Include elf32-hppa.h.
3664 (stub_sec, file_chain): Delete.
3665 (hppaelf_create_output_section_statements): Don't make a stub
3667 (hook_stub_info): New struct.
3668 (hook_in_stub): New function.
3669 (hppaelf_add_stub_section): New function.
3670 (hppaelf_finish): Do nothing for relocateable links. Modify the
3671 call to elf32_hppa_size_stubs. Move code for updating section
3673 (hppaelf_layaout_sections_again): ..to here, a new function.
3675 * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Fix
3676 broken list handling. Pass in a pointer to the list.
3677 (hppaelf_finish): Update call to hppaelf_delete_padding_statements
3679 (hppaelf_before_parse): Prototype.
3680 (hppaelf_set_output_arch): Prototype.
3681 (hppaelf_create_output_section_statements): Prototype.
3682 (hppaelf_delete_padding_statements): Prototype.
3683 (hppaelf_finish): Prototype.
3686 * emultempl/hppaelf.em: Include ctype.h.
3687 (struct orphan_save): New.
3688 (gld${EMULATION_NAME}_place_orphan): New.
3689 (output_rel_find): New.
3690 (hppaelf_get_script): Update from elf32.em.
3691 (ld_hppaelf_emulation): Rename to ld_${EMULATION_NAME}_emulation.
3692 Change emulation_name field to "${EMULATION_NAME}". Add
3693 gld${EMULATION_NAME}_place_orphan.
3695 * Makefile.am (ALL_EMULATIONS): Reinstate ehppaelf.o, add
3696 ehppalinux.o, sort it. Regenerate dependencies.
3697 (ehppalinux.c): Depend on hppaelf.em
3698 * Makefile.in: Regenerate.
3700 * configure.tgt: targ_emul=hppalinux for hppa*linux
3702 * emulparams/hppalinux.sh: New.
3703 * emulparams/hppaelf.sh (TARGET_PAGE_SIZE): Write in hex.
3707 * lexsup.c (parse_args): Copy section name.
3711 * emultempl/pe.em: institute the following search order for
3712 dynamic libraries on pei386: libfoo.dll.a, foo.dll.a (import
3713 libs), libfoo.dll, foo.dll (link direct to dll). Fall back to
3714 static lib (libfoo.a) if none of the above are found.
3718 * emultempl/pe.em (pe_enable_auto_image_base): New variable.
3719 (longopts): New --{enable,disable}-auto-image-base options.
3720 (gld_${EMULATION_NAME}_list_options): Document.
3721 (gld_${EMULATION_NAME}_parse): Handle.
3722 (strhash): New static function.
3723 (compute_dll_image_base): New static function.
3724 (gld_${EMULATION_NAME}_set_symbols): Use.
3732 * configure.tgt: Add traditional mips (mips*-*-sysv4*) target.
3733 * emulparams/elf32btsmip.sh: New file.
3734 * Makefile.am: Add traditional mips target.
3735 * Makefile.in: Rebuild.
3739 * Makefile.am (EXTRA_ld_new_SOURCES): Set to deffilep.y for
3740 automake to use YLWRAP.
3741 * Makefile.in: Rebuild.
3745 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
3746 (CLEANFILES): Add DEPA.
3747 * Makefile.in: Regenerate.
3749 2000-06-30 Timothy Wall <twall@ppc>
3751 * scripttempl/tic54xcoff.sc: PAGE N is not implemented, so encode
3752 the page in the upper octet of the address.
3756 * emulparams/avrmega161.sh (ARCH): Change to avr:5.
3760 * NEWS: arm-elf does --gc-sections too.
3764 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
3766 * Makefile.in: Regenerate.
3770 * Makefile.am: Rebuild dependency.
3771 * Makefile.in: Rebuild.
3775 * Makefile.am: Rebuild dependency.
3776 * Makefile.in: Rebuild.
3780 * scripttempl/tic54xcoff.sc: New.
3781 * ldlang.c (wild_doit): Propagate SEC_BLOCK flag.
3782 * gen-doc.texi: Add flag for TI COFF.
3783 * ld.texinfo: Add documentation for TI COFF handling switches.
3784 * emultempl/ticoff.em: New. TI COFF handling.
3785 * configure.tgt: Add tic54x target.
3786 * Makefile.am: Add tic54x target.
3787 * Makefile.in: Ditto.
3791 * ldmain.c (set_scripts_dir): Correct pointer comparison when
3792 checking for backslashes.
3796 * NEWS: Move entries not in 2.10 above "Changes in version 2.10".
3800 * NEWS: Update list of targets supporting --gc-sections.
3802 * scripttempl/elf.sc: KEEP .eh_frame contents.
3803 * scripttempl/elfd30v.sc: Same here.
3807 * Makefile.am (ALL_EMULATIONS): Added new emulation for m68hc12
3809 * Makefile.in: Rebuild.
3810 * configure.tgt: Recognize m68hc12 and m68hc11.
3811 * scripttempl/elfm68hc12.sc: New file.
3812 * emulparams/m68hc12elfb: New emulation.
3813 * emulparams/m68hc12elf: New emulation.
3814 * emulparams/m68hc11elfb.sh: New file. User configurable emulation
3815 (includes a memory.x script to define the ROM and RAM banks).
3816 * scripttempl/elfm68hc11.sc, emulparams/m68hc11elf.sh:
3817 New configuration files for support of Motorola 68hc11
3821 * ldmain.c (main): Only change SEC_READONLY for final link.
3825 * configure: Regenerate.
3829 * configure.in (VERSION): Update to show this is the CVS mainline.
3833 * emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all
3834 input objects to be ECOFF.
3835 (check_sections): einfo takes %B, not %P, to print a BFD name.
3839 * ldgram.y (vers_defns): Handle 'extern "C++" { ... }' in
3842 * ldlex.l (V_IDENTIFIER): Accept `::' in symbols.
3846 * emulparams/avr1200.sh (STACK): Define as 0.
3847 * emulparams/avr23xx.sh (STACK): Define as last internal SRAM address.
3848 * emulparams/avr4433.sh (STACK): Likewise.
3849 * emulparams/avr44x4.sh (STACK): Likewise.
3850 * emulparams/avr85xx.sh (STACK): Likewise.
3851 * emulparams/avrmega103.sh (STACK): Likewise.
3852 * emulparams/avrmega161.sh (STACK): Likewise.
3853 * emulparams/avrmega603.sh (STACK): Likewise.
3854 * scripttempl/elf32avr.sc (__data_start): Define for gcrt1.
3855 (__stack): Define from ${STACK} for main().
3859 * Makefile.am: Update dependencies with "make dep-am"
3860 * Makefile.in: Regenerate.
3864 * ldmain.c: Include filenames.h.
3865 (set_scripts_dir): Support backslashes in program name.
3869 * ldmain.c (main): When deciding if ".text" section should be
3870 read-only, don't forget to reset SEC_READONLY because it
3871 could be already set.
3875 * ld.1: Add documentation for new command line option:
3876 --section-start <sectionname>=<sectionorg>
3877 This is a generic version of -Ttext etc. which accepts
3878 any section name as a parameter instead of just text/data/
3880 * ld.texinfo: More docs.
3882 * lexsup.c: (parse_args): Recognize new command line option.
3883 (ld_options): Add new option.
3887 * lexsup.c (parse_args): `i' == `r', not `q'.
3891 * configure.tgt (hppa*64*-*-*): Enable PA64 target.
3896 Add support for '-q' == '--emit-relocs' switch.
3897 * ldmain.c (main): Default to false.
3898 * lexsup.c (parse_args): Turn on emitrelocations flag if set.
3899 * NEWS: Describe the emitrelocations switch.
3900 * ld.texinfo: Describe the emitrelocations switch.
3904 * emultempl/pe.em (_open_dynamic_archive): New function: Search
3905 the library path for "foo.dll" and "libfoo.dll" dynamic libraries
3906 before searching for 'libfoo.a' in response to a '-Bdynamic -lfoo'
3911 * lexsup.c (parse_args): Update the year in the copyright notice.
3915 * ld.h (gettext, dgettext, dcgettext, textdomain, bindtextdomain):
3916 Replace defines with those from intl/libgettext.h to quieten gcc
3921 * ldlang.c (open_input_bfds): Don't load the same file within
3922 a group again if the whole archive has been loaded already.
3927 * lexsup.c (set_section_start): Use bfd_scan_vma rather than
3932 * configure.host (ia64-*-linux-gnu*): Change gcc to ${CC}.
3934 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
3935 host "ia64-*-linux-gnu*".
3939 * ld.h: Correctly check GCC version.
3943 * Makefile.am: Add PA64 support. Add missing dependencies for
3945 * Makefile.in: Rebuilt.
3946 * configure.tgt: Add PA64 support (currently disabled).
3950 * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Delete.
3951 (output_rel_find): New function.
3952 (hold_section, hold_use): Delete.
3953 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
3954 hold_interp): Make local to place_orphan.
3955 (gld${EMULATION_NAME}_place_orphan): Use lang_output_section_find
3956 rather than place_section to find possible previous use of orphan.
3957 Similarly find the place-holder output sections. Use returned
3958 value from lang_enter_output_section_statement rather than calling
3959 lang_output_section_statement_lookup.
3960 * emultempl/armelf.em: Same here.
3961 * emultempl/pe.em: Similar to above, but no need for output_rel_find.
3963 * ldlang.c (lang_enter_output_section_statement): Return output
3965 * ldlang.h (lang_enter_output_section_statement): Change
3968 * ldlang.h (lang_output_section_statement): Export it.
3969 * ldlang.c (lang_output_section_statement): Ditto.
3973 * ld.texinfo (Output Section Data): Add note that section data
3974 commands cannot appear outside of section directives.
3978 * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support.
3983 * Makefile.am (ALL_64_EMULATIONS): Add eelf64_ia64.o.
3984 (eelf64_ia64.c): New rule.
3985 * Makefile.in: Rebuild.
3986 * configure.tgt (ia64-*-elf*, ia64-*-linux*): New targets.
3987 * emulparams/elf64_ia64.sh: New file.
3991 * scripttempl/elfd30v.sc: Place .gcc_except_table.
3995 * dep-in.sed: Match space at start of file name, not at end.
3999 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
4000 lang_leave_output_section_statement () after calling
4001 lang_enter_output_section_statement ().
4002 * emultempl/armelf.em: Likewise.
4006 * emultempl/elf32.em (struct orphan_save): Add section field.
4007 (gld${EMULATION_NAME}_place_orphan): Use above to keep sections in
4008 better order, and place first orphan section as we did before the
4009 2000-04-12 patch. Ignore ~SEC_ALLOC sections when choosing place.
4010 Don't call make_bfd_section here, let wild_doit do the job for us.
4011 Don't build a statement list when we'll only throw it away.
4012 * emultempl/armelf.em: Ditto.
4013 * emultempl/pe.em: Similarly.
4017 * scripttempl/elfppc.sc: Remove.
4018 * emulparams/elf32ppc.sh: Use elf.sc.
4019 * emulparams/elf32lppc.sh: Use elf.sc.
4020 * emulparams/elf32ppclinux.sh: Use elf.sc.
4021 * emulparams/elf32ppcsim.sh: New file.
4022 * emulparams/elf32lppcsim.sh: New file.
4023 * Makefile.am: Update dependencies. Add elf32ppcsim ad elf32lppcsim.
4024 (ALL_EMULATIONS): Add elf32ppcsim ad elf32lppcsim.
4025 * Makefile.in: Regenerate.
4026 * configure.tgt (powerpc-*): Add elf32ppcsim and elf32lppcsim.
4030 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Process
4031 ~SEC_ALLOC sections too. Init start address of debug sections.
4032 * emultempl/armelf.em (gld${EMULATION_NAME}_place_orphan): Ditto.
4033 * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Ditto.
4034 Also set all relocateable section start addresses.
4038 * scripttempl/elf.sc: Add support for .sbss2 and .sdata2 sections.
4039 Add new BSS_PLT variable for when .plt need not be contained in
4040 the file. Move _etext so that it is also after .fini, and provide
4041 both etext and _etext with a leading underscore. Mark the start
4046 * emultempl/elf32.em (struct orphan_save): New.
4047 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
4048 hold_interp): Make them struct orphan_save.
4049 (gld${EMULATION_NAME}_place_section): Modify for new hold_*.
4050 (gld${EMULATION_NAME}_place_orphan): Add new orphan sections to
4051 the end of the relevant section list. Also add associated section
4052 statements to the end of any previous orphan statements.
4053 * emultempl/armelf.em: Similarly.
4054 * emultempl/pe.em: Similarly.
4058 * ld.texinfo (Simple Example): Remove extraneous paragraph.
4062 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
4063 --enable-build-warnings option.
4064 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
4065 * Makefile.in, configure: Re-generate.
4069 * po/ld.pot: Regenerate.
4071 * lexsup.c (help): Restore translated part of bug string.
4073 * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
4074 (DEP): Quote when passing vars to sub-make. Add warning message
4076 (DEP1): Rewrite for "gcc -MM".
4077 (CLEANFILES): Add DEP2.
4078 Update dependencies.
4079 * Makefile.in: Regenerate.
4083 * ld.h: #include "bin-bugs.h"
4084 * lexsup.c (help): Use REPORT_BUGS_TO.
4088 * configure.tgt (avr-*-*): New target support.
4089 * Makefile.am: Likewise.
4090 * scripttempl/elf32avr.sc: New script file.
4091 * emulparams/avr1200.sh: New file.
4092 * emulparams/avr23xx.sh: New file.
4093 * emulparams/avr4433.sh New file.
4094 * emulparams/avr44x4.sh New file.
4095 * emulparams/avr85xx.sh New file.
4096 * emulparams/avrmega103.sh New file.
4097 * emulparams/avrmega161.sh New file.
4098 * emulparams/avrmega603.sh New file.
4099 * Makefile.in: Regenerate.
4103 * Makefile.am (check-DEJAGNU): Also unset LANG.
4104 * Makefile.in: Rebuild.
4108 * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
4113 * emulparams/elf32mcore.sh: Include "getopt.h".
4117 * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware.
4121 * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR.
4122 * emulparams/shpe.sh: Likewise.
4126 * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED
4127 to unused parameters.
4129 * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static
4130 functions only used by DLL code.
4131 (_place_orphan): Initialise 'dollar'.
4135 * ldmain.c (undefined_symbol): Take one more arg, fatal, to
4136 indicate if the undefined symbol is a fatal error or not.
4137 Don't delete the output file if "fatal" is false.
4141 * Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)".
4142 Set LC_COLLATE and LC_ALL to null and export them. It is for
4143 sort which expects the C locale.
4144 Add $(LIBS) to all $(HOSTING_LIBS).
4145 * Makefile.in: Rebuild.
4149 * emultempl/{aix.em, armcoff.em, armelf.em, armelf_oabi.em,
4150 beos.em, elf32.em, generic.em, gld960.em, gld960c.em, hppaelf.em,
4151 linux.em, lnk960.em, mipsecoff.em, sunos.em, vanilla.em}
4152 (ld_emulation_xfer_struct): Add missing NULL initialiser for
4153 find_potential_libraries.
4157 * ldgram.y (exclude_name_list): Don't require a comma to separate
4158 list entries; the lexer considers commas to be valid part of a
4159 filename, so in something like `foo, bar' the comma is considered
4160 part of the first filename, `foo,'.
4161 * ld.texinfo: Update section on EXCLUDE_FILE lists.
4165 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
4166 host "i[3456]86-*-freebsdelf*".
4170 * scripttempl/i386go32.sc: Move misplaced semicolons.
4174 * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o.
4175 (ALL_64_EMULATIONS): Remove eelf64hppa.o.
4176 (eelf64hppa.c, ehppaelf.c): Remove targets.
4177 * Makefile.in: Rebuild.
4181 * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on
4182 GNU/Linux/sparc, but keep the default as 32.
4184 * configure.tgt: Enable elf64_sparc on Solaris7+/sparc. And make
4185 it default if sparcv9 or sparc64.
4189 * Makefile.am: Add rules to build emipspe.o and earmpe.o.
4190 * Makefile.in: Regenerate.
4191 * configure.tgt: Add targets for arm-wince, sh-pe and mips-pe.
4193 * ldemul.h (ld_emulation_xfer_struct): Add new field:
4194 find_potential_libraries.
4195 * ldemul.c (ldemul_find_potential_libraries): New function.
4197 * ldfile.c (ldfile_open_file_search): Allow function to be
4199 (ldfile_open_file): Call ldemul_find_potential_libraries.
4200 * ldfile.h: Add prototype for ldfile_open_file_search.
4202 * pe-dll.c: Add support for ARM, MIPS and SH targets.
4204 * emulparams/mipspe.sh: New file. Parameters for mips-pe target.
4205 * emulparams/shpe.sh: New file. Parameters for sh-pe target.
4207 * emultempl/pe.em: Add support for ARM, MIPS and SH DLLs.
4208 (gld_X_find_potential_libraries): New function. Search for
4209 libraries called "*.lib".
4211 * scripttempl/pe.sc: Add .pdata section.
4215 * scripttempl/elfd10v.sc: Remove dynamic linking hooks.
4216 Add and use memory regions.
4220 * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New.
4222 * Makefile.am: Add support for Linux/IBM 370.
4223 * configure.tgt: Likewise.
4225 * Makefile.in: Regenerate.
4229 * ldlang.c (print_input_section, print_data_statement,
4230 print_reloc_statement, print_padding_statement, insert_pad,
4231 size_input_section, lang_check_section_addresses,
4232 lang_size_sections, lang_do_assignments, lang_set_startof,
4233 lang_one_common): Change `opb' to unsigned.
4234 (lang_do_assignments): Also change `size' to unsigned.
4238 * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION.
4242 * mri.c (mri_draw_tree): Add default LMA region argument to call
4243 to lang_leave_output_section_statement.
4244 * ldlang.h: Update prototypes with LMA region arguments.
4245 * ldlang.c (lang_size_sections): Encapsulate region bounds
4246 checking in os_check_region call.
4247 (os_check_region): New function.
4248 (lang_output_section_statement_lookup): Initialize lma_region.
4249 (lang_leave_output_section_statement): Add LMA region argument.
4250 (lang_leave_overlay): Ditto.
4251 * ldgram.y: Handle LMA region syntax.
4252 * ld.texinfo (Output Section Description): Describe LMA region usage.
4253 * emultempl/armelf.em (gld$place_orphan): Add default value for
4254 lma region in call to lang_leave_output_section_statement.
4255 * emultempl/elf32.em (gld$place_orphan): Add default value for
4256 lma region in call to lang_leave_output_section_statement.
4257 * emultempl/pe.em (gld$place_orphan): Add default value for
4258 lma region in call to lang_leave_output_section_statement.
4263 * ldlang.c (lang_check_section_addresses): Use bytes instead of
4264 octets when calculating section end addresses.
4268 * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation.
4272 * ldexp.c (fold_name): Make SIZEOF operator return byte count, not
4274 * ldlang.c (print_input_section, print_data_statement,
4275 print_reloc_statement, print_padding_statement): Print target
4276 address values and section sizes as bytes, not octets.
4277 (insert_pad) Calculate padding size in octets, and adjust "dot"
4279 (size_input_section) Always adjust "dot" by bytes, not octets.
4280 (lang_check_section_addresses, lang_do_assignments) Adjust
4281 "dot" by bytes, not octets. Use the larger of the directive size
4282 or octets_per_byte for the number of octets actually allocated in
4284 (lang_set_startof) Make sure STARTOF returns a target address.
4285 (lang_one_common) Record size changes in octets.
4286 (lang_abs_symbol_at_end_of) Section end symbol's value is
4287 recorded in target bytes.
4288 * ld.texinfo: Updated description of BYTE, SHORT, LONG, etc.
4289 to be clear about behavior when an octet is smaller than one byte.
4293 * ldcref.c (output_cref): Don't pass message strings to printf
4297 * ldmisc.c (vfinfo): Same here.
4302 * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em,
4303 generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em,
4304 mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct):
4305 Add missing NULL initialisers, and comments.
4307 * testsuite/ld-srec/sr3.cc (__rethrow): New.
4311 * ldlang.c (lang_size_sections): Fix typo in comment.
4315 * ldlang.c (lang_size_sections): Also update the current
4316 address of a region if the SEC_NEVER_LOAD bit is not set.
4320 * configure.tgt (arm*-*-conix*): New target.
4324 * ld.texinfo (Options): Remind users to preceed linker command
4325 line switches with -Wl, (or whatever is appropriate) if it is
4326 being invoked by a comnpiler driver program.
4327 Fix description of the behaviour of the -n command line switch.
4331 * ld.h (wildcard_spec): Change exclude_name to exclude_name_list.
4333 * ld.texinfo (EXCLUDE_FILE): Update documentation.
4334 * ldgram.y (wildcard_spec): Support a list of excluded_files.
4335 (exclude_name_list): New.
4336 ldlang.c (walk_wild_section): Support list of excluded files.
4337 (print_wild_statement): Likewise.
4338 (lang_add_wild): Likewise.
4339 * ldlang.h (lang_wild_statement_type): Likewise.
4340 * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support.
4344 * pe-dll.c (pe_dll_warn_dup_exports): New variable.
4345 (process_def_file): Use.
4346 (pe_dll_compat_implib): New variable.
4349 * pe-dll.h: Add exports of pe_dll_warn_dup_exports and
4350 pe_dll_compat_implib.
4352 * emultempl/pe.em (longopts): Add warn-duplicate-exports and
4353 compat-implib options.
4354 (gld_${EMULATION_NAME}_list_options): List new options.
4355 (gld_${EMULATION_NAME}_parse_args): Handle.
4357 * pe-dll.c (pe_dll_generate_implib): Use the correct name for output
4360 * deffilep.y (opt_name): Allow "." in name.
4362 For older changes see ChangeLog-9899
4368 version-control: never