3 * emulparams/elf64ppc.sh (OTHER_TEXT_SECTIONS): Define.
7 * Makefile.in: Add new files earmelf_fbsd, eelf32ppc_fbsd,
8 eelf_i386_fbsd, eelf64_ia64_fbsd, eelf_x86_64_fbsd, eelf64_sparc_fbsd,
10 * configure.tgt(sparc64-*-freebsd, ia64-*-freebsd, i[3456]86-*-freebsd,
11 x86_64-*-freebsd, arm-*-freebsd, alpha*-*-freebsd, powerpc-*-freebsd):
12 use a FreeBSD-specific emulation rather than the psABI one.
13 * emulparams/elf_fbsd.sh (ELF_INTERPRETER_NAME): Set appropriate value
14 for all FreeBSD ELF systems.
15 * emulparams/armelf_fbsd.sh: Bridge elf_fbsd.sh and the "native" psABI
17 * emulparams/elf32ppc_fbsd.sh: Likewise.
18 * emulparams/elf64_ia64_fbsd.sh: Likewise.
19 * emulparams/elf64_sparc_fbsd.sh: Likewise.
20 * emulparams/elf64alpha_fbsd.sh: Likewise.
21 * emulparams/elf_i386_fbsd.sh: Likewise.
22 * emulparams/elf_x86_64_fbsd.sh: Likewise.
26 * po/tr.po: Updated version.
30 * ld.texinfo (Output Section Fill): Fix amateur texinfo.
35 * emultempl/mmo.em (mmo_after_open): Don't call
36 _bfd_mmix_check_all_relocs when producing ELF output.
40 * emulparams/elf64alpha.sh (NOP): Adjust for big-endian
41 definition. Emit a unop+nop pair.
45 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Also check
46 for presence of .MMIX.reg_contents.linker_allocated before early
49 * NEWS: Mention support for MMIX.
53 Support arbitrary length fill patterns.
54 * ld.texinfo (Output Section Fill): Describe fill expressions.
55 (FILL): Refer to the above.
56 * ldexp.h (etree_value_type): Add "str" field.
57 (union etree_union): Add "str" to "value" struct.
58 (exp_bigintop): Declare.
59 (exp_get_fill): Declare.
60 * ldexp.c: Include "safe-ctype.h".
61 (exp_intop): Set value.str to NULL.
62 (exp_bigintop): New function.
63 (new_rel): Pass in "str", and set new.str from it.
64 (new_rel_from_section): Set new.str to NULL.
65 (fold_name): Adjust calls to new_rel.
66 (exp_fold_tree): Likewise.
67 (exp_get_fill): New function.
68 * ldgram.y (struct big_int bigint, fill_type *fill): New.
69 (INT): Returns a "bigint". Adjust all code handling INTs.
70 (fill_opt): Returns a "fill".
71 (fill_exp): Split out of fill_opt, use for FILL.
72 * ldlang.h (struct _fill_type): New.
73 (fill_type): Move typedef to ldexp.h.
74 (lang_output_section_statement_type): "fill" is now a pointer.
75 (lang_fill_statement_type): Likewise.
76 (lang_padding_statement_type): Likewise.
77 (lang_add_fill): Now takes a "fill_type *" param.
78 (lang_leave_output_section_statement): Likewise.
79 (lang_do_assignments): Likewise.
80 (lang_size_sections): Likewise.
81 (lang_leave_overlay_section): Likewise.
82 (lang_leave_overlay): Likewise.
83 * ldlang.c: Include ldgram.h after ldexp.h.
84 (lang_output_section_statement_lookup): Adjust for fill_type change.
85 (print_fill_statement): Likewise.
86 (print_padding_statement): Likewise.
87 (insert_pad): Now takes a "fill_type *" arg.
88 (size_input_section): Likewise.
89 (lang_size_sections_1): Likewise.
90 (lang_size_sections): Likewise.
91 (lang_do_assignments): Likewise.
92 (lang_add_fill): Likewise.
93 (lang_leave_output_section_statement): Likewise.
94 (lang_leave_overlay_section): Likewise.
95 (lang_leave_overlay): Likewise.
96 Adjust all callers of the above function.
97 * ldlex.l: Include ldgram.h after ldexp.h. Allow hex numbers
98 starting with "0X" as well as "0x". Return bigint.str for hex
99 numbers starting with "0x" or "0X", zero bigint.str otherwise.
100 Always use base 16 for numbers starting with "$".
101 * ldmain.c: Include ldgram.h after ldexp.h.
102 * ldwrite.c (build_link_order): Use bfd_data_link_order in place
103 of bfd_fill_link_order.
104 * pe-dll.c: Adjust lang_do_assignments calls.
105 * emultempl/elf32.em: Likewise.
106 * emultempl/hppaelf.em: Likewise.
107 * emultempl/ppc64elf.em: Likewise.
108 * emultempl/beos.em: Include ldgram.h after ldexp.h, adjust
109 lang_add_assignment call.
110 * emultempl/pe.em: Likewise.
114 * ld.texinfo (VERSION scripts): Symbol names are globbing patterns.
115 * ldgram.y (lang_new_vers_regex): Rename to lang_new_vers_pattern;
116 the pattern in question is not a regexp.
117 * ldlang.c: Likewise.
118 * ldlang.h: Likewise.
119 * ldlex.l (V_IDENTIFIER): Allow '[', ']', '-', '!', and '^' also.
123 * ldlex.l (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
124 * ldgram.y (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
125 (exp): Add DATA_SEGMENT_ALIGN (exp, exp) and DATA_SEGMENT_END (exp).
126 * ldexp.c (exp_data_seg): New variable.
127 (exp_print_token): Handle DATA_SEGMENT_ALIGN and DATA_SEGMENT_END.
128 (fold_binary): Handle DATA_SEGMENT_ALIGN.
129 (exp_fold_tree): Handle DATA_SEGMENT_END.
130 Pass allocation_done when recursing instead of hardcoding
131 lang_allocating_phase_enum.
132 * ldexp.h (exp_data_seg): New.
133 * ldlang.c (lang_size_sections_1): Renamed from lang_size_sections.
134 (lang_size_sections): New.
135 * ld.texinfo (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): Document.
136 * scripttempl/elf.sc: Use DATA_SEGMENT_ALIGN and DATA_SEGMENT_END
137 if COMMONPAGESIZE is defined.
138 * emulparams/elf_i386.sh (COMMONPAGESIZE): Set to 4K.
139 * emulparams/elf32_sparc.sh (COMMONPAGESIZE): Set to 8K.
140 * emulparams/elf64_sparc.sh (COMMONPAGESIZE): Set to 8K.
141 * emulparams/elf64alpha.sh (COMMONPAGESIZE): Set to 8K.
142 * emulparams/elf64_ia64.sh (COMMONPAGESIZE): Set to 16K for shared
147 * Makefile.in: Regenerate.
151 * lexsup.c: Remove strtoul declaration.
155 * ldmain.c: Add prototype for main ().
156 * lexsup.c: Guard declaration of strtoul with HAVE_STDLIB_H.
157 * emultempl/lnk960.em (lnk960_choose_target): Function should
162 * ldlang.c (entry_section): New initialised variable.
163 (lang_finish): Use it.
164 * ldlang.h (entry_section): Declare.
165 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Set
166 entry_section to ".opd".
170 * ld.texinfo (Options): Add back in -nostdlib documentation,
171 which had been inadvertently removed.
175 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Adjust
176 register section vma to a sane value after emitting error. Make
177 fatal conditions cause program exit when emitting message.
181 * configure.tgt: Add or32-*-rtems target.
187 * emulparams/shelf32.sh (STACK_ADDR): Define as formerly defined
188 in OTHER_RELOCATABLE_SECTIONS.
190 * emulparams/shelf32.sh (STACK_ADDR): Define.
191 (OTHER_RELOCATABLE_SECTIONS): Renamed to...
192 (OTHER_SECTIONS): this. Removed stack settings.
193 * emulparams/shelf64.sh (OTHER_RELOCATABLE_SECTIONS): Do not set.
194 (OTHER_SECTIONS): Reset after sourcing shelf32.sh.
196 * emultempl/sh64elf.em (sh64_elf_$_before_allocation): Disable
197 relaxing if any shmedia or mixed sections are found.
199 * emultempl/sh64elf.em (sh64_elf_before_allocation): Pass f to
200 einfo. Gracefully decline to output to non-elf formats.
202 * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS) <.stack>:
203 Default to _end aligned to next multiple of 0x40000, plus 0x40000.
204 * emulparams/shelf32.sh: Ditto.
206 * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Tweak
209 * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Avoid
210 non-portable shell constructs. From Hans-Peter Nilsson.
212 * emulparams/shelf64.sh (EXTRA_EM_FILE): Define empty.
213 * Makefile.am (eshelf64.c, eshlelf64.c, eshlelf32.c): Adjust
214 dependencies to the shell script include chain.
215 * Makefile.in: Regenerate.
217 * emultempl/sh64elf.em: Update and tweak comments.
218 (sh64_elf_${EMULATION_NAME}_after_allocation): Always allocate and
219 make a .cranges section SEC_IN_MEMORY.
221 * emultempl/sh64elf.em
222 (sh64_elf_${EMULATION_NAME}_before_allocation): Don't stop when
223 .cranges section found to be necessary; continue and set stored
224 section contents flags for sections with non-mixed contents.
225 Use a struct sh64_section_data container and sh64_elf_section_data
226 to store contents-type flags.
227 Remove unused update of "isec".
228 (sh64_elf_${EMULATION_NAME}_after_allocation): Only process
229 sections marked SHF_SH5_ISA32_MIXED. Use sh64_elf_section_data to
230 access contents-type flags. Assert that the associated container
231 is initialized. Use that container, not elf_gp_size, to hold size
232 of linker-generated cranges contents.
234 * emultempl/sh64elf.em
235 (sh64_elf_${EMULATION_NAME}_before_allocation): Exit early if
236 there's already a .cranges section. When section flag difference
237 is found, don't NULL-check cranges a second time. Tweak comments.
238 (sh64_elf_${EMULATION_NAME}_after_allocation): Use size after
239 merging, not max size, as size of ld-generated .cranges contents.
240 Don't set ELF section flags in output section. When checking for
241 needed .cranges descriptors, don't use a variable; compare
242 incoming ELF section flags directly to SHF_SH5_ISA32_MIXED. Tweak
245 * emultempl/sh64elf.em: New file.
246 * Makefile.am (eshelf32.c, eshlelf32.c): Adjust dependencies.
247 * Makefile.in: Regenerate.
248 * emulparams/shelf32.sh (OUTPUT_FORMAT): Only set if not set.
249 (OTHER_RELOCATING_SECTIONS): Ditto.
250 (EXTRA_EM_FILE): New, set to sh64elf if not set.
251 * emulparams/shlelf32.sh: Stub out all settings except
252 OUTPUT_FORMAT. Source shelf32.sh.
253 * emulparams/shelf64.sh: Similar, but also keep ELF_SIZE and
254 OTHER_RELOCATING_SECTIONS.
255 (OTHER_RELOCATING_SECTIONS): Remove .cranges.
256 * emulparams/shlelf64.sh: Stub out all settings except
257 OUTPUT_FORMAT. Source shelf64.sh.
259 * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS): Include
261 (DATA_START_SYMBOLS): Define, provide ___data.
262 (OTHER_READONLY_SYMBOLS): Define, provide ___rodata and align to 8
263 for consecutive .data section.
264 (OTHER_GOT_SECTIONS): Define, align to 8 for consecutive .bss
265 section after .data section.
266 * emulparams/shlelf64.sh: Ditto.
267 * emulparams/shelf32.sh: Ditto.
268 (ALIGNMENT): Define to 8.
269 * emulparams/shelf32.sh: Ditto.
271 * configure.tgt (sh64-*-elf*): Assign targ_extra_libpath to get
272 built-in linker scripts.
274 * emulparams/shlelf64.sh: New.
275 * emulparams/shelf64.sh: New.
276 * configure.tgt (sh64-*-elf*): Add shelf64 and shlelf64 to
278 * Makefile.am: Add support for shlelf64 and shelf64.
279 * Makefile.in: Regenerate.
281 * configure.tgt (sh64-*-elf*): Add shelf as default.
282 Add shlelf to targ_extra_emuls.
284 * emulparams/shelf32.sh: New file.
285 * emulparams/shlelf32.sh: New file.
286 * Makefile.am: Add support for shlelf32 and shelf32.
287 * configure.tgt: Map sh64-*-elf* to shlelf32 and shelf32.
288 * Makefile.in: Regenerate.
292 * ldlang.c (lang_reset_memory_regions): Rename from
293 reset_memory_regions. Change all callers. Make public.
294 * ldlang.h (lang_reset_memory_regions): Prototype.
295 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Call
296 lang_reset_memory_regions before lang_size_sections.
297 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
298 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Likewise.
302 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Use signed
303 arithmetic when checking for too many global registers.
307 * Makefile.am (ALL_EMULATIONS): Add ehppanbsd.o.
308 (ehppanbsd.c): New rule.
309 * Makefile.in: Regenerate.
310 * configure.tgt (hppa*-*-netbsd*): New target.
311 * emulparams/hppalinux.sh: Add comment to check other files
312 that source this file it is modified, and list which
314 * emulparams/hppanbsd.sh: New file.
318 * scripttempl/xstormy16.sc: Don't allocate extra space for the
323 Support on-demand global register allocation from
324 R_MMIX_BASE_PLUS_OFFSET relocs.
325 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Rename from
326 mmix_set_reg_section_vma. Call
327 _bfd_mmix_finalize_linker_allocated_gregs.
328 (mmix_before_allocation): New function.
329 (LDEMUL_AFTER_ALLOCATION): Set to mmix_after_allocation.
330 (LDEMUL_BEFORE_ALLOCATION): Define to mmix_before_allocation.
331 * scripttempl/mmo.sc (.text): Mark .init, .fini as KEEP.
332 (.MMIX.reg_contents): Add .MMIX.reg_contents.linker_allocated
333 before .MMIX.reg_contents.
334 * emultempl/mmo.em (gldmmo_before_allocation): Define to default.
335 (mmo_after_open): New function.
336 (LDEMUL_AFTER_OPEN): Define to mmo_after_open.
337 * emulparams/elf64mmix.sh (OTHER_SECTIONS): Tweak formatting. Add
338 .MMIX.reg_contents.linker_allocated before .MMIX.reg_contents.
342 * emulparams/or32.sh: New file.
343 * emulparams/or32elf.sh: New file.
344 * scripttempl/or32.sc: New file.
345 * configure.tgt : Add support for or32.
346 * configure: Regenerate
347 * Makefile.am: Add support for or32.
348 * Makefile.in: Regenerate.
349 * NEWS: Mention support for or32.
350 * po/ld.pot: Regenerate.
355 * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Define to be mipself.
356 * emultempl/mipself.em: New file to handle MIPS ELF embedded
357 reloc creation (ld --embedded-relocs).
361 * configure: Regenerated.
365 * Makefile.am (install): Depend on install-info.
366 * Makefile.in: Regenerate.
370 * ldmain.c (main): Use full sentences to ease translation.
374 * po/fr.po: Updated version.
378 * po/es.po: Updated version.
382 * ldlex.l (yy_input): Correct error check.
386 * ldmisc.c (demangle): Put back dots when string not demangled.
390 * emulparams/elf64alpha.sh (NOP): Use unop.
394 * ldlex.l: Use fread instead of read.
398 * configure.tgt (ia64-*-netbsd*): New target.
402 * emulparams/elf32btsmip.sh (SHLIB_TEXT_START_ADDR): Change to
404 * emulparams/elf64btsmip.sh (SHLIB_TEXT_START_ADDR): Likewise.
408 * ldver.c (ldversion): Update year.
412 * po/ld.pot: Regenerate.
416 * Makefile.am (eelf64ppc.c, eelf64lppc.c): Depend on ppc64elf.em.
417 * Makefile.in: Regenerate.
418 * emulparams/elf64ppc.sh (EXTRA_EM_FILE): Define.
419 * emultempl/ppc64elf.em: New file.
423 * scripttempl/pe.sc: Add support for constructor priorities.
427 * emulparams/avr1200.sh (DATA_START): Define as 0x60.
428 * emulparams/avr23xx.sh: Likewise.
429 * emulparams/avr4433.sh: Likewise.
430 * emulparams/avr44x4.sh: Likewise.
431 * emulparams/avr85xx.sh: Likewise.
432 * emulparams/avrmega103.sh: Likewise.
433 * emulparams/avrmega161.sh: Likewise.
434 * emulparams/avrmega603.sh: Likewise.
435 * scripttempl/elf32avr.sc: Use DATA_START instead of 0x60.
439 * ldlang.c (walk_wild_section): Exclude object file if enclosing
444 * Makefile.am (ALL_EMULATIONS): Add eshelf_nbsd.o and eshlelf_nbsd.o.
445 (eshelf_nbsd.c): New rule.
446 (eshlelf_nbsd.c): New rule.
447 * Makefile.in: Regenerate.
448 * configure.tgt (sh*le-*-netbsdelf*): New target.
449 (sh*-*-netbsdelf*): New target.
450 * emulparams/shelf.sh: Document that shelf_nbsd.sh sources this file.
451 * ld/emulparams/shelf_nbsd.sh: New emulation.
452 * ld/emulparams/shlelf_nbsd.sh: New emulation.
456 * po/es.po: New file: Spanish translation.
457 * configure.in (ALL_LINGUAS): Add es.
458 * configure: Regenerate.
462 * ld.texinfo: Note that --emit-relocs is currently only
467 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Make use
468 of bfd_section_list_remove and bfd_section_list_insert macros.
469 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
470 * emultempl/mmo.em (mmo_place_orphan): Likewise.
474 * configure.tgt (x86_64-*-netbsd*): New target.
478 (gld*_create_output_section_statements): New function.
479 For -binitfini support.
480 * emultempl/aix.em (gld*_before_parse): Fix comment.
481 * emultempl/aix.em (gld*_parse_args): Fix comment.
485 * configure.tgt (mips*-dec-netbsd*): Delete alias for
487 (sparc64-*-netbsd*): Add elf32_sparc to targ_extra_emuls.
489 * configure.tgt (arm-*-netbsdelf*): Add target.
490 (arm-*-netbsd*): Add armelf and armelf_nbsd to targ_extra_emuls.
491 * emulparams/armelf_nbsd.sh: Added.
492 * Makefile.am: Add rules for earmelf_nbsd.
493 * Makefile.in: Regenerate.
498 * configure.host: Add rules for x86_64-*linux-gnu. Change
499 s390x-linux entry to use gcc to report configuration, replace gcc
500 with $CC in s390-linux
504 * ld.texinfo (VERSION): Fix markup.
508 * Makefile.am (ALL_EMULATIONS): Add m68kelfnbsd.o.
509 (m68kelfnbsd.c): New rule.
510 * Makefile.in: Regenerate.
511 * configure.tgt (m68*-hp-netbsd*): Renamed to ..
512 (m68*-*-netbsd*4k*): .. this.
513 (m68*-*-netbsdelf*): New target.
514 (m68*-*-netbsd*): Also include ELF support.
515 (m68*-*-netbsdaout*): New alias for m68*-*-netbsd*.
516 * emulparams/m68kelfnbsd.sh: New emulation.
520 * ldgram.y (vers_node): Support anonymous version tags.
521 * ldlang.c (lang_register_vers_node): Ensure anonymous version
522 tag is not defined together with non-anonymous versions.
523 * ld.texinfo: Document it.
527 * po/tr.po: New file: Turkish translation.
528 * configure.in (ALL_LINGUAS): Add tr.
529 * configure: Regenerate.
533 * Makefile.am: Add rules for eelf64alpha_nbsd.
534 * Makefile.in: Regenerate.
535 * configure.tgt (alpha*-*-netbsd*): Set
536 targ_emul to elf64alpha_nbsd.
537 * emulparams/elf64alpha_nbsd.sh: Added.
541 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust
542 section_tail when fiddling with section list.
543 (gld${EMULATION_NAME}_list_options): Ensure sentences aren't
544 broken into separate strings to make translation easier.
545 * emultempl/mmo.em (mmo_place_orphan): Adjust section_tail when
546 fiddling with section list.
547 * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
551 * scripttempl/mmo.sc: Add .debug_ranges to listed sections.
555 * ldmain.c (main): Initialise link_info.eh_frame_hdr.
559 * emultempl/elf32.em (finish): Supply output_bfd
560 to bfd_elf*_discard_info.
561 (OPTION_EH_FRAME_HDR): Define.
562 (longopts): Add --eh-frame-hdr.
563 (parse_args): Handle it.
564 (list_options): Add --eh-frame-hdr to help.
565 * emultempl/hppaelf.em (finish): Supply output_bfd
566 to bfd_elf*_discard_info.
567 * scripttempl/elf.sc (.eh_frame_hdr): Add.
571 * lexsup.c (parse_args): Don't pass shortopts to second call to
572 getopt functions. Restore optind rather than decrementing before
573 second call. Remove errind as it now duplicates last_optind.
577 * emultempl/pe.em (gld_${EMULATION_NAME}_list_options): Fix typo.
582 * Makefile.am: Add support for xstormy16.
583 * configure.tgt: Add support for xstormy16.
584 * Makefile.in: Regenerate.
585 * emulparams/elf32xstormy16.sh: New file.
586 * scripttempl/xstormy16.sc: New file.
590 * Makefile.in (LIB_PATH): Make configurable.
591 (GENSCRIPTS): Set LIB_PATH in environment.
592 * configure.in: Substitute LIB_PATH.
593 * configure: Regenerate.
594 * configure.tgt (*cygwin): Set LIB_PATH for cross build.
595 * configure.host (*cygwin): Add /usr/lib/w32api to NATIVE_LIB_DIRS.
599 * lexsup.c (ld_options): Insert 'PROGRAM' into the text string
600 describing the -N option so that it is easier to translate into
605 * emultempl/pe.em (..._list_options): Replace multiple fprintf
606 statements describing a single option with a single, newline
607 escaped fprintf. This allows better translation into other
610 * ldmain.c (add_archive_element): Combine multiple strings
611 into a single string to permit better translation into other
616 * Makefile.am: Remove eaixppc64.
617 * Makefile.in: Regenerate.
621 * emultempl/aix.em (choose_target): Change default target to
622 OUTPUT_FORMAT for ppcmacos. Add braces to remove compiler
624 (gld*_read_file): Fix typo.
625 (change_symbol_mode): Add prototype.
628 * emulparams/aixppc.sh (SYSCALL_MASK, SYMBOL_MODE_MASK): Delete.
629 * emulparams/aixrs6.sh : Same.
630 * emulparams/ppcmacos.sh : Same.
631 * emulparams/aixppc64.sh : Delete file.
632 * emultempl/aix.em : Formatting changes.
636 * emulparams/criself.sh (NO_SMALL_DATA): Set, to yes.
637 (OTHER_BSS_END_SYMBOLS): Don't refer to .sbss when setting
639 (OTHER_END_SYMBOLS): Fix formatting.
640 * emulparams/crislinux.sh (NO_SMALL_DATA): Set, to yes.
641 (OTHER_END_SYMBOLS): Fix formatting.
645 * ldexp.c (exp_print_token): Correct "table" entry for RSHIFT.
649 * configure.tgt : Remove eaixppc64 emulations.
650 * Makefile.in : Remove eaixppc64.c
651 * ldemul.c (ldemul_choose_target): New parameters argc, argv.
652 (ldemul_default_target): Same.
653 * emultempl/gld960.em (gld960_choose_target): Same.
654 * emultempl/gld960c.em (gld960_choose_target): Same.
655 * scripttempl/aix.sc: Remove OUTPUT_FORMAT.
656 * emultempl/aix.em (is_syscall): syscall_mask now a variable.
657 * emultempl/aix.em (gld*_read_file): symbol_mode_mask now a variable.
658 * emultempl/aix.em (gld*_parse_args): Handle -b32 -b64 emulation.
659 * emultempl/aix.em (choose_target): New function. Handle emulation of
664 * emulparams/elf_i386.sh (NO_SMALL_DATA): Set to yes.
665 * emulparams/elf_i386_be.sh (NO_SMALL_DATA): Likewise.
666 * emulparams/elf_i386_chaos.sh (NO_SMALL_DATA): Likewise.
667 * emulparams/elf_i386_ldso.sh (NO_SMALL_DATA): Likewise.
668 * emulparams/elf_x86_64.sh (NO_SMALL_DATA): Likewise.
669 * emulparams/m68kelf.sh (NO_SMALL_DATA): Likewise.
670 * emulparams/elf32_sparc.sh (NO_SMALL_DATA): Likewise.
671 * emulparams/elf64_sparc.sh (NO_SMALL_DATA): Likewise.
673 * scripttempl/elf.sc (SBSS): New. Define if ${NO_SMALL_DATA}
676 (REL_SDATA): Likewise.
677 (REL_SBSS): Likewise.
678 (REL_SDATA2): Likewise.
679 (REL_SBSS2): Likewise.
680 (SBSS2): Define if ${NO_SMALL_DATA} is not empty.
685 * scripttempl/elfm68hc11.sc (CTOR, DTOR): Put constructor and
687 * scripttempl/elfm68hc12.sc (CTOR, DTOR): Likewise.
691 * Makefile.in: Regenerated with automake based on automake
696 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Define.
697 (config.status): Delete rule.
698 Add extra dependencies to cover sourced emulparams files.
699 * Makefile.in: Regenerate.
701 * scripttempl/elf.sc: Order <section>, <section>.* and
702 corresponding linkonce sections as seen in input files.
703 Formatting fixes. Zero vma of all sections if not relocating.
704 (STACK): Define and insert if STACK_ADDR defined.
705 (OTHER_RELOCATING_SECTIONS): Delete.
706 (OTHER_END_SYMBOLS): Define.
707 (OTHER_READONLY_SECTIONS): Always insert, not just when relocating.
708 (OTHER_READWRITE_SECTIONS): Likewise.
709 (OTHER_GOT_SECTIONS): Likewise.
710 (OTHER_SDATA_SECTIONS): Likewise.
711 (OTHER_BSS_SECTIONS): Likewise.
712 * scripttempl/elfi370.sc (OTHER_READONLY_SECTIONS): Likewise.
713 (OTHER_READWRITE_SECTIONS): Likewise.
714 * scripttempl/nw.sc (OTHER_READONLY_SECTIONS): Likewise.
715 (OTHER_READWRITE_SECTIONS): Likewise
717 * emulparams/armelf.sh (OTHER_RELOCATING_SECTIONS): Delete.
718 (STACK_ADDR): Define.
719 * emulparams/armelf_oabi.sh: As for armelf.sh.
720 * emulparams/elf32mcore.sh: As for armelf.sh.
721 * emulparams/h8300elf.sh: As for armelf.sh.
722 * emulparams/mn10200.sh: As for armelf.sh.
723 * emulparams/shelf.sh: As for armelf.sh.
725 * emulparams/elf32fr30.sh (OTHER_RELOCATING_SECTIONS): Delete.
726 (OTHER_END_SYMBOLS): Define.
727 * emulparams/m32relf.sh: As for elf32fr30.sh.
728 * emulparams/h8300helf.sh: As for elf32fr30.sh.
729 * emulparams/h8300self.sh: As for elf32fr30.sh.
731 * emulparams/criself.sh (OTHER_READONLY_SECTIONS): Protect symbol
732 defines with RELOCATING test.
733 (OTHER_SDATA_SECTIONS): Likewise.
734 (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
735 (OTHER_END_SYMBOLS): ..this.
736 * emulparams/crislinux.sh: As for criself.sh.
738 * emulparams/elf32bmipn32.sh (OTHER_SDATA_SECTIONS): Zero vma
740 (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
741 (OTHER_SECTIONS): ..this. Zero vma if not relocating. Order
742 normal and linkonce sections as seen in input files.
743 * emulparams/elf32bmip.sh (DATA_ADDR): Don't define if EMBEDDED.
744 (TEXT_DYNAMIC): Likewise.
745 (INITIAL_READONLY_SECTIONS): Zero vma if not relocating.
746 (OTHER_SDATA_SECTIONS): Likewise.
747 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
748 * emulparams/shlelf_linux.sh (OTHER_READWRITE_SECTIONS): Likewise.
749 * emulparams/elf64alpha.sh (OTHER_READONLY_SECTIONS): Likewise.
750 * emulparams/hppalinux.sh (OTHER_READONLY_SECTIONS): Likewise.
751 * emulparams/elf64_aix.sh (OTHER_GOT_SECTIONS): Likewise.
752 (OTHER_PLT_RELOC_SECTIONS): Likewise.
753 (OTHER_READONLY_SECTIONS): Likewise. Order normal and linkonce
754 sections as seen in input files.
755 * emulparams/elf64_ia64.sh: As for emulparams/elf64_aix.sh.
756 * emulparams/hppa64linux.sh (OTHER_READONLY_SECTIONS): Zero vma
758 (OTHER_READWRITE_SECTIONS, OTHER_BSS_SECTIONS): Likewise.
759 (OTHER_BSS_END_SYMBOLS): Merge from elf64hppa.sh.
760 * emulparams/elf64mmix.sh (OTHER_RELOCATING_SECTIONS): Delete.
761 (OTHER_SECTIONS): Instead, use this..
762 (OTHER_END_SYMBOLS): ..and this.
764 * emulparams/elf32b4300.sh: Source elf32bmip.sh, remove duplicates.
765 * emulparams/elf32bsmip.sh: Likewise.
766 * emulparams/elf32btsmip.sh: Likewise.
767 * emulparams/elf32ebmip.sh: Likewise.
768 * emulparams/elf32lmip.sh: Likewise.
769 * emulparams/elf32elmip.sh: Source elf32lmip.sh, remove duplicates.
770 * emulparams/elf32lsmip.sh: Likewise.
771 * emulparams/elf32ltsmip.sh: Source elf32btsmip.sh, remove duplicates.
772 * emulparams/elf32l4300.sh: Source elf32b4300.sh, remove duplicates.
773 * emulparams/elf64bmip.sh: Source elf32bmipn32.sh, remove duplicates.
774 * emulparams/elf64btsmip.sh: Likewise.
775 * emulparams/elf64ltsmip.sh: Source elf64btsmip.sh, remove duplicates.
776 * emulparams/elf32lppc.sh: Source elf32ppc.sh, remove duplicates.
777 * emulparams/elf32ppclinux.sh: Likewise.
778 * emulparams/elf32ppcsim.sh: Likewise.
779 * emulparams/elf32lppcsim.sh: Source elf32lppc.sh, remove duplicates.
780 * emulparams/elf64hppa.sh: Source hppa64linux.sh, remove duplicates.
781 * emulparams/h8300helf.sh: Source h8300elf.sh, remove duplicates.
782 * emulparams/h8300self.sh: Likewise.
783 * emulparams/mn10300.sh: Source mn10200.sh, remove duplicates.
784 * emulparams/sh.sh: Comment.
785 * emulparams/shl.sh: Source sh.sh, remove duplicates.
786 * emulparams/shlelf.sh: Source shelf.sh, remove duplicates.
787 * emulparams/shelf_linux.sh: Source shlelf_linux.sh, remove duplicates.
792 * ldlang.c (map_input_to_output_sections): Replace "break"
793 accidentally removed with 2001-08-03 change.
794 (lang_gc_sections_1): Likewise.
798 * ldlang.c (walk_wild_section): Move sec == NULL case out of loop.
802 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Use NULL instead
803 of false when calling lang_size_sections.
804 * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
808 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Only emit this
809 function when LDEMUL_FINISH isn't set to the same name. Don't
810 call ${LDEMUL_FINISH}.
811 (ld_${EMULATION_NAME}_emulation): Call $LDEMUL_FINISH if defined.
812 * emultempl/armelf.em (arm_elf_finish): Call
813 gld${EMULATION_NAME}_finish.
814 * emultempl/hppaelf.em (hppaelf_finish): Rename to
815 gld${EMULATION_NAME}_finish. Call bfd_elf32_discard_info and
816 hppaelf_layout_sections_again if necessary.
817 (need_laying_out): New var.
818 (hppaelf_layaout_sections_again): Rename to
819 hppaelf_layout_sections_again. Clear need_laying_out.
820 (PARSE_AND_LIST_OPTIONS): Format text.
824 * emultempl/armelf.em (arm_elf_finish): Renamed from
825 gld${EMULATION_NAME}_finish.
826 (LDEMUL_FINISH): Set to arm_elf_finish.
830 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): New.
831 (struct ld_emulation_xfer_struct): Use it.
835 * emulparams/elf64hppa.sh (OTHER_BSS_END_SYMBOLS): Add
836 additional symbols referenced by newer crt0.o files from HP.
840 * emulparams/armelf.sh (DATA_START_SYMBOLS): New symbol.
844 * Makefile.am (GENSCRIPTS): Quote ${exec_prefix}.
845 * Makefile.in: Regenerate.
849 * ld.texinfo: Use @command for commands, @option for options.
850 * Makefile.am (POD2MAN): Use 'GNU Development Tools' for
852 * Makefile.in: Rebuild.
856 * configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
857 Add support for targets.
861 * configure.in (ALL_LINGUAS): Add "fr" and "sv"
862 * configure: Regernate.
863 * po/fr.po: New file.
864 * po/sv.po: New file.
868 * configure.tgt (sh-*-linux): Set targ_emul, targ_extra_emuls
869 as little endian default and to support big endian.
873 * ld.texinfo (Options): Document new option, -nostdlib.
874 * lexsup.c (OPTION_NOSTDLIB): New definition.
875 (ld_options): Add entry for "nostdlib".
876 (parse_args): Handle OPTIONS_NOSTDLIB.
877 * ldfile.c (ldfile_add_library_path): Don't add directories
878 to the search path if they weren't specified on the command line
879 and -nostdlib was specified.
880 * ld.h (ld_config_type): New member only_cmd_line_lib_dirs.
884 * lexsup.c (parse_args): Prevent infinite parsing loop when
885 "-rpath.a" is specified on the command line.
886 Replace calls to fprintf with calls to einfo.
890 * ld.texinfo: A historical requirement that MEMORY and SECTIONS
891 appear only once across all the linker scripts involved in a link
892 invocation no longer applies. Make the documentation reflect
897 * configure.tgt: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
899 (sh-*-linux*): Added targ_extra_libpath.
903 * ldlang.c (lang_size_sections): Keep a valid output_offset field
904 for padding statements.
908 * configure.tgt (mmix-*-*): New target.
909 * Makefile.am (ALL_EMULATIONS): Add eelf64mmix.o and emmo.o.
910 Add dependencies to match.
911 * emulparams/mmo.sh, emulparams/elf64mmix.sh, emultempl/mmo.em,
912 emultempl/mmix-elfnmmo.em, emultempl/mmixelf.em,
913 scripttempl/mmo.sc: New files.
914 * gen-doc.texi: @set MMIX.
916 [MMIX] Add MMIX node.
917 * Makefile.in: Regenerate.
921 * ldlang.c: Fix a comment typo.
925 * configure.host: Move alpha*-*-linux-gnu* entry to generic
926 entries, and match *-*-linux*.
930 * ldgram.y (mri_script_command): Surround processing of INCLUDE
931 with ldlex_script, ldlex_popstate.
932 (ifile_p1): Likewise.
933 * ldlex.l (EOF): Don't BEGIN(SCRIPT). Restore lineno from the
935 (lex_push_file): Save current lineno to lineno_stack. Set lineno
936 to 1. Don't BEGIN(SCRIPT).
937 (lex_redirect): Similarly.
938 * ldmain.c (main): Set yydebug non-zero if YYDEBUG.
942 * scripttempl/armcoff.sc: Define __EH_FRAME_BEGIN__ and
943 __EH_FRAME_END__ and accept eh frames into data section.
944 Add ctor and dtor sections.
948 * pe-dll.c (autofilter_objectlist): Add gcrt0.o.
949 (auto-export): Fix indentation.
953 * pe-dll.c (autofilter_objectlist): Add startup objects
955 (auto-export): Constify char * p.
956 Extract file basename and use strcmp rather than ststr
961 * ldmain.c (get_emulation): Improve comment about the handling
966 * po/POTFILES.in: Regenerate.
970 * emultempl/elf32.em (gld*_list_options): Remove extra '\t' from
971 -z nocopyreloc and -z nocombreloc usage strings.
975 * emultempl/elf32.em (gld*_list_options): Include -z nocopyreloc
980 * scripttempl/armaout.sc: Place .bss section after end of aligned
981 data section to match behaviour of aout code in constructrion of
986 * pe-dll.c (autofilter_entry_type autofilter_liblist: Add
987 startup files for mingw32 dlls to list.
991 * emultempl/elf32.em: Fix shell 'if' usage for portability.
995 * configure.tgt (targ): Add arm9e-*-elf.
999 * genscripts.sh: Fix a typo in the last change.
1003 * emultempl/elf32.em (gld_*_list_options): Include -z combreloc and
1004 -z nocombreloc in usage.
1008 * genscripts.sh: Include a comment at the top of each generated
1009 script, explaining its purpose.
1013 * emultempl/elf32.em (parse_args): Handle -z nocopyreloc.
1014 * NEWS: Mention -z nocopyreloc.
1015 * ld.texinfo (Options): Describe nocopyreloc.
1019 * configure: Regenerate.
1023 * ldver.h (ld_program_version): Remove declaration.
1024 * lexsup.c (parse_args): Move printing of copyright message..
1025 * ldver.c (ldversion): .. to here.
1026 Use BFD_VERSION_STRING in place of BFD_VERSION.
1027 (ld_program_version): Remove.
1028 * Makefile.am (Makefile): Depend on bfd/configure.in.
1030 * Makefile.in: Regenerate.
1034 * Makefile.am: Update dependencies with "make dep-am".
1035 * Makefile.in: Regenerate.
1039 * ldlang.c (lang_common): Conditionally inhibit Common allocation.
1040 * lexsup.c: Add --no-define-common commandline option.
1041 * ldgram.y: Add INHIBIT_COMMON_ALLOCATION script command.
1042 * ldlex.l: Likewise.
1043 * ld.h: Add command_line.inhibit_common_definition.
1044 * ldmain.c (main): Initialize.
1045 * ld.texinfo: Document.
1049 * ldmisc.c (USE_STDARG): Remove.
1050 (info_msg): Define using VPARAMS, VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1055 * ldmisc.h: Remove #ifdef ANSI_PROTOTYPES and non-ansi
1056 declarations. Update copyright.
1060 * pe-dll.c: Remove obsoleted declaration of
1061 pe_get_data_import_dll_name.
1062 (pe_create_import_fixup): Fix thinko.
1064 * ld.texinfo(enable-auto-import): Clarify the explanation.
1068 * pe-dll.c (pe_create_import_fixup): Revert previous patch.
1069 * emultemp/pe.em (pe_data_import_dll): Move definition outside of
1070 DLL_SUPPORT controlled code.
1074 * emultempl/pe.em(pe_data_import_dll): Make static.
1075 (pe_get_data_import_dll_name): New accessor function.
1076 * pe-dll.c(pe_create_import_fixup): call
1077 pe_get_data_import_dll_name() from pe.em, instead of
1078 directly accessing pe_data_import_dll variable from pe.em.
1082 * deffilep.y: Include "safe-ctype.h" instead of <ctype.h>.
1083 (def_file_add_directive): Use ISSPACE instead of isspace.
1084 (def_lex): Use ISDIGIT/ISXDIGIT/ISALPHA/ISALNUM instead of
1085 isdigit/isxdigit/isalpha/isalnum.
1086 * emultempl/aix.em: Include "safe-ctype.h" instead of <ctype.h>.
1087 (gld${EMULATION_NAME}_read_file): Use ISSPACE instead of isspace.
1088 * emultempl/elf32.em: Include "safe-ctype.h" instead of <ctype.h>.
1089 (gld${EMULATION_NAME}_place_orphan): Use ISALNUM instead of
1091 * emultempl/gld960c.em: Include "safe-ctype.h" instead of <ctype.h>.
1092 (gld960_set_output_arch): Use ISUPPER/TOLOWER instead of
1094 * emultempl/sunos.em: Include "safe-ctype.h" instead of <ctype.h>.
1095 (gld${EMULATION_NAME}_search_dir): Use ISDIGIT instead of isdigit.
1096 * ldctor.c: Include "safe-ctype.h" instead of <ctype.h>.
1097 (ctor_prio): Use ISDIGIT instead of isdigit.
1098 * ldfile.c: Include "safe-ctype.h" instead of <ctype.h>.
1099 (ldfile_open_file_search): Use ISALPHA instead of isalpha.
1100 (ldfile_add_arch): Use ISUPPER/TOLOWER instead of
1102 * ldlang.c: Include "safe-ctype.h" instead of <ctype.h>.
1103 (stricpy): Use TOLOWER instead of isupper/tolower.
1104 (lang_leave_overlay_section): Use ISALNUM instead of isalnum.
1105 * ldlex.l: Include "safe-ctype.h" instead of <ctype.h>.
1106 (lex_warn_invalid): Use ISPRINT instead of isprint.
1107 * ldmain.c: Include "safe-ctype.h" instead of <ctype.h>.
1108 (main): For gettext, also set the LC_CTYPE locate facet.
1109 (add_keepsyms_file): Use ISSPACE instead of isspace.
1110 * lexsup.c: Include "safe-ctype.h" instead of <ctype.h>.
1111 (is_num, parse_args): Use ISDIGIT instead of isdigit.
1112 * mpw-elfmips.c: Include "safe-ctype.h" instead of <ctype.h>.
1113 (gldelf32ebmip_place_orphan): Use ISALNUM instead of isalnum.
1114 * mpw-eppcmac.c: Include "safe-ctype.h" instead of <ctype.h>.
1115 (gldppcmacos_read_file): Use ISSPACE instead of isspace.
1116 * pe-dll.c: Include "safe-ctype.h" instead of <ctype.h>.
1117 (quoteput): Use ISSPACE instead of isspace.
1118 (pe_dll_generate_implib, pe_process_import_defs): Use ISALNUM
1123 * deffilep.y (def_stash_module): Constify "name" param.
1125 * pe-dll.c: Replace CONST with const throughout.
1126 (quick_symbol): Constify "n1", "n2", "n3" params.
1127 (make_singleton_name_thunk): Constify "import" param. Make
1128 "buffer_len" a size_t.
1129 (make_import_fixup_entry): Constify "name", "fixup_name",
1130 "dll_symname" params.
1131 (pe_get16): Cast args of bfd_seek. Replace bfd_read with bfd_bread.
1132 (pe_get32): Likewise.
1133 (pe_implied_import_dll): Likewise.
1135 * emultempl/beos.em (sort_by_file_name): Constify "ra", "rb".
1136 (sort_by_section_name): Likewise.
1138 * emultempl/pe.em: Move defines for arm_epoc_pe before bfd.h included.
1139 (make_import_fixup): Cast printf arg, rel->address to long rather
1141 (gld_${EMULATION_NAME}_after_open): Don't compare NULL against int.
1145 * ldmain.c (main): Rename BufferSize to ld_bufsz because HPUX
1146 defines BufferSize. Increase buffer size by one.
1150 * pe-dll.c (pe_walk_relocs_of_symbol): Fix memory leak.
1154 * configure.tgt: Add arm-openbsd target.
1158 * Makefile.am (ALL_EMULATIONS): Move eelf64ppc.o and
1160 (ALL_64_EMULATIONS): Here.
1161 * Makefile.in: Regenerated.
1165 * emultempl/pe.em(make_import_fixup): change signature to
1166 take asection as well as arelec; we need this for proper
1167 error reporting. Only call pe_create_import_fixup() if
1168 there is no attempt to add a constant addend to the reloc;
1169 otherwise, report error condition.
1170 * pe-dll.c(pe_walk_relocs_of_symbol): change signature,
1171 since final argument is a pointer to make_import_fixup().
1172 Change call to cb() to match make_import_fixup() signature.
1173 (make_import_fixup_mark): make buffer_len unsigned.
1174 * pe-dll.h: change signature of pe_walk_relocs_of_symbol.
1178 * ld.texinfo: add verbose documentation for auto-import
1179 direct-addressing workaround, to compliment the terse
1184 * scripttempl/v850.sc: Add gcc_except_table sections.
1188 * emulparams/h8300helf.sh: Move stack to a much higher memory address.
1189 * emulparams/h8300self.sh: Similarly.
1193 * ld.texinfo (Options, --stack): Correct default value for stack
1198 * emultempl/aix.em : Handle import file XMC_XO and syscall symbols.
1202 * emultempl/beos.em: Declare prototypes for comparions functions,
1207 * emultempl/aix.em: Add missing prototype.
1208 * emultempl/lnk960.em: Likewise.
1209 * emultempl/vanilla.em: Likewise.
1210 * emultempl/armcoff.em: Likewise.
1211 * emultempl/armelf_oabi.em: Likewise.
1212 * emultempl/beos.em: Likewise.
1213 * emultempl/gld960c.em: Likewise.
1214 * emultempl/gld960.em: Likewise.
1216 * emulparams/elf64alpha.sh (PARSE_AND_LIST_PROLOGUE): Add parameter
1217 for prototype declaration.
1222 * ldmain.c (get_emulation): Add support for -mips32 and -mips64.
1226 * emultempl/pe.em: Add missing prototypes.
1227 (gld_${EMULATION_NAME}_after_open): Remove extra args to
1228 pe_find_data_imports.
1229 (pr_sym): Add unused attribute.
1233 * configure.tgt (i[3456]86-*-rtems*, m68*-*-rtems*): Change
1234 default from coff to elf.
1238 * emulparams/h8300helf.sh: Resync with h8300elf.sh. Update
1240 * emulparams/h8300self.sh: Similarly.
1244 * Makefile.am (ALL_EMULATIONS): Add eh8300elf.o, eh8300elf.o and
1246 (eh8300elf.c, eh8300helf.c, eh8300self.c): New targets.
1247 * configure.tgt (h8300-*-elf*): New case.
1248 * emulparams/h8300elf.sh, emulparams/h8300helf.sh: New files.
1249 * emulparams/h8300self.sh: New file.
1250 * Makefile.in: Regenerated.
1254 * ldmain.c (main): Rename BSIZE to BufferSize to avoid collision
1260 * Makefile.am (ALL_EMULATIONS): Add eelf64ppc.o and eelf64lppc.o.
1261 (eelf64ppc.c, eelf64lppc.c): Add make targets.
1263 * Makefile.in: Regenerate.
1264 * configure.tgt: Add powerpc64 support. Move pdp11, pjl, pj
1265 entries to correct alphabetical position.
1266 * emulparams/elf64ppc.sh: New.
1267 * emulparams/elf64lppc.sh: New.
1271 * ldmain.c (main): Declare BSIZE as static.
1275 * emultempl/elf32.em (place_orphan): Place orphan .rel* sections
1276 into .rel.dyn resp. .rela.dyn if combreloc.
1277 (get_script): If .x linker script is equal to .xn, only put it
1278 once into the binary.
1279 Add .xc and .xsc scripts.
1280 (parse_args): Handle -z combreloc and -z nocombreloc.
1281 * scripttempl/elf.sc (.rela.sbss): Fix a typo.
1282 For .xc and .xsc scripts put all .rel* or .rela* input sections
1283 but .rel*.plt and PLT-like sections into .rel.dyn resp. .rela.dyn.
1284 * genscripts.sh (GENERATE_COMBRELOC_SCRIPT): Set if SCRIPT_NAME
1286 Strip trailing whitespace from script.
1287 Generate .xc and .xsc scripts if requested.
1288 * ldmain.c (main): Initialize link_info.combreloc and
1289 link_info.spare_dynamic_tags.
1290 * lexsup.c (OPTION_SPARE_DYNAMIC_TAGS): Define.
1291 (ld_options): Add --spare-dynamic-tags option.
1292 (parse_args): Likewise.
1293 * ld.texinfo: Document -z combreloc and -z nocombreloc.
1294 * ldint.texinfo: Document .xc and .xsc linker scripts.
1295 * NEWS: Add notes about -z combreloc and SHF_MERGE.
1299 * emulparams/elf32fr30.sh: Add a newline.
1303 * deffilep.y: Add missing prototypes.
1304 * pe-dll.c: Likewise.
1308 * ldlang.c (insert_pad): Fix typos in last patch.
1310 * ldlang.c: When traversing lang_statement_union_type lists,
1311 consistently use "header.next" rather than "next".
1312 * mpw-eppcmac.c: Likewise.
1313 * emultempl/beos.em: Likewise.
1314 * emultempl/hppaelf.em: Likewise.
1315 * emultempl/pe.em: Likewise.
1316 * ldlang.h (union lang_statement_union): Remove "next" field.
1318 * ldlang.c (insert_pad): Use offsetof macro.
1319 (lang_size_sections): Always neuter padding statements.
1320 * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Delete.
1322 * pe-dll.c (pe_dll_fill_sections): Correct type of "relax" param
1323 passed to lang_size_sections.
1324 (pe_exe_fill_sections): Likewise.
1325 * emultempl/pe.em (output_prev_sec_find): Copied from elf32.em.
1326 (gld_${EMULATION_NAME}_place_orphan): Merge from elf32.em.
1330 * emultempl/aix.em: Formatting fixes.
1334 * ldlang.c (insert_pad): Make use of an existing pad statement if
1335 available. Move code calculating alignment, adjusting section
1336 alignment power, and adjusting dot to ..
1337 (size_input_section): .. here. Remove unused relax param.
1338 (lang_size_sections): Change boolean `relax' param to boolean *.
1339 Adjust call to size_input_section. Make use of insert_pad to
1340 place pad after the assignment statement. If relaxing, zap
1342 (reset_memory_regions): Reset output_bfd section sizes too.
1343 (relax_again): Move to..
1344 (lang_process): ..here. Adjust call to lang_size_sections, and
1345 remove duplicated code.
1346 * ldlang.h (lang_size_sections): Change `relax' param to boolean *.
1350 * ld.texinfo: Document that fill values now use the four least
1352 * emulparams/elf32fr30.sh (NOP): Update.
1353 * emulparams/elf32mcore.sh: Likewise.
1354 * emulparams/elf64_s390.sh: Likewise.
1355 * emulparams/elf_i386.sh: Likewise.
1356 * emulparams/elf_i386_be.sh: Likewise.
1357 * emulparams/elf_i386_chaos.sh: Likewise.
1358 * emulparams/elf_i386_ldso.sh: Likewise.
1359 * emulparams/elf_s390.sh: Likewise.
1360 * emulparams/elf_x86_64.sh: Likewise.
1361 * emulparams/i386moss.sh: Likewise.
1362 * emulparams/i386nw.sh: Likewise.
1363 * emulparams/m68kelf.sh: Likewise.
1364 * scripttempl/elf.sc: Update NOP comment.
1365 * scripttempl/elfi370.sc: Likewise.
1366 * scripttempl/elfm68hc11.sc: Likewise.
1367 * scripttempl/elfm68hc12.sc: Likewise.
1368 * scripttempl/nw.sc: Likewise.
1372 * ldgram.y (saved_script_handle): Initialize to NULL.
1373 * ldmain.c (main): Change check on saved_script_handle.
1377 * emultempl/elf32.em: Formatting fixes.
1378 (output_prev_sec_find): Test for bfd_ind_section too; do so by
1379 looking at sec->owner.
1380 (output_rel_find): Move function inside LDEMUL_PLACE_ORPHAN test.
1381 (gld${EMULATION_NAME}_place_orphan): Add a few comments. Remove
1382 unused code, and reorganize orphan section placement code.
1384 * ldlang.c (wild_doit): Rename to lang_add_section.
1385 * ldlang.h: Here too.
1386 * mpw-elfmips.c: And here.
1387 * emultempl/beos.em: And here.
1388 * emultempl/elf32.em: And here.
1389 * emultempl/hppaelf.em: And here.
1390 * emultempl/pe.em: And here.
1394 * emultempl/needrelax.em: New file.
1395 * emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Reference it.
1396 * Makefile.am (eelf64_ia64.c): Depend on it.
1397 * Makefile.in: Rebuild.
1401 * emultempl/elf32.em: For SEC_EXCLUDE sections, ensure that
1402 output_section is set non-NULL.
1404 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Return
1405 `true' for SEC_EXCLUDE sections so that the generic code doesn't
1406 needlessly create an output_section_statement. Treat a correctly
1407 named output_section_statement with NULL bfd_section as compatible.
1411 * emultempl/generic.em: Support EXTRA_EM_FILE.
1412 (ld_${EMULATION_NAME}_emulation): Support emulation parameters
1413 LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
1414 LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
1415 LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
1416 LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
1417 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
1418 LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
1419 LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
1420 LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
1421 LDEMUL_FIND_POTENTIAL_LIBRARIES.
1425 * scripttempl/elf.sc, scripttempl/elfd30v.sc,
1426 scripttempl/elfm68hc11.sc, scripttempl/elfm68hc12.sc,
1427 scripttempl/v850.sc: Keep .jcr data.
1433 * ldgram.y (had_script): Change name to saved_script_handle.
1434 Change type to file handle.
1435 * ld.h (had_script): Rename and retype.
1436 * ldfile.c (ldfile_open_command_file): Save the file handle
1437 used in saved_script_handle.
1438 * lexsup.c (parse_args): Do not allow -c option to alter
1439 saved_script_handle.
1440 * ldmain.c (main): Print out the linker script used if
1441 --verbose is given. Check saved_script_handle to obtain the
1442 external linker script used, or if NULL, dump the builtin
1444 * ld.texinfo: Document that --verbose now dumps the linker
1445 script used, regardless of whether it was an internal or an
1450 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
1452 * configure: Regenerate.
1456 * emultempl/elf32.em (output_prev_sec_find): Add missing prototype.
1458 * scripttempl/elf.sc: Move non-text .dynamic section before
1459 .plt/.got/.sdata* group.
1460 (OTHER_GOT_SECTIONS): Move to immediately after .got.
1461 (OTHER_SDATA_SECTIONS): Add.
1462 * emulparams/criself.sh: Use OTHER_SDATA_SECTIONS rather than
1464 * emulparams/crislinux.sh: Likewise.
1465 * emulparams/elf32b4300.sh: Likewise.
1466 * emulparams/elf32bmip.sh: Likewise.
1467 * emulparams/elf32bmipn32.sh: Likewise.
1468 * emulparams/elf32bsmip.sh: Likewise.
1469 * emulparams/elf32btsmip.sh: Likewise.
1470 * emulparams/elf32ebmip.sh: Likewise.
1471 * emulparams/elf32elmip.sh: Likewise.
1472 * emulparams/elf32l4300.sh: Likewise.
1473 * emulparams/elf32lmip.sh: Likewise.
1474 * emulparams/elf32lsmip.sh: Likewise.
1475 * emulparams/elf32ltsmip.sh: Likewise.
1476 * emulparams/elf64bmip.sh: Likewise.
1477 * emulparams/elf64btsmip.sh: Likewise.
1478 * emulparams/elf64ltsmip.sh: Likewise.
1482 * genscripts.sh: Source the emulparams script before each output
1483 script is generated so that variables like `RELOCATING' may affect
1484 variables defined in the emulparams script.
1488 * emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this
1491 * emultempl/beos.em (sort_sections): Modify for 2001-08-03 change,
1492 ie. iterate over wild_statement.section_list.
1493 (gld${EMULATION_NAME}_place_orphan): Likewise.
1497 * scripttempl/elfm68hc12.sc (FINISH_CODE, FINISH_RELOC): New to handle
1498 .fini[0-4] sections used by _exit
1499 (CTOR, DTOR): Export ctor/dtor symbols; move them to ROM.
1500 (*.text,*.data,*.bss): Take into account .text.*, .data.*, .bss.*.
1501 * scripttempl/elfm68hc11.sc: Likewise.
1505 * emultempl/beos.em (init): Add the missing initialization.
1509 * ld.texinfo (Input Section Basics): Clarify ordering of output
1511 * ldlang.c (callback_t): Add wildcard_list param.
1512 (walk_wild_section): Remove "section" param. Rewrite for
1513 lang_wild_statement_type change. Remove unique_section_p test.
1514 (walk_wild_file): Remove "section" param.
1515 (walk_wild): Remove "section" and "file" params.
1516 (lang_gc_wild): Likewise.
1517 (wild): Likewise. Modify for lang_wild_statement_type change.
1518 (wild_sort): Likewise. Add "sec" param.
1519 (gc_section_callback): Likewise.
1520 (output_section_callback): Likewise. Do unique_section_p test.
1521 (map_input_to_output_sections): Modify call to wild.
1522 (lang_gc_sections_1): Likewise.
1523 (print_wild_statement): Modify for lang_wild_statement_type
1525 (lang_add_wild): Replace filename, filenames_sorted param with
1526 filespec. Replace section_name, sections_sorted,
1527 exclude_filename_list with section_list.
1528 * ldlang.h (lang_add_wild): Here too.
1529 (lang_wild_statement_type): Replace section_name, sections_sorted,
1530 and exclude_filename_list with section_list.
1531 * ldgram.y (current_file): Delete.
1532 (%union): Add wildcard_list.
1533 (file_NAME_list): Set type to wildcard_list. Build a linked list
1534 rather than calling lang_add_wild for each entry.
1535 (input_section_spec_no_keep): Call lang_add_wild here instead.
1536 * ld.h (struct wildcard_list): Declare.
1537 * mri.c (mri_draw_tree): Modify to suit new lang_add_wild.
1541 * ldmain.c (main): initialize link_info.pei386_auto_import
1542 * pe-dll.c: new tables for auto-export filtering
1543 (auto_export): change API, pass abfd for contextual filtering.
1544 Loop thru tables of excluded symbols instead of comparing
1549 * pe-dll.c: new variable pe_dll_enable_extra_debug. New
1550 static variable current_sec (static struct sec *). Add
1551 forward declaration for add_bfd_to_link.
1552 (process_def_file): Don't export undefined symbols. Do not
1553 export symbols starting with "_imp__". Call auto_export()
1555 (pe_walk_relocs_of_symbol): New function.
1556 (generate_reloc): add optional extra debugging
1557 (pe_dll_generate_def_file): eliminate extraneous initial blank
1559 (make_one): enlarge symtab to make room for __nm__ symbols
1560 (DATA auto-import support).
1561 (make_singleton_name_thunk): New function.
1562 (make_import_fixup_mark): New function.
1563 (make_import_fixup_entry): New function.
1564 (pe_create_import_fixup): New function.
1565 (add_bfd_to_link): Specify that 'name' argument is a CONST
1567 * pe-dll.h: declare new variable pe_dll_extra_pe_debug;
1568 declare new functions pe_walk_relocs_of_symbol and
1569 pe_create_import_fixup.
1570 * emultempl/pe.em: add new options --enable-auto-import,
1571 --disable-auto-import, and --enable-extra-pe-debug.
1572 (make_import_fixup): New function.
1573 (pe_find_data_imports): New function.
1574 (pr_sym): New function.
1575 (gld_${EMULATION_NAME}_after_open): Add optional extra pe
1576 debugging. Call pe_find_data_imports. Mark .idata as DATA, not
1581 * ld.texinfo: add additional documentation for
1582 --export-all-symbols. Document --out-implib,
1583 --enable-auto-image-base, --disable-auto-image-base,
1584 --dll-search-prefix, --enable-auto-import, and
1585 --disable-auto-import.
1586 * ldint.texinfo: Add detailed documentation on auto-import
1591 * ld.texinfo (Simple Assignments): Fix computation in SECTIONS
1596 * Makefile.am: Update dependencies with "make dep-am".
1597 * Makefile.in: Regenerate
1601 * ldcref.c (check_section_sym_xref): New function.
1602 (check_nocrossrefs): Call it.
1603 (check_nocrossref): Interate over h->refs here instead of..
1604 (check_refs): ..here. Pass in the symbol name, section, and bfd
1605 rather than hash_entry pointers.
1606 (struct check_refs_info): Keep symbol name rather than hash entry.
1608 (check_reloc_refs): Tweak for above changes in check_refs_info.
1609 Only report references to section syms when symname is NULL to
1610 prevent duplicate messages for the same reloc.
1614 * ldexp.c (exp_print_tree): Use stderr if config.map_file is not
1615 available. Do not print NULL trees.
1616 (exp_print_token): Print unknown tokens with values > 126 as
1617 decimal values not ASCII characters.
1619 * ldlang.c (lang_leave_overlay): If a region is specified assign
1620 it to all sections inside the overlay unless they have been
1621 assigned to the own, non-default, memory region.
1623 * README: Add header for consistency with other README files.
1627 * emultempl/elf32.em (output_prev_sec_find): Never return
1628 bfd_abs_section_ptr, bfd_com_section_ptr nor
1629 bfd_und_section_ptr.
1633 * Makefile.am (em32relf.c): Change dependency from generic.em to
1635 * Makefile.in: Regenerate.
1639 * configure.tgt (i386-*-netbsdelf*): New target.
1640 (i386-*-netbsd*): Set targ_extra_emuls to `elf_i386'
1644 * emultempl/elf32.em (output_prev_sec_find): New.
1645 (place_orphan): Use it.
1649 * ldmain.c (main): Fix typos in the last change.
1653 * ldmain.c (main): Disallow -F and -f without -shared.
1657 * emultempl/pe.em (after_open): Check for the output_bfd not
1658 having any coff_data structure allocated to it.
1662 * emultempl/elf32.em: Do not assuming that contents of the buffer
1663 returned from basename function will remain unchanged accross other
1668 * scripttempl/elf.sc (DYNAMIC_PAD): Revert the change made on
1669 2001-07-03. It creates dynamic entries even for static binaries.
1673 * scripttempl/elf.sc (DYNAMIC_PAD): New variable.
1674 (DYNAMIC): Use it to reserve few dynamic entries for
1679 * emulparams/hppa64linux.sh: New file.
1680 * configure.tgt: hppa*64*-*-linux* uses hppa64linux.sh
1681 * Makefile.am (ALL_64_EMULATIONS): Add ehppa64linux.o
1682 (ehppa64linux.c): Add rule to make it.
1684 * Makefile.in: Regenerate.
1688 * ld.texinfo (Options, -r): Mention restrictions when using
1689 different object formats.
1693 * ldlang.c (lang_check): Emit fatal error if relocatable link
1694 between different object flavours with relocations in input.
1698 * ld.texinfo (-E, --export-dynamic): Mention --version-script.
1699 (--version-script): Mention the language support.
1703 * ldlang.c (lang_check): Revert the change mode on 2001-06-15.
1707 * Makefile.am (ld.1): Remove the prefix `$(srcdir)/'.
1708 (diststuff): Add $(MANS).
1709 * Makefile.in: Regenerated.
1715 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
1716 Update for API change in bfd_elf${ELFSIZE}_size_dynamic_sections.
1717 * mpw-elfmips.c (gldelf32ebmip_before_allocation): Ditto.
1718 * ld.h (args_type): Remove member export_dynamic. All users
1719 changed to use struct bfd_link_info member.
1721 * Makefile.am (ecriself.c, ed10velf.c, ei386moss.c): Depend on
1722 $(srcdir)/emultempl/elf32.em, not $(srcdir)/emultempl/generic.em.
1723 * Makefile.in: Regenerate.
1727 * ldlang.c (init_os): Add the newline to the einfo call.
1728 (lang_check): Likewise.
1729 (lang_do_version_exports_section): Likewise.
1733 * lexsup.c (parse_args); Save optind to report unrecognized
1738 * ldlang.c (lang_check): Emit fatal error if relocatable link
1739 between different object flavours.
1741 * lexsup.c (parse_args) <case OPTION_EXPORT_DYNAMIC, case 'E'>:
1742 Set new link_info member export_dynamic.
1743 * ldmain.c (main): Initialize new link_info member export_dynamic.
1747 * ldlang.c (walk_wild): Only call walk_wild_file if
1748 lookup_name returns something.
1749 (lookup_name): If load_symbols fails, return NULL.
1750 (load_symbols): Change to a boolean function.
1751 (open_input_bfds): If load_symbols fails then do not make the
1756 * ldlang.c (record_bfd_errors): Remove.
1758 * emultempl/aix.em: Fix copyright dates.
1762 * elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase.
1763 (TEXT_START_ADDR): Likewise.
1767 * configure.host: Set HOSTING_CRT0/HOSTING_LIBS correctly for s/390.
1771 * emultempl/pe.em (init): Reduce default stack reserve to 0x200000.
1775 * ldlang.c (open_input_bfds): Don't change the bfd error
1776 handler whilst loading symbols.
1780 * configure.tgt: Remove i370-mvs architecture, it is not currently
1785 * emulparams/ppcmacos.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
1786 like emulparams/aixppc.sh.
1790 * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Move
1791 setting of output_filename after bfd_scan_arch.
1792 * emultempl/pe.em: Likewise.
1796 * emulparams/aixrs6.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
1797 like emulparams/aixppc.sh.
1799 * emultempl/aix.em (sc): Use ${srcdir}/emultempl/ostring.sed
1800 instead of ${srcdir}/emultempl/stringify.sed.
1804 * emulparams/elf64_aix.sh: Change settings to match IBM linker
1809 * configure.host: Replace linuxoldld with linux*oldld.
1810 * configure.tgt: Likewise.
1814 * emultempl/stringify.sed: Removed again.
1818 * emultempl/aix.em (OUTPUT_ARCH): Defined.
1819 (gld${EMULATION_NAME}_before_parse): Initialize
1820 ldfile_output_architecture, ldfile_output_machine and
1821 ldfile_output_machine_name from ${OUTPUT_ARCH} if possible.
1822 * emultempl/beos.em: Likewise.
1823 * emultempl/elf32.em: Likewise.
1824 * emultempl/linux.em: Likewise.
1825 * emultempl/mipsecoff.em: Likewise.
1826 * emultempl/pe.em: Likewise.
1827 * emultempl/sunos.em: Likewise.
1831 * emultempl/aix.em : (gld${EMULATION_NAME}_read_file)
1832 udate import file format.
1833 (change_symbol_mode) New, same
1834 (is_syscall) New, same
1835 * emulparams/aixppc.sh : add SYSCALL_MASK and SYMBOL_MODE_MASK
1836 * emulparams/aixppc64.sh : same
1837 * emulparams/aixrs6.sh : same
1838 * emulparams/ppcmacos.sh : same
1839 * emultempl/aix.em : use strtoull to parse options
1840 * Makefile.am : add eaixppc64 emulation for xcoff64
1841 * Makefile.in : same
1842 * configure.tgt : same
1844 * scripttempl/aix.sc : default text section offset to 0x10000000
1845 default data section offset to 0x20000000
1846 add .sv3264 and .sv64 pseudo sections
1847 loader and debug sections use the currect section offset.
1849 * emultempl/aix.em : Add xcoff64 support
1850 Add -binitfini support
1851 (gld${EMULATION_NAME}_before_parse) -binitfini
1852 (gld${EMULATION_NAME}_parse_args) same
1853 (gld${EMULATION_NAME}_before_allocation) format change for special
1856 * emulparams/aixppc64.sh : New file for xcoff64 support
1860 * emultempl/elf32.em (ELF_INTERPRETER_SET_DEFAULT): Use this new
1861 variable to avoid non-portable shell construct.
1865 * ldmain.c (get_emulation): Add -mips5 command line argument.
1869 * emulparams/elf_i386_ldso.sh: New, copied from elf_i386.sh.
1870 (ELF_INTERPRETER_NAME): Define it.
1871 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Use
1873 * configure.tgt (targ_emul, targ_extra_emuls)
1874 [i[3456]86-*-solaris2*, i[3456]86-*-solaris*]: Use elf_i386_ldso
1875 as primary, elf_i386 as extra.
1876 * Makefile.am (ALL_EMULATIONS): Added eelf_i386_ldso.o.
1877 (eelf_i386_ldso.c): New rule.
1878 * Makefile.in: Rebuilt.
1882 * lexsup.c (ld_options): Allow -I to be an alias for
1883 --dynamic-linker. This is for Solaris compatability.
1884 * ld.texinfo: Document that -I can be used.
1889 * ldlang.c (wild_doit): Use linker_has_input to reliably determine
1890 whether an input section is the first one assigned to an output
1892 Assorted formatting fixes.
1896 * Makefile.am (ld.dvi): Search bfd/doc for texinfo files.
1897 * Makefile.in: Ditto.
1901 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Put
1902 .gnu.linkonce.ia64unw{,i} sections into corresponding .IA_64.unwind*
1904 * emulparams/elf64_aix.sh (OTHER_READONLY_SECTIONS): Likewise.
1908 * ldlang.c (lang_process): Call bfd_merge_sections.
1912 * ldgram.y: Fix typo.
1916 * emultempl/elf32.em: Include "libiberty.h".
1917 (gld${EMULATION_NAME}_vercheck): Call basename () to get the
1918 basename of the bfd filename.
1919 (gld${EMULATION_NAME}_stat_needed): Likewise.
1920 (gld${EMULATION_NAME}_try_needed): Likewise.
1921 (gld${EMULATION_NAME}_open_dynamic_archive): Likewise.
1925 * emultempl/pe.em: Include <ctype.h>.
1929 * emulparams/elf32openrisc.sh: New file.
1931 * Makefile.am: Add OpenRISC target.
1932 * Makefile.in: Regenerated.
1934 * configure.tgt: Add openrisc-*-* mapping.
1938 * emultempl/aix.em: Replace buystring with xstrdup.
1939 * emultempl/beos.em: Replace buystring with xstrdup.
1943 * ldfile.c: Include "libiberty.h".
1944 * ldlex.l: Likewise.
1946 * ldmisc.c (buystring): Removed.
1947 * ldmisc.h: Likewise.
1949 * ldfile.c: Replace buystring with xstrdup.
1950 * ldlang.c: Likewise.
1951 * ldlex.l: Likewise.
1952 * ldmain.c: Likewise.
1953 * ldmisc.c: Likewise.
1954 * lexsup.c: Likewise.
1955 * mpw-eppcmac.c: Likewise.
1959 * emulparms/elf_x86_64.sh (MAXPAGESIZE): Fix value.
1963 * ldlang.c (load_symbols): Give emulation a chance
1964 to process unrecognized file before fatal error is
1965 reported, not after.
1969 * configure.tgt: Add arm-vxworks target.
1970 * scripttempl/armcoff.sc: Support .text or .data as a section name
1976 * ld.texinfo: Document --fatal-warnings.
1979 * ldmisc.c (vfinfo): Set flag to inhibit making executable if
1980 warnings have been turned into errors.
1981 * lexsup.c (OPTION_WARN_FATAL): Define.
1982 (ld_options): Entry for --fatal-warnings.
1983 (parse_args): Handle OPTION_WARN_FATAL.
1984 * ld.h (ld_config_type): Add fatal_warnings field.
1988 * ldmain.c (main): Default to discard_sec_merge.
1989 * lexsup.c (OPTION_DISCARD_NONE): Define.
1990 (ld_options): Add --discard-none.
1991 (parse_args): Handle OPTION_DISCARD_NONE.
1992 * ldlang.c (wild_doit): SEC_MERGE should be set in the output
1993 section only if SEC_MERGE and SEC_STRINGS flags and entsize of
1994 all its input sections match.
1998 * Makefile.am (ALL_EMULATIONS): Add eelf32ltsmip.o.
1999 (ALL_64_EMULATIONS): Add eelf64btsmip.o and eelf64ltsmip.o.
2000 (eelf32ltsmip.c): New target.
2001 (eelf64btsmip.c): Likewise.
2002 (eelf64ltsmip.c): Likewise.
2003 * Makefile.in: Regenerated.
2005 * configure.tgt (mips*el-*-linux-gnu): Uses traditional MIPS
2007 (mips*-*-linux-gnu*): Likewise.
2009 * emulparams/elf32ltsmip.sh: New. Traditional little endian
2011 * emulparams/elf64btsmip.sh: New. Traditional 64bit big endian
2013 * emulparams/elf64ltsmip.sh: New. Traditional 64bit little
2018 * emulparams/criself.sh (EXECUTABLE_SYMBOLS): Cannot provide
2019 correct value of __Stext here.
2020 (TEXT_START_SYMBOLS): Define; always define __Stext, to start of
2023 * emulparams/crislinux.sh: Remove FIXME.
2027 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 64k.
2028 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Likewise.
2032 * configure.tgt (cris-*-*): Change default emulation to criself.
2033 (cris-*-*aout*): New rule.
2037 * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 0x4000.
2038 (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
2042 * ld.texinfo (Overview): Fix syntax in texi code.
2046 * ld.texinfo: Put @c man indications to generate the ld man page.
2047 When generating man, define all the variables. Define SEEALSO
2048 and SYNOPSIS. Re-organize some lines to avoid the cross references.
2049 * Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variables.
2050 (ld.1): Generate from ld.texinfo.
2051 * Makefile.in: Regenerate.
2055 * scripttempl/i386go32.sc: Support the GCC flags '-ffunction-sections'
2056 and '-fdata-sections'. Set the VMA of STABS sections to zero.
2060 * emultmpl/elf32.em (gld${EMULATION_NAME}_search_needed): If NAME
2061 is an absolute path look only for this file and not along the path.
2065 * emultempl/elf32.em (OPTION_GROUP): New macro.
2066 Add new option Bgroup to longopts.
2067 (gld*_parse_args): Handle GROUP_OPTION and recognize -z defs.
2068 (gld*_list_options): Add -Bgroup and -z defs.
2069 * ld.1: Document -Bgroup and -z defs.
2070 * ld.texinfo: Likewise.
2074 * scripttempl/elfd10v.sc (.rodata,.rodata1,.data1,.sdata): Deal
2075 with sections created by -fdata-sections.
2076 (.dynbss,.bss): Ditto.
2080 * emultempl/m68kelf.em (m68k_elf_after_allocation): Call
2081 after_allocation_default, not gld..._before_allocation.
2085 * configure.in (BFD_VERSION): New.
2086 (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
2087 * configure: Regenerate.
2088 * Makefile.am: Run "make dep-am"
2089 * Makefile.in: Regenerate.
2093 * emulparams/elf64_aix.sh: Add additional read-only sections;
2094 uncomment lines which are now required.
2098 * ldlang.c (open_input_bfds): Set the bfd error handler so
2099 that problems can be caught whilst loading symbols.
2100 (record_bfd_errors): New function: Report BFD errors and mark
2101 the executable output as being invalid.
2105 * configure.host: Add configuration for ia64-*-aix*.
2106 * Makefile.am (ALL_64_EMULATIONS): Add emulation for ia64-*-aix*.
2107 Add dependencies for eelf64_aix.c.
2108 * Makefile.in: Regenerate.
2109 * configure.tgt: Add ia64-*-aix* mapping.
2110 * emulparams/elf64_aix.sh: Add settings for elf64 on aix5.
2111 * testsuite/ld-bootstrap/bootstrap.exp: Exclude ia64 flavor from
2116 * ldfile.c (ldfile_open_file): Set entry->search_dirs_flag to
2117 false if we found the file.
2121 * configure.tgt: Add FreeBSD/Alpha, FreeBSD/x86-64, FreeBSD/ia64,
2122 FreeBSD/PowerPC, FreeBSD/arm, and FreeBSD/sparc64 entries.
2126 * Makefile.am: Add PDP-11 target.
2127 * configure.tgt: Likewise.
2128 * emulparams/pdp11.sh: New file.
2132 * configure.host: Add a generic FreeBSD configuration entry such that
2133 all [modern] FreeBSD systems on all platforms will look the same.
2137 * configure.tgt: Remove mention of earmelf_linux26.
2141 * emulparams/elf64_ia64.sh (OTHER_GOT_SYMBOLS): Remove.
2145 * ldexp.h (node_type): Add etree_provided.
2146 * ldexp.c (exp_fold_tree): Handle etree_provided. Set the node
2147 type to etree_provided if defined by PROVIDE. Allow updating
2149 (exp_print_tree): Handle etree_provided.
2150 * mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle
2155 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add
2156 .IA_64.unwind.* pattern to unwind table section and
2157 .IA_64.unwind_info* pattern to unwind info section.
2161 * Makefile.am: Add linux target for S/390.
2162 * Makefile.in: Likewise.
2163 * configure.host: Likewise.
2164 * configure.tgt: Likewise.
2165 * emulparams/elf64_s390.sh: New file.
2166 * emulparams/elf_s390.sh: New file.
2170 * configure.tgt (sparc64-*-linux-gnu*): Add elf32_sparc into
2172 (sparc-*-linux-gnu*): Add elf64_sparc into targ_extra_libpath.
2176 * Makefile.am: Remove mention of earmelf_linux26.
2177 * Makefile.in: Regenerate.
2181 * emulparams/armelf_linux.sh (TEXT_START_ADDR): Set to 0x8000.
2182 * emulparams/armelf_linux26.sh: Delete.
2183 * configure.tgt: Remove mention of armelf_linux26 emulation.
2187 * ld.1: Replace occurances of -oformat with --oformat.
2191 * ldlang.c (lang_leave_overlay): Don't set lma_region when
2192 load_base is specified.
2196 * emultempl/elf32.em: Correct spelling in comments and listed
2201 * ldlang.c (lang_leave_overlay): Only set lma_region from the
2202 default for the first section of a group of overlay sections.
2206 * Makefile.am (GENSCRIPTS): Pass exec_prefix.
2207 * Makefile.in: Regenerate.
2208 * genscripts.sh: Use exec_prefix parameter to specify tool lib.
2209 Check for null tool_dir.
2213 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add IA_64.unwind
2214 and IA_64.unwind.info.
2218 * ldlang.c (lang_check): Merge the private data only if the
2219 input file has contents.
2223 * emulparams/hppalinux.sh (OUTPUT_FORMAT): Set to elf32-hppa-linux.
2225 * emultempl/hppaelf.em (hppaelf_after_parse): New function,
2226 enabling search for libmilli. On a relocatable link, make .text
2228 (LDEMUL_AFTER_PARSE): Define.
2229 (hppaelf_finish): Correct spelling of relocatable in comments.
2231 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
2232 rummage through the script for sections on the unique list.
2233 Correct length of strncmp for ".note".
2234 (gld${EMULATION_NAME}_check_needed): Rearrange function.
2236 * ldlang.c (unique_section_list): New var.
2237 (unique_section_p): New function.
2238 (walk_wild_section): Don't match sections on unique_section_list.
2239 (lang_add_unique): New function.
2240 Correct spelling of relocatable in comments.
2242 * ldlang.h (struct unique_sections): Declare.
2243 (unique_section_list): Declare.
2244 (unique_section_p): Declare.
2245 (lang_add_unique): Declare.
2247 * lexsup.c (ld_options): Allow --unique to take an optional arg.
2248 (parse_args [OPTION_UNIQUE]): Call lang_add_unique.
2250 * ld.texinfo (--unique): Update.
2254 * lexsup.c (parse_args): Remove spurious white space.
2258 * lexsup.c (parse_args): Update copyright date.
2262 * configure.host: Set HOSTING_LIBS appropriately for ix86-cygwin.
2266 * scripttempl/h8300.sc: Fix formatting. Fix a comment typo.
2267 * scripttempl/h8300h.sc: Fix formatting.
2268 * scripttempl/h8300s.sc: Likewise.
2269 * scripttempl/h8500.sc: Likewise.
2270 * scripttempl/h8500b.sc: Likewise.
2271 * scripttempl/h8500c.sc: Likewise.
2272 * scripttempl/h8500m.sc: Likewise.
2273 * scripttempl/h8500s.sc: Likewise.
2277 * emultempl/elf32.em: Only perform Linux ld hints processing when
2282 * ld.texinfo (Bug Reporting): Update email address for reports.
2286 * lexsup.c (parse_args): Set opterr to 0 and detect unparsed long
2287 options by checking for a return value of '?' not -1.
2291 * lexsup.c (struct ld_option): Add new enum value:
2293 (ld_options[]): Change -omagic, -output and -oformat options
2294 to be EXACTLY_TWO_DASHES.
2295 (OUTPUT_COUNT): Use ARRAY_SIZE.
2296 (parse_args): Change parameter 'argc' to unsigned.
2297 Place EXACTLY_TWO_DASHES options into new really_longopts
2299 If getopt_long_only fails, try calling getopt_long using the
2300 really_longopts array.
2301 (help): Print a double dash for both EXACTLY_TWO_DASHES and
2304 * ldlex.h: Fix prototype of parse_args.
2306 * ld.texinfo: Document that long options starting with 'o'
2307 must be preceeded by two dashes. Change example of a single
2308 dashed long option from -oformat to -trace-symbol.
2312 * emultempl/pe.em (OPTION_NO_DEFAULT_EXCLUDES): Define.
2313 (longopts[]): New --no-default-excludes option.
2314 (gld_${EMULATION_NAME}_list_options): Document.
2315 (gld_${EMULATION_NAME}_parse_args): Handle.
2319 * ldlang.c (new_stat): Revert the last beautification with "innocent"
2320 whitespace, it breaks the K&R C preprocessor.
2324 * ld.texinfo: Add notes about --whole-archive and gcc.
2328 * lexsup.c (OPTION_ALLOW_SHLIB_UNDEFINED): Define.
2329 (ld_options): Entry for --allow-shlib-undefined.
2330 (parse_args): Handle OPTION_ALLOW_SHLIB_UNDEFINED.
2331 * ldmain.c (main): Initialize link_info.allow_shlib_undefined
2333 * ld.texinfo: Document new command line switch.
2337 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS):
2338 .fixup is actually read/write.
2339 * emulparams/elf32lppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
2340 * emulparams/elf32ppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
2341 * emulparams/elf32lppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
2345 * NEWS: Add note about x86_64 architecture.
2349 * scripttempl/i386go32.sc: Use PROVIDE with _etext, _edata, _end.
2350 Set DWARF2 sections to a VMA of zero.
2354 * configure.tgt (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
2356 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
2357 (sparc*-*-rtems*): Switched from a.out to ELF.
2361 * Makefile.am (ALL_EMULATIONS): Add eelf_x86_64.o
2362 (eelf_x86_64.c): New.
2363 * Makefile.in: Regenerate.
2364 * configure.tgt: Add support for x86_64-*-linux-gnu*.
2365 * emulparams/elf_x86_64.sh: New.
2369 * emulparams/crislinux.sh (ENTRY): Change back to _start.
2370 (TEXT_START_SYMBOLS): Remove conditional setting of __start.
2372 * scripttempl/crisaout.sc: Change all RELOCATING not related to
2373 merging non-a.out sections into CONSTRUCTING.
2377 * ld.1 (COPYING): Mention that the GNU Free Documentation
2378 License is present in the sources, but not the output, and
2379 also available from the GNU website.
2380 (GNU Free Documentation License): Comment out this section.
2384 * emulparams/elf64alpha.sh (ENTRY): Remove leading underscore as ELF
2389 * ld.1: Remove old date so it does not give the impression the manpage
2394 * configure.tgt (xscale-coff): Add target.
2395 (xscale-elf): Add target.
2399 * ldmain.c (main): Remove redundant init of config.make_executable
2404 * emulparams/elf64alpha.sh (MAXPAGESIZE): Typo -- 64k, not 1M.
2408 * scripttempl/h8300.sc: Fix formatting.
2409 * scripttempl/h8300h.sc: Likewise.
2410 * scripttempl/h8300s.sc: Likewise.
2414 * scripttempl/elf32avr.sc: Fix bug in .eeprom segment.
2418 * emultempl/pe.em: Define ___start_SECNAME and ___stop_SECNAME
2419 around orphan sections whose names can be represented in C.
2423 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): New local
2424 hold_sdata. If SEC_SMALL_DATA set, set place to hold_sdata.
2428 * ld.texinfo: Add GNU Free Documentation License.
2429 * ldint.texinfo: Add GNU Free Documentation License.
2430 * ld.1: Add GNU Free Documentation License.
2434 * ldlex.l (yy_create_string_buffer): Init yy_is_our_buffer,
2435 yy_is_interactive, yy_at_bol, and yy_fill_buffer.
2437 * Makefile.am (DISTCLEANFILES): Add stringify.sed.
2438 Move 2000-11-02 Makefile.in changes to this file.
2439 * Makefile.in: Regenerate.
2443 * scripttempl/h8300.sc: Use ${CONSTRUCTING...} to enclose
2444 constructors and destructors.
2445 * scripttempl/h8300h.sc: Ditto.
2446 * scripttempl/h8300s.sc: Ditto.
2447 * scripttempl/h8500.sc: Ditto.
2448 * scripttempl/h8500b.sc: Ditto.
2449 * scripttempl/h8500c.sc: Ditto.
2450 * scripttempl/h8500m.sc: Ditto.
2451 * scripttempl/h8500s.sc: Ditto.
2452 * scripttempl/v850.sc: Ditto.
2453 * scripttempl/w65.sc: Ditto.
2454 * scripttempl/z8000.sc: Ditto.
2458 * Makefile.in (e_i386_chaos.c): New rule.
2459 (ALL_EMULATIONS): Added e_i386_chaos.o.
2460 * emulparams/elf_i386_chaos.sh: New file.
2461 * configure.tgt: Recognise i[3456]86-chaosdev-storm-chaos.
2465 * emulparams/elf64_sparc.sh (TEXT_START_ADDR,
2466 NONPAGED_TEXT_START_ADDR): Set to 4GB for Solaris targets.
2467 Fix sed invocation, so that it coped with '/' in Solaris 64bit
2468 library path suffix.
2473 * scripttempl/crisaout.sc (.text, .data): Pad, with ALIGN (32),
2474 for consecutive sections.
2478 * lexsup.c: New option OPTION_TARGET_HELP. Prints all target specific
2480 * ld.texinfo: Added notes about this new option.
2484 * emultempl/pe.em (_after_open): Add tests of return values from
2485 bfd functions. Emit appropriate error messages if necessary.
2489 * emultempl/pe.em (_after_open): Delete 'is2' and 'nsyms'
2490 local variables - they are not used, but leave in the call to
2491 bfd_canonicalize_symtab.
2492 (_open_dynamic_archive): Add #ifdef DLL_SUPPORT around use of
2493 pe_dll_search_prefix.
2497 * emultempl/pe.em (pe_dll_search_prefix): New variable,
2498 (longopts): New --dll-search-prefix option.
2499 (gld_${EMULATION_NAME}_list_options): Document.
2500 (gld_${EMULATION_NAME}_parse_args): Handle.
2501 (gld_${EMULATION_NAME}_open_dynamic_archive): When linking
2502 dynamically, search for a dll named '<prefix><basename>.dll'
2503 in preference to 'lib<basename>.dll' if --dll-search-prefix
2508 * ldlang.c (section_already_linked): Set kept_section instead of
2513 * deffile.h: Fix formatting.
2514 * lexsup.c: Likewise.
2519 * pe-dll.c (make_one): Do not generate code thunk for DATA
2521 (process_def_file): deduce DATA flag for auto-export sumbols.
2525 * ld.h: Fix formatting.
2526 * ldcref.c: Likewise.
2527 * ldctor.h: Likewise.
2528 * ldemul.c: Likewise.
2529 * ldemul.h: Likewise.
2530 * ldexp.c: Likewise.
2531 * ldexp.h: Likewise.
2532 * ldfile.c: Likewise.
2533 * ldfile.h: Likewise.
2534 * ldlang.c: Likewise.
2535 * ldlang.h: Likewise.
2536 * ldmain.c: Likewise.
2537 * pe-dll.c: Likewise.
2539 * pe-dll.c: Revert some formatting fixes.
2543 * pe-dll.c: Fix formatting.
2547 * ldlang.c: Fix formatting.
2551 * pe-dll.c (fill_edata): initialize entire block
2552 (make_one): fill in correct section.
2556 * ldexp.c: Fix formatting.
2560 * emultempl/pe.em (gld_*_after_open): detect case where there two
2561 import libraries for same dll; rename one to ensure proper link
2564 * pe-dll.c (process_def_file): compare ordinals to -1, not 0; fix
2566 (generate_edata): fix typo
2570 * scripttempl/crisaout.sc (ENTRY): Now __start.
2571 (.text): Add default setting for __start.
2572 Remove CONSTRUCTORS handling.
2573 (/DISCARD/): Add .gnu.warning.*.
2574 * emulparams/crislinux.sh (ENTRY): Now __start.
2575 (TEXT_START_SYMBOLS): New; provide __Stext and __start default.
2576 * emulparams/criself.sh (OUTPUT_FORMAT): Now elf32-us-cris.
2577 (ENTRY): Now __start.
2578 (INITIAL_READONLY_SECTIONS): Add KEEP for .startup.
2579 (EXECUTABLE_SYMBOLS): Add default setting for __start.
2583 * deffile.h: Fix formatting.
2585 * ldcref.c: Likewise.
2586 * ldctor.c: Likewise.
2587 * ldctor.h: Likewise.
2588 * ldemul.c: Likewise.
2589 * ldemul.h: Likewise.
2590 * ldexp.c: Likewise.
2591 * ldexp.h: Likewise.
2592 * ldfile.c: Likewise.
2593 * ldfile.h: Likewise.
2594 * ldlang.c: Likewise.
2595 * ldlang.h: Likewise.
2596 * lexsup.c: Likewise.
2598 * pe-dll.c: Likewise.
2602 * pe-dll.c (process_def_file): Uninitialized data wasn't
2603 exported with --export-all-symbols switch.
2607 * pe-dll.c (fill_edata): rearrange the data so that ordinals and
2608 noname work properly.
2612 * ld.texinfo (HPPA ELF32): New section.
2614 * emultempl/hppaelf.em (group_size): New.
2615 (hppaelf_finish): Pass group_size to elf32_hppa_size_stubs.
2616 (PARSE_AND_LIST_PROLOGUE): Add OPTION_STUBGROUP_SIZE.
2617 (PARSE_AND_LIST_LONGOPTS): Add --stub-group-size. Duplicate
2618 options to prevent abbreviations matching.
2619 (PARSE_AND_LIST_OPTIONS): Describe the above. Reformat.
2620 (PARSE_AND_LIST_ARGS_CASES): Handle it.
2624 * emultempl/m68kelf.em: Conditionalise the embedded relocs feature
2625 on the m68*-*-elf target. Make it support COFF input objects.
2629 * ldmain.c: Fix formatting.
2630 * ldmisc.c: Likewise.
2631 * ldver.c: Likewise.
2632 * ldwrite.c: Likewise.
2636 * ldwrite.c (clone_section): Silence gcc warnings.
2640 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Handle
2641 out of memory failure.
2643 * ldwrite.c (ldwrite): Remove unnecessary einfo arg.
2644 (clone_section): Handle out of memory failures. Rename var to
2645 avoid c++ reserved word.
2649 * emultempl/hppaelf.em (hppaelf_add_stub_section): Rename
2650 stub_name param to stub_sec_name.
2651 (hppaelf_finish): Modify call to elf32_hppa_size_stubs.
2655 * emultempl/m68kelf.em: New file.
2656 * emulparams/m68kelf.sh (EXTRA_EM_FILE): Use it.
2657 * Makefile.am (em68kelf.c): Add dependency on m68kelf.em.
2658 * Makefile.in: Regenerate.
2662 * emulparams/hppalinux.sh (DATA_START_SYMBOLS): Provide $global$
2667 * ldmain.c (multiple_definition): Disable relaxation if
2668 multiple symbol definitions are encountered - otherwise the
2669 linker could abort with an assertion failure.
2673 * mri.c: Fix formatting.
2677 * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
2678 * configure: Rebuild.
2682 * Makefile.am (lexsup.o): Also depend on $(INCDIR)/demangle.h.
2683 * Makefile.in: Rebuild.
2687 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Fix
2688 broken list handling. Create __start_SECNAME and __stop_SECNAME
2689 when no place-holder. Add some comments. Test both SEC_CODE and
2690 SEC_READONLY for hold_text to prevent .rodata orphan poisoning.
2691 Handle case where no output section statement created.
2695 * configure.tgt (sh-*-linux*): Added.
2696 * Makefile.am: Added eshelf_linux and eshlelf_linux.
2697 * Makefile.in: Rebuilt.
2698 * emulparams/shelf_linux.sh: New file.
2699 * emulparams/shlelf_linux.sh: New file.
2703 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
2704 try shuffling sections when the orphan happens to be the place
2705 holder. Keep count of unique section names generated so we speed
2706 the search for a new name.
2710 * configure: Rebuilt with new libtool.m4.
2714 * Makefile.in: Regenerate.
2715 * aclocal.m4: Regenerate.
2716 * configure: Regenerate.
2717 * config.in: Regenerate.
2718 * po/ld.pot: Regenerate.
2720 * ldint.texinfo: Remove CVS revision marker - it foils local
2723 * emultempl/ticoff.em: Remove extraneous comma.
2727 * emultempl/hppaelf.em (hppaelf_add_stub_section): Add SEC_RELOC
2728 to stub section flags.
2729 (hppa_for_each_input_file_wrapper): New.
2730 (hppa_lang_for_each_input_file): New.
2731 (lang_for_each_input_file): Define to call above.
2732 (multi_subspace): New.
2733 (hppaelf_finish): Pass multi_subspace to elf32_hppa_size_stubs.
2734 (PARSE_AND_LIST_PROLOGUE): Define.
2735 (PARSE_AND_LIST_LONGOPTS): Define.
2736 (PARSE_AND_LIST_OPTIONS): Define.
2737 (PARSE_AND_LIST_ARGS_CASES): Define.
2738 (hppaelf_finish): Call elf32_hppa_set_gp.
2739 (hppaelf_set_output_arch): Remove.
2740 (LDEMUL_SET_OUTPUT_ARCH): Remove.
2742 * emulparams/hppalinux.sh (ELFSIZE): Define.
2744 (OTHER_READONLY_SECTIONS): Define.
2746 (GENERATE_SHLIB_SCRIPT): Define.
2748 * ldlang.c: Add missing prototypes, and tidy others. Change CONST
2749 to const throughout. Change `void *' to `PTR' throughout.
2750 (lang_memory_default): Function is local to file, add `static'.
2752 * Makefile.am (ehppaelf.c): Depend on emultempl/elf32.em.
2753 (ehppalinux.c): Likewise.
2754 (earmelf.c): Likewise.
2755 (earmelf_linux.c): Likewise.
2756 (earmelf_linux26.c): Likewise.
2757 * Makefile.in: Regenerate.
2759 * ld.h (ld_config_type): Add unique_orphan_sections.
2760 * lexsup.c (OPTION_UNIQUE): Define.
2761 (ld_options): Add "--unique".
2762 (parse_args): Handle it.
2763 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
2764 search for an existing output section if unique_orphan_sections is
2765 set. Make use of bfd_get_unique_section_name rather than
2766 duplicating code here.
2767 * ld.texinfo: Describe --unique.
2769 * lexsup.c (ld_options): Make split-by-reloc arg optional. Add
2770 optional arg to split-by-file.
2771 (parse_args): Handle them.
2772 * ld.texinfo: Update description of these options.
2773 * ldwrite.c (clone_section): Pass in the section name. Replace
2774 local code with bfd_get_unique_section_name.
2775 (split_sections): Tidy code and comments. Use a list traversal
2776 more appropriate to the list construction. Handle cooked section
2777 sizes. Split when split_by_reloc reached rather than exceeded.
2778 Track section size and split when split_by_file reached. Fix
2779 link_order_tail (even though it's not used).
2780 (ldwrite): Modify condition for calling split_sections to suit
2781 changed split_by_reloc and split_by_file.
2782 * ldmain.c (main): Init config.split_by_reloc and
2783 config.split_by_file to -1.
2784 * ld.h (ld_config_type): Change split_by_reloc to unsigned.
2785 Change split_by_file to bfd_size_type.
2789 * configure.in: Increase version number to 2.10.91.
2790 * NEWS: Mention new ability to support removal of duplicate DWARF2
2792 * configure: Regenerate.
2793 * aclocal.m4: Regenerate.
2794 * config.in: Regenerate.
2798 * scripttempl/elf.sc: Add .gnu.linkonce.wi.* to .debug_info
2800 * scripttempl/elf32avr.sc: Ditto.
2801 * scripttempl/elfd10v.sc: Ditto.
2802 * scripttempl/elfd30v.sc: Ditto.
2803 * scripttempl/elfi370.sc: Ditto.
2804 * scripttempl/elfm68hc11.sc: Ditto.
2805 * scripttempl/elfm68hc12.sc: Ditto.
2806 * scripttempl/elfi386beos.sc: Ditto.
2807 * scripttempl/v850.sc: Ditto.
2811 * acinclude.m4: Include libtool and gettext macros from the
2813 * aclocal.m4, configure: Rebuilt.
2817 * ldlang.c (open_output): When choosing the target for a
2818 particular endianness, do nothing if the target is not
2823 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
2824 check -rpath nor LD_RUN_PATH for cross link.
2825 * ld.texinfo: Document the change.
2829 * NEWS: Mention support for CRIS.
2833 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Get
2834 the current runpath list from bfd_elf_get_runpath_list ()
2839 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search
2840 the DT_RPATH/DT_RUNPATH entries for DT_NEEDED after
2841 LD_LIBRARY_PATH for native linker. Display the needed DSO if
2842 trace_file_tries is non-zero.
2843 (gld${EMULATION_NAME}_try_needed): Report the needed DSO found
2844 if trace_file_tries is non-zero.
2846 * ld.texinfo: Document the usage of DT_RPATH/DT_RUNPATH.
2851 * NEWS: Mention i860 support.
2855 * scripttempl/elf.sc: Fix last change to use correct comment
2860 * scripttempl/elf.sc: Add a comment giving the correspondence
2861 between sections, per-datum sections, and linkonce sections. Make
2862 the comment true even for .bss, .sdata, .sdata2, .sbss, and
2867 * emulparams/elf32_i860.sh: New file.
2868 * configure.tgt: Recognize new target i860-stardent-{sysv4*|elf*}.
2869 * Makefile.am (ALL_EMULATIONS): Add eelf32_i860.o.
2870 (eelf32_i860.c): New rule.
2871 * Makefile.in: Regenerate.
2875 * emulparams/mipspe.sh (ENTRY): Add definition.
2879 * emultempl/elf32.em (_after_close): Refer to -rpath not --rpath
2884 * scripttempl/elfm68hc11.sc: Define __bss_size symbol to indicate
2885 the final size of .bss section.
2886 * scripttempl/elfm68hc12.sc: Likewise.
2890 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Rename to
2891 gld${EMULATION_NAME}_parse_args for consistency. Combine
2892 lastoptind and prevoptind vars, and keep track of last optind.
2893 (gld_${EMULATION_NAME}_list_options): Rename to
2894 gld${EMULATION_NAME}_list_options.
2898 * configure.tgt: Select targ_emul=elf_i386 for Unixware 7
2899 (i586-sco-sysv5uw7.1.0).
2903 * emulparams/elf64alpha.sh (PARSE_AND_LIST_ARGS): Removed.
2904 (PARSE_AND_LIST_PROLOGUE): New.
2905 (PARSE_AND_LIST_LONGOPTS): Likewise.
2906 (PARSE_AND_LIST_OPTIONS): Likewise.
2907 (PARSE_AND_LIST_ARGS_CASES): Likewise.
2908 (PARSE_AND_LIST_EPILOGUE): Likewise.
2912 * emultempl/armelf.em: Elide functions common to elf32.em,
2913 ie. most of the file.
2914 (arm_elf_after_open): New. Do arm specific things then call
2915 gld${EMULATION_NAME}_after_open.
2916 (arm_elf_before_allocation): New. Call
2917 gld${EMULATION_NAME}_before_allocation then do arm specifics.
2918 (PARSE_AND_LIST_PROLOGUE): Define.
2919 (PARSE_AND_LIST_SHORTOPTS): Define.
2920 (PARSE_AND_LIST_LONGOPTS): Define.
2921 (PARSE_AND_LIST_OPTIONS): Define.
2922 (PARSE_AND_LIST_ARGS_CASES): Define.
2923 (LDEMUL_AFTER_OPEN): Define.
2924 (LDEMUL_BEFORE_ALLOCATION): Define.
2925 (LDEMUL_BEFORE_PARSE): Define.
2926 (LDEMUL_FINISH): Define.
2928 * emultempl/hppaelf.em: Similarly zap most of this file.
2929 (hppaelf_add_stub_section): Prototype.
2930 (hppaelf_layaout_sections_again): Prototype.
2931 (hook_in_stub): Prototype.
2932 (LDEMUL_SET_OUTPUT_ARCH): Define.
2933 (LDEMUL_FINISH): Define.
2934 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
2936 * emulparams/armelf.sh (TEMPLATE_NAME): Use elf32.
2937 (EXTRA_EM_FILE): New.
2938 * emulparams/armelf_linux.sh: Likewise.
2939 * emulparams/armelf_linux26.sh: Likewise.
2940 * emulparams/hppalinux.sh: Likewise.
2941 * emulparams/hppaelf.sh: Likewise.
2944 * emultempl/elf32.em: Fix formatting.
2945 (EXTRA_EM_FILE): Source it.
2946 (LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
2947 LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
2948 LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
2949 LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
2950 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
2951 LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
2952 LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
2953 LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
2954 LDEMUL_FIND_POTENTIAL_LIBRARIES): New shell vars. Add code to
2955 allow functions in this file to be overridden.
2956 (PARSE_AND_LIST_SHORTOPTS): Handle it.
2958 * emultempl/m68kcoff.em: Include ldfile.h before ldemul.h.
2960 * emultempl/elf32.em: Reorganize file.
2964 * emulparams/elf64alpha.sh: Implement "-taso" emulation
2965 specific option to fit 64-bit executable in the lower
2966 31-bit address range. This is done by changing start
2967 address of .interp (the very first section of executable)
2968 and then setting EF_ALPHA_32BIT elf header flag.
2972 * emultempl/m68kcoff.em: New file.
2973 * emulparams/m68kcoff.sh (TEMPLATE_NAME): Use m68kcoff template.
2974 * Makefile.am (em68kcoff.c): Depend on m68kcoff.em rather than
2976 * Makefile.in: Regenerate.
2980 * emultempl/elf32.em (longopts): Duplicate "disable-new-dtags"
2981 and "disable-new-dtags" to stop getopt from treating -d/-e as
2982 abbreviations for these options.
2986 * ld.texinfo: Add documentation for --disable-new-dtags and
2989 * ldmain.c (main): Initialize link_info.new_dtags to false.
2991 * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Add
2992 --disable-new-dtags and --enable-new-dtags.
2993 (gld_${EMULATION_NAME}_list_options): Likewise.
2997 * lexsup.c: Add optional style to demangle switch
2998 * ld.texinfo: Document optional style to demangle switch.
3002 * Makefile.am (ALL_EMULATIONS): Add ecrisaout.o, ecriself.o,
3004 (ecrisaout.c, ecriself.c, ecrislinux.c): New rules.
3005 Regenerate dependencies.
3006 * Makefile.in: Rebuild.
3007 * configure.tgt (cris-*-*): New target.
3008 * emulparams/crisaout.sh, emulparams/criself.sh,
3009 emulparams/crislinux.sh, scripttempl/crisaout.sc: New files.
3010 * po/POTFILES.in, po/ld.pot: Regenerate.
3014 * emultempl/elf32.em (gld_${EMULATION_NAME}_list_options):
3015 Print out ignored -z options.
3019 * emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Removed.
3020 (PARSE_AND_LIST_PROLOGUE): New.
3021 (PARSE_AND_LIST_LONGOPTS): Likewise.
3022 (PARSE_AND_LIST_OPTIONS): Likewise.
3023 (PARSE_AND_LIST_ARGS_CASES): Likewise.
3025 * ldmain.c (main): Clear link_info.flags and link_info.flags_1.
3027 * lexsup.c (ld_options): Comment out 'z'.
3028 (parse_args): Likewise.
3030 * emultempl/elf32.em: Include "elf/common.h".
3031 (gld_${EMULATION_NAME}_parse_args): Defined. Handle some -z
3033 (gld_${EMULATION_NAME}_list_options): Likewise.
3035 * ld.texinfo: Add documentation for the recognized -z options.
3039 * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call
3040 bfd_elf_set_dt_needed_soname ().
3044 * pe-dll.c (pe_dll_id_target): check object target name also
3048 * scripttempl/elf.sc (.init): Only do ${INIT_START} and
3049 ${INIT_END} if relocating.
3050 (.fini): Likewise ${FINI_START} and ${FINI_END}.
3054 * emultempl/pe.em (gld_*_open_dynamic_archive): New search
3055 order for dynamic library '-lfoo' on pei386: libfoo.dll.a,
3056 foo.dll.a, libfoo.a, libfoo.dll, foo.dll. This fixes compatibility
3057 errors introduced by the old dynamic lib search order.
3061 * pe-dll.c (process_def_file): auto-export data items also
3062 (pe_process_import_defs): also see if _imp_ form needed
3066 * pe-dll.c (make_one): fix a typo in the __imp_ name decoration
3067 for dll import libraries
3071 * scripttempl/i386go32.sc: Support the g++ attribute init_priority in
3072 gcc 2.95.2 and later.
3076 * ldfile.c (ldfile_try_open_bfd): Output '\n' after an error
3081 * ldemul.h (struct lang_input_statement_struct): Remove forward
3083 (struct search_dirs): Likewise.
3084 * ldfile.h (struct lang_input_statement_struct): Likewise.
3085 Protect file from multiple inclusion.
3086 * ldlang.h (LANG_FOR_EACH_INPUT_STATEMENT): Move file_chain
3087 declaration from macro to file scope.
3089 * ldemul.c: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this order.
3090 * ldgram.y: Likewise here.
3091 * ldlang.c: And here.
3092 * ldmain.c: And here.
3093 * mpw-elfmips.c: And here.
3094 * mpw-eppcmac.c: And here.
3095 * emultempl/aix.em: And here.
3096 * emultempl/armcoff.em: And here.
3097 * emultempl/armelf.em: And here.
3098 * emultempl/armelf_oabi.em: And here.
3099 * emultempl/beos.em: And here.
3100 * emultempl/elf32.em: And here.
3101 * emultempl/hppaelf.em: And here.
3102 * emultempl/linux.em: And here.
3103 * emultempl/lnk960.em: And here.
3104 * emultempl/pe.em: And here.
3105 * emultempl/sunos.em: And here.
3106 * mpw-esh.c: And here. Include ldexp.h and ldlang.h too.
3107 * mpw-idtmips.c: Ditto.
3108 * emultempl/generic.em: Ditto.
3109 * emultempl/gld960.em: Ditto.
3110 * emultempl/gld960c.em: Ditto.
3111 * emultempl/mipsecoff.em: Ditto.
3112 * emultempl/ticoff.em: Ditto.
3113 * emultempl/vanilla.em: Ditto.
3115 * pe-dll.c: Include ldfile.h
3116 * ldver.c: Include ldexp.h, ldlang.h, ldfile.h
3118 * mpw-elfmips.c: (gldelf32ebmip_before_allocation): Add missing
3119 arguments to bfd_elf32_size_dynamic_sections call.
3120 (gldelf32ebmip_place_orphan): Add missing arguments to
3121 lang_leave_output_section_statement call.
3125 * emultempl/pe.em (pe_enable_stdcall_fixup): Protect with
3127 (strhash): Likewise.
3128 (compute_dll_image_base): Likewise.
3129 (pe_undef_found_sym): Likewise.
3130 (pe_undef_cdecl_match): Likewise.
3131 (gld_${EMULATION_NAME}_open_dynamic_archive): Mark the
3132 argument "arch" with ATTRIBUTE_UNUSED.
3136 * configure.tgt: Remove extraneous hppa*-*-linux-gnu*.
3139 * ldwrite.c (SSIZE): Remove to cure macro redefinition warning.
3143 Changes to create multiple linker stubs, positioned immediately
3144 before the section where they are required.
3145 * emultempl/hppaelf.em: Include elf32-hppa.h.
3146 (stub_sec, file_chain): Delete.
3147 (hppaelf_create_output_section_statements): Don't make a stub
3149 (hook_stub_info): New struct.
3150 (hook_in_stub): New function.
3151 (hppaelf_add_stub_section): New function.
3152 (hppaelf_finish): Do nothing for relocateable links. Modify the
3153 call to elf32_hppa_size_stubs. Move code for updating section
3155 (hppaelf_layaout_sections_again): ..to here, a new function.
3157 * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Fix
3158 broken list handling. Pass in a pointer to the list.
3159 (hppaelf_finish): Update call to hppaelf_delete_padding_statements
3161 (hppaelf_before_parse): Prototype.
3162 (hppaelf_set_output_arch): Prototype.
3163 (hppaelf_create_output_section_statements): Prototype.
3164 (hppaelf_delete_padding_statements): Prototype.
3165 (hppaelf_finish): Prototype.
3168 * emultempl/hppaelf.em: Include ctype.h.
3169 (struct orphan_save): New.
3170 (gld${EMULATION_NAME}_place_orphan): New.
3171 (output_rel_find): New.
3172 (hppaelf_get_script): Update from elf32.em.
3173 (ld_hppaelf_emulation): Rename to ld_${EMULATION_NAME}_emulation.
3174 Change emulation_name field to "${EMULATION_NAME}". Add
3175 gld${EMULATION_NAME}_place_orphan.
3177 * Makefile.am (ALL_EMULATIONS): Reinstate ehppaelf.o, add
3178 ehppalinux.o, sort it. Regenerate dependencies.
3179 (ehppalinux.c): Depend on hppaelf.em
3180 * Makefile.in: Regenerate.
3182 * configure.tgt: targ_emul=hppalinux for hppa*linux
3184 * emulparams/hppalinux.sh: New.
3185 * emulparams/hppaelf.sh (TARGET_PAGE_SIZE): Write in hex.
3189 * lexsup.c (parse_args): Copy section name.
3193 * emultempl/pe.em: institute the following search order for
3194 dynamic libraries on pei386: libfoo.dll.a, foo.dll.a (import
3195 libs), libfoo.dll, foo.dll (link direct to dll). Fall back to
3196 static lib (libfoo.a) if none of the above are found.
3200 * emultempl/pe.em (pe_enable_auto_image_base): New variable.
3201 (longopts): New --{enable,disable}-auto-image-base options.
3202 (gld_${EMULATION_NAME}_list_options): Document.
3203 (gld_${EMULATION_NAME}_parse): Handle.
3204 (strhash): New static function.
3205 (compute_dll_image_base): New static function.
3206 (gld_${EMULATION_NAME}_set_symbols): Use.
3214 * configure.tgt: Add traditional mips (mips*-*-sysv4*) target.
3215 * emulparams/elf32btsmip.sh: New file.
3216 * Makefile.am: Add traditional mips target.
3217 * Makefile.in: Rebuild.
3221 * Makefile.am (EXTRA_ld_new_SOURCES): Set to deffilep.y for
3222 automake to use YLWRAP.
3223 * Makefile.in: Rebuild.
3227 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
3228 (CLEANFILES): Add DEPA.
3229 * Makefile.in: Regenerate.
3231 2000-06-30 Timothy Wall <twall@ppc>
3233 * scripttempl/tic54xcoff.sc: PAGE N is not implemented, so encode
3234 the page in the upper octet of the address.
3238 * emulparams/avrmega161.sh (ARCH): Change to avr:5.
3242 * NEWS: arm-elf does --gc-sections too.
3246 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
3248 * Makefile.in: Regenerate.
3252 * Makefile.am: Rebuild dependency.
3253 * Makefile.in: Rebuild.
3257 * Makefile.am: Rebuild dependency.
3258 * Makefile.in: Rebuild.
3262 * scripttempl/tic54xcoff.sc: New.
3263 * ldlang.c (wild_doit): Propagate SEC_BLOCK flag.
3264 * gen-doc.texi: Add flag for TI COFF.
3265 * ld.texinfo: Add documentation for TI COFF handling switches.
3266 * emultempl/ticoff.em: New. TI COFF handling.
3267 * configure.tgt: Add tic54x target.
3268 * Makefile.am: Add tic54x target.
3269 * Makefile.in: Ditto.
3273 * ldmain.c (set_scripts_dir): Correct pointer comparison when
3274 checking for backslashes.
3278 * NEWS: Move entries not in 2.10 above "Changes in version 2.10".
3282 * NEWS: Update list of targets supporting --gc-sections.
3284 * scripttempl/elf.sc: KEEP .eh_frame contents.
3285 * scripttempl/elfd30v.sc: Same here.
3289 * Makefile.am (ALL_EMULATIONS): Added new emulation for m68hc12
3291 * Makefile.in: Rebuild.
3292 * configure.tgt: Recognize m68hc12 and m68hc11.
3293 * scripttempl/elfm68hc12.sc: New file.
3294 * emulparams/m68hc12elfb: New emulation.
3295 * emulparams/m68hc12elf: New emulation.
3296 * emulparams/m68hc11elfb.sh: New file. User configurable emulation
3297 (includes a memory.x script to define the ROM and RAM banks).
3298 * scripttempl/elfm68hc11.sc, emulparams/m68hc11elf.sh:
3299 New configuration files for support of Motorola 68hc11
3303 * ldmain.c (main): Only change SEC_READONLY for final link.
3307 * configure: Regenerate.
3311 * configure.in (VERSION): Update to show this is the CVS mainline.
3315 * emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all
3316 input objects to be ECOFF.
3317 (check_sections): einfo takes %B, not %P, to print a BFD name.
3321 * ldgram.y (vers_defns): Handle 'extern "C++" { ... }' in
3324 * ldlex.l (V_IDENTIFIER): Accept `::' in symbols.
3328 * emulparams/avr1200.sh (STACK): Define as 0.
3329 * emulparams/avr23xx.sh (STACK): Define as last internal SRAM address.
3330 * emulparams/avr4433.sh (STACK): Likewise.
3331 * emulparams/avr44x4.sh (STACK): Likewise.
3332 * emulparams/avr85xx.sh (STACK): Likewise.
3333 * emulparams/avrmega103.sh (STACK): Likewise.
3334 * emulparams/avrmega161.sh (STACK): Likewise.
3335 * emulparams/avrmega603.sh (STACK): Likewise.
3336 * scripttempl/elf32avr.sc (__data_start): Define for gcrt1.
3337 (__stack): Define from ${STACK} for main().
3341 * Makefile.am: Update dependencies with "make dep-am"
3342 * Makefile.in: Regenerate.
3346 * ldmain.c: Include filenames.h.
3347 (set_scripts_dir): Support backslashes in program name.
3351 * ldmain.c (main): When deciding if ".text" section should be
3352 read-only, don't forget to reset SEC_READONLY because it
3353 could be already set.
3357 * ld.1: Add documentation for new command line option:
3358 --section-start <sectionname>=<sectionorg>
3359 This is a generic version of -Ttext etc. which accepts
3360 any section name as a parameter instead of just text/data/
3362 * ld.texinfo: More docs.
3364 * lexsup.c: (parse_args): Recognize new command line option.
3365 (ld_options): Add new option.
3369 * lexsup.c (parse_args): `i' == `r', not `q'.
3373 * configure.tgt (hppa*64*-*-*): Enable PA64 target.
3378 Add support for '-q' == '--emit-relocs' switch.
3379 * ldmain.c (main): Default to false.
3380 * lexsup.c (parse_args): Turn on emitrelocations flag if set.
3381 * NEWS: Describe the emitrelocations switch.
3382 * ld.texinfo: Describe the emitrelocations switch.
3386 * emultempl/pe.em (_open_dynamic_archive): New function: Search
3387 the library path for "foo.dll" and "libfoo.dll" dynamic libraries
3388 before searching for 'libfoo.a' in response to a '-Bdynamic -lfoo'
3393 * lexsup.c (parse_args): Update the year in the copyright notice.
3397 * ld.h (gettext, dgettext, dcgettext, textdomain, bindtextdomain):
3398 Replace defines with those from intl/libgettext.h to quieten gcc
3403 * ldlang.c (open_input_bfds): Don't load the same file within
3404 a group again if the whole archive has been loaded already.
3409 * lexsup.c (set_section_start): Use bfd_scan_vma rather than
3414 * configure.host (ia64-*-linux-gnu*): Change gcc to ${CC}.
3416 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
3417 host "ia64-*-linux-gnu*".
3421 * ld.h: Correctly check GCC version.
3425 * Makefile.am: Add PA64 support. Add missing dependencies for
3427 * Makefile.in: Rebuilt.
3428 * configure.tgt: Add PA64 support (currently disabled).
3432 * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Delete.
3433 (output_rel_find): New function.
3434 (hold_section, hold_use): Delete.
3435 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
3436 hold_interp): Make local to place_orphan.
3437 (gld${EMULATION_NAME}_place_orphan): Use lang_output_section_find
3438 rather than place_section to find possible previous use of orphan.
3439 Similarly find the place-holder output sections. Use returned
3440 value from lang_enter_output_section_statement rather than calling
3441 lang_output_section_statement_lookup.
3442 * emultempl/armelf.em: Same here.
3443 * emultempl/pe.em: Similar to above, but no need for output_rel_find.
3445 * ldlang.c (lang_enter_output_section_statement): Return output
3447 * ldlang.h (lang_enter_output_section_statement): Change
3450 * ldlang.h (lang_output_section_statement): Export it.
3451 * ldlang.c (lang_output_section_statement): Ditto.
3455 * ld.texinfo (Output Section Data): Add note that section data
3456 commands cannot appear outside of section directives.
3460 * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support.
3465 * Makefile.am (ALL_64_EMULATIONS): Add eelf64_ia64.o.
3466 (eelf64_ia64.c): New rule.
3467 * Makefile.in: Rebuild.
3468 * configure.tgt (ia64-*-elf*, ia64-*-linux*): New targets.
3469 * emulparams/elf64_ia64.sh: New file.
3473 * scripttempl/elfd30v.sc: Place .gcc_except_table.
3477 * dep-in.sed: Match space at start of file name, not at end.
3481 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
3482 lang_leave_output_section_statement () after calling
3483 lang_enter_output_section_statement ().
3484 * emultempl/armelf.em: Likewise.
3488 * emultempl/elf32.em (struct orphan_save): Add section field.
3489 (gld${EMULATION_NAME}_place_orphan): Use above to keep sections in
3490 better order, and place first orphan section as we did before the
3491 2000-04-12 patch. Ignore ~SEC_ALLOC sections when choosing place.
3492 Don't call make_bfd_section here, let wild_doit do the job for us.
3493 Don't build a statement list when we'll only throw it away.
3494 * emultempl/armelf.em: Ditto.
3495 * emultempl/pe.em: Similarly.
3499 * scripttempl/elfppc.sc: Remove.
3500 * emulparams/elf32ppc.sh: Use elf.sc.
3501 * emulparams/elf32lppc.sh: Use elf.sc.
3502 * emulparams/elf32ppclinux.sh: Use elf.sc.
3503 * emulparams/elf32ppcsim.sh: New file.
3504 * emulparams/elf32lppcsim.sh: New file.
3505 * Makefile.am: Update dependencies. Add elf32ppcsim ad elf32lppcsim.
3506 (ALL_EMULATIONS): Add elf32ppcsim ad elf32lppcsim.
3507 * Makefile.in: Regenerate.
3508 * configure.tgt (powerpc-*): Add elf32ppcsim and elf32lppcsim.
3512 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Process
3513 ~SEC_ALLOC sections too. Init start address of debug sections.
3514 * emultempl/armelf.em (gld${EMULATION_NAME}_place_orphan): Ditto.
3515 * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Ditto.
3516 Also set all relocateable section start addresses.
3520 * scripttempl/elf.sc: Add support for .sbss2 and .sdata2 sections.
3521 Add new BSS_PLT variable for when .plt need not be contained in
3522 the file. Move _etext so that it is also after .fini, and provide
3523 both etext and _etext with a leading underscore. Mark the start
3528 * emultempl/elf32.em (struct orphan_save): New.
3529 (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
3530 hold_interp): Make them struct orphan_save.
3531 (gld${EMULATION_NAME}_place_section): Modify for new hold_*.
3532 (gld${EMULATION_NAME}_place_orphan): Add new orphan sections to
3533 the end of the relevant section list. Also add associated section
3534 statements to the end of any previous orphan statements.
3535 * emultempl/armelf.em: Similarly.
3536 * emultempl/pe.em: Similarly.
3540 * ld.texinfo (Simple Example): Remove extraneous paragraph.
3544 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
3545 --enable-build-warnings option.
3546 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
3547 * Makefile.in, configure: Re-generate.
3551 * po/ld.pot: Regenerate.
3553 * lexsup.c (help): Restore translated part of bug string.
3555 * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
3556 (DEP): Quote when passing vars to sub-make. Add warning message
3558 (DEP1): Rewrite for "gcc -MM".
3559 (CLEANFILES): Add DEP2.
3560 Update dependencies.
3561 * Makefile.in: Regenerate.
3565 * ld.h: #include "bin-bugs.h"
3566 * lexsup.c (help): Use REPORT_BUGS_TO.
3570 * configure.tgt (avr-*-*): New target support.
3571 * Makefile.am: Likewise.
3572 * scripttempl/elf32avr.sc: New script file.
3573 * emulparams/avr1200.sh: New file.
3574 * emulparams/avr23xx.sh: New file.
3575 * emulparams/avr4433.sh New file.
3576 * emulparams/avr44x4.sh New file.
3577 * emulparams/avr85xx.sh New file.
3578 * emulparams/avrmega103.sh New file.
3579 * emulparams/avrmega161.sh New file.
3580 * emulparams/avrmega603.sh New file.
3581 * Makefile.in: Regenerate.
3585 * Makefile.am (check-DEJAGNU): Also unset LANG.
3586 * Makefile.in: Rebuild.
3590 * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
3595 * emulparams/elf32mcore.sh: Include "getopt.h".
3599 * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware.
3603 * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR.
3604 * emulparams/shpe.sh: Likewise.
3608 * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED
3609 to unused parameters.
3611 * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static
3612 functions only used by DLL code.
3613 (_place_orphan): Initialise 'dollar'.
3617 * ldmain.c (undefined_symbol): Take one more arg, fatal, to
3618 indicate if the undefined symbol is a fatal error or not.
3619 Don't delete the output file if "fatal" is false.
3623 * Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)".
3624 Set LC_COLLATE and LC_ALL to null and export them. It is for
3625 sort which expects the C locale.
3626 Add $(LIBS) to all $(HOSTING_LIBS).
3627 * Makefile.in: Rebuild.
3631 * emultempl/{aix.em, armcoff.em, armelf.em, armelf_oabi.em,
3632 beos.em, elf32.em, generic.em, gld960.em, gld960c.em, hppaelf.em,
3633 linux.em, lnk960.em, mipsecoff.em, sunos.em, vanilla.em}
3634 (ld_emulation_xfer_struct): Add missing NULL initialiser for
3635 find_potential_libraries.
3639 * ldgram.y (exclude_name_list): Don't require a comma to separate
3640 list entries; the lexer considers commas to be valid part of a
3641 filename, so in something like `foo, bar' the comma is considered
3642 part of the first filename, `foo,'.
3643 * ld.texinfo: Update section on EXCLUDE_FILE lists.
3647 * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
3648 host "i[3456]86-*-freebsdelf*".
3652 * scripttempl/i386go32.sc: Move misplaced semicolons.
3656 * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o.
3657 (ALL_64_EMULATIONS): Remove eelf64hppa.o.
3658 (eelf64hppa.c, ehppaelf.c): Remove targets.
3659 * Makefile.in: Rebuild.
3663 * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on
3664 GNU/Linux/sparc, but keep the default as 32.
3666 * configure.tgt: Enable elf64_sparc on Solaris7+/sparc. And make
3667 it default if sparcv9 or sparc64.
3671 * Makefile.am: Add rules to build emipspe.o and earmpe.o.
3672 * Makefile.in: Regenerate.
3673 * configure.tgt: Add targets for arm-wince, sh-pe and mips-pe.
3675 * ldemul.h (ld_emulation_xfer_struct): Add new field:
3676 find_potential_libraries.
3677 * ldemul.c (ldemul_find_potential_libraries): New function.
3679 * ldfile.c (ldfile_open_file_search): Allow function to be
3681 (ldfile_open_file): Call ldemul_find_potential_libraries.
3682 * ldfile.h: Add prototype for ldfile_open_file_search.
3684 * pe-dll.c: Add support for ARM, MIPS and SH targets.
3686 * emulparams/mipspe.sh: New file. Parameters for mips-pe target.
3687 * emulparams/shpe.sh: New file. Parameters for sh-pe target.
3689 * emultempl/pe.em: Add support for ARM, MIPS and SH DLLs.
3690 (gld_X_find_potential_libraries): New function. Search for
3691 libraries called "*.lib".
3693 * scripttempl/pe.sc: Add .pdata section.
3697 * scripttempl/elfd10v.sc: Remove dynamic linking hooks.
3698 Add and use memory regions.
3702 * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New.
3704 * Makefile.am: Add support for Linux/IBM 370.
3705 * configure.tgt: Likewise.
3707 * Makefile.in: Regenerate.
3711 * ldlang.c (print_input_section, print_data_statement,
3712 print_reloc_statement, print_padding_statement, insert_pad,
3713 size_input_section, lang_check_section_addresses,
3714 lang_size_sections, lang_do_assignments, lang_set_startof,
3715 lang_one_common): Change `opb' to unsigned.
3716 (lang_do_assignments): Also change `size' to unsigned.
3720 * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION.
3724 * mri.c (mri_draw_tree): Add default LMA region argument to call
3725 to lang_leave_output_section_statement.
3726 * ldlang.h: Update prototypes with LMA region arguments.
3727 * ldlang.c (lang_size_sections): Encapsulate region bounds
3728 checking in os_check_region call.
3729 (os_check_region): New function.
3730 (lang_output_section_statement_lookup): Initialize lma_region.
3731 (lang_leave_output_section_statement): Add LMA region argument.
3732 (lang_leave_overlay): Ditto.
3733 * ldgram.y: Handle LMA region syntax.
3734 * ld.texinfo (Output Section Description): Describe LMA region usage.
3735 * emultempl/armelf.em (gld$place_orphan): Add default value for
3736 lma region in call to lang_leave_output_section_statement.
3737 * emultempl/elf32.em (gld$place_orphan): Add default value for
3738 lma region in call to lang_leave_output_section_statement.
3739 * emultempl/pe.em (gld$place_orphan): Add default value for
3740 lma region in call to lang_leave_output_section_statement.
3745 * ldlang.c (lang_check_section_addresses): Use bytes instead of
3746 octets when calculating section end addresses.
3750 * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation.
3754 * ldexp.c (fold_name): Make SIZEOF operator return byte count, not
3756 * ldlang.c (print_input_section, print_data_statement,
3757 print_reloc_statement, print_padding_statement): Print target
3758 address values and section sizes as bytes, not octets.
3759 (insert_pad) Calculate padding size in octets, and adjust "dot"
3761 (size_input_section) Always adjust "dot" by bytes, not octets.
3762 (lang_check_section_addresses, lang_do_assignments) Adjust
3763 "dot" by bytes, not octets. Use the larger of the directive size
3764 or octets_per_byte for the number of octets actually allocated in
3766 (lang_set_startof) Make sure STARTOF returns a target address.
3767 (lang_one_common) Record size changes in octets.
3768 (lang_abs_symbol_at_end_of) Section end symbol's value is
3769 recorded in target bytes.
3770 * ld.texinfo: Updated description of BYTE, SHORT, LONG, etc.
3771 to be clear about behavior when an octet is smaller than one byte.
3775 * ldcref.c (output_cref): Don't pass message strings to printf
3779 * ldmisc.c (vfinfo): Same here.
3784 * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em,
3785 generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em,
3786 mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct):
3787 Add missing NULL initialisers, and comments.
3789 * testsuite/ld-srec/sr3.cc (__rethrow): New.
3793 * ldlang.c (lang_size_sections): Fix typo in comment.
3797 * ldlang.c (lang_size_sections): Also update the current
3798 address of a region if the SEC_NEVER_LOAD bit is not set.
3802 * configure.tgt (arm*-*-conix*): New target.
3806 * ld.texinfo (Options): Remind users to preceed linker command
3807 line switches with -Wl, (or whatever is appropriate) if it is
3808 being invoked by a comnpiler driver program.
3809 Fix description of the behaviour of the -n command line switch.
3813 * ld.h (wildcard_spec): Change exclude_name to exclude_name_list.
3815 * ld.texinfo (EXCLUDE_FILE): Update documentation.
3816 * ldgram.y (wildcard_spec): Support a list of excluded_files.
3817 (exclude_name_list): New.
3818 ldlang.c (walk_wild_section): Support list of excluded files.
3819 (print_wild_statement): Likewise.
3820 (lang_add_wild): Likewise.
3821 * ldlang.h (lang_wild_statement_type): Likewise.
3822 * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support.
3826 * pe-dll.c (pe_dll_warn_dup_exports): New variable.
3827 (process_def_file): Use.
3828 (pe_dll_compat_implib): New variable.
3831 * pe-dll.h: Add exports of pe_dll_warn_dup_exports and
3832 pe_dll_compat_implib.
3834 * emultempl/pe.em (longopts): Add warn-duplicate-exports and
3835 compat-implib options.
3836 (gld_${EMULATION_NAME}_list_options): List new options.
3837 (gld_${EMULATION_NAME}_parse_args): Handle.
3839 * pe-dll.c (pe_dll_generate_implib): Use the correct name for output
3842 * deffilep.y (opt_name): Allow "." in name.
3844 For older changes see ChangeLog-9899
3850 version-control: never