3 * emulparams/elf64alpha.sh (PLT): New.
5 * emultempl/alphaelf.em (disable_relaxation): New.
6 (limit_32bit): Rename from elf64alpha_32bit; update all users.
7 (elf64_alpha_use_secureplt): Declare.
8 (bfd_elf64_alpha_vec, bfd_elf64_alpha_freebsd_vec): Declare.
9 (alpha_after_open): New.
10 (alpha_before_allocation): New.
11 (OPTION_NO_RELAX, OPTION_SECUREPLT, OPTION_NO_SECUREPLT): New.
12 (PARSE_AND_LIST_LONGOPTS): Include them.
13 (PARSE_AND_LIST_OPTIONS): Likewise.
14 (PARSE_AND_LIST_ARGS_CASES): Likewise.
15 (LDEMUL_AFTER_OPEN, LDEMUL_BEFORE_ALLOCATION): New.
16 * scripttempl/elf.sc (TEXT_PLT): New.
21 * configure.host (HOSTING_LIBS): Add libunwind.a if it exists.
25 * emultempl/ppc32elf.em (after_allocation): Don't call
26 ppc_elf_set_sdata_syms when relocatable.
30 * Makefile.am (ld.1): Revert the last 2 changes.
31 (info-recursive): Depend on ld.1.
32 * Makefile.in: Regenerated.
36 * Makefile.am (ld.1): Depend on "info" instead of
37 "configdoc.texi ldver.texi".
38 * Makefile.in: Regenerated.
42 * Makefile.am (ld.1): Depend on "info".
43 * Makefile.in: Regenerated.
47 * Makefile.am: Have 'all' depend on 'info' and 'ld.1'.
48 * Makefile.in: Regenerate.
52 * ld-arm/mixed-app.d: Adjust expected disassembly a little.
56 * Makefile.am (ldver.texi): Don't use $<.
57 * Makefile.in: Regenerated.
61 * Makefile.am (AM_MAKEINFOFLAGS, TEXI2DVI): Explicitly include
62 $(srcdir) before $(BFDDIR)/doc.
63 * Makefile.in: Regenerated.
68 * ldexp.c (exp_fold_tree_1): Renamed from exp_fold_tree and
69 take take a bfd_boolean, mark_used. Ignore assert failure if
71 (exp_fold_tree) Call exp_fold_tree_1 with mark_used == FALSE.
72 (exp_fold_tree_no_dot): Updated to take a bfd_boolean,
73 mark_used and pass down.
74 (fold_unary): Likewise.
75 (fold_binary): Likewise.
76 (fold_trinary): Likewise.
77 (exp_binop): Add FALSE to call to exp_fold_tree_no_dot.
78 (exp_trinop): Likewise.
80 (exp_nameop): Likewise.
81 (exp_get_vma): Likewise.
82 (exp_get_fill): Likewise.
83 (exp_get_abs_int): Likewise.
84 (fold_name): Likewise. Set SEC_KEEP in output section flags.
85 (exp_mark_used_section): New.
87 * ldexp.h (exp_mark_used_section): New.
89 * ldlang.c (lang_output_section_statement_lookup_1): Set the
90 ignored field to FALSE.
91 (lang_mark_used_section_1): New.
92 (lang_mark_used_section): Call lang_mark_used_section_1.
93 (strip_excluded_output_sections): Call lang_mark_used_section
94 and check for unused sections.
95 (lang_size_sections_1): Skip an output section if it should
97 (lang_do_assignments_1): Likewise.
98 (lang_process): Don't call lang_mark_used_section here.
100 * ldlang.h (lang_output_section_statement_type): Change
101 all_input_readonly to bitfield. Add ignored.
106 * emulparams/armelf_linux.sh (GENERATE_PIE_SCRIPT): Define as "yes".
107 * emulparams/hppalinux.sh (GENERATE_PIE_SCRIPT): Define as "yes".
111 * ldlang.c (print_assignment): Do not rely upon a valid result
112 having a section associated with it.
116 * ldlang.c (Scan_for_self_assignment): Check an assignment tree to
117 see if the same value is being used on the rhs as on the lhs.
118 (print_assignment): Call scan_for_self_assignment and if it
119 returns true, do no display the result of the computation but
120 instead just the final value of the symbol on the lhs.
121 * ld.texinfo: Document this behaviour and provide an example of
126 * Makefile.am (AM_MAKEINFOFLAGS): Define.
128 (ldver.texi): Depend on distributed files instead of built files.
129 (ld.info): Include $(srcdir) in the rule target. Remove actions.
130 (ld.dvi): Remove actions.
131 (MAINTAINERCLEANFILES): Add configdoc.texi.
132 (CONFIG_STATUS_DEPENDENCIES): Add bfd/configure.in.
133 (install-data-local): Renamed from install.
134 (Makefile): Remove explicit dependency.
135 * acinclude.m4: Remove obsolete code.
136 * configure.in: Update AC_PREREQ. Remove extra $CONFIG_SHELL.
137 * Makefile.in, aclocal.m4, config.in, configure: Regenerated.
141 * scripttempl/elfxtensa.sc: Sync up with elf.sc.
142 * emulparams/elf32xtensa.sh (PLT, GOT): Define.
146 * ldgram.y: Add SPECIAL token.
147 (sect_constraint): Handle SPECIAL.
148 * ldlang.c (lang_output_section_find_1): Don't match SPECIAL.
149 (map_input_to_output_sections): Likewise.
150 * ldlex.l (SPECIAL): Define.
151 * emulparams/elf32ppc.sh (DATA_GOT, SDATA_GOT, SEPARATE_GOTPLT,
152 GOT, PLT, GOTPLT): Define.
153 * emultempl/ppc32elf.em (old_plt, old_got): New static vars.
154 (ppc_after_open): New function.
155 (PARSE_AND_LIST_PROLOGUE): Define OPTION_OLD_LPT and OPTION_OLD_GOT.
156 (PARSE_AND_LIST_LONGOPTS): Add "bss-plt" and "sdata-got".
157 (PARSE_AND_LIST_OPTIONS): Document them.
158 (PARSE_AND_LIST_ARGS_CASES): Handle them.
159 (LDEMUL_AFTER_OPEN): Define.
160 * scripttempl/elf.sc (PLT): Don't override existing define.
161 (DATA_GOT, SDATA_GOT): Define and use to enable alternate got
162 placement rather than using NO_SMALL_DATA. Emit GOTPLT for RELRO_NOW.
166 * scripttempl/elf.sc (DATA_SEGMENT_RELRO_GOTPLT_END): Delete.
167 (DATA_SEGMENT_RELRO_END): Use SEPARATE_GOTPLT value.
168 (GOTPLT): Remove DATA_SEGMENT_RELRO_GOTPLT_END. Place after
169 DATA_SEGMENT_RELRO_END in script.
173 * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols):
174 Don't use a removed section.
178 * ldmain.c (reloc_overflow): Use output_bfd if the symbol
179 is defined in the ABS section.
183 * emultempl/elf32.em (gld${EMULATION_NAME}_provide_init_fini_syms):
184 Put back !link_info.relocatable.
189 * emultempl/elf32.em (gld${EMULATION_NAME}_provide_init_fini_syms):
190 Just check link_info.executable.
194 * Update the address and phone number of the FSF organization in
195 the GPL notices in the following files:
196 aclocal.m4, deffile.h, deffilep.y, fdl.texi, ld.h, ldcref.c,
197 ldctor.c, ldctor.h, ldemul.c, ldexp.c, ldexp.h, ldfile.c,
198 ldfile.h, 20ldgram.y, ldint.texinfo, ldlang.c, ldlang.h, ldlex.h,
199 ldlex.l, ldmain.c, ldmain.h, ldmisc.c, ldmisc.h, ldver.c, ldver.h,
200 ldwrite.c, ldwrite.h, lexsup.c, mri.c, mri.h, pe-dll.c, pe-dll.h,
201 sysdep.h, emultempl/aix.em, emultempl/alphaelf.em,
202 emultempl/armcoff.em, emultempl/armelf.em, emultempl/beos.em,
203 emultempl/crxelf.em, emultempl/elf32.em, emultempl/generic.em,
204 emultempl/gld960.em, emultempl/gld960c.em, emultempl/hppaelf.em,
205 emultempl/ia64elf.em, emultempl/irix.em, emultempl/linux.em,
206 emultempl/lnk960.em, emultempl/m68hc1xelf.em,
207 emultempl/m68kcoff.em, emultempl/m68kelf.em,
208 emultempl/mipsecoff.em, emultempl/mmix-elfnmmo.em,
209 emultempl/mmixelf.em, emultempl/mmo.em, emultempl/needrelax.em,
210 emultempl/pe.em, emultempl/ppc32elf.em, emultempl/ppc64elf.em,
211 emultempl/sh64elf.em, emultempl/sunos.em, emultempl/ticoff.em,
212 emultempl/vanilla.em, emultempl/xtensaelf.em
216 * scripttempl/elf.sc: Document the usage of __bss_start.
220 * Makefile.am: Add eelf_i386_vxworks.
221 * Makefile.in: Regenerate.
222 * configure.tgt: Make i?86-*-vxworks use targ_emul=elf_i386_vxworks.
223 * emulparams/elf_i386_vxworks.sh: New file.
224 * emulparams/vxworks.sh: New file.
225 * scripttempl/elf.sc: Add DATA_END_SYMBOLS and ETEXT_NAME.
229 * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols):
230 Call _bfd_elf_provide_section_bound_symbols.
234 * ldemul.c: Include bfdlink.h.
235 (ldemul_before_allocation): Assume before_allocation is non-zero.
236 (before_allocation_default): Call strip_excluded_output_sections.
237 * ldlang.c (stripped_excluded_sections): New variable.
238 (lang_add_section): Build input section list for each output
239 section, attached via map_head and map_tail pointers.
240 (strip_excluded_output_sections): Make global. Traverse the
241 input section lists to find which output sections can go. Clear
242 link_order pointers and set stripped_excluded_sections.
243 (lang_process): Call strip_excluded_output_sections.
244 * ldlang.h (strip_excluded_output_sections): Declare.
245 * ldwrite.c: Update throuhout for link_order_head -> map_head change.
246 * emultempl/aix.em (before_allocation): Call
247 strip_excluded_output_sections.
248 * emultempl/armcoff.em (before_allocation): Likewise.
249 * emultempl/beos.em (before_allocation): Likewise.
250 * emultempl/linux.em (before_allocation): Likewise.
251 * emultempl/pe.em (before_allocation): Likewise.
252 * emultempl/sunos.em (before_allocation): Likewise.
253 * emultempl/elf32.em (before_allocation): Likewise. Call
254 bfd_elf_size_dynsym_hash_dynstr too.
255 * emultempl/lnk960.em (lnk960_before_allocation): Delete.
256 (ld_lnk960): Use before_allocation_default.
260 * emultempl/elf32.em (gld${EMULATION_NAME}_strip_empty_section):
261 Updated for bfd_section_list_remove change.
262 * ldlang.c (lang_insert_orphan): Likewise.
263 (strip_excluded_output_sections): Likewise.
264 (sort_sections_by_lma): New.
265 (lang_check_section_addresses): Sort the sections before
270 * configure.tgt: Add h8300*-*-rtemscoff.
271 Switch h8300*-*-rtems* to elf.
275 * ldgram.y (lang_memory_region_type): Make static.
276 (ldgram_want_filename): Likewise.
277 * ldemul.c (ld_emulation): Make static.
278 * ldfile.h (ldfile_find_command_file): Remove extern.
279 * ldfile.c (ldfile_find_command_file): Make static.
280 * ldlang.h (unique_section_list): Remove extern declaration.
281 * ldlang.c (unique_section_list): Make static.
282 * mri.h (symbol_truncate): Remove extern declaration.
283 * mri.c (symbol_truncate): Make static.
284 (order, only_load, address, alias): Likewise.
285 (alignment, subalignment): Likewise.
289 * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols):
290 Use the first SEC_ALLOC section which isn't SEC_READONLY or the
291 last SEC_ALLOC section if such a section doesn't exist.
295 * configure.host: Add *-*-openbsd support.
299 * ld.texinfo: Document --use-blx.
300 * emultempl/armelf.em (use_blx): New variable.
301 (arm_elf_create_output_section_statements): Communicate value of
303 (PARSE_AND_LIST_PROLOGUE): Add OPTION_USE_BLX.
304 (PARSE_AND_LIST_OPTIONS): Add --use-blx option.
305 (PARSE_AND_LIST_ARGS_CASES): Add OPTION_USE_BLX case.
309 * Makefile.am (NO_WERROR): Define. Use instead of -Wno-error.
310 * configure.in: Include ../bfd/warning.m4 contents.
311 * Makefile.in: Regenerate.
312 * configure: Regenerate.
316 * Makefile.am: Run "make dep-am".
317 (ldgram.o, ldlex.o, deffilep.o): Add -Wno-error to command.
318 * Makefile.in: Regenerate.
319 * config.in: Regenerate.
323 * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed): Ignore
324 as_needed libs that were not needed.
325 (gld${EMULATION_NAME}_check_needed): Likewise.
329 * emultempl/m68kcoff.em: Include ldexp.h and ldlang.h so that
330 ldfile.h can use the lang_input_statement type.
334 * ldlang.c: Formatting.
335 (walk_wild_consider_section): Remember return value from wildcardp.
336 (is_simple_wild): Use strcspn instead of 2 strpbrk calls and strlen.
337 (wild_spec_can_overlap): Use strcspn instead of strpbrk and strlen.
341 * ld.h (lean_section_userdata_type): Remove.
342 (fat_section_userdata_type): Remove file field.
343 (SECTION_USERDATA_SIZE): Remove.
344 * ldlang.c (init_os): Eliminate initialization of unused
345 lean_section_userdata_type.
347 * ldlang.h (callback_t, walk_wild_section_handler_t): New
349 (struct lang_wild_statement_struct): Add walk_wild_section_handler
350 and handler_data fields.
351 * ldlang.c (callback_t): Removed.
352 (walk_wild_consider_section, walk_wild_section_general,
353 section_iterator_callback, find_section, is_simple_wild,
354 match_simple_wild, walk_wild_section_specs1_wild0,
355 walk_wild_section_specs1_wild1, walk_wild_section_specs2_wild1,
356 walk_wild_section_specs3_wild2, walk_wild_section_specs4_wild2,
357 wild_spec_can_overlap, analyze_walk_wild_section_handler): New
359 (lang_add_wild): Call analyze_walk_wild_section_handler.
360 (walk_wild_section): Renamed to walk_wild_section_general and
361 created a wrapper function.
362 (section_iterator_callback_data): New typedef.
366 * configure.in: Add a check for <unistd.h> providing a prototype
367 for getopt() which is compatible with the one in
368 include/getopt.h. If so then define HAVE_DECL_GETOPT.
369 * configure: Regenerate.
370 * config.in (HAVE_DECL_GETOPT): Add.
371 * ldemul.c: Include config.h
372 * lexsup.c: Likewise.
373 * emultempl/elf32.sc: Likewise.
377 * emultempl/elf32.em (gld${EMULATION_NAME}_layout_sections_again):
378 New function, extracted from static void gld${EMULATION_NAME}_finish.
379 (gld${EMULATION_NAME}_strip_empty_sections): Likewise.
380 (gld${EMULATION_NAME}_provide_init_fini_syms): Likewise.
381 * emultempl/ppc64elf.em: Revert last change.
382 (ppc_layout_sections_again): Use
383 gld${EMULATION_NAME}_layout_sections_again.
384 (ppc_finish): Don't call gld${EMULATION_NAME}_finish. Instead call
385 gld${EMULATION_NAME}_strip_empty_sections and
386 gld${EMULATION_NAME}_provide_init_fini_syms.
387 * emultempl/hppaelf.em: Similarly.
391 * emultempl/ppc64elf.em (need_laying_out): Delete. Remove all refs.
392 (ppc_finish): Don't call bfd_elf_discard_info.
393 * emultempl/hppaelf.em: Similarly.
397 * po/fr.po: Updated French translation.
402 * configure.host: Accept any C library to accompany a GNU Linux
403 implementation, not just the GNU C library.
404 * configure.tgt: Likewise.
405 * emultempl/elf32.em: Likewise.
409 * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols): New
410 (gld${EMULATION_NAME}_finish): Call
411 gld${EMULATION_NAME}_provide_bound_symbols to provide
412 __preinit_array_start, __preinit_array_end, __init_array_start,
413 __init_array_end, __fini_array_start and __fini_array_end.
415 * scripttempl/elf.sc: Don't provide __preinit_array_start,
416 __preinit_array_end, __init_array_start, __init_array_end,
417 __fini_array_start nor __fini_array_end.
421 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Set
422 SEC_EXCLUDE on .gnu.warning sections.
426 * scripttempl/elf.sc (SBSS): Don't provide sbss start and end syms.
430 * emultempl/ppc32elf.em (gld${EMULATION_NAME}_after_allocation): New
432 (LDEMUL_AFTER_ALLOCATION): Define.
436 * emultempl/ppc64elf.em (ppc_finish): Rename from
437 gld${EMULATION_NAME}_finish. Call gld${EMULATION_NAME}_finish.
438 (LDEMUL_FINISH): Update.
439 * emultempl/hppaelf.em (hppaelf_finish, LDEMUL_FINISH): Likewise.
440 * emultempl/m68hc1xelf.em (m68hc11elf_finish, LDEMUL_FINISH): Likewise.
444 * scripttempl/armbpapi.sc (.rel.dyn): Add .rel.init_array,
446 (.rela.dyn): Add .rela.init_array, .rela.fini_array.
447 (SECTIONS): Add .rel.other, .rela.other, .reli.other after PLT relocs.
451 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Don't set
452 bfd_section when removing unused empty output sections for
453 non-relocatable link.
457 * ldlang.c (lang_insert_orphan): Use old section_tail rather than
458 traversing the bfd section list to find pointer to new section.
462 * scripttempl/elf.sc: When CREATE_SHLIB, put .sdata2 and .sbss2
463 input sections into .sdata and .sbss output respectively.
468 * ldlang.c (IGNORE_SECTION): Remove check for zero size.
469 (lang_check_section_addresses): Ignore zero size sections here.
473 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Remove
474 unused empty output sections for non-relocatable link.
476 * ld.h (args_type): Remove gc_sections.
478 * ldlang.c (lang_mark_used_section): New.
479 (lang_gc_sections): Use link_info.gc_sections instead of
480 command_line.gc_sections.
481 * ldmain.c (main): Likewise.
482 * lexsup.c (parse_args): Likewise.
483 * ldlang.c (lang_process): Call lang_mark_used_section.
485 * ldmain.c (main): Initialize link_info.gc_sections to FALSE.
490 * configure.in (werror): New switch: Add -Werror to the
491 compiler command line. Enabled by default. Disable via
493 * configure: Regenerate.
497 * emulparams/elf32ppclinux.sh (OTHER_READWRITE_SECTION): Delete.
498 (OTHER_RELRO_SECTIONS): Set this instead.
502 * NEWS: Add cutoff for changes in 2.16 release.
506 * configure.tgt (x86_64-elf): Add target.
510 * po/es.po: Commit new Spanish translation.
514 * ldexp.c (exp_fold_tree): Ensure return value is initialized.
515 Tidy etree_assert case.
519 * po/tr.po: Commit new Turkish translation.
523 * Makefile.am: Remove references to em68klynx.o and esparclynx.o.
524 * Makefile.in: Regenerated.
525 * emulparams/m68klynx.sh, emulparams/sparclynx.sh: Remove.
529 * po/fr.po: Updated translation.
533 * po/ld.pot: Regenerate.
537 * ldmain.c (remove_output): Use unlink_if_ordinary instead of unlink.
538 * pe-dll.c (pe_dll_generate_implib): Likewise.
542 * ldfile.c: Remove GNU960 conditional code.
543 * emultempl/gld960.em: Likewise.
544 * emultempl/gld960c.em: Likewise.
545 * emultempl/lnk960.em: Likewise.
549 * emultempl/lnk960.em (lnk960_before_parse): Remove redundant
550 empty string from calls to concat.
554 * emultempl/lnk960.em (lnk960_before_parse): Terminate list of
555 arguments passed to concat() with a NULL.
557 * emultempl/m68kcoff.em: Include ldexp.h and ldlang.h because they
558 define types needed by ldfile.h
562 * pe-dll.c: Warning fixes.
563 * emultempl/sunos.em: Likewise.
567 * ldlang.c (section_already_linked): Don't call
568 bfd_section_already_linked for dynamic objects.
572 * ldexp.c: Warning fixes.
573 * ldwrite.c: Likewise.
574 * emultempl/elf32.em: Likewise.
578 * ldlang.c (lang_add_section): Check SEC_TIC54X_BLOCK for TI
580 (lang_size_sections_1): Check SEC_COFF_SHARED_LIBRARY for COFF
581 and ECOFF output only.
585 * config.in: Regenerate.
586 * configure: Regenerate.
590 * ldexp.c (assigning_to_dot): New global flag.
591 (fold_name): If assigning_to_dot is true, object immediately to
593 (exp_fold_tree): Set and clear assigning_to_dot around the
594 recursive call to exp_fold_tree to process the right-hand side
595 of an assignment to the location counter.
599 * scripttempl/armbpabi.sc: Add dummy name to version block.
603 * ldexp.c (new_abs): Init new.str.
607 * configure.in (AC_CHECK_FUNCS): Add glob.
608 * configure: Regenerated.
609 * emultempl/elf32.em (<glob.h>): Do not include if HAVE_GLOB is
611 (gld${EMULATION_NAME}_parse_ld_so_conf_include): Do not use glob
612 if HAVE_GLOB is not defined.
616 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Define
617 lib_path if NATIVE is yes.
621 * emultempl/ppc64elf.em (ppc_create_output_section_statements): Make
622 an error creating fake bfd fatal.
623 (ppc_before_allocation): Continue on after errors.
624 (gld${EMULATION_NAME}_finish): Likewise.
628 * ldlex.l (YY_NO_UNPUT): Define so that the yy_unput function is
629 not declared. It is not used and its presence causes a compile
634 * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed):
635 If st.st_ino is zero, do not treat the library as a duplicate.
639 * emultempl/hppaelf.em (hppaelf_create_output_section_statements):
640 Set BFD_LINKER_CREATED on the stubs bfd.
641 * emultempl/ppc64elf.em (ppc_create_output_section_statements):
646 * scripttempl/armbpabi.sc (VERSION): Make special section symbols
648 (Image$$ER_RO$$Base): Define whenever RELOCATING.
649 (Image$$ER_RO$$Limit): Likewise.
650 (SHT$$INIT_ARRAY$$Base): Likewise.
651 (SHT$$INIT_ARRAY$$Limit): Likeise.
655 * emultempl/beos.em: Remove #if 0 and #if 1 blocks.
659 * configure.tgt (mips64*el-*-linux-gnu*): Define targ_extra_libpath
660 to include o32 and n64 emulations.
661 (mips64*-*-linux-gnu*): Likewise.
665 * ldmain.c (warning_callback, warning_find_reloc): Prepend
666 "warning: " to warning messages.
670 * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment): Don't
671 look up symbol for etree_provide here.
675 * emulparams/elf32bmip.sh (TEXT_DYNAMIC): Always set.
680 * ld.texinfo (Source Code Reference): New node describing how to
681 access linker script defined variables from source code.
685 * ld.texinfo: Clarify --as-needed operation.
689 * configure: Regenerate to track ../gettext.m4.
693 * ldver.c (ldversion): Bump reported copyright date to 2005.
697 * configure.tgt: Remove obsolete targets m68k-lynxos and
702 * emultempl/armelf.em (fix_v4bx): New variable.
703 (arm_elf_create_output_section_statements): Communicate fix_v4bx flag
705 (PARSE_AND_LIST_PROLOGUE): Add option token OPTION_FIX_V4BX.
706 (PARSE_AND_LIST_LONGOPTS): Add option --fix-v4bx.
707 (PARSE_AND_LIST_OPTIONS): Add option --fix-v4bx.
708 (PARSE_AND_LIST_ARGS_CASES): Add option OPTION_FIX_V4BX.
709 * NEWS: Mention --fix-v4bx.
710 * ld.texinfo: Document --fix-v4bx.
714 * emulparams/armsymbian.sh (OTHER_READONLY_SECTIONS): Define, so
715 as to include .ARM.exidx$${Base,Limit}.
716 * ld/scripttempl/armbpabi.sc: Move .plt to end of text segment.
717 Define IMAGE$$ER_RO$${Base,Limit} and SHT$$INIT_ARRAY$${Base,Limit}.
718 Put .init_array, .fini_array, etc. into the read-only data
723 * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Formatting.
724 (gld${EMULATION_NAME}_after_open): Ignore needed libs if they were
725 only needed by an as-needed lib that didn't get linked.
729 * ld.texinfo (Output Section Keywords <CONSTRUCTORS>): Correct
730 __DTOR_LIST__ description.
734 * ld.texinfo (Location Counter <dot outside sections>): Document
735 effects of orphan section placement, and ". = ." workaround.
736 * Makefile.in: Regenerate.
740 * emulparams/elf32bmip.sh (OTHER_GOT_SECTIONS): Add ". = .;".
741 * emulparams/elf32bmipn32-defs.sh (OTHER_GOT_SECTIONS): Likewise.
745 * ldgram.y (AS_NEEDED): New token.
746 (input_list): Handle AS_NEEDED ( input_list ).
747 * ldlex.l (AS_NEEDED): Add.
748 * ld.texinfo: Document AS_NEEDED ().
749 * NEWS: Mention AS_NEEDED ().
753 * ldlang.c (lang_reasonable_defaults): Remove.
754 (lang_process): Don't call lang_reasonable_defaults.
756 * ldexp.c (exp_assop): Remove #if 0'd code.
757 (exp_print_tree): Likewise.
758 * ldlang.c (lang_memory_region_lookup): Likewise.
759 (open_output): Likewise.
760 (lang_do_assignments_1): Likewise.
761 (lang_place_orphans): Likewise.
762 (lang_enter_output_section_statement): Likewise.
763 (lang_reasonable_defaults): Likewise.
764 * ldlang.h (struct lang_input_statement_struct): Likewise.
765 * mri.c (mri_draw_tree): Likewise.
766 (mri_load): Likewise.
767 * pe-dll.c (generate_reloc): Likewise.
768 (make_import_fixup_entry): Likewise.
770 * emultempl/beos.em (set_pe_subsystem): Likewise.
771 * emultempl/hppaelf.em (hppaelf_after_parse): Likewise.
772 * emultempl/pe.em: Likewise.
773 * emultempl/xtensaelf.em (xtensa_colocate_literals): Likewise.
777 * Makefile.am (ALL_EMULATIONS): Add earmelfb_linux_eabi.o.
778 (earmelfb_linux_eabi.c): New target.
779 * Makefile.in: Regenerated.
780 * configure.tgt (arm*b-*-linux-gnueabi): New target.
781 * emulparams/armelfb_linux_eabi.sh: New file.
786 * emultempl/hppaelf.em (hppaelf_create_output_section_statements):
787 Handle bfd_elf32_hppa_nbsd_vec.
791 * ldmain.h (ld_sysroot): Change type to a constant string.
792 * ldmain.c (ld_sysroot): Likewise.
793 (get_relative_sysroot, get_sysroot): New functions, adding command-line
794 support for changing the sysroot.
795 (main): Call the new functions.
796 * lexsup.c (OPTION_SYSROOT): New.
797 (ld_options): Add --sysroot.
798 (parse_args): Add a dummy handler for it.
799 * ld.texinfo (--sysroot): Document.
800 * NEWS: Mention the new --sysroot option.
804 * ldlang.c (section_already_linked): Adjust bfd_link_just_syms call.
805 (lang_place_orphans): Don't abort on just_syms_flag, instead call
810 * defilep.y (def_name, def_library): Combine into...
811 (def_image_name): New function. Strip name to basename,
816 * configure.in: Be sure to invoke config.sub using the shell.
817 * configure: Regenerate.
821 * configure.host: Correct sed patterns for last change.
826 * ldmisc.c (vfinfo): Add an extra argument: is_warning. Use this
827 to determine whether config.make_executable should be set to FALSE in
828 conjunction with config.fatal_warnings.
829 (info_msg, minfo, lfinof): Pass FALSE as the extra argument.
830 (einfo): Pass TRUE as the extra argument.
834 * configure.host (linux targets): Use "${CC} -dumpspecs" instead
835 of "${CC} --print-file-name=specs" to appease GCC versions >= 4.0.
836 (ia64-*-aix): Delete - this target is obsolete, and would be
837 broken by this patch.
841 * configure.host (sparc*-*-solaris2*): Rename into sparc-*-solaris2*.
842 (sparc64-sun-solaris2*): New host.
846 * Makefie.am: Add earmelf_vxworks.
847 * Makefile.in: Regenerate.
848 * configure.tgt: Make arm-*-vxworks a separate case.
849 * emulparams/armelf_vxworks.sh: New function.
853 * emultempl/ppc64elf.em (no_multi_toc): New var.
854 (gld${EMULATION_NAME}_finish): Pass to ppc64_elf_setup_section_lists.
855 (OPTION_NO_MULTI_TOC): Define.
856 (PARSE_AND_LIST_LONGOPTS): Add --no-multi-toc support.
857 (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Likewise.
862 * ldmisc.c (vfinfo): Alter output to conform to the GNU Coding
863 Standard's specification for parsable error messages.
867 * Makefile.am: Correct dependency for earmsymbian.c.
868 * Makefile.in: Regenerate.
872 * emultempl/pe.em (set_pe_subsystem): Change second arg to
873 lang_add_entry to FALSE.
878 * emulparams/shelf.sh (.stack): Increase stack start address to
883 * ldmain.c (main): Issue an error message if -static and -shared
888 * ldexp.h (exp_data_seg): Add min_base and maxpagesize fields.
889 * ldexp.c (fold_binary) <case DATA_SEGMENT_ALIGN>: Initialize them.
890 * ldlang.c (lang_size_sections): Use them to avoid wasting virtual
891 address space at DATA_SEGMENT_ALIGN. Fix computation of expected
892 PT_GNU_RELRO segment end.
896 * configure.tgt: Add s390x-ibm-tpf support.
900 * ldmisc.c (vfinfo): Handle the case where %B is passed a NULL
905 * ldemul.h: Forward declare struct option.
909 * scripttempl/pe.sc (.data): Add .jcr subsection.
913 * emultempl/armelf.em: Ignore -p and -no-pipeline-knowledge.
917 * Makefile.am: Change LOCALEDIR to $(datadir)/share.
918 * Makefile.in: Regenerate.
922 * emultempl/pe.em: Add --subsystem:xbox as well as
924 * ld.texinfo: (ld_options): Document acceptance of subsystem xbox
925 and numeric subsystems.
929 * ldexp.c (fold_name): Correct PR 338 fix.
933 * Makefile.am (ALL_EMULATIONS): Add earmelf_linux_eabi.o.
934 (earmelf_linux_eabi.c): New target.
935 * configure.tgt (arm*-*-linux-gnueabi): Handle it.
936 * emulparams/armelf_linux_eabi.sh: New file.
937 * Makefile.in: Regenerated.
942 * ld.texinfo (MEMORY): Update the descriptions of the ORIGIN and
943 LENGTH fields in the MEMORY command, to explicitly state that
944 symbols cannot be used in their expressions.
948 * ld/ldlex.l: Allow ORIGIN and LENGTH in EXPRESSION.
949 * ld/ldgram.y: Add ORIGIN and LENGTH expressions.
950 * ld/ldexp.c (fold_name): Implement LENGTH() and ORIGIN() functions
951 which return the length and origin of a memory.
952 * ld/ld.texinfo: Document LENGTH() and ORIGIN() functions.
953 * NEWS: Mention support for ORIGIN and LENGTH operators.
957 * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Don't use
958 a dynamic object for stubs.
962 * ld.texinfo: Document --default-imported-symver.
963 * ldmain.c (main): Set link_info.default_imported_symver.
964 * lexsup.c (option_values): Add OPTION_DEFAULT_IMPORTED_SYMVER.
965 (ld_options): Add --default-imported-symver.
966 (parse_args): Handle OPTION_DEFAULT_IMPORTED_SYMVER.
971 * Makefile.am: Add entries for new maxq-coff target.
972 * Makefile.in: Regenerate.
973 * configure.tgt: Add support for maxq.
974 * emulparams/maxqcoff.sh: New File.
975 * scripttempl/maxqcoff.sc: New linker script for target maxq.
976 * NEWS: Mention the new target.
980 * Makefile.am (ALL_EMULATIONS): Remove earmelf_oabi.o.
981 (earmelf_oabi.c): Remove rule.
982 * configure.tgt: Remove arm-*-oabi and thumb-*-oabi.
983 * emulparams/armelf_oabi.sh, emultempl/armelf_oabi.em: Delete files.
984 * Makefile.in: Regenerated.
988 * configure.tgt (crisv32-*-*): Handle like cris-*-* for non-aout.
989 * emulparams/criself.sh (INIT_START): Remove emitted "push srp".
991 (INIT_END): Remove emitted "jump [sp+]".
996 * emultempl/ppc64elf.em (no_tls_opt): Rename from notlsopt.
997 (no_opd_opt, no_toc_opt): New static vars.
998 (ppc_before_allocation): Don't edit opt if no_opd_opt. Call
1000 (OPTION_NO_OPD_OPT, OPTION_NO_TOC_OPT): Define.
1001 (PARSE_AND_LIST_LONGOPTS): Add no-opd-optimize and no-toc-optimize.
1002 (PARSE_AND_LIST_OPTIONS): Describe new options.
1003 (PARSE_AND_LIST_ARGS_CASES): Handle them.
1007 * emultempl/alphaelf.em (alpha_after_parse): Add extra, NULL,
1008 parameter to invocation of lang_section_start.
1009 * emultempl/aix.em (_handle_option): Likewise.
1011 * Makefile.am (eelf64alpha.c, eelf64alpha_fbsd.c,
1012 eelf64alpha_nbsd.c): Add dependency upon emultempl/alphaelf.em.
1013 * Makefile.in: Regenerate.
1017 * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Do not emit
1018 __exidx_{start,end} when not relocating.
1022 * Makefile.in (earmsymbian.c): Depend on armbpabi.sc, not elf.sc.
1023 * ldexp.h (segment_type): New type.
1024 (segments): New variable.
1025 * ldexp.c (segments): New variable.
1026 (exp_print_token): Handle SEGMENT_START.
1027 (fold_binary): Likewise.
1028 * ldgram.y (SEGMENT_START): Declare it as a token.
1029 (exp): Handle SEGMENT_START.
1030 * ldlang.h (lang_address_statement_type): Add segment field.
1031 (lang_section_start): Change prototype.
1032 * ldlang.c (map_input_to_output_sections): Do not process section
1033 assignments if a corresponding SEGMENT_START has already been
1035 (lang_section_start): Add segment parameter.
1036 * ldlex.l (SEGMENT_START): Add it.
1037 * lexsup.c (seg_segment_start): New function.
1038 (parse_args): Use it for -Tbss, -Tdata, and -Ttext.
1039 * ld.texinfo (SEGMENT_START): Document it.
1040 * emulparams/armsymbian.sh (EMBEDDED): Set it.
1041 * scripttempl/armbpabi.sc: Use SEGMENT_START to control segment
1042 base addresses. Do not map relocations.
1043 * NEWS: Mention SEGMENT_START.
1047 * ld.texinfo: Document --default-symver.
1048 * ldmain.c (main): Set link_info.create_default_symver.
1049 * lexsup.c (enum option_values): Add OPTION_DEFAULT_SYMVER.
1050 (ld_options): Add default-symver.
1051 (parse_args): Handle OPTION_DEFAULT_SYMVER.
1055 * pe-dll.c (process_def_file): Don't export all symbols by default if
1056 building a position-independent executable.
1061 * ldmain.c (reloc_overflow): Accept a pointer to struct
1062 bfd_link_hash_entry. Report symbol location for relocation
1067 * genscripts.sh (libpath.exp): Really generate for first
1072 * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Simplify
1073 comparison and replacement of filenames.
1078 * ldlang.c (load_symbols): Use the same -Bdynamic/-Bstatic
1079 option on linker script as the one for linker script.
1083 * ldlang.c (struct excluded_lib, excluded_libs, add_excluded_libs)
1084 (check_excluded_libs): New.
1085 (load_symbols): Call check_excluded_libs.
1086 * ldlang.h (add_excluded_libs): New prototype.
1087 * emultempl/elf32.em (OPTION_EXCLUDED_LIBS): Define.
1088 (gld${EMULATION_NAME}_add_options): Add --exclude-libs.
1089 (gld${EMULATION_NAME}_handle_option): Handle --exclude-libs.
1090 * ld.texinfo (Command Line Variables): Document --exclude-libs.
1091 (Options Specific to i386 PE Targets): Remove --exclude-libs.
1095 * ldexp.c (exp_fold_tree): Don't immediately exit ld on a
1096 failing link script assert.
1098 * ldctor.c (ldctor_add_set_entry): Fix comment typo.
1103 * emulparams/elf64_ia64.sh (SMALL_DATA_CTOR): Set.
1104 (SMALL_DATA_DTOR): Set.
1105 * emulparams/elf64_ia64_fbsd.sh (SMALL_DATA_CTOR): Unset.
1106 (SMALL_DATA_DTOR): Unset.
1107 * scripttempl/elf.sc: If SMALL_DATA_CTOR is set, move .ctors
1108 after .data. If SMALL_DATA_DTOR is set, move .dtors after
1114 * ldlang.h (lang_output_section_statement_type): Make "next" a
1115 struct lang_output_section_statement_struct *.
1116 (struct orphan_save): Move from elf32.em. Add "name" and "flags".
1117 (lang_output_section_find_by_flags, lang_insert_orphan): Declare.
1118 * ldlang.c (lang_output_section_find_1): Adjust for changed
1119 output_section_statement "next".
1120 (strip_excluded_output_sections): Likewise.
1121 (lang_record_phdrs): Likewise.
1122 (lang_output_section_find_by_flags): New function.
1123 (output_prev_sec_find): Move from pe.em. Adjust iterator.
1124 (lang_insert_orphan): New function. Tail end of elf32.em's
1125 place_orphan merged with that from pe.em. Allow bfd_section to
1126 be placed first. New heuristic for placing new output section
1127 statement in existing script, and accompanying split of __start
1128 symbol alignment into a separate assignment to dot.
1129 (lang_add_section): Consistently use output->bfd_section rather than
1130 an alias, section->output_section.
1131 (map_input_to_output_sections): Rename overly long arg. Move
1132 initialization of data_statement output section to here..
1133 (lang_check_section_addresses): ..from here.
1134 (print_assignment): Correct printing of etree_assert.
1135 (print_all_symbols): Don't bomb if userdata is NULL.
1136 (IGNORE_SECTION): Rearrange.
1137 * emultempl/elf32.em (output_rel_find): Adjust interator.
1138 (output_prev_sec_find): Delete.
1139 (struct orphan_save): Delete.
1140 (gld${EMULATION_NAME}_place_orphan): Cater for zero bfd_section
1141 flags without creating a duplicate output section statement.
1142 Revise code holding history of various orphan section placements.
1143 Allow orphan sections to place before script specified output
1144 sections. Call lang_output_section_find_by_flags when placement
1145 by name fails. Use lang_insert_orphan.
1146 * emultempl/mmo.em (output_prev_sec_find): Delete.
1147 (struct orphan_save): Delete.
1148 (mmo_place_orphan): Revise code holding history of orphan placement.
1149 Allow orphans to place before existing output sections. Use
1151 * emultempl/pe.em (output_prev_sec_find): Delete.
1152 (struct orphan_save): Delete.
1153 (gld_${EMULATION_NAME}_place_orphan): Revise to suit use of
1158 * scripttempl/armbpabi.sc: Do not put .gnu.version.* into a
1164 * ldcref.c (check_section_sym_xref): Delete.
1165 (check_local_sym_xref): New function.
1166 (check_nocrossrefs): Adjust call.
1167 * emultempl/pe.em (struct orphan_save): Add os_tail.
1168 (place_orphan): Backport assorted fixes from elf32.em.
1172 * emultempl/xtensaelf.em: Use ISO C90 formatting.
1176 * emultempl/elf32.em (gld${EMULATION_NAME}_parse_ld_so_conf): Avoid
1177 getline for portability.
1179 * emultempl/elf32.em (gld${EMULATION_NAME}_ld_so_conf): New structure.
1180 (gld${EMULATION_NAME}_parse_ld_so_conf,
1181 gld${EMULATION_NAME}_parse_ld_so_conf_include): New functions.
1182 (gld${EMULATION_NAME}_check_ld_so_conf): Use them.
1187 * ldfile.c (ldfile_try_open_bfd): Ensure dynamic objects are
1188 rejected when linking statically.
1192 * configure.tgt: Include elf_x86_64 for i[3-7]86-*-solaris2*.
1196 * ld.texinfo (Xtensa): Describe new linker relaxation to optimize
1197 assembler-generated longcall sequences. Describe new --size-opt
1199 * emulparams/elf32xtensa.sh (OTHER_SECTIONS): Add .xt.prop section.
1200 * emultempl/xtensaelf.em (remove_section,
1201 replace_insn_sec_with_prop_sec, replace_instruction_table_sections,
1202 elf_xtensa_after_open): New.
1203 (OPTION_OPT_SIZEOPT, OPTION_LITERAL_MOVEMENT,
1204 OPTION_NO_LITERAL_MOVEMENT): Define.
1205 (elf32xtensa_size_opt, elf32xtensa_no_literal_movement): New globals.
1206 (PARSE_AND_LIST_LONGOPTS): Add size-opt and [no-]literal-movement.
1207 (PARSE_AND_LIST_OPTIONS): Add --size-opt.
1208 (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_OPT_SIZEOPT,
1209 OPTION_LITERAL_MOVEMENT, and OPTION_NO_LITERAL_MOVEMENT.
1210 (LDEMUL_AFTER_OPEN): Set to elf_xtensa_after_open.
1211 * scripttempl/elfxtensa.sc: Update with changes from elf.sc.
1212 * Makefile.am (eelf32xtensa.c): Update dependencies.
1213 * Makefile.in: Regenerate.
1217 * lexsup.c: Handle --warn-shared-textrel option.
1218 (ld_options): Restore alpha sorting of options.
1219 * ldmain.c (main): Initialise warn_shared_info field to FALSE.
1220 * ld.texinfo: Add documentation for --warn-shared-textrel.
1221 * NEWS: Added mention of --warn-shared-textrel option.
1225 * emultempl/crxelf.em (disable_relaxation): Add.
1226 (crxelf_before_allocation): Enable --relax option by default.
1227 (PARSE_AND_LIST_PROLOGUE): Add OPTION_NO_RELAX.
1228 (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --no-relax.
1229 (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_NO_RELAX.
1233 * NEWS: Mention SORT_BY_NAME, SORT_BY_ALIGNMENT and
1234 --sort-section name|alignment.
1236 * ld.texinfo: Document SORT_BY_NAME, SORT_BY_ALIGNMENT and
1237 --sort-section name|alignment.
1239 * ld.h (sort_type): New enum.
1240 (wildcard_spec): Change the type of `sorted' to sort_type.
1242 * ldgram.y (SORT): Removed.
1243 (SORT_BY_NAME): Added.
1244 (SORT_BY_ALIGNMENT): Added.
1245 (wildcard_spec): Updated `sorted'. Handle SORT_BY_NAME and
1247 (input_section_spec_no_keep): Updated `sorted'.
1248 (statement): Replace SORT with SORT_BY_NAME.
1250 * ldlang.c (compare_section): New function to compare 2
1251 sections with different sorting schemes.
1252 (wild_sort): Updated. Use compare_section.
1253 (update_wild_statements): New function.
1254 (lang_process): Call update_wild_statements before
1255 map_input_to_output_sections.
1257 * ldlex.l (SORT_BY_NAME): New.
1258 (SORT_BY_ALIGNMENT): New.
1259 (SORT): Return SORT_BY_NAME.
1261 * ldmain.c (sort_section): New. Defined.
1262 (main): Initialize it to none.
1264 * lexsup.c (option_values): Add OPTION_SORT_SECTION.
1265 (ld_options): Add an entry for OPTION_SORT_SECTION.
1266 (parse_args): Handle OPTION_SORT_SECTION.
1268 * mri.c (mri_draw_tree): Updated `sorted'.
1272 * ldgram.y (DATA_SEGMENT_RELRO_END): Add one argument.
1273 * scripttempl/elf.sc (DATA_SEGMENT_RELRO_END): Add 0 as first
1275 (DATA_SEGMENT_RELRO_GOTPLT_END): Pass $SEPARATE_GOTPLT as first
1276 and . as second argument.
1277 (GOTPLT): Move $DATA_SEGMENT_RELRO_GOTPLT_END before the section.
1278 * ldexp.c (fold_unary): Remove DATA_SEGMENT_RELRO_END handling here.
1279 (fold_binary): Add it here. Insert padding to make relro_end
1280 COMMONPAGESIZE bytes aligned. For DATA_SEGMENT_ALIGN in
1281 exp_dataseg_relro_adjust phase just use previously computed
1283 * ldlang.c (lang_size_sections): Set exp_data_seg.base for
1284 relro_adjust here. Call lang_size_sections_1 once more if there
1285 was too big padding at DATA_SEGMENT_RELRO_END.
1286 * ld.texinfo (DATA_SEGMENT_RELRO_END): Add documentation.
1290 * emulparams/armelf.sh: Add unwinding table sections.
1294 * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Generate
1295 correct base address for position independant executables.
1296 * pe-dll.c (pe_dll_fill_sections): Don't mark position independant
1297 executables as DLLs.
1301 * ld.texinfo: Document --target2=abs.
1302 * emulparms/armsymbian.sh (TARGET2_TYPE): Set.
1306 * scripttempl/xstormy16.sc: Only perform the assignments to the
1307 ROM region when not performing a relocatable link. The ROM region
1308 does not start at address 0, but the sections will.
1309 * Makefile.am: Fix linker script dependency for the generation of
1311 * Makefile.in: Regenerate.
1315 * emulparams/arm_epoc_pe.sh, emulparams/armpe.sh, emulparams/i386pe.sh,
1316 emulparams/i386pe_posix.sh, emulparams/mcorepe.sh,
1317 emulparams/mipspe.sh, emulparams/ppcpe.sh, scripttempl/pe.sc: Define
1319 * scripttempl/pe.sc: Make the virtual address and file offset synced if
1320 the alignment is lower than the target page size.
1324 * emultempl/pe.em (gld_${EMULATION_NAME}_unrecognized_file): Allow
1325 def_file_parse to handle pe_def_file if NULL and prevent crash with
1330 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Enable
1331 --emit-stub-syms automatically when --emit-relocs.
1335 * scripttempl/elf.sc: Keep .preinit_array, .init_array and
1336 .fini_array sections.
1340 * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Adjust data segment
1341 base so that relro end is suitably aligned.
1345 * ld.texinfo: Rename arm-specific section. Document --target*
1346 * emulparams/armelf_fbsd.sh: Set TARGET2_TYPE.
1347 * emulparams/armelf_linux.sh: Ditto.
1348 * emulparams/armelf_nbsd.sh: Ditto.
1349 * emultempl/armelf.em: Set default for TARGET2_TYPE.
1350 (target2_type): New variable.
1351 (arm_elf_before_allocation): Don't pass target1_type.
1352 (arm_elf_create_output_section_statements): New function.
1353 (PARSE_AND_LIST_PROLOGUE): Add OPTION_TARGET2.
1354 (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --target=.
1355 (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_TARGET2.
1356 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Set.
1357 * emultempl/armelf_oabi.em (_before_allocation): Remove extra
1358 argument to bfd_elf32_arm_process_before_allocation.
1362 * ldexp.c (fold_name): Update u.undef.next refs.
1363 * emultempl/pe.em: Likewise.
1364 * emultempl/sunos.em: Likewise.
1368 * Makefile.am: Run "make dep-am".
1369 * Makefile.in: Regenerate.
1370 * config.in: Regenerate.
1371 * configure: Regenerate.
1372 * aclocal.m4: Regenerate.
1373 * po/ld.pot: Regenerate.
1377 * scripttempl/elf32crx.sc (.init): Add KEEP for section's *personality*.
1383 * emultempl/armelf_oabi.em (before_allocation): Add extra zero param
1384 to bfd_elf32_arm_process_before_allocation call.
1388 * emulparams/armsymbian.sh: Set TARGET1_IS_REL.
1389 * emultempl/armelf.em: Use TARGET1_IS_REL. Add --target1-{rel,abs}.
1393 * configure: Regenerated with autconfig 2.13.
1397 * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Apply data segment
1398 alignment before adjusting DATA_SEGMENT_RELRO_END.
1402 * emulparams/armsymbian.sh: Use armbpabi script.
1403 * scripttempl/armbpabi.sc: New script.
1407 * Makefile.am (ALL_EMULATIONS): Add earmsymbian.o.
1408 (earmsymbian.c): New target.
1409 * configure.tgt: Use armsymbian emulation for arm*-*-symbianelf*.
1410 * Makefile.in: Regenerated.
1411 * aclocal.m4: Likewise.
1412 * configure: Likewise.
1413 * emulparams/armsymbian.sh: New file.
1417 * scripttempl/elf32crx.sc: Edit file with comments.
1418 (.init): Add new section.
1420 (.ctor): Control the linkage order.
1425 * emultempl/pe.em (after_open): Do not assume that either bfd is
1430 * ldlang.c (lang_init): Don't compare with TRUE.
1434 * emulparams/msp430all.sh: Fix RAM sizes for all targets.
1435 * scripttempl/elf32msp430.sc: Add .profiler section definition.
1439 * ldlang.c (wildcardp): Defined as a macro with strpbrk.
1443 * configure.tgt (arm*-*-symbianelf*): New target.
1444 (arm*-*-eabi*): Likewise.
1448 * emultempl/ppc64elf.em (non_overlapping_opd): New variable.
1449 (ppc_before_allocation): Pass it to ppc64_elf_edit_opd).
1450 (OPTION_NON_OVERLAPPING_OPD): Define.
1451 (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Add
1452 --non-overlapping-opd option.
1457 * ldexp.c (fold_name): Don't call bfd_link_add_undef if the symbol
1458 was already on the undefs list.
1462 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_new_vers_pattern): Dot
1463 prefix the symbol field too.
1467 * ldmain.c (link_callbacks): Remove "error_handler".
1468 * ldmisc.c: Include elf-bfd.h.
1469 (vfinfo): Sort comment. Handle %A. Use %A instead of
1470 bfd_get_section_indent.
1471 (error_handler): Delete.
1472 * ldmisc.h (error_handler): Delete declaration.
1476 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Call
1477 ppc64_elf_restore_symbols.
1481 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Error if
1482 .toc is too large on relocatable linking.
1486 * emultempl/ppc64elf.em (ppc_after_open): Delete.
1487 (LDEMUL_AFTER_OPEN): Don't define.
1491 * ld.texinfo (Top): Document specific options of 68HC11 and 68HC12.
1495 * scripttempl/elfm68hc12.sc: Align text, rodata and data section
1500 * emulparams/hppanbsd.sh (OUTPUT_FORMAT): Set to "elf32-hppa-netbsd".
1504 * Makefile.am: Add new subtargets: msp430x1610, msp430x1611,
1505 msp430x1612, msp430x415, msp430x417, msp430xG437, msp430xG438,
1507 * configure.tgt: Likewise.
1508 * emulparams/msp430all.sh: Likewise.
1509 * Makefile.in: Regenerate.
1513 * emultempl/elf32.em (_place_orphan): Use an already existing
1514 section name if that section does not have any flags set.
1518 * ldlang.c (already_linked_hash_entry): Removed.
1519 (already_linked): Likewise.
1520 (already_linked_table): Likewise.
1521 (section_already_linked): Call bfd_section_already_linked.
1522 (lang_process): Replace already_linked_table_init with
1523 bfd_section_already_linked_table_init and check return. Replace
1524 already_linked_table_free with bfd_section_already_linked_table_free.
1528 * ldlang.c (init_os): Make sure that the newly allocated userdata
1529 structure is zeroed out.
1533 * NEWS: Mention the new --add-needed/--no-add-needed and
1534 --as-needed/--no-as-needed options.
1538 * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): Also
1539 check the add_needed field.
1540 (dt_needed): New struct.
1541 (gld${EMULATION_NAME}_try_needed): Change the first argument
1542 to a pointer to struct dt_needed. Check the DYN_NO_ADD_NEEDED
1543 bit in the file where the DT_NEEDED entry comes from.
1544 (gld${EMULATION_NAME}_search_needed): Change the second
1545 argument to a pointer to struct dt_needed.
1546 (gld${EMULATION_NAME}_check_ld_so_conf): Updated.
1547 (gld${EMULATION_NAME}_after_open): Likewise.
1549 * ld.texinfo: Add --add-needed document.
1550 * ldlang.c (new_afile): Set p->add_needed.
1551 * ldlang.h (lang_input_statement_type): Add add_needed field.
1552 * ldmain.h (add_needed): Declare.
1553 * ldmain.c (add_needed): New global var.
1554 * lexsup.c (option_values): Add OPTION_ADD_NEEDED and
1555 OPTION_NO_ADD_NEEDED.
1556 (ld_options): Likewise.
1557 (parse_args): Handle them.
1561 * emultempl/pe.em (make_import_fixup): Use bfd_get_32 to correct
1562 for endian-ness of extracted addend.
1566 * pe-dll.c (auto_export): Filter on just the import prefix,
1567 "_imp_", not "_imp__".
1571 * configure.tgt: Change sh-sybmian-elf to sh-*-symbianelf.
1575 * Makefile.am (ALL_EMULATIONS): Add eelf32crx.o.
1576 (eelf32crx.c): New target.
1577 * Makefile.in: Regenerate.
1578 * configure.tgt: Handle crx-*-elf*.
1579 * emulparams/elf32crx.sh: New file.
1580 * emultempl/crxelf.em: New file.
1581 * scripttempl/elf32crx.sc: New file.
1582 * NEWS: Mention new target.
1586 * Makefile.am: Add eshlsymbian.c.
1587 * Makefile.in: Regenerate.
1588 * configure.tgt: Add sh*-symbian-elf target.
1589 * emulparams/shlsymbian.sh: New file. Configure the
1590 sh-symbian-elf linker scripts.
1591 * scripttemp/elf32sh-symbian.sc: New file. Linker script
1592 template for the sh-symbian-elf target.
1596 * emulparams/hppa64linux.sh: Define PLT_BEFORE_GOT.
1597 * emulparams/hppalinux.sh: Likewise.
1598 * scripttempl/elf.sc: Place .plt just before .got when .plt is in
1599 data segment and PLT_BEFORE_GOT is defined.
1603 * ld.texinfo (WIN32): Document PE weak symbols.
1607 * emulparams/shlelf32_linux.sh (COMMONPAGESIZE): Set to 4KB.
1611 * ldmisc.c (vfinfo): Call bfd_get_section_ident to identify
1616 * ldlang.c (lang_reset_memory_regions): Save last relax pass section
1621 * ldlang.c (print_output_section_statement): Don't print size before
1623 (IGNORE_SECTION): Remove bfd arg. Update all callers.
1625 * ldexp.c (fold_name): .. See below.
1626 * ldlang.c (section_already_linked, print_output_section_statement,
1627 print_input_section, insert_pad, size_input_section,
1628 lang_check_section_addresses, lang_size_sections_1,
1629 lang_size_sections, lang_do_assignments_1, lang_set_startof,
1630 lang_one_common, lang_reset_memory_regions, lang_process,
1631 lang_abs_symbol_at_end_of, lang_do_version_exports_section): ..
1632 * ldwrite.c (build_link_order, clone_section, ds, split_sections): ..
1633 * pe-dll.c (process_def_file, generate_reloc): ..
1634 * emultempl/elf32.em (gld${EMULATION_NAME}_find_statement_assignment,
1635 gld${EMULATION_NAME}_before_allocation): ..
1636 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): ..
1637 * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation,
1638 sh64_elf_${EMULATION_NAME}_after_allocation): ..
1639 * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): ..
1640 * emultempl/xtensaelf.em (ld_assign_relative_paged_dot,
1641 ld_local_file_relocations_fit, ld_xtensa_insert_page_offsets): Use
1642 "size" instead of "_raw_size" and "_cooked_size". Expand
1643 bfd_section_size macro invocations.
1647 * ld/scripttemp/pe.sc (.CRT): Define ___crt_xc_start__,
1648 ___crt_xc_end__, ___crt_xi_start__, ___crt_xi_end__, ___crt_xl_start__,
1649 ___crt_xp_start__, ___crt_xp_end__, ___crt_xt_start__ and
1651 (.tls): Define ___tls_start__ and ___tls_end__.
1655 * emulparams/elf32frvfd.sh (GENERATE_PIE_SCRIPT): Set to yes.
1659 * configure.in: Set EXTRA_SHLIB_EXTENSION to .a for LynxOS.
1660 * configure: Regenerate.
1664 * scripttempl/elf.sc: Readd KEEP and .gcc_except_table.* to
1665 .gcc_except_table output sections lost accidentally with
1670 * ldwrite.c (build_link_order): Use bfd_get_section_size
1671 instead of bfd_get_section_size_before_reloc or _raw_size.
1672 * pe-dll.c (process_def_file): Likewise.
1677 * ldlang.c (lang_finish): Don't free lang_definedness_table.
1681 * ldlang.c (gc_section_callback): Move SEC_EXCLUDE twiddles..
1682 (lang_gc_sections): .. to a LANG_FOR_EACH_INPUT_STATEMENT loop here.
1686 * ldlang.c: Formatting. Wrap long lines, expand bfd_get_section_flags
1688 * lexsup.c: Formatting. Wrap long lines.
1689 * ldwrite.c: Update copyright date.
1691 * ldlang.c (lang_add_section): Don't twidlle SEC_EXCLUDE here.
1692 (output_section_callback): Nor SEC_KEEP here.
1693 (gc_section_callback): Twiddle SEC_EXCLUDE here.
1694 (lang_gc_wild): Delete. Fold into..
1695 (lang_gc_sections_1): ..here. Only call bfd_gc_sections when garbage
1697 (lang_process): Always call lang_gc_sections.
1698 (lang_place_orphans): Handle SEC_EXCLUDE sections.
1699 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Remove
1704 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Clear
1705 SEC_EXCLUDE on non-SEC_DEBUGGING sections for relocatable link.
1706 * ldlang.c (lang_add_section): Likewise.
1710 * ldlang.c (lang_add_section): Set SEC_EXCLUDE for SEC_GROUP
1711 sections when doing a final link. Clear SEC_EXCLUDE when doing
1712 a relocable link, except for SEC_DEBUGGING sections.
1713 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Use the
1714 same condition here to drop SEC_EXCLUDE orphan sections.
1718 * ldlang.c (lang_process): Call bfd_merge_sections later, and
1719 only when not a relocatable link.
1720 (print_input_section): Handle SEC_EXCLUDE sections.
1721 (size_input_section): Don't update dot on SEC_EXCLUDE sections.
1722 (lang_do_assignments_1): Likewise.
1723 * ldwrite.c (build_link_order): Ignore SEC_EXCLUDE input sections.
1724 * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Likewise.
1725 * emultempl/hppaelf.em (build_section_lists): Likewise.
1726 * emultempl/ppc64elf.em (build_toc_list): Likewise.
1727 (build_section_lists): Likewise.
1731 * ld.texinfo (Options): Fix typo in last change.
1735 * ld.h (ld_config_type): Add new field: hash_table_size.
1736 * ldmain.c: Initialise the new field to zero. If it is non-zero
1737 after parsing the linker's command line call
1738 bfd_hash_set_default_size.
1739 * lexsup.c (option_values): Add OPTION_HASH_SIZE.
1740 (ld_options): Add hash-size.
1741 (parse_args): Parse --hash-size option. Allow
1742 --reduce-memory-overheads to set the default hash table size as
1744 * ld.texinfo: Document the new switch. Also mention that
1745 --reduce-memory-overheads can affect the hash table size.
1746 * NEWS: Mention the new feature.
1750 * NEWS: Mention new linker map file generation and the
1751 --reduce-memory-overheads option.
1752 * ld.texinfo: Document --reduce-memory-overheads option.
1753 * ld.h (map_symbol_def): New struct.
1754 (struct user_section_struct, section_userdata_type): Rename to:
1755 (struct lean_user_section_struct, lean_section_userdata_type).
1756 (struct fat_user_section_struct, fat_section_userdata_type): New.
1757 (SECTION_USERDATA_SIZE): Define.
1758 (args_type): New member reduce_memory_overheads.
1759 * ldlang.c (map_obstack): New static variable.
1760 (init_map_userdata, print_all_symbols, sort_def_symbol): New functions.
1761 (lang_map): Unless command_line.reduce_memory_overheads is set,
1762 initialize lists of defined symbols for each section.
1763 (print_input_section): Unless command_line.reduce_memory_overheads
1764 is set, use print_all_symbols.
1765 (init_os): Use lean_section_userdata_type / SECTION_USERDATA_SIZE.
1766 * ldmain.c (main): Initialize command_line.reduce_memory_overheads.
1767 * lexsup.c (enum option_values): Add OPTION_REDUCE_MEMORY_OVERHEADS.
1768 (ld_options): Add entry for --reduce-memory-overheads.
1769 (parse_args): Handle OPTION_REDUCE_MEMORY_OVERHEADS.
1773 * ldgram.y (sect_constraint): New.
1774 (ONLY_IF_RO, ONLY_IF_RW): New tokens.
1775 (section): Add sect_constraint. Pass additional argument
1776 to lang_enter_output_section_statement.
1777 * mri.c (mri_draw_tree): Pass additional argument to
1778 lang_enter_output_section_statement.
1779 * emultempl/pe.em (place_orphan): Likewise.
1780 (output_prev_sec_find): Disregard output section statements with
1782 * emultempl/mmo.em (output_prev_sec_find): Likewise.
1783 (mmo_place_orphan): Pass additional argument to
1784 lang_enter_output_section_statement.
1785 * emultempl/elf32.em (output_prev_sec_find): Disregard output section
1786 statements with constraint == -1.
1787 (place_orphan): Pass additional argument to
1788 lang_enter_output_section_statement.
1789 * ldlang.c (lang_enter_overlay_section): Likewise.
1790 (lang_output_section_find_1): New.
1791 (lang_output_section_find): Use it.
1792 (lang_output_section_statement_lookup_1): New.
1793 (lang_output_section_statement_lookup): Use it.
1794 (check_section_callback, check_input_sections): New.
1795 (map_input_to_output_sections): Check if all input sections
1796 are readonly if ONLY_IF_RO or ONLY_IF_RW was seen.
1797 (strip_excluded_output_sections): Disregard output section statements
1798 with constraint == -1.
1799 (lang_record_phdrs): Likewise.
1800 (lang_enter_output_section_statement): Add constraint argument.
1801 Use lang_output_section_statement_lookup_1.
1802 * ldlang.h (lang_output_section_statement_type): Add constraint
1803 and all_input_readonly fields.
1804 (lang_enter_output_section_statement): Adjust prototype.
1805 * ldlex.l (ONLY_IF_RO, ONLY_IF_RW): New tokens.
1806 * scripttempl/elf.sc (.eh_frame, .gcc_except_table): Move into text
1807 segment if all input sections are readonly.
1811 * scripttempl/i386lynx.sc: Remove file.
1815 * ld.texinfo (Output Section Address): Correct subsection name.
1819 * configure.tgt (powerpc-*-lynxos* case): New case.
1820 * configure.host (i[3-7]86-*-lynxos* case): Remove case.
1821 * emulparams/ppclynx.sh: New file.
1822 * emulparams/i386lynx.sh (SCRIPT_NAME): Update to LynxOS 4.0.
1823 * Makefile.am (ALL_EMULATIONS): Add eppclynx.o
1824 (ei386lynx.c): Update rule to LynxOS 4.0 ELF.
1825 (eppclynx.c): New rule.
1826 * Makefile.in: Regenerate.
1830 * configure.tgt (or32-*-rtems*): Switch to elf and
1831 support versioned targets.
1835 * po/fr.po: Updated French translation.
1839 * genscripts.sh: Generate -z combreloc -z now -z relro scripts
1840 for binaries, -shared and -pie.
1841 * emulparams/elf_i386.sh (SEPARATE_GOTPLT): Set.
1842 * emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Set.
1843 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Rename to...
1844 (OTHER_RELRO_SECTIONS): ... this.
1845 * ldlex.l (DATA_SEGMENT_RELRO_END): Add.
1846 * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
1847 -z relro and -z norelro.
1848 (gld${EMULATION_NAME}_list_options): Add it to usage.
1849 (gld${EMULATION_NAME}_get_script): Return -z combreloc -z now
1850 -z relro scripts when appropriate.
1851 * scripttempl/elf.sc: Unset SEPARATE_GOTPLT if RELRO_NOW is set.
1852 Create separate .got.plt section if SEPARATE_GOTPLT.
1853 Move sections which are only written during relocation handling
1854 to the beginning of RW segment. If NO_SMALL_DATA, move .got
1855 before .data. Add DATA_SEGMENT_RELRO_END directive.
1856 Include OTHER_RELRO_SECTIONS.
1857 * ldgram.y (DATA_SEGMENT_RELRO_END): Add.
1858 * ldexp.c (exp_print_token): Handle DATA_SEGMENT_RELRO_END.
1859 (fold_unary): Likewise.
1860 (fold_binary): Handle -z relro.
1861 * ldexp.h (struct exp_data_seg): Add exp_dataseg_relro_seen and
1862 exp_dataseg_relro_adjust phases. Add relro_end field.
1863 * ldmain.c (main): Initialize link_info.relro to FALSE.
1864 * ldlang.c (lang_size_sections): Handle -z relro.
1868 * scripttempl/avr.sc: Do not set LMA for "eeprom" section.
1872 * ldlang.c (print_padding_statement): Cast size_t to bfd_vma
1873 before printing it with %W.
1878 * emultempl/pe.em (real_flags): New static.
1879 (OPTION_LARGE_ADDRESS_AWARE): New define.
1880 (gld${EMULATION_NAME}_add_options): Add --large-address-aware option.
1881 (gld_${EMULATION_NAME}_list_options): Likewise.
1882 (gld${EMULATION_NAME}_handle_option): Likewise.
1883 (gld_${EMULATION_NAME}_after_open): Pass real_flags to PE private data.
1884 * ld.texinfo: Document it.
1889 * NEWS: Mention DWARF 2 support for i386pe.
1893 * emulparams/elf32frvfd.sh (OUTPUT_FORMAT): Switch to new
1898 * ldlang.c (unique_section_p): Pass section parm, return true on
1900 (output_section_callback): Adjust.
1901 * ldlang.h (unique_section_p): Update prototype.
1902 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust.
1906 * ld.texinfo (--gc-sections): Remove restriction for
1911 * scripttempl/pe.sc: Handle .debug* and .gnu.linkonce.wi.* sections
1912 for DWARF 2/3. Update stab section's syntax.
1916 * pe-dll.c: Revert changes accidentally committed 2004-03-08.
1917 (fill_edata): Correct pointer arithmetic.
1921 * ld.texinfo: Remove MIPS --embedded-relocs documentation.
1922 * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Remove definition.
1923 * emulparams/mipsidt.sh (TEMPLATE_NAME): Use generic.em.
1924 (EXTRA_EM_FILE): Use mipsecoff.em
1925 * emulparams/mipsidtl.sh (TEMPLATE_NAME): Use generic.em.
1926 (EXTRA_EM_FILE): Use mipsecoff.em
1927 * emultempl/mipsecoff.em: Restructure to be included as an
1928 extra emulation file.
1929 (check_sections, gld${EMULATION_NAME}_after_open)
1930 (gld${EMULATION_NAME}_after_allocation)
1931 (gld${EMULATION_NAME}_get_script)
1932 (ld_${EMULATION_NAME}_emulation): Remove
1933 (gld${EMULATION_NAME}_before_parse): Rename to...
1934 (mipsecoff_before_parse): This.
1935 (LDEMUL_BEFORE_PARSE): Define.
1936 * emultempl/mipself.em: Remove file.
1937 * scripttempl/mips.sc (.rel.sdata): Do not include in output.
1938 (__runtime_reloc_start, __runtime_reloc_stop): Stop providing
1940 * Makefile.am: Remove dependencies on emultempl/mipself.em.
1941 * Makefile.in: Regenerate.
1945 * ld.texinfo (synthesizing on H8/300): Information about linker
1946 relaxation support for bit manipulation instructions and system
1947 control instructions is added.
1951 * NEWS: Mention change in DEFINED semantics.
1955 * scripttempl/elf.sc (.text): Add KEEP for .text.*personality*.
1956 (.data): Add KEEP for .gnu.linkonce.d.*personality*.
1957 (.gcc_except_table): Add KEEP for self and accept .gcc_except_table.*.
1961 * ld.texinfo (Simple Example): Add missing punctuation.
1965 * NEWS: Note that MIPS --embedded-relocs option is deprecated.
1969 * ldlang.c (lang_do_assignments_1): Handle .tbss output section
1974 * scriptempl/pe.sc: Put numbered .ctors.* after .ctors
1975 with default priority. Likewise for dtors.
1979 * configure.host: Remove mips*-dec-bsd* target.
1980 * configure.tgt: Likewise.
1984 * emulparams/elf32bsmip.sh (EXTRA_EM_FILE): Define to irix.
1985 * emulparams/elf64bmip.sh (EXTRA_EM_FILE): Likewise.
1986 * emulparams/elf32bmipn32.sh (EXTRA_EM_FILE): Likewise.
1987 * emultempl/irix.em: New file.
1988 * Makefile.am (eelf32bsmip.c, eelf32bmipn32.c, eelf64bmip.c): Update
1990 * Makefile.in: Regenerate.
1994 * emultempl/armelf.em (byteswap_code): Add.
1995 (arm_elf_before_allocation): Pass extra parameter.
1996 (PARSE_AND_LIST_PROLOGUE): Add OPTION_BE8.
1997 (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add be8.
1998 (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_BE8.
1999 * emultempl/armelf_oabi.em: Pass extra parameter.
2000 * ld.texinfo: Document --be8.
2004 Remove long-obsolete MPW support.
2005 * mpw-config.in, mpw-make.sed, mac-ld.r: Remove files.
2006 * Makefile.am (mpw): Remove file-presynthesizing actions.
2007 * Makefile.in: Likewise.
2008 * ldfile.c (slash): Remove MPW case.
2009 * ldlex.l [MPW]: Remove unused definition.
2013 * Makefile.am (ALL_EMULATIONS): Add eelf32cr16c.o.
2014 (eelf32cr16c.c): New target.
2015 * Makefile.in: Regenerate.
2016 * configure.tgt: Handle cr16c-*-elf*.
2017 * emulparams/elf32cr16c.sh: New file.
2018 * scripttempl/elfcr16c.sc: Likewise
2019 * NEWS: Mention support for new target.
2023 * po/sv.po: Updated Swedish translation.
2027 * emultempl/elf32.em: Update new bfd_elf_discard_info name.
2028 * emultempl/hppaelf.em: Likewise.
2029 * emultempl/ppc64elf.em: Likewise.
2030 * emultempl/sh64elf.em: Likewise.
2034 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Update
2035 size_dynamic_sections call.
2040 * emultempl/ppc64elf.em (ppc_create_output_section_statements): Set
2041 link_info.wrap_char.
2045 * lexsup.c (parse_args): Don't set unresolved_syms_in_objects
2046 or unresolved_syms_in_shared_libs for -Bdynamic and -Bstatic.
2050 * emulparams/elf32frvfd.sh (MAXPAGESIZE): Change to 16Kb.
2054 * config.in: Regenerate.
2055 * po/ld.pot: Regenerate.
2059 * ld.texinfo: Add --as-needed doco.
2060 * ldmain.c (as_needed): New global var.
2061 * ldmain.h (as_needed): Declare.
2062 * lexsup.c (option_values): Add OPTION_AS_NEEDED and
2063 OPTION_NO_AS_NEEDED.
2064 (ld_options): Likewise.
2065 (parse_args): Handle them.
2066 * ldlang.h (lang_input_statement_type): Add as_needed field.
2067 * ldlang.c (new_afile): Set p->as_needed.
2068 * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): New function.
2069 (gld${EMULATION_NAME}_try_needed): Use bfd_elf_set_dyn_lib_class.
2070 (ld_${EMULATION_NAME}_emulation): Set LDEMUL_RECOGNIZED_FILE entry.
2072 * ldlang.c (open_input_bfds): Remove useless cast.
2073 (lang_do_assignments_1): Likewise.
2074 (lang_for_each_input_section): Delete.
2078 * configure.tgt: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
2082 * pe-dll.c (pe_dll_generate_implib): Skip sections marked as
2083 private when building implib.
2087 * ldlang.c (lang_add_section): Don't force SEC_LOAD on
2089 (IGNORE_SECTION): Ignore .tbss sections too.
2090 (lang_size_sections_1): .tbss sections do not advance dot.
2094 * ld.texinfo (Options): Fix example for --wrap.
2098 * pe-dll.c (fill_edata): Check that exported_symbol_sections is
2103 * ldlang.c (lang_check): Use %P, not %E, in error message.
2107 * ldlang.h (struct lang_output_section_state): Change processed
2109 * ldexp.c (check, invalid): Remove.
2110 (fold_name): Move valid_p assignments. Create undefined symbol
2111 when needed. Directly exampine section's processd flag.
2112 * ldlang.c (lang_output_section_statement_lookup): Adjust
2113 processed field init.
2114 (lang_size_sections_1): Allow LOADADDR when determining section's
2115 VMA. Adjust error message. Fold data statement's expr.
2116 (lang_size_sections): Correctly increment lang_statement_iteration.
2120 * ldexp.c (fold_tree): Follow indirect symbols.
2124 * ldgram.y (exp): Add two operand ALIGN.
2125 * ldexp.c (fold_binary): Add ALIGN_K case.
2126 * ld.texinfo (ALIGN): Document two operand version.
2130 * ldlang.c (map_input_to_output_sections): Initialize sections
2131 mentioned in a data statement expression.
2132 (lang_do_assignments_1): Add data statement's expression's
2137 * ldgram.y (statement_anywhere): Add assert rule.
2138 * ldlang.c (exp_init_os): Add assert case.
2142 * ldmain.c (remove_output): Call bfd_cache_close.
2146 * emulparams/elf32bmipn32-defs.sh (OTHER_SECTIONS): Discard
2147 .MIPS.content* and .MIPS.events* sections.
2151 * emulparams/armelf.sh, emulparams/armelf_linux.sh: Move
2152 .note.gnu.arm.ident to after allocated sections. Mark its
2157 * emulparams/armelf_linux.sh (COMMONPAGESIZE): Set to 4KB.
2158 * emulparams/elf32bmip.sh (COMMONPAGESIZE): Likewise.
2159 * emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Likewise.
2160 * emulparams/elf32btsmipn32.sh (COMMONPAGESIZE): Likewise.
2161 * emulparams/shlelf_linux.sh (COMMONPAGESIZE): Likewise.
2165 * emultempl/pe.em (_after_open): Fix typo in previous delta.
2169 * emultempl/pe.em (_after_open): Fix thinko in 2003-12-18 patch.
2173 * genscripts.sh: Fix typo.
2175 * genscripts.sh: Apply $LIBPATH_SUFFIX to $tool_lib and $libdir too.
2179 * emulparams/elf64_ia64.sh: Put .rela.opd into
2180 OTHER_GOT_RELOC_SECTIONS instead of OTHER_PLT_RELOC_SECTIONS.
2184 * pe-dll.c (pe_create_import_fixup): Clear WP_TEXT flag.
2185 * ld.texinfo (--omagic): Note that writable text section
2186 does not conform to published PE-COFF specs.
2187 (--enable-auto-import): Likewise.
2191 * emulparams/elf32ppc.sh (COMMONPAGESIZE): Define.
2195 * ldlang.c (lang_get_regions): Add extra parameter 'have_vma'
2196 which if true will prevent the LMA region being used as a
2197 replacement for a default VMA region.
2198 (lang_leave_output_section_statement): Pass extra parameter.
2199 (lang_leave_overlay): Likewise.
2200 * ld.texinfo (Output Section LMA): Document that the LMA
2201 region can be set to the VMA region if no VMA has been set.
2202 * ldlang.h (struct lang_output_section_phdr_list): Create a
2203 typedef for this type. Minor formatting fixes.
2207 * ldlang.c (lang_size_sections_1): If dot is advanced, then
2208 assume that the section should be allocated.
2212 * ldlang.c (IGNORE_SECTION): Don't ignore SEC_ALLOC && !SEC_LOAD
2213 sections. Do ignore SEC_NEVER_LOAD sections.
2214 (lang_size_sections_1): Remove test made redundant with the above.
2218 * emultempl/ppc64elf.em (ppc_before_allocation): Clear cached
2219 program_header_size.
2224 * emulparams/elf32frvfd.sh (EMBEDDED): Clear.
2226 * emulparams/elf32frvfd.sh (STACK_ADDR): Unset.
2227 (MAXPAGESIZE): Set to 64Kb.
2228 (OTHER_READONLY_SECTIONS): Define __ROFIXUP_LIST__ and
2229 __ROFIXUP_END__. Don't map .rofixup.got any more.
2230 * emulparams/elf32frv.sh (NOP): Set.
2232 * configure.tgt: Add frv-*-*linux*.
2234 * Makefile.am (ALL_EMULATIONS): Added eelf32frvfd.o.
2235 (eelf32frvfd.c): New.
2236 * configure.tgt <frv-*-*>: Added it to targ_extra_emuls.
2237 * emulparams/elf32frv.sh: Reverted previous two patches.
2238 * emulparams/elf32frvfd.sh: New.
2239 * Makefile.in: Rebuilt.
2241 * emulparams/elf32frv.sh (OTHER_READONLY_SECTIONS): Added
2242 .rofixup.got to .rofixup.
2244 * emulparams/elf32frv.sh (MAXPAGESIZE): Make it 256KiB, not 256B.
2245 (TEMPLATE_NAME, GENERATE_SHLIB_SCRIPT): Set.
2249 * emulparams/elf_s390.sh (NO_SMALL_DATA): Set to yes.
2250 * emulparams/elf64_s390.sh (NO_SMALL_DATA): Set to yes.
2254 * ldexp.c (align_n): Make static.
2255 * ldexp.h (align_n): Delete declaration.
2256 * ldlang.h (lang_enter_output_section_statement): Remove
2258 * ldlang.c (lang_enter_output_section_statement): Likewise.
2259 (TO_ADDR, TO_SIZE): Define.
2260 (opb_shift): New var.
2261 (init_opb): New function.
2262 (print_input_section): Call init_opb and use TO_ADDR.
2263 (print_data_statement, print_reloc_statement): Likewise.
2264 (print_padding_statement): Likewise.
2265 (size_input_section): Use TO_SIZE and TO_ADDR, and global opb_shift.
2266 (lang_check_section_addresses): Likewise.
2267 (lang_size_sections_1): Likewise.
2268 (lang_do_assignments_1): Likewise.
2269 (lang_set_startof): Likewise.
2270 (lang_one_common): Likewise. Combine power_of_two and opb_shift align.
2271 (lang_process): Call init_opb.
2272 (lang_abs_symbol_at_end_of): Use TO_ADDR and global opb_shift.
2273 (lang_enter_overlay_section): Adjust
2274 lang_enter_output_section_statement call.
2275 * ldgram.y: Likewise.
2276 * mri.c (mri_draw_tree): Likewise.
2277 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Likewise.
2278 * emultempl/mmo.em (mmo_place_orphan): Likewise.
2279 * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Likewise.
2281 * ldfile.c (ldfile_set_output_arch): Add defarch param.
2282 * ldfile.h (ldfile_set_output_arch): Ditto.
2283 * emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Use
2284 ldfile_set_output_arch.
2285 * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Ditto.
2286 * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Ditto.
2287 * emultempl/linux.em (gld${EMULATION_NAME}_before_parse): Ditto.
2288 * emultempl/mipsecoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
2289 * emultempl/pe.em (gld${EMULATION_NAME}_before_parse): Ditto.
2290 * emultempl/sunos.em (gld${EMULATION_NAME}_before_parse): Ditto.
2291 * ldgram.y: Adjust ldfile_set_output_arch call.
2292 * emultempl/armcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
2293 * emultempl/armelf.em (gld${EMULATION_NAME}_before_parse): Ditto.
2294 * emultempl/armelf_oabi.em (gld${EMULATION_NAME}_before_parse): Ditto.
2295 * emultempl/generic.em (gld${EMULATION_NAME}_before_parse): Ditto.
2296 * emultempl/gld960c.em (gld960_set_output_arch): Ditto.
2297 * emultempl/m68kcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
2298 * emultempl/ticoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
2302 * configure.tgt: Add m68k-uClinux target.
2304 For older changes see ChangeLog-0203
2310 version-control: never