1 2005-05-04 Alan Modra <amodra@bigpond.net.au>
3 * ldemul.c: Include bfdlink.h.
4 (ldemul_before_allocation): Assume before_allocation is non-zero.
5 (before_allocation_default): Call strip_excluded_output_sections.
6 * ldlang.c (stripped_excluded_sections): New variable.
7 (lang_add_section): Build input section list for each output
8 section, attached via map_head and map_tail pointers.
9 (strip_excluded_output_sections): Make global. Traverse the
10 input section lists to find which output sections can go. Clear
11 link_order pointers and set stripped_excluded_sections.
12 (lang_process): Call strip_excluded_output_sections.
13 * ldlang.h (strip_excluded_output_sections): Declare.
14 * ldwrite.c: Update throuhout for link_order_head -> map_head change.
15 * emultempl/aix.em (before_allocation): Call
16 strip_excluded_output_sections.
17 * emultempl/armcoff.em (before_allocation): Likewise.
18 * emultempl/beos.em (before_allocation): Likewise.
19 * emultempl/linux.em (before_allocation): Likewise.
20 * emultempl/pe.em (before_allocation): Likewise.
21 * emultempl/sunos.em (before_allocation): Likewise.
22 * emultempl/elf32.em (before_allocation): Likewise. Call
23 bfd_elf_size_dynsym_hash_dynstr too.
24 * emultempl/lnk960.em (lnk960_before_allocation): Delete.
25 (ld_lnk960): Use before_allocation_default.
27 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
29 * emultempl/elf32.em (gld${EMULATION_NAME}_strip_empty_section):
30 Updated for bfd_section_list_remove change.
31 * ldlang.c (lang_insert_orphan): Likewise.
32 (strip_excluded_output_sections): Likewise.
33 (sort_sections_by_lma): New.
34 (lang_check_section_addresses): Sort the sections before
37 2005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
39 * configure.tgt: Add h8300*-*-rtemscoff.
40 Switch h8300*-*-rtems* to elf.
42 2005-04-29 Ben Elliston <bje@au.ibm.com>
44 * ldgram.y (lang_memory_region_type): Make static.
45 (ldgram_want_filename): Likewise.
46 * ldemul.c (ld_emulation): Make static.
47 * ldfile.h (ldfile_find_command_file): Remove extern.
48 * ldfile.c (ldfile_find_command_file): Make static.
49 * ldlang.h (unique_section_list): Remove extern declaration.
50 * ldlang.c (unique_section_list): Make static.
51 * mri.h (symbol_truncate): Remove extern declaration.
52 * mri.c (symbol_truncate): Make static.
53 (order, only_load, address, alias): Likewise.
54 (alignment, subalignment): Likewise.
56 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
58 * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols):
59 Use the first SEC_ALLOC section which isn't SEC_READONLY or the
60 last SEC_ALLOC section if such a section doesn't exist.
62 2005-04-24 Mark Kettenis <kettenis@gnu.org>
64 * configure.host: Add *-*-openbsd support.
66 2005-04-15 Julian Brown <julian@codesourcery.com>
68 * ld.texinfo: Document --use-blx.
69 * emultempl/armelf.em (use_blx): New variable.
70 (arm_elf_create_output_section_statements): Communicate value of
72 (PARSE_AND_LIST_PROLOGUE): Add OPTION_USE_BLX.
73 (PARSE_AND_LIST_OPTIONS): Add --use-blx option.
74 (PARSE_AND_LIST_ARGS_CASES): Add OPTION_USE_BLX case.
76 2005-04-14 Alan Modra <amodra@bigpond.net.au>
78 * Makefile.am (NO_WERROR): Define. Use instead of -Wno-error.
79 * configure.in: Include ../bfd/warning.m4 contents.
80 * Makefile.in: Regenerate.
81 * configure: Regenerate.
83 2005-04-12 Alan Modra <amodra@bigpond.net.au>
85 * Makefile.am: Run "make dep-am".
86 (ldgram.o, ldlex.o, deffilep.o): Add -Wno-error to command.
87 * Makefile.in: Regenerate.
88 * config.in: Regenerate.
90 2005-04-11 Alan Modra <amodra@bigpond.net.au>
92 * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed): Ignore
93 as_needed libs that were not needed.
94 (gld${EMULATION_NAME}_check_needed): Likewise.
96 2005-04-07 Nick Clifton <nickc@redhat.com>
98 * emultempl/m68kcoff.em: Include ldexp.h and ldlang.h so that
99 ldfile.h can use the lang_input_statement type.
101 2005-04-06 Jakub Jelinek <jakub@redhat.com>
103 * ldlang.c: Formatting.
104 (walk_wild_consider_section): Remember return value from wildcardp.
105 (is_simple_wild): Use strcspn instead of 2 strpbrk calls and strlen.
106 (wild_spec_can_overlap): Use strcspn instead of strpbrk and strlen.
108 2005-04-06 Robert O'Callahan <rocallahan@novell.com>
110 * ld.h (lean_section_userdata_type): Remove.
111 (fat_section_userdata_type): Remove file field.
112 (SECTION_USERDATA_SIZE): Remove.
113 * ldlang.c (init_os): Eliminate initialization of unused
114 lean_section_userdata_type.
116 * ldlang.h (callback_t, walk_wild_section_handler_t): New
118 (struct lang_wild_statement_struct): Add walk_wild_section_handler
119 and handler_data fields.
120 * ldlang.c (callback_t): Removed.
121 (walk_wild_consider_section, walk_wild_section_general,
122 section_iterator_callback, find_section, is_simple_wild,
123 match_simple_wild, walk_wild_section_specs1_wild0,
124 walk_wild_section_specs1_wild1, walk_wild_section_specs2_wild1,
125 walk_wild_section_specs3_wild2, walk_wild_section_specs4_wild2,
126 wild_spec_can_overlap, analyze_walk_wild_section_handler): New
128 (lang_add_wild): Call analyze_walk_wild_section_handler.
129 (walk_wild_section): Renamed to walk_wild_section_general and
130 created a wrapper function.
131 (section_iterator_callback_data): New typedef.
133 2005-04-04 Nick Clifton <nickc@redhat.com>
135 * configure.in: Add a check for <unistd.h> providing a prototype
136 for getopt() which is compatible with the one in
137 include/getopt.h. If so then define HAVE_DECL_GETOPT.
138 * configure: Regenerate.
139 * config.in (HAVE_DECL_GETOPT): Add.
140 * ldemul.c: Include config.h
141 * lexsup.c: Likewise.
142 * emultempl/elf32.sc: Likewise.
144 2005-03-29 Alan Modra <amodra@bigpond.net.au>
146 * emultempl/elf32.em (gld${EMULATION_NAME}_layout_sections_again):
147 New function, extracted from static void gld${EMULATION_NAME}_finish.
148 (gld${EMULATION_NAME}_strip_empty_sections): Likewise.
149 (gld${EMULATION_NAME}_provide_init_fini_syms): Likewise.
150 * emultempl/ppc64elf.em: Revert last change.
151 (ppc_layout_sections_again): Use
152 gld${EMULATION_NAME}_layout_sections_again.
153 (ppc_finish): Don't call gld${EMULATION_NAME}_finish. Instead call
154 gld${EMULATION_NAME}_strip_empty_sections and
155 gld${EMULATION_NAME}_provide_init_fini_syms.
156 * emultempl/hppaelf.em: Similarly.
158 2005-03-29 Alan Modra <amodra@bigpond.net.au>
160 * emultempl/ppc64elf.em (need_laying_out): Delete. Remove all refs.
161 (ppc_finish): Don't call bfd_elf_discard_info.
162 * emultempl/hppaelf.em: Similarly.
164 2005-03-24 Nick Clifton <nickc@redhat.com>
166 * po/fr.po: Updated French translation.
168 2005-03-23 Mike Frysinger <vapier@gentoo.org>
169 Nick Clifton <nickc@redhat.com>
171 * configure.host: Accept any C library to accompany a GNU Linux
172 implementation, not just the GNU C library.
173 * configure.tgt: Likewise.
174 * emultempl/elf32.em: Likewise.
176 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
178 * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols): New
179 (gld${EMULATION_NAME}_finish): Call
180 gld${EMULATION_NAME}_provide_bound_symbols to provide
181 __preinit_array_start, __preinit_array_end, __init_array_start,
182 __init_array_end, __fini_array_start and __fini_array_end.
184 * scripttempl/elf.sc: Don't provide __preinit_array_start,
185 __preinit_array_end, __init_array_start, __init_array_end,
186 __fini_array_start nor __fini_array_end.
188 2005-03-23 Alan Modra <amodra@bigpond.net.au>
190 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Set
191 SEC_EXCLUDE on .gnu.warning sections.
193 2005-03-22 Alan Modra <amodra@bigpond.net.au>
195 * scripttempl/elf.sc (SBSS): Don't provide sbss start and end syms.
197 2005-03-21 Alan Modra <amodra@bigpond.net.au>
199 * emultempl/ppc32elf.em (gld${EMULATION_NAME}_after_allocation): New
201 (LDEMUL_AFTER_ALLOCATION): Define.
203 2005-03-21 Alan Modra <amodra@bigpond.net.au>
205 * emultempl/ppc64elf.em (ppc_finish): Rename from
206 gld${EMULATION_NAME}_finish. Call gld${EMULATION_NAME}_finish.
207 (LDEMUL_FINISH): Update.
208 * emultempl/hppaelf.em (hppaelf_finish, LDEMUL_FINISH): Likewise.
209 * emultempl/m68hc1xelf.em (m68hc11elf_finish, LDEMUL_FINISH): Likewise.
211 2005-03-18 Julian Brown <julian@codesourcery.com>
213 * scripttempl/armbpapi.sc (.rel.dyn): Add .rel.init_array,
215 (.rela.dyn): Add .rela.init_array, .rela.fini_array.
216 (SECTIONS): Add .rel.other, .rela.other, .reli.other after PLT relocs.
218 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
220 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Don't set
221 bfd_section when removing unused empty output sections for
222 non-relocatable link.
224 2005-03-19 Alan Modra <amodra@bigpond.net.au>
226 * ldlang.c (lang_insert_orphan): Use old section_tail rather than
227 traversing the bfd section list to find pointer to new section.
229 2005-03-18 Alan Modra <amodra@bigpond.net.au>
231 * scripttempl/elf.sc: When CREATE_SHLIB, put .sdata2 and .sbss2
232 input sections into .sdata and .sbss output respectively.
234 2005-03-16 David Heine <dlheine@tensilica.com>
235 Bob Wilson <bob.wilson@acm.org>
237 * ldlang.c (IGNORE_SECTION): Remove check for zero size.
238 (lang_check_section_addresses): Ignore zero size sections here.
240 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
242 * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Remove
243 unused empty output sections for non-relocatable link.
245 * ld.h (args_type): Remove gc_sections.
247 * ldlang.c (lang_mark_used_section): New.
248 (lang_gc_sections): Use link_info.gc_sections instead of
249 command_line.gc_sections.
250 * ldmain.c (main): Likewise.
251 * lexsup.c (parse_args): Likewise.
252 * ldlang.c (lang_process): Call lang_mark_used_section.
254 * ldmain.c (main): Initialize link_info.gc_sections to FALSE.
256 2005-03-16 Nick Clifton <nickc@redhat.com>
257 Ben Elliston <bje@au.ibm.com>
259 * configure.in (werror): New switch: Add -Werror to the
260 compiler command line. Enabled by default. Disable via
262 * configure: Regenerate.
264 2005-03-16 Alan Modra <amodra@bigpond.net.au>
266 * emulparams/elf32ppclinux.sh (OTHER_READWRITE_SECTION): Delete.
267 (OTHER_RELRO_SECTIONS): Set this instead.
269 2005-03-15 Nick Clifton <nickc@redhat.com>
271 * NEWS: Add cutoff for changes in 2.16 release.
273 2005-03-15 Mikkel Krautz <krautz@gmail.com>
275 * configure.tgt (x86_64-elf): Add target.
277 2005-03-15 Alan Modra <amodra@bigpond.net.au>
279 * po/es.po: Commit new Spanish translation.
281 2005-03-14 Alan Modra <amodra@bigpond.net.au>
283 * ldexp.c (exp_fold_tree): Ensure return value is initialized.
284 Tidy etree_assert case.
286 2005-03-14 Alan Modra <amodra@bigpond.net.au>
288 * po/tr.po: Commit new Turkish translation.
290 2005-03-11 Daniel Jacobowitz <dan@codesourcery.com>
292 * Makefile.am: Remove references to em68klynx.o and esparclynx.o.
293 * Makefile.in: Regenerated.
294 * emulparams/m68klynx.sh, emulparams/sparclynx.sh: Remove.
296 2005-03-07 Nick Clifton <nickc@redhat.com>
298 * po/fr.po: Updated translation.
300 2005-03-05 Alan Modra <amodra@bigpond.net.au>
302 * po/ld.pot: Regenerate.
304 2005-03-02 Jan Beulich <jbeulich@novell.com>
306 * ldmain.c (remove_output): Use unlink_if_ordinary instead of unlink.
307 * pe-dll.c (pe_dll_generate_implib): Likewise.
309 2005-02-24 Ben Elliston <bje@au.ibm.com>
311 * ldfile.c: Remove GNU960 conditional code.
312 * emultempl/gld960.em: Likewise.
313 * emultempl/gld960c.em: Likewise.
314 * emultempl/lnk960.em: Likewise.
316 2005-02-24 Nick Clifton <nickc@redhat.com>
318 * emultempl/lnk960.em (lnk960_before_parse): Remove redundant
319 empty string from calls to concat.
321 2005-02-23 Nick Clifton <nickc@redhat.com>
323 * emultempl/lnk960.em (lnk960_before_parse): Terminate list of
324 arguments passed to concat() with a NULL.
326 * emultempl/m68kcoff.em: Include ldexp.h and ldlang.h because they
327 define types needed by ldfile.h
329 2005-02-23 Alan Modra <amodra@bigpond.net.au>
331 * pe-dll.c: Warning fixes.
332 * emultempl/sunos.em: Likewise.
334 2005-02-22 Daniel Jacobowitz <dan@codesourcery.com>
336 * ldlang.c (section_already_linked): Don't call
337 bfd_section_already_linked for dynamic objects.
339 2005-02-22 Alan Modra <amodra@bigpond.net.au>
341 * ldexp.c: Warning fixes.
342 * ldwrite.c: Likewise.
343 * emultempl/elf32.em: Likewise.
345 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
347 * ldlang.c (lang_add_section): Check SEC_TIC54X_BLOCK for TI
349 (lang_size_sections_1): Check SEC_COFF_SHARED_LIBRARY for COFF
350 and ECOFF output only.
352 2005-02-21 Alan Modra <amodra@bigpond.net.au>
354 * config.in: Regenerate.
355 * configure: Regenerate.
357 2005-02-17 Zack Weinberg <zack@codesourcery.com>
359 * ldexp.c (assigning_to_dot): New global flag.
360 (fold_name): If assigning_to_dot is true, object immediately to
362 (exp_fold_tree): Set and clear assigning_to_dot around the
363 recursive call to exp_fold_tree to process the right-hand side
364 of an assignment to the location counter.
366 2005-02-17 Paul Brook <paul@codesourcery.com>
368 * scripttempl/armbpabi.sc: Add dummy name to version block.
370 2005-02-17 Alan Modra <amodra@bigpond.net.au>
372 * ldexp.c (new_abs): Init new.str.
374 2005-02-15 Mark Mitchell <mark@codesourcery.com>
376 * configure.in (AC_CHECK_FUNCS): Add glob.
377 * configure: Regenerated.
378 * emultempl/elf32.em (<glob.h>): Do not include if HAVE_GLOB is
380 (gld${EMULATION_NAME}_parse_ld_so_conf_include): Do not use glob
381 if HAVE_GLOB is not defined.
383 2005-02-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
385 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Define
386 lib_path if NATIVE is yes.
388 2005-02-16 Alan Modra <amodra@bigpond.net.au>
390 * emultempl/ppc64elf.em (ppc_create_output_section_statements): Make
391 an error creating fake bfd fatal.
392 (ppc_before_allocation): Continue on after errors.
393 (gld${EMULATION_NAME}_finish): Likewise.
395 2005-02-15 Nick Clifton <nickc@redhat.com>
397 * ldlex.l (YY_NO_UNPUT): Define so that the yy_unput function is
398 not declared. It is not used and its presence causes a compile
401 2005-02-11 Zack Weinberg <zack@codesourcery.com>
403 * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed):
404 If st.st_ino is zero, do not treat the library as a duplicate.
406 2005-02-10 Jakub Jelinek <jakub@redhat.com>
408 * emultempl/hppaelf.em (hppaelf_create_output_section_statements):
409 Set BFD_LINKER_CREATED on the stubs bfd.
410 * emultempl/ppc64elf.em (ppc_create_output_section_statements):
413 2005-02-08 Mark Mitchell <mark@codesourcery.com>
415 * scripttempl/armbpabi.sc (VERSION): Make special section symbols
417 (Image$$ER_RO$$Base): Define whenever RELOCATING.
418 (Image$$ER_RO$$Limit): Likewise.
419 (SHT$$INIT_ARRAY$$Base): Likewise.
420 (SHT$$INIT_ARRAY$$Limit): Likeise.
422 2005-02-10 Ben Elliston <bje@au.ibm.com>
424 * emultempl/beos.em: Remove #if 0 and #if 1 blocks.
426 2005-02-08 Richard Sandiford <rsandifo@redhat.com>
428 * configure.tgt (mips64*el-*-linux-gnu*): Define targ_extra_libpath
429 to include o32 and n64 emulations.
430 (mips64*-*-linux-gnu*): Likewise.
432 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
434 * ldmain.c (warning_callback, warning_find_reloc): Prepend
435 "warning: " to warning messages.
437 2005-02-04 Alan Modra <amodra@bigpond.net.au>
439 * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment): Don't
440 look up symbol for etree_provide here.
442 2005-02-02 Daniel Jacobowitz <dan@codesourcery.com>
444 * emulparams/elf32bmip.sh (TEXT_DYNAMIC): Always set.
446 2005-02-01 Edward Welbourne <eddy@opera.com>
447 Nick Clifton <nickc@redhat.com>
449 * ld.texinfo (Source Code Reference): New node describing how to
450 access linker script defined variables from source code.
452 2005-02-01 Alan Modra <amodra@bigpond.net.au>
454 * ld.texinfo: Clarify --as-needed operation.
456 2005-01-31 Andrew Cagney <cagney@gnu.org>
458 * configure: Regenerate to track ../gettext.m4.
460 2005-01-31 Nick Clifton <nickc@redhat.com>
462 * ldver.c (ldversion): Bump reported copyright date to 2005.
464 2005-01-31 Nick Clifton <nickc@redhat.com>
466 * configure.tgt: Remove obsolete targets m68k-lynxos and
469 2005-01-28 Julian Brown <julian@codesourcery.com>
471 * emultempl/armelf.em (fix_v4bx): New variable.
472 (arm_elf_create_output_section_statements): Communicate fix_v4bx flag
474 (PARSE_AND_LIST_PROLOGUE): Add option token OPTION_FIX_V4BX.
475 (PARSE_AND_LIST_LONGOPTS): Add option --fix-v4bx.
476 (PARSE_AND_LIST_OPTIONS): Add option --fix-v4bx.
477 (PARSE_AND_LIST_ARGS_CASES): Add option OPTION_FIX_V4BX.
478 * NEWS: Mention --fix-v4bx.
479 * ld.texinfo: Document --fix-v4bx.
481 2005-01-25 Mark Mitchell <mark@codesourcery.com>
483 * emulparams/armsymbian.sh (OTHER_READONLY_SECTIONS): Define, so
484 as to include .ARM.exidx$${Base,Limit}.
485 * ld/scripttempl/armbpabi.sc: Move .plt to end of text segment.
486 Define IMAGE$$ER_RO$${Base,Limit} and SHT$$INIT_ARRAY$${Base,Limit}.
487 Put .init_array, .fini_array, etc. into the read-only data
490 2005-01-25 Alan Modra <amodra@bigpond.net.au>
492 * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Formatting.
493 (gld${EMULATION_NAME}_after_open): Ignore needed libs if they were
494 only needed by an as-needed lib that didn't get linked.
496 2005-01-23 Alan Modra <amodra@bigpond.net.au>
498 * ld.texinfo (Output Section Keywords <CONSTRUCTORS>): Correct
499 __DTOR_LIST__ description.
501 2005-01-23 Alan Modra <amodra@bigpond.net.au>
503 * ld.texinfo (Location Counter <dot outside sections>): Document
504 effects of orphan section placement, and ". = ." workaround.
505 * Makefile.in: Regenerate.
507 2005-01-22 Richard Sandiford <rsandifo@redhat.com>
509 * emulparams/elf32bmip.sh (OTHER_GOT_SECTIONS): Add ". = .;".
510 * emulparams/elf32bmipn32-defs.sh (OTHER_GOT_SECTIONS): Likewise.
512 2005-01-21 Jakub Jelinek <jakub@redhat.com>
514 * ldgram.y (AS_NEEDED): New token.
515 (input_list): Handle AS_NEEDED ( input_list ).
516 * ldlex.l (AS_NEEDED): Add.
517 * ld.texinfo: Document AS_NEEDED ().
518 * NEWS: Mention AS_NEEDED ().
520 2005-01-21 Ben Elliston <bje@au.ibm.com>
522 * ldlang.c (lang_reasonable_defaults): Remove.
523 (lang_process): Don't call lang_reasonable_defaults.
525 * ldexp.c (exp_assop): Remove #if 0'd code.
526 (exp_print_tree): Likewise.
527 * ldlang.c (lang_memory_region_lookup): Likewise.
528 (open_output): Likewise.
529 (lang_do_assignments_1): Likewise.
530 (lang_place_orphans): Likewise.
531 (lang_enter_output_section_statement): Likewise.
532 (lang_reasonable_defaults): Likewise.
533 * ldlang.h (struct lang_input_statement_struct): Likewise.
534 * mri.c (mri_draw_tree): Likewise.
535 (mri_load): Likewise.
536 * pe-dll.c (generate_reloc): Likewise.
537 (make_import_fixup_entry): Likewise.
539 * emultempl/beos.em (set_pe_subsystem): Likewise.
540 * emultempl/hppaelf.em (hppaelf_after_parse): Likewise.
541 * emultempl/pe.em: Likewise.
542 * emultempl/xtensaelf.em (xtensa_colocate_literals): Likewise.
544 2005-01-20 Daniel Jacobowitz <dan@codesourcery.com>
546 * Makefile.am (ALL_EMULATIONS): Add earmelfb_linux_eabi.o.
547 (earmelfb_linux_eabi.c): New target.
548 * Makefile.in: Regenerated.
549 * configure.tgt (arm*b-*-linux-gnueabi): New target.
550 * emulparams/armelfb_linux_eabi.sh: New file.
552 2005-01-20 Nick Hudson <skrll@netbsd.org>
555 * emultempl/hppaelf.em (hppaelf_create_output_section_statements):
556 Handle bfd_elf32_hppa_nbsd_vec.
558 2005-01-19 Richard Sandiford <rsandifo@redhat.com>
560 * ldmain.h (ld_sysroot): Change type to a constant string.
561 * ldmain.c (ld_sysroot): Likewise.
562 (get_relative_sysroot, get_sysroot): New functions, adding command-line
563 support for changing the sysroot.
564 (main): Call the new functions.
565 * lexsup.c (OPTION_SYSROOT): New.
566 (ld_options): Add --sysroot.
567 (parse_args): Add a dummy handler for it.
568 * ld.texinfo (--sysroot): Document.
569 * NEWS: Mention the new --sysroot option.
571 2005-01-18 Alan Modra <amodra@bigpond.net.au>
573 * ldlang.c (section_already_linked): Adjust bfd_link_just_syms call.
574 (lang_place_orphans): Don't abort on just_syms_flag, instead call
577 2005-01-16 Danny Smith <dannysmith@users.sourceforge.net>
579 * defilep.y (def_name, def_library): Combine into...
580 (def_image_name): New function. Strip name to basename,
583 2005-01-12 Mark Kettenis <kettenis@gnu.org>
585 * configure.in: Be sure to invoke config.sub using the shell.
586 * configure: Regenerate.
588 2005-01-11 Alan Modra <amodra@bigpond.net.au>
590 * configure.host: Correct sed patterns for last change.
592 2005-01-10 Nick Clifton <nickc@redhat.com>
595 * ldmisc.c (vfinfo): Add an extra argument: is_warning. Use this
596 to determine whether config.make_executable should be set to FALSE in
597 conjunction with config.fatal_warnings.
598 (info_msg, minfo, lfinof): Pass FALSE as the extra argument.
599 (einfo): Pass TRUE as the extra argument.
601 2005-01-10 Greg Schaffer <gschafer@zip.com.au>
603 * configure.host (linux targets): Use "${CC} -dumpspecs" instead
604 of "${CC} --print-file-name=specs" to appease GCC versions >= 4.0.
605 (ia64-*-aix): Delete - this target is obsolete, and would be
606 broken by this patch.
608 2005-01-06 Eric Botcazou <ebotcazou@libertysurf.fr>
610 * configure.host (sparc*-*-solaris2*): Rename into sparc-*-solaris2*.
611 (sparc64-sun-solaris2*): New host.
613 2005-01-06 Paul Brook <paul@codesourcery.com>
615 * Makefie.am: Add earmelf_vxworks.
616 * Makefile.in: Regenerate.
617 * configure.tgt: Make arm-*-vxworks a separate case.
618 * emulparams/armelf_vxworks.sh: New function.
620 2005-01-06 Alan Modra <amodra@bigpond.net.au>
622 * emultempl/ppc64elf.em (no_multi_toc): New var.
623 (gld${EMULATION_NAME}_finish): Pass to ppc64_elf_setup_section_lists.
624 (OPTION_NO_MULTI_TOC): Define.
625 (PARSE_AND_LIST_LONGOPTS): Add --no-multi-toc support.
626 (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Likewise.
628 2005-01-05 Nick Clifton <nickc@redhat.com>
631 * ldmisc.c (vfinfo): Alter output to conform to the GNU Coding
632 Standard's specification for parsable error messages.
634 2005-01-04 Paul Brook <paul@codesourcery.com>
636 * Makefile.am: Correct dependency for earmsymbian.c.
637 * Makefile.in: Regenerate.
639 2004-12-28 Danny Smith <dannysmith@users.sourceforge.net>
641 * emultempl/pe.em (set_pe_subsystem): Change second arg to
642 lang_add_entry to FALSE.
644 2004-12-23 Nick Clifton <nickc@redhat.com>
647 * emulparams/shelf.sh (.stack): Increase stack start address to
650 2004-12-20 Nick Clifton <nickc@redhat.com>
652 * ldmain.c (main): Issue an error message if -static and -shared
655 2004-12-17 Jakub Jelinek <jakub@redhat.com>
657 * ldexp.h (exp_data_seg): Add min_base and maxpagesize fields.
658 * ldexp.c (fold_binary) <case DATA_SEGMENT_ALIGN>: Initialize them.
659 * ldlang.c (lang_size_sections): Use them to avoid wasting virtual
660 address space at DATA_SEGMENT_ALIGN. Fix computation of expected
661 PT_GNU_RELRO segment end.
663 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
665 * configure.tgt: Add s390x-ibm-tpf support.
667 2004-12-16 Martin Kögler <mkoegler@auto.tuwien.ac.at>
669 * ldmisc.c (vfinfo): Handle the case where %B is passed a NULL
672 2004-12-07 Ben Elliston <bje@gnu.org>
674 * ldemul.h: Forward declare struct option.
676 2004-12-01 Danny Smith <dannysmith@users.sourceforge.net>
678 * scripttempl/pe.sc (.data): Add .jcr subsection.
680 2004-11-30 Paul Brook <paul@codesourcery.com>
682 * emultempl/armelf.em: Ignore -p and -no-pipeline-knowledge.
684 2004-11-30 Tero Niemela <tero_niemela@yahoo.com>
686 * Makefile.am: Change LOCALEDIR to $(datadir)/share.
687 * Makefile.in: Regenerate.
689 2004-11-26 Melissa Mears <asterisk@graces.dricas.com>
691 * emultempl/pe.em: Add --subsystem:xbox as well as
693 * ld.texinfo: (ld_options): Document acceptance of subsystem xbox
694 and numeric subsystems.
696 2004-11-24 Alan Modra <amodra@bigpond.net.au>
698 * ldexp.c (fold_name): Correct PR 338 fix.
700 2004-11-19 Mark Mitchell <mark@codesourcery.com>
702 * Makefile.am (ALL_EMULATIONS): Add earmelf_linux_eabi.o.
703 (earmelf_linux_eabi.c): New target.
704 * configure.tgt (arm*-*-linux-gnueabi): Handle it.
705 * emulparams/armelf_linux_eabi.sh: New file.
706 * Makefile.in: Regenerated.
708 2004-11-19 Nick Clifton <nickc@redhat.com>
711 * ld.texinfo (MEMORY): Update the descriptions of the ORIGIN and
712 LENGTH fields in the MEMORY command, to explicitly state that
713 symbols cannot be used in their expressions.
715 2004-11-19 Jon Beniston <jon@beniston.com>
717 * ld/ldlex.l: Allow ORIGIN and LENGTH in EXPRESSION.
718 * ld/ldgram.y: Add ORIGIN and LENGTH expressions.
719 * ld/ldexp.c (fold_name): Implement LENGTH() and ORIGIN() functions
720 which return the length and origin of a memory.
721 * ld/ld.texinfo: Document LENGTH() and ORIGIN() functions.
722 * NEWS: Mention support for ORIGIN and LENGTH operators.
724 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
726 * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Don't use
727 a dynamic object for stubs.
729 2004-11-04 Paul Brook <paul@codesourcery.com>
731 * ld.texinfo: Document --default-imported-symver.
732 * ldmain.c (main): Set link_info.default_imported_symver.
733 * lexsup.c (option_values): Add OPTION_DEFAULT_IMPORTED_SYMVER.
734 (ld_options): Add --default-imported-symver.
735 (parse_args): Handle OPTION_DEFAULT_IMPORTED_SYMVER.
737 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
738 Vineet Sharma <vineets@noida.hcltech.com>
740 * Makefile.am: Add entries for new maxq-coff target.
741 * Makefile.in: Regenerate.
742 * configure.tgt: Add support for maxq.
743 * emulparams/maxqcoff.sh: New File.
744 * scripttempl/maxqcoff.sc: New linker script for target maxq.
745 * NEWS: Mention the new target.
747 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
749 * testsuite/ld-scripts/weak.exp: Enable test on PE,
751 * testsuite/ld-undefined/weak-undef.exp: Enable test on PE,
753 * testsuite/lib/ld-lib.exp (is_pecoff_format): New.
755 2004-11-04 Daniel Jacobowitz <dan@debian.org>
757 * Makefile.am (ALL_EMULATIONS): Remove earmelf_oabi.o.
758 (earmelf_oabi.c): Remove rule.
759 * configure.tgt: Remove arm-*-oabi and thumb-*-oabi.
760 * emulparams/armelf_oabi.sh, emultempl/armelf_oabi.em: Delete files.
761 * Makefile.in: Regenerated.
763 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
765 * configure.tgt (crisv32-*-*): Handle like cris-*-* for non-aout.
766 * emulparams/criself.sh (INIT_START): Remove emitted "push srp".
768 (INIT_END): Remove emitted "jump [sp+]".
771 2004-11-04 Alan Modra <amodra@bigpond.net.au>
773 * emultempl/ppc64elf.em (no_tls_opt): Rename from notlsopt.
774 (no_opd_opt, no_toc_opt): New static vars.
775 (ppc_before_allocation): Don't edit opt if no_opd_opt. Call
777 (OPTION_NO_OPD_OPT, OPTION_NO_TOC_OPT): Define.
778 (PARSE_AND_LIST_LONGOPTS): Add no-opd-optimize and no-toc-optimize.
779 (PARSE_AND_LIST_OPTIONS): Describe new options.
780 (PARSE_AND_LIST_ARGS_CASES): Handle them.
782 2004-10-27 Nick Clifton <nickc@redhat.com>
784 * emultempl/alphaelf.em (alpha_after_parse): Add extra, NULL,
785 parameter to invocation of lang_section_start.
786 * emultempl/aix.em (_handle_option): Likewise.
788 * Makefile.am (eelf64alpha.c, eelf64alpha_fbsd.c,
789 eelf64alpha_nbsd.c): Add dependency upon emultempl/alphaelf.em.
790 * Makefile.in: Regenerate.
792 2004-10-26 Mark Mitchell <mark@codesourcery.com>
794 * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Do not emit
795 __exidx_{start,end} when not relocating.
797 2004-10-25 Mark Mitchell <mark@codesourcery.com>
799 * Makefile.in (earmsymbian.c): Depend on armbpabi.sc, not elf.sc.
800 * ldexp.h (segment_type): New type.
801 (segments): New variable.
802 * ldexp.c (segments): New variable.
803 (exp_print_token): Handle SEGMENT_START.
804 (fold_binary): Likewise.
805 * ldgram.y (SEGMENT_START): Declare it as a token.
806 (exp): Handle SEGMENT_START.
807 * ldlang.h (lang_address_statement_type): Add segment field.
808 (lang_section_start): Change prototype.
809 * ldlang.c (map_input_to_output_sections): Do not process section
810 assignments if a corresponding SEGMENT_START has already been
812 (lang_section_start): Add segment parameter.
813 * ldlex.l (SEGMENT_START): Add it.
814 * lexsup.c (seg_segment_start): New function.
815 (parse_args): Use it for -Tbss, -Tdata, and -Ttext.
816 * ld.texinfo (SEGMENT_START): Document it.
817 * emulparams/armsymbian.sh (EMBEDDED): Set it.
818 * scripttempl/armbpabi.sc: Use SEGMENT_START to control segment
819 base addresses. Do not map relocations.
820 * NEWS: Mention SEGMENT_START.
822 2004-10-26 Paul Brook <paul@codesourcery.com>
824 * ld.texinfo: Document --default-symver.
825 * ldmain.c (main): Set link_info.create_default_symver.
826 * lexsup.c (enum option_values): Add OPTION_DEFAULT_SYMVER.
827 (ld_options): Add default-symver.
828 (parse_args): Handle OPTION_DEFAULT_SYMVER.
830 2004-10-24 Danny Smith <dannysmith@users.sourceforge.net>
832 * pe-dll.c (process_def_file): Don't export all symbols by default if
833 building a position-independent executable.
835 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
838 * ldmain.c (reloc_overflow): Accept a pointer to struct
839 bfd_link_hash_entry. Report symbol location for relocation
842 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
844 * genscripts.sh (libpath.exp): Really generate for first
847 2004-10-19 Danny Smith <dannysmith@users.sourceforge.net>
849 * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Simplify
850 comparison and replacement of filenames.
852 2004-10-19 H.J. Lu <hongjiu.lu@intel.com>
855 * ldlang.c (load_symbols): Use the same -Bdynamic/-Bstatic
856 option on linker script as the one for linker script.
858 2004-10-16 Daniel Jacobowitz <dan@debian.org>
860 * ldlang.c (struct excluded_lib, excluded_libs, add_excluded_libs)
861 (check_excluded_libs): New.
862 (load_symbols): Call check_excluded_libs.
863 * ldlang.h (add_excluded_libs): New prototype.
864 * emultempl/elf32.em (OPTION_EXCLUDED_LIBS): Define.
865 (gld${EMULATION_NAME}_add_options): Add --exclude-libs.
866 (gld${EMULATION_NAME}_handle_option): Handle --exclude-libs.
867 * ld.texinfo (Command Line Variables): Document --exclude-libs.
868 (Options Specific to i386 PE Targets): Remove --exclude-libs.
870 2004-10-15 Alan Modra <amodra@bigpond.net.au>
872 * ldexp.c (exp_fold_tree): Don't immediately exit ld on a
873 failing link script assert.
875 * ldctor.c (ldctor_add_set_entry): Fix comment typo.
877 2004-10-14 H.J. Lu <hongjiu.lu@intel.com>
880 * emulparams/elf64_ia64.sh (SMALL_DATA_CTOR): Set.
881 (SMALL_DATA_DTOR): Set.
882 * emulparams/elf64_ia64_fbsd.sh (SMALL_DATA_CTOR): Unset.
883 (SMALL_DATA_DTOR): Unset.
884 * scripttempl/elf.sc: If SMALL_DATA_CTOR is set, move .ctors
885 after .data. If SMALL_DATA_DTOR is set, move .dtors after
888 2004-10-14 Alan Modra <amodra@bigpond.net.au>
891 * ldlang.h (lang_output_section_statement_type): Make "next" a
892 struct lang_output_section_statement_struct *.
893 (struct orphan_save): Move from elf32.em. Add "name" and "flags".
894 (lang_output_section_find_by_flags, lang_insert_orphan): Declare.
895 * ldlang.c (lang_output_section_find_1): Adjust for changed
896 output_section_statement "next".
897 (strip_excluded_output_sections): Likewise.
898 (lang_record_phdrs): Likewise.
899 (lang_output_section_find_by_flags): New function.
900 (output_prev_sec_find): Move from pe.em. Adjust iterator.
901 (lang_insert_orphan): New function. Tail end of elf32.em's
902 place_orphan merged with that from pe.em. Allow bfd_section to
903 be placed first. New heuristic for placing new output section
904 statement in existing script, and accompanying split of __start
905 symbol alignment into a separate assignment to dot.
906 (lang_add_section): Consistently use output->bfd_section rather than
907 an alias, section->output_section.
908 (map_input_to_output_sections): Rename overly long arg. Move
909 initialization of data_statement output section to here..
910 (lang_check_section_addresses): ..from here.
911 (print_assignment): Correct printing of etree_assert.
912 (print_all_symbols): Don't bomb if userdata is NULL.
913 (IGNORE_SECTION): Rearrange.
914 * emultempl/elf32.em (output_rel_find): Adjust interator.
915 (output_prev_sec_find): Delete.
916 (struct orphan_save): Delete.
917 (gld${EMULATION_NAME}_place_orphan): Cater for zero bfd_section
918 flags without creating a duplicate output section statement.
919 Revise code holding history of various orphan section placements.
920 Allow orphan sections to place before script specified output
921 sections. Call lang_output_section_find_by_flags when placement
922 by name fails. Use lang_insert_orphan.
923 * emultempl/mmo.em (output_prev_sec_find): Delete.
924 (struct orphan_save): Delete.
925 (mmo_place_orphan): Revise code holding history of orphan placement.
926 Allow orphans to place before existing output sections. Use
928 * emultempl/pe.em (output_prev_sec_find): Delete.
929 (struct orphan_save): Delete.
930 (gld_${EMULATION_NAME}_place_orphan): Revise to suit use of
933 2004-10-13 Mark Mitchell <mark@codesourcery.com>
935 * scripttempl/armbpabi.sc: Do not put .gnu.version.* into a
938 2004-10-13 Alan Modra <amodra@bigpond.net.au>
941 * ldcref.c (check_section_sym_xref): Delete.
942 (check_local_sym_xref): New function.
943 (check_nocrossrefs): Adjust call.
944 * emultempl/pe.em (struct orphan_save): Add os_tail.
945 (place_orphan): Backport assorted fixes from elf32.em.
947 2004-10-12 Bob Wilson <bob.wilson@acm.org>
949 * emultempl/xtensaelf.em: Use ISO C90 formatting.
951 2004-10-11 Jakub Jelinek <jakub@redhat.com>
953 * emultempl/elf32.em (gld${EMULATION_NAME}_parse_ld_so_conf): Avoid
954 getline for portability.
956 * emultempl/elf32.em (gld${EMULATION_NAME}_ld_so_conf): New structure.
957 (gld${EMULATION_NAME}_parse_ld_so_conf,
958 gld${EMULATION_NAME}_parse_ld_so_conf_include): New functions.
959 (gld${EMULATION_NAME}_check_ld_so_conf): Use them.
961 2004-10-11 Alan Modra <amodra@bigpond.net.au>
964 * ldfile.c (ldfile_try_open_bfd): Ensure dynamic objects are
965 rejected when linking statically.
967 2004-10-08 Daniel Jacobowitz <dan@debian.org>
969 * configure.tgt: Include elf_x86_64 for i[3-7]86-*-solaris2*.
971 2004-10-07 Bob Wilson <bob.wilson@acm.org>
973 * ld.texinfo (Xtensa): Describe new linker relaxation to optimize
974 assembler-generated longcall sequences. Describe new --size-opt
976 * emulparams/elf32xtensa.sh (OTHER_SECTIONS): Add .xt.prop section.
977 * emultempl/xtensaelf.em (remove_section,
978 replace_insn_sec_with_prop_sec, replace_instruction_table_sections,
979 elf_xtensa_after_open): New.
980 (OPTION_OPT_SIZEOPT, OPTION_LITERAL_MOVEMENT,
981 OPTION_NO_LITERAL_MOVEMENT): Define.
982 (elf32xtensa_size_opt, elf32xtensa_no_literal_movement): New globals.
983 (PARSE_AND_LIST_LONGOPTS): Add size-opt and [no-]literal-movement.
984 (PARSE_AND_LIST_OPTIONS): Add --size-opt.
985 (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_OPT_SIZEOPT,
986 OPTION_LITERAL_MOVEMENT, and OPTION_NO_LITERAL_MOVEMENT.
987 (LDEMUL_AFTER_OPEN): Set to elf_xtensa_after_open.
988 * scripttempl/elfxtensa.sc: Update with changes from elf.sc.
989 * Makefile.am (eelf32xtensa.c): Update dependencies.
990 * Makefile.in: Regenerate.
992 2004-10-07 Jeff Baker <jbaker@qnx.com>
994 * lexsup.c: Handle --warn-shared-textrel option.
995 (ld_options): Restore alpha sorting of options.
996 * ldmain.c (main): Initialise warn_shared_info field to FALSE.
997 * ld.texinfo: Add documentation for --warn-shared-textrel.
998 * NEWS: Added mention of --warn-shared-textrel option.
1000 2004-10-05 Tomer Levi <Tomer.Levi@nsc.com>
1002 * emultempl/crxelf.em (disable_relaxation): Add.
1003 (crxelf_before_allocation): Enable --relax option by default.
1004 (PARSE_AND_LIST_PROLOGUE): Add OPTION_NO_RELAX.
1005 (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --no-relax.
1006 (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_NO_RELAX.
1008 2004-10-04 H.J. Lu <hongjiu.lu@intel.com>
1010 * NEWS: Mention SORT_BY_NAME, SORT_BY_ALIGNMENT and
1011 --sort-section name|alignment.
1013 * ld.texinfo: Document SORT_BY_NAME, SORT_BY_ALIGNMENT and
1014 --sort-section name|alignment.
1016 * ld.h (sort_type): New enum.
1017 (wildcard_spec): Change the type of `sorted' to sort_type.
1019 * ldgram.y (SORT): Removed.
1020 (SORT_BY_NAME): Added.
1021 (SORT_BY_ALIGNMENT): Added.
1022 (wildcard_spec): Updated `sorted'. Handle SORT_BY_NAME and
1024 (input_section_spec_no_keep): Updated `sorted'.
1025 (statement): Replace SORT with SORT_BY_NAME.
1027 * ldlang.c (compare_section): New function to compare 2
1028 sections with different sorting schemes.
1029 (wild_sort): Updated. Use compare_section.
1030 (update_wild_statements): New function.
1031 (lang_process): Call update_wild_statements before
1032 map_input_to_output_sections.
1034 * ldlex.l (SORT_BY_NAME): New.
1035 (SORT_BY_ALIGNMENT): New.
1036 (SORT): Return SORT_BY_NAME.
1038 * ldmain.c (sort_section): New. Defined.
1039 (main): Initialize it to none.
1041 * lexsup.c (option_values): Add OPTION_SORT_SECTION.
1042 (ld_options): Add an entry for OPTION_SORT_SECTION.
1043 (parse_args): Handle OPTION_SORT_SECTION.
1045 * mri.c (mri_draw_tree): Updated `sorted'.
1047 2004-10-04 Jakub Jelinek <jakub@redhat.com>
1049 * ldgram.y (DATA_SEGMENT_RELRO_END): Add one argument.
1050 * scripttempl/elf.sc (DATA_SEGMENT_RELRO_END): Add 0 as first
1052 (DATA_SEGMENT_RELRO_GOTPLT_END): Pass $SEPARATE_GOTPLT as first
1053 and . as second argument.
1054 (GOTPLT): Move $DATA_SEGMENT_RELRO_GOTPLT_END before the section.
1055 * ldexp.c (fold_unary): Remove DATA_SEGMENT_RELRO_END handling here.
1056 (fold_binary): Add it here. Insert padding to make relro_end
1057 COMMONPAGESIZE bytes aligned. For DATA_SEGMENT_ALIGN in
1058 exp_dataseg_relro_adjust phase just use previously computed
1060 * ldlang.c (lang_size_sections): Set exp_data_seg.base for
1061 relro_adjust here. Call lang_size_sections_1 once more if there
1062 was too big padding at DATA_SEGMENT_RELRO_END.
1063 * ld.texinfo (DATA_SEGMENT_RELRO_END): Add documentation.
1065 2004-10-01 Paul Brook <paul@codesourcery.com>
1067 * emulparams/armelf.sh: Add unwinding table sections.
1069 2004-09-30 Filip Navara <navaraf@reactos.com>
1071 * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Generate
1072 correct base address for position independant executables.
1073 * pe-dll.c (pe_dll_fill_sections): Don't mark position independant
1074 executables as DLLs.
1076 2004-09-30 Paul Brook <paul@codesourcery.com>
1078 * ld.texinfo: Document --target2=abs.
1079 * emulparms/armsymbian.sh (TARGET2_TYPE): Set.
1081 2004-09-29 Nick Clifton <nickc@redhat.com>
1083 * scripttempl/xstormy16.sc: Only perform the assignments to the
1084 ROM region when not performing a relocatable link. The ROM region
1085 does not start at address 0, but the sections will.
1086 * Makefile.am: Fix linker script dependency for the generation of
1088 * Makefile.in: Regenerate.
1090 2004-09-18 Filip Navara <navaraf@reactos.com>
1092 * emulparams/arm_epoc_pe.sh, emulparams/armpe.sh, emulparams/i386pe.sh,
1093 emulparams/i386pe_posix.sh, emulparams/mcorepe.sh,
1094 emulparams/mipspe.sh, emulparams/ppcpe.sh, scripttempl/pe.sc: Define
1096 * scripttempl/pe.sc: Make the virtual address and file offset synced if
1097 the alignment is lower than the target page size.
1099 2004-09-27 Filip Navara <navaraf@reactos.com>
1101 * emultempl/pe.em (gld_${EMULATION_NAME}_unrecognized_file): Allow
1102 def_file_parse to handle pe_def_file if NULL and prevent crash with
1105 2004-09-27 Alan Modra <amodra@bigpond.net.au>
1107 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Enable
1108 --emit-stub-syms automatically when --emit-relocs.
1110 2004-09-24 Paul Brook <paul@codeosurcery.com>
1112 * scripttempl/elf.sc: Keep .preinit_array, .init_array and
1113 .fini_array sections.
1115 2004-09-19 Andreas Schwab <schwab@suse.de>
1117 * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Adjust data segment
1118 base so that relro end is suitably aligned.
1120 2004-09-17 Paul Brook <paul@codesourcery.com>
1122 * ld.texinfo: Rename arm-specific section. Document --target*
1123 * emulparams/armelf_fbsd.sh: Set TARGET2_TYPE.
1124 * emulparams/armelf_linux.sh: Ditto.
1125 * emulparams/armelf_nbsd.sh: Ditto.
1126 * emultempl/armelf.em: Set default for TARGET2_TYPE.
1127 (target2_type): New variable.
1128 (arm_elf_before_allocation): Don't pass target1_type.
1129 (arm_elf_create_output_section_statements): New function.
1130 (PARSE_AND_LIST_PROLOGUE): Add OPTION_TARGET2.
1131 (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --target=.
1132 (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_TARGET2.
1133 (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Set.
1134 * emultempl/armelf_oabi.em (_before_allocation): Remove extra
1135 argument to bfd_elf32_arm_process_before_allocation.
1137 2004-09-17 Alan Modra <amodra@bigpond.net.au>
1139 * ldexp.c (fold_name): Update u.undef.next refs.
1140 * emultempl/pe.em: Likewise.
1141 * emultempl/sunos.em: Likewise.
1143 2004-09-17 Alan Modra <amodra@bigpond.net.au>
1145 * Makefile.am: Run "make dep-am".
1146 * Makefile.in: Regenerate.
1147 * config.in: Regenerate.
1148 * configure: Regenerate.
1149 * aclocal.m4: Regenerate.
1150 * po/ld.pot: Regenerate.
1152 2004-09-16 Tomer Levi <Tomer.Levi@nsc.com>
1154 * scripttempl/elf32crx.sc (.init): Add KEEP for section's *personality*.
1158 2004-09-16 Alan Modra <amodra@bigpond.net.au>
1160 * emultempl/armelf_oabi.em (before_allocation): Add extra zero param
1161 to bfd_elf32_arm_process_before_allocation call.
1163 2004-09-13 Paul Brook <paul@codesourcery.com>
1165 * emulparams/armsymbian.sh: Set TARGET1_IS_REL.
1166 * emultempl/armelf.em: Use TARGET1_IS_REL. Add --target1-{rel,abs}.
1168 2004-09-07 H.J. Lu <hongjiu.lu@intel.com>
1170 * configure: Regenerated with autconfig 2.13.
1172 2004-09-07 Andreas Schwab <schwab@suse.de>
1174 * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Apply data segment
1175 alignment before adjusting DATA_SEGMENT_RELRO_END.
1177 2004-09-06 Mark Mitchell <mark@codesourcery.com>
1179 * emulparams/armsymbian.sh: Use armbpabi script.
1180 * scripttempl/armbpabi.sc: New script.
1182 2004-09-02 Mark Mitchell <mark@codesourcery.com>
1184 * Makefile.am (ALL_EMULATIONS): Add earmsymbian.o.
1185 (earmsymbian.c): New target.
1186 * configure.tgt: Use armsymbian emulation for arm*-*-symbianelf*.
1187 * Makefile.in: Regenerated.
1188 * aclocal.m4: Likewise.
1189 * configure: Likewise.
1190 * emulparams/armsymbian.sh: New file.
1192 2004-09-03 Tomer Levi <Tomer.Levi@nsc.com>
1194 * scripttempl/elf32crx.sc: Edit file with comments.
1195 (.init): Add new section.
1197 (.ctor): Control the linkage order.
1200 2004-08-27 Nick Clifton <nickc@redhat.com>
1202 * emultempl/pe.em (after_open): Do not assume that either bfd is
1205 2004-08-26 Alan Modra <amodra@bigpond.net.au>
1207 * ldlang.c (lang_init): Don't compare with TRUE.
1209 2004-08-25 Dmitry Diky <diwil@spec.ru>
1211 * emulparams/msp430all.sh: Fix RAM sizes for all targets.
1212 * scripttempl/elf32msp430.sc: Add .profiler section definition.
1214 2004-08-24 H.J. Lu <hongjiu.lu@intel.com>
1216 * ldlang.c (wildcardp): Defined as a macro with strpbrk.
1218 2004-08-19 Mark Mitchell <mark@codesourcery.com>
1220 * configure.tgt (arm*-*-symbianelf*): New target.
1221 (arm*-*-eabi*): Likewise.
1223 2004-08-19 Jakub Jelinek <jakub@redhat.com>
1225 * emultempl/ppc64elf.em (non_overlapping_opd): New variable.
1226 (ppc_before_allocation): Pass it to ppc64_elf_edit_opd).
1227 (OPTION_NON_OVERLAPPING_OPD): Define.
1228 (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Add
1229 --non-overlapping-opd option.
1231 2004-08-18 Alan Modra <amodra@bigpond.net.au>
1234 * ldexp.c (fold_name): Don't call bfd_link_add_undef if the symbol
1235 was already on the undefs list.
1237 2004-08-17 Alan Modra <amodra@bigpond.net.au>
1239 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_new_vers_pattern): Dot
1240 prefix the symbol field too.
1242 2004-08-13 Alan Modra <amodra@bigpond.net.au>
1244 * ldmain.c (link_callbacks): Remove "error_handler".
1245 * ldmisc.c: Include elf-bfd.h.
1246 (vfinfo): Sort comment. Handle %A. Use %A instead of
1247 bfd_get_section_indent.
1248 (error_handler): Delete.
1249 * ldmisc.h (error_handler): Delete declaration.
1251 2004-08-10 Alan Modra <amodra@bigpond.net.au>
1253 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Call
1254 ppc64_elf_restore_symbols.
1256 2004-08-09 Alan Modra <amodra@bigpond.net.au>
1258 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Error if
1259 .toc is too large on relocatable linking.
1261 2004-08-09 Alan Modra <amodra@bigpond.net.au>
1263 * emultempl/ppc64elf.em (ppc_after_open): Delete.
1264 (LDEMUL_AFTER_OPEN): Don't define.
1266 2004-08-02 Stephane Carrez <stcarrez@nerim.fr>
1268 * ld.texinfo (Top): Document specific options of 68HC11 and 68HC12.
1270 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
1272 * scripttempl/elfm68hc12.sc: Align text, rodata and data section
1275 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
1277 * emulparams/hppanbsd.sh (OUTPUT_FORMAT): Set to "elf32-hppa-netbsd".
1279 2004-07-26 Dmitry Diky <diwil@spec.ru>
1281 * Makefile.am: Add new subtargets: msp430x1610, msp430x1611,
1282 msp430x1612, msp430x415, msp430x417, msp430xG437, msp430xG438,
1284 * configure.tgt: Likewise.
1285 * emulparams/msp430all.sh: Likewise.
1286 * Makefile.in: Regenerate.
1288 2004-07-23 Nick Clifton <nickc@redhat.com>
1290 * emultempl/elf32.em (_place_orphan): Use an already existing
1291 section name if that section does not have any flags set.
1293 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
1295 * ldlang.c (already_linked_hash_entry): Removed.
1296 (already_linked): Likewise.
1297 (already_linked_table): Likewise.
1298 (section_already_linked): Call bfd_section_already_linked.
1299 (lang_process): Replace already_linked_table_init with
1300 bfd_section_already_linked_table_init and check return. Replace
1301 already_linked_table_free with bfd_section_already_linked_table_free.
1303 2004-07-21 Nick Clifton <nickc@redhat.com>
1305 * ldlang.c (init_os): Make sure that the newly allocated userdata
1306 structure is zeroed out.
1308 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
1310 * NEWS: Mention the new --add-needed/--no-add-needed and
1311 --as-needed/--no-as-needed options.
1313 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
1315 * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): Also
1316 check the add_needed field.
1317 (dt_needed): New struct.
1318 (gld${EMULATION_NAME}_try_needed): Change the first argument
1319 to a pointer to struct dt_needed. Check the DYN_NO_ADD_NEEDED
1320 bit in the file where the DT_NEEDED entry comes from.
1321 (gld${EMULATION_NAME}_search_needed): Change the second
1322 argument to a pointer to struct dt_needed.
1323 (gld${EMULATION_NAME}_check_ld_so_conf): Updated.
1324 (gld${EMULATION_NAME}_after_open): Likewise.
1326 * ld.texinfo: Add --add-needed document.
1327 * ldlang.c (new_afile): Set p->add_needed.
1328 * ldlang.h (lang_input_statement_type): Add add_needed field.
1329 * ldmain.h (add_needed): Declare.
1330 * ldmain.c (add_needed): New global var.
1331 * lexsup.c (option_values): Add OPTION_ADD_NEEDED and
1332 OPTION_NO_ADD_NEEDED.
1333 (ld_options): Likewise.
1334 (parse_args): Handle them.
1336 2004-07-13 Christof Petig <christof@petig-baender.de>
1338 * emultempl/pe.em (make_import_fixup): Use bfd_get_32 to correct
1339 for endian-ness of extracted addend.
1341 2004-07-13 Danny Smith <dannysmith@usesr.sourceforge.net>
1343 * pe-dll.c (auto_export): Filter on just the import prefix,
1344 "_imp_", not "_imp__".
1346 2004-07-09 Nick Clifton <nickc@redhat.com>
1348 * configure.tgt: Change sh-sybmian-elf to sh-*-symbianelf.
1350 2004-07-06 Tomer Levi <Tomer.Levi@nsc.com>
1352 * Makefile.am (ALL_EMULATIONS): Add eelf32crx.o.
1353 (eelf32crx.c): New target.
1354 * Makefile.in: Regenerate.
1355 * configure.tgt: Handle crx-*-elf*.
1356 * emulparams/elf32crx.sh: New file.
1357 * emultempl/crxelf.em: New file.
1358 * scripttempl/elf32crx.sc: New file.
1359 * NEWS: Mention new target.
1361 2004-07-06 Nick Clifton <nickc@redhat.com>
1363 * Makefile.am: Add eshlsymbian.c.
1364 * Makefile.in: Regenerate.
1365 * configure.tgt: Add sh*-symbian-elf target.
1366 * emulparams/shlsymbian.sh: New file. Configure the
1367 sh-symbian-elf linker scripts.
1368 * scripttemp/elf32sh-symbian.sc: New file. Linker script
1369 template for the sh-symbian-elf target.
1371 2004-07-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1373 * emulparams/hppa64linux.sh: Define PLT_BEFORE_GOT.
1374 * emulparams/hppalinux.sh: Likewise.
1375 * scripttempl/elf.sc: Place .plt just before .got when .plt is in
1376 data segment and PLT_BEFORE_GOT is defined.
1378 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
1380 * ld.texinfo (WIN32): Document PE weak symbols.
1382 2004-07-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1384 * emulparams/shlelf32_linux.sh (COMMONPAGESIZE): Set to 4KB.
1386 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
1388 * ldmisc.c (vfinfo): Call bfd_get_section_ident to identify
1391 2004-06-29 Alan Modra <amodra@bigpond.net.au>
1393 * ldlang.c (lang_reset_memory_regions): Save last relax pass section
1396 2004-06-24 Alan Modra <amodra@bigpond.net.au>
1398 * ldlang.c (print_output_section_statement): Don't print size before
1400 (IGNORE_SECTION): Remove bfd arg. Update all callers.
1402 * ldexp.c (fold_name): .. See below.
1403 * ldlang.c (section_already_linked, print_output_section_statement,
1404 print_input_section, insert_pad, size_input_section,
1405 lang_check_section_addresses, lang_size_sections_1,
1406 lang_size_sections, lang_do_assignments_1, lang_set_startof,
1407 lang_one_common, lang_reset_memory_regions, lang_process,
1408 lang_abs_symbol_at_end_of, lang_do_version_exports_section): ..
1409 * ldwrite.c (build_link_order, clone_section, ds, split_sections): ..
1410 * pe-dll.c (process_def_file, generate_reloc): ..
1411 * emultempl/elf32.em (gld${EMULATION_NAME}_find_statement_assignment,
1412 gld${EMULATION_NAME}_before_allocation): ..
1413 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): ..
1414 * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation,
1415 sh64_elf_${EMULATION_NAME}_after_allocation): ..
1416 * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): ..
1417 * emultempl/xtensaelf.em (ld_assign_relative_paged_dot,
1418 ld_local_file_relocations_fit, ld_xtensa_insert_page_offsets): Use
1419 "size" instead of "_raw_size" and "_cooked_size". Expand
1420 bfd_section_size macro invocations.
1422 2004-06-22 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
1424 * ld/scripttemp/pe.sc (.CRT): Define ___crt_xc_start__,
1425 ___crt_xc_end__, ___crt_xi_start__, ___crt_xi_end__, ___crt_xl_start__,
1426 ___crt_xp_start__, ___crt_xp_end__, ___crt_xt_start__ and
1428 (.tls): Define ___tls_start__ and ___tls_end__.
1430 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
1432 * emulparams/elf32frvfd.sh (GENERATE_PIE_SCRIPT): Set to yes.
1434 2004-06-18 Adam Nemet <anemet@lnxw.com>
1436 * configure.in: Set EXTRA_SHLIB_EXTENSION to .a for LynxOS.
1437 * configure: Regenerate.
1439 2004-06-15 Jakub Jelinek <jakub@redhat.com>
1441 * scripttempl/elf.sc: Readd KEEP and .gcc_except_table.* to
1442 .gcc_except_table output sections lost accidentally with
1445 2004-06-15 Alan Modra <amodra@bigpond.net.au>
1447 * ldwrite.c (build_link_order): Use bfd_get_section_size
1448 instead of bfd_get_section_size_before_reloc or _raw_size.
1449 * pe-dll.c (process_def_file): Likewise.
1451 2004-06-14 Alan Modra <amodra@bigpond.net.au>
1453 From Richard Wirth <r.wirth@wirthware.de>
1454 * ldlang.c (lang_finish): Don't free lang_definedness_table.
1456 2004-05-29 Alan Modra <amodra@bigpond.net.au>
1458 * ldlang.c (gc_section_callback): Move SEC_EXCLUDE twiddles..
1459 (lang_gc_sections): .. to a LANG_FOR_EACH_INPUT_STATEMENT loop here.
1461 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
1463 * testsuite/ld-sh/arch/arch.exp: New test script.
1464 * testsuite/ld-sh/arch/arch_expected.txt: New file.
1465 * testsuite/ld-sh/arch/sh.s: New file.
1466 * testsuite/ld-sh/arch/sh2.s: New file.
1467 * testsuite/ld-sh/arch/sh-dsp.s: New file.
1468 * testsuite/ld-sh/arch/sh2e.s: New file.
1469 * testsuite/ld-sh/arch/sh3-nommu.s: New file.
1470 * testsuite/ld-sh/arch/sh3.s: New file.
1471 * testsuite/ld-sh/arch/sh3-dsp.s: New file.
1472 * testsuite/ld-sh/arch/sh3e.s: New file.
1473 * testsuite/ld-sh/arch/sh4-nommu-nofpu.s: New file.
1474 * testsuite/ld-sh/arch/sh4-nofpu.s: New file.
1475 * testsuite/ld-sh/arch/sh4.s: New file.
1476 * testsuite/ld-sh/arch/sh4a-nofpu.s: New file.
1477 * testsuite/ld-sh/arch/sh4al-dsp.s: New file.
1478 * testsuite/ld-sh/arch/sh4a.s: New file.
1480 2004-05-28 Alan Modra <amodra@bigpond.net.au>
1482 * ldlang.c: Formatting. Wrap long lines, expand bfd_get_section_flags
1484 * lexsup.c: Formatting. Wrap long lines.
1485 * ldwrite.c: Update copyright date.
1487 * ldlang.c (lang_add_section): Don't twidlle SEC_EXCLUDE here.
1488 (output_section_callback): Nor SEC_KEEP here.
1489 (gc_section_callback): Twiddle SEC_EXCLUDE here.
1490 (lang_gc_wild): Delete. Fold into..
1491 (lang_gc_sections_1): ..here. Only call bfd_gc_sections when garbage
1493 (lang_process): Always call lang_gc_sections.
1494 (lang_place_orphans): Handle SEC_EXCLUDE sections.
1495 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Remove
1498 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
1500 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Clear
1501 SEC_EXCLUDE on non-SEC_DEBUGGING sections for relocatable link.
1502 * ldlang.c (lang_add_section): Likewise.
1504 2004-05-26 Alan Modra <amodra@bigpond.net.au>
1506 * ldlang.c (lang_add_section): Set SEC_EXCLUDE for SEC_GROUP
1507 sections when doing a final link. Clear SEC_EXCLUDE when doing
1508 a relocable link, except for SEC_DEBUGGING sections.
1509 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Use the
1510 same condition here to drop SEC_EXCLUDE orphan sections.
1512 2004-05-25 Alan Modra <amodra@bigpond.net.au>
1514 * ldlang.c (lang_process): Call bfd_merge_sections later, and
1515 only when not a relocatable link.
1516 (print_input_section): Handle SEC_EXCLUDE sections.
1517 (size_input_section): Don't update dot on SEC_EXCLUDE sections.
1518 (lang_do_assignments_1): Likewise.
1519 * ldwrite.c (build_link_order): Ignore SEC_EXCLUDE input sections.
1520 * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Likewise.
1521 * emultempl/hppaelf.em (build_section_lists): Likewise.
1522 * emultempl/ppc64elf.em (build_toc_list): Likewise.
1523 (build_section_lists): Likewise.
1525 2004-05-23 Andreas Schwab <schwab@suse.de>
1527 * ld.texinfo (Options): Fix typo in last change.
1529 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
1531 * ld.h (ld_config_type): Add new field: hash_table_size.
1532 * ldmain.c: Initialise the new field to zero. If it is non-zero
1533 after parsing the linker's command line call
1534 bfd_hash_set_default_size.
1535 * lexsup.c (option_values): Add OPTION_HASH_SIZE.
1536 (ld_options): Add hash-size.
1537 (parse_args): Parse --hash-size option. Allow
1538 --reduce-memory-overheads to set the default hash table size as
1540 * ld.texinfo: Document the new switch. Also mention that
1541 --reduce-memory-overheads can affect the hash table size.
1542 * NEWS: Mention the new feature.
1544 2004-05-19 J"orn Rennecke <joern.rennecke@superh.com>
1546 * NEWS: Mention new linker map file generation and the
1547 --reduce-memory-overheads option.
1548 * ld.texinfo: Document --reduce-memory-overheads option.
1549 * ld.h (map_symbol_def): New struct.
1550 (struct user_section_struct, section_userdata_type): Rename to:
1551 (struct lean_user_section_struct, lean_section_userdata_type).
1552 (struct fat_user_section_struct, fat_section_userdata_type): New.
1553 (SECTION_USERDATA_SIZE): Define.
1554 (args_type): New member reduce_memory_overheads.
1555 * ldlang.c (map_obstack): New static variable.
1556 (init_map_userdata, print_all_symbols, sort_def_symbol): New functions.
1557 (lang_map): Unless command_line.reduce_memory_overheads is set,
1558 initialize lists of defined symbols for each section.
1559 (print_input_section): Unless command_line.reduce_memory_overheads
1560 is set, use print_all_symbols.
1561 (init_os): Use lean_section_userdata_type / SECTION_USERDATA_SIZE.
1562 * ldmain.c (main): Initialize command_line.reduce_memory_overheads.
1563 * lexsup.c (enum option_values): Add OPTION_REDUCE_MEMORY_OVERHEADS.
1564 (ld_options): Add entry for --reduce-memory-overheads.
1565 (parse_args): Handle OPTION_REDUCE_MEMORY_OVERHEADS.
1567 2004-05-19 Jakub Jelinek <jakub@redhat.com>
1569 * ldgram.y (sect_constraint): New.
1570 (ONLY_IF_RO, ONLY_IF_RW): New tokens.
1571 (section): Add sect_constraint. Pass additional argument
1572 to lang_enter_output_section_statement.
1573 * mri.c (mri_draw_tree): Pass additional argument to
1574 lang_enter_output_section_statement.
1575 * emultempl/pe.em (place_orphan): Likewise.
1576 (output_prev_sec_find): Disregard output section statements with
1578 * emultempl/mmo.em (output_prev_sec_find): Likewise.
1579 (mmo_place_orphan): Pass additional argument to
1580 lang_enter_output_section_statement.
1581 * emultempl/elf32.em (output_prev_sec_find): Disregard output section
1582 statements with constraint == -1.
1583 (place_orphan): Pass additional argument to
1584 lang_enter_output_section_statement.
1585 * ldlang.c (lang_enter_overlay_section): Likewise.
1586 (lang_output_section_find_1): New.
1587 (lang_output_section_find): Use it.
1588 (lang_output_section_statement_lookup_1): New.
1589 (lang_output_section_statement_lookup): Use it.
1590 (check_section_callback, check_input_sections): New.
1591 (map_input_to_output_sections): Check if all input sections
1592 are readonly if ONLY_IF_RO or ONLY_IF_RW was seen.
1593 (strip_excluded_output_sections): Disregard output section statements
1594 with constraint == -1.
1595 (lang_record_phdrs): Likewise.
1596 (lang_enter_output_section_statement): Add constraint argument.
1597 Use lang_output_section_statement_lookup_1.
1598 * ldlang.h (lang_output_section_statement_type): Add constraint
1599 and all_input_readonly fields.
1600 (lang_enter_output_section_statement): Adjust prototype.
1601 * ldlex.l (ONLY_IF_RO, ONLY_IF_RW): New tokens.
1602 * scripttempl/elf.sc (.eh_frame, .gcc_except_table): Move into text
1603 segment if all input sections are readonly.
1605 2004-05-19 Adam Nemet <anemet@lnxw.com>
1607 * scripttempl/i386lynx.sc: Remove file.
1609 2004-05-17 Bob Wilson <bob.wilson@acm.org>
1611 * ld.texinfo (Output Section Address): Correct subsection name.
1613 2004-05-17 Adam Nemet <anemet@lnxw.com>
1615 * configure.tgt (powerpc-*-lynxos* case): New case.
1616 * configure.host (i[3-7]86-*-lynxos* case): Remove case.
1617 * emulparams/ppclynx.sh: New file.
1618 * emulparams/i386lynx.sh (SCRIPT_NAME): Update to LynxOS 4.0.
1619 * Makefile.am (ALL_EMULATIONS): Add eppclynx.o
1620 (ei386lynx.c): Update rule to LynxOS 4.0 ELF.
1621 (eppclynx.c): New rule.
1622 * Makefile.in: Regenerate.
1624 2004-05-13 Joel Sherrill <joel@oarcorp.com>
1626 * configure.tgt (or32-*-rtems*): Switch to elf and
1627 support versioned targets.
1629 2004-05-13 Nick Clifton <nickc@redhat.com>
1631 * po/fr.po: Updated French translation.
1633 2004-05-11 Jakub Jelinek <jakub@redhat.com>
1635 * genscripts.sh: Generate -z combreloc -z now -z relro scripts
1636 for binaries, -shared and -pie.
1637 * emulparams/elf_i386.sh (SEPARATE_GOTPLT): Set.
1638 * emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Set.
1639 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Rename to...
1640 (OTHER_RELRO_SECTIONS): ... this.
1641 * ldlex.l (DATA_SEGMENT_RELRO_END): Add.
1642 * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
1643 -z relro and -z norelro.
1644 (gld${EMULATION_NAME}_list_options): Add it to usage.
1645 (gld${EMULATION_NAME}_get_script): Return -z combreloc -z now
1646 -z relro scripts when appropriate.
1647 * scripttempl/elf.sc: Unset SEPARATE_GOTPLT if RELRO_NOW is set.
1648 Create separate .got.plt section if SEPARATE_GOTPLT.
1649 Move sections which are only written during relocation handling
1650 to the beginning of RW segment. If NO_SMALL_DATA, move .got
1651 before .data. Add DATA_SEGMENT_RELRO_END directive.
1652 Include OTHER_RELRO_SECTIONS.
1653 * ldgram.y (DATA_SEGMENT_RELRO_END): Add.
1654 * ldexp.c (exp_print_token): Handle DATA_SEGMENT_RELRO_END.
1655 (fold_unary): Likewise.
1656 (fold_binary): Handle -z relro.
1657 * ldexp.h (struct exp_data_seg): Add exp_dataseg_relro_seen and
1658 exp_dataseg_relro_adjust phases. Add relro_end field.
1659 * ldmain.c (main): Initialize link_info.relro to FALSE.
1660 * ldlang.c (lang_size_sections): Handle -z relro.
1662 2004-05-08 Marek Michalkiewicz <marekm@amelek.gda.pl>
1664 * scripttempl/avr.sc: Do not set LMA for "eeprom" section.
1666 2004-05-07 J"orn Rennecke <joern.rennecke@superh.com>
1668 * ldlang.c (print_padding_statement): Cast size_t to bfd_vma
1669 before printing it with %W.
1671 2004-05-07 Brian Ford <ford@vss.fsi.com>
1672 DJ Delorie <dj@redhat.com>
1674 * emultempl/pe.em (real_flags): New static.
1675 (OPTION_LARGE_ADDRESS_AWARE): New define.
1676 (gld${EMULATION_NAME}_add_options): Add --large-address-aware option.
1677 (gld_${EMULATION_NAME}_list_options): Likewise.
1678 (gld${EMULATION_NAME}_handle_option): Likewise.
1679 (gld_${EMULATION_NAME}_after_open): Pass real_flags to PE private data.
1680 * ld.texinfo: Document it.
1683 2004-05-07 Brian Ford <ford@vss.fsi.com>
1685 * NEWS: Mention DWARF 2 support for i386pe.
1687 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
1689 * emulparams/elf32frvfd.sh (OUTPUT_FORMAT): Switch to new
1692 2004-04-30 Alan Modra <amodra@bigpond.net.au>
1694 * ldlang.c (unique_section_p): Pass section parm, return true on
1696 (output_section_callback): Adjust.
1697 * ldlang.h (unique_section_p): Update prototype.
1698 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust.
1700 2004-04-30 Eric Botcazou <ebotcazou@act-europe.fr>
1702 * ld.texinfo (--gc-sections): Remove restriction for
1705 2004-04-29 Brian Ford <ford@vss.fsi.com>
1707 * scripttempl/pe.sc: Handle .debug* and .gnu.linkonce.wi.* sections
1708 for DWARF 2/3. Update stab section's syntax.
1710 2004-04-29 Alan Modra <amodra@bigpond.net.au>
1712 * pe-dll.c: Revert changes accidentally committed 2004-03-08.
1713 (fill_edata): Correct pointer arithmetic.
1715 2004-04-21 Chris Demetriou <cgd@broadcom.com>
1717 * ld.texinfo: Remove MIPS --embedded-relocs documentation.
1718 * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Remove definition.
1719 * emulparams/mipsidt.sh (TEMPLATE_NAME): Use generic.em.
1720 (EXTRA_EM_FILE): Use mipsecoff.em
1721 * emulparams/mipsidtl.sh (TEMPLATE_NAME): Use generic.em.
1722 (EXTRA_EM_FILE): Use mipsecoff.em
1723 * emultempl/mipsecoff.em: Restructure to be included as an
1724 extra emulation file.
1725 (check_sections, gld${EMULATION_NAME}_after_open)
1726 (gld${EMULATION_NAME}_after_allocation)
1727 (gld${EMULATION_NAME}_get_script)
1728 (ld_${EMULATION_NAME}_emulation): Remove
1729 (gld${EMULATION_NAME}_before_parse): Rename to...
1730 (mipsecoff_before_parse): This.
1731 (LDEMUL_BEFORE_PARSE): Define.
1732 * emultempl/mipself.em: Remove file.
1733 * scripttempl/mips.sc (.rel.sdata): Do not include in output.
1734 (__runtime_reloc_start, __runtime_reloc_stop): Stop providing
1736 * Makefile.am: Remove dependencies on emultempl/mipself.em.
1737 * Makefile.in: Regenerate.
1739 2004-04-21 Anil Paranjpe <anilp1@kpitcummins.com>
1741 * ld.texinfo (synthesizing on H8/300): Information about linker
1742 relaxation support for bit manipulation instructions and system
1743 control instructions is added.
1745 2004-04-21 Hans-Peter Nilsson <hp@axis.com>
1747 * NEWS: Mention change in DEFINED semantics.
1749 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
1751 * scripttempl/elf.sc (.text): Add KEEP for .text.*personality*.
1752 (.data): Add KEEP for .gnu.linkonce.d.*personality*.
1753 (.gcc_except_table): Add KEEP for self and accept .gcc_except_table.*.
1755 2004-04-21 Ben Elliston <bje@au.ibm.com>
1757 * ld.texinfo (Simple Example): Add missing punctuation.
1759 2004-04-20 Chris Demetriou <cgd@broadcom.com>
1761 * NEWS: Note that MIPS --embedded-relocs option is deprecated.
1763 2004-04-19 Jakub Jelinek <jakub@redhat.com>
1765 * ldlang.c (lang_do_assignments_1): Handle .tbss output section
1768 2004-04-18 Danny Smith <dannysmith@users.sourceforge.net>
1770 * scriptempl/pe.sc: Put numbered .ctors.* after .ctors
1771 with default priority. Likewise for dtors.
1773 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1775 * configure.host: Remove mips*-dec-bsd* target.
1776 * configure.tgt: Likewise.
1778 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
1780 * emulparams/elf32bsmip.sh (EXTRA_EM_FILE): Define to irix.
1781 * emulparams/elf64bmip.sh (EXTRA_EM_FILE): Likewise.
1782 * emulparams/elf32bmipn32.sh (EXTRA_EM_FILE): Likewise.
1783 * emultempl/irix.em: New file.
1784 * Makefile.am (eelf32bsmip.c, eelf32bmipn32.c, eelf64bmip.c): Update
1786 * Makefile.in: Regenerate.
1788 2004-04-01 Paul Brook <paul@codesourcery.com>
1790 * emultempl/armelf.em (byteswap_code): Add.
1791 (arm_elf_before_allocation): Pass extra parameter.
1792 (PARSE_AND_LIST_PROLOGUE): Add OPTION_BE8.
1793 (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add be8.
1794 (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_BE8.
1795 * emultempl/armelf_oabi.em: Pass extra parameter.
1796 * ld.texinfo: Document --be8.
1798 2004-03-30 Stan Shebs <shebs@apple.com>
1800 Remove long-obsolete MPW support.
1801 * mpw-config.in, mpw-make.sed, mac-ld.r: Remove files.
1802 * Makefile.am (mpw): Remove file-presynthesizing actions.
1803 * Makefile.in: Likewise.
1804 * ldfile.c (slash): Remove MPW case.
1805 * ldlex.l [MPW]: Remove unused definition.
1807 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
1809 * Makefile.am (ALL_EMULATIONS): Add eelf32cr16c.o.
1810 (eelf32cr16c.c): New target.
1811 * Makefile.in: Regenerate.
1812 * configure.tgt: Handle cr16c-*-elf*.
1813 * emulparams/elf32cr16c.sh: New file.
1814 * scripttempl/elfcr16c.sc: Likewise
1815 * NEWS: Mention support for new target.
1817 2004-03-30 Nick Clifton <nickc@redhat.com>
1819 * po/sv.po: Updated Swedish translation.
1821 2004-03-27 Alan Modra <amodra@bigpond.net.au>
1823 * emultempl/elf32.em: Update new bfd_elf_discard_info name.
1824 * emultempl/hppaelf.em: Likewise.
1825 * emultempl/ppc64elf.em: Likewise.
1826 * emultempl/sh64elf.em: Likewise.
1828 2004-03-25 Alan Modra <amodra@bigpond.net.au>
1830 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Update
1831 size_dynamic_sections call.
1833 2004-03-23 Alan Modra <amodra@bigpond.net.au>
1836 * emultempl/ppc64elf.em (ppc_create_output_section_statements): Set
1837 link_info.wrap_char.
1839 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
1841 * lexsup.c (parse_args): Don't set unresolved_syms_in_objects
1842 or unresolved_syms_in_shared_libs for -Bdynamic and -Bstatic.
1844 2004-03-20 Alexandre Oliva <aoliva@redhat.com>
1846 * emulparams/elf32frvfd.sh (MAXPAGESIZE): Change to 16Kb.
1848 2004-03-19 Alan Modra <amodra@bigpond.net.au>
1850 * config.in: Regenerate.
1851 * po/ld.pot: Regenerate.
1853 2004-03-18 Alan Modra <amodra@bigpond.net.au>
1855 * ld.texinfo: Add --as-needed doco.
1856 * ldmain.c (as_needed): New global var.
1857 * ldmain.h (as_needed): Declare.
1858 * lexsup.c (option_values): Add OPTION_AS_NEEDED and
1859 OPTION_NO_AS_NEEDED.
1860 (ld_options): Likewise.
1861 (parse_args): Handle them.
1862 * ldlang.h (lang_input_statement_type): Add as_needed field.
1863 * ldlang.c (new_afile): Set p->as_needed.
1864 * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): New function.
1865 (gld${EMULATION_NAME}_try_needed): Use bfd_elf_set_dyn_lib_class.
1866 (ld_${EMULATION_NAME}_emulation): Set LDEMUL_RECOGNIZED_FILE entry.
1868 * ldlang.c (open_input_bfds): Remove useless cast.
1869 (lang_do_assignments_1): Likewise.
1870 (lang_for_each_input_section): Delete.
1872 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1874 * configure.tgt: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
1876 2004-03-08 Danny Smith <dannysmith@users.sourceforge.net>
1878 * pe-dll.c (pe_dll_generate_implib): Skip sections marked as
1879 private when building implib.
1881 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
1883 * ldlang.c (lang_add_section): Don't force SEC_LOAD on
1885 (IGNORE_SECTION): Ignore .tbss sections too.
1886 (lang_size_sections_1): .tbss sections do not advance dot.
1888 2004-03-01 Andreas Schwab <schwab@suse.de>
1890 * ld.texinfo (Options): Fix example for --wrap.
1892 2004-02-25 Danny Smith <dannysmith@users.sourceforge.net>
1894 * pe-dll.c (fill_edata): Check that exported_symbol_sections is
1897 2004-02-23 Ian Lance Taylor <ian@wasabisystems.com>
1899 * ldlang.c (lang_check): Use %P, not %E, in error message.
1901 2004-02-23 Nathan Sidwell <nathan@codesourcery.com>
1903 * ldlang.h (struct lang_output_section_state): Change processed
1905 * ldexp.c (check, invalid): Remove.
1906 (fold_name): Move valid_p assignments. Create undefined symbol
1907 when needed. Directly exampine section's processd flag.
1908 * ldlang.c (lang_output_section_statement_lookup): Adjust
1909 processed field init.
1910 (lang_size_sections_1): Allow LOADADDR when determining section's
1911 VMA. Adjust error message. Fold data statement's expr.
1912 (lang_size_sections): Correctly increment lang_statement_iteration.
1914 2004-02-23 Alan Modra <amodra@bigpond.net.au>
1916 * ldexp.c (fold_tree): Follow indirect symbols.
1918 2004-02-20 Nathan Sidwell <nathan@codesourcery.com>
1920 * ldgram.y (exp): Add two operand ALIGN.
1921 * ldexp.c (fold_binary): Add ALIGN_K case.
1922 * ld.texinfo (ALIGN): Document two operand version.
1924 2004-02-19 Nathan Sidwell <nathan@codesourcery.com>
1926 * ldlang.c (map_input_to_output_sections): Initialize sections
1927 mentioned in a data statement expression.
1928 (lang_do_assignments_1): Add data statement's expression's
1931 2004-02-18 Nathan Sidwell <nathan@codesourcery.com>
1933 * ldgram.y (statement_anywhere): Add assert rule.
1934 * ldlang.c (exp_init_os): Add assert case.
1936 2004-02-14 Andrew Cagney <cagney@redhat.com>
1938 * ldmain.c (remove_output): Call bfd_cache_close.
1940 2004-02-14 Richard Sandiford <rsandifo@redhat.com>
1942 * emulparams/elf32bmipn32-defs.sh (OTHER_SECTIONS): Discard
1943 .MIPS.content* and .MIPS.events* sections.
1945 2004-02-09 Daniel Jacobowitz <drow@mvista.com>
1947 * emulparams/armelf.sh, emulparams/armelf_linux.sh: Move
1948 .note.gnu.arm.ident to after allocated sections. Mark its
1951 2004-02-09 Daniel Jacobowitz <drow@mvista.com>
1953 * emulparams/armelf_linux.sh (COMMONPAGESIZE): Set to 4KB.
1954 * emulparams/elf32bmip.sh (COMMONPAGESIZE): Likewise.
1955 * emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Likewise.
1956 * emulparams/elf32btsmipn32.sh (COMMONPAGESIZE): Likewise.
1957 * emulparams/shlelf_linux.sh (COMMONPAGESIZE): Likewise.
1959 2004-02-05 Nick Clifton <nickc@redhat.com>
1961 * emultempl/pe.em (_after_open): Fix typo in previous delta.
1963 2004-02-04 Danny Smith <dannysmith@users.sourceforge.net>
1965 * emultempl/pe.em (_after_open): Fix thinko in 2003-12-18 patch.
1967 2004-01-28 Alan Modra <amodra@bigpond.net.au>
1969 * genscripts.sh: Fix typo.
1971 * genscripts.sh: Apply $LIBPATH_SUFFIX to $tool_lib and $libdir too.
1973 2004-01-24 Jakub Jelinek <jakub@redhat.com>
1975 * emulparams/elf64_ia64.sh: Put .rela.opd into
1976 OTHER_GOT_RELOC_SECTIONS instead of OTHER_PLT_RELOC_SECTIONS.
1978 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
1980 * pe-dll.c (pe_create_import_fixup): Clear WP_TEXT flag.
1981 * ld.texinfo (--omagic): Note that writable text section
1982 does not conform to published PE-COFF specs.
1983 (--enable-auto-import): Likewise.
1985 2004-01-15 Alan Modra <amodra@bigpond.net.au>
1987 * emulparams/elf32ppc.sh (COMMONPAGESIZE): Define.
1989 2004-01-13 Nick Clifton <nickc@redhat.com>
1991 * ldlang.c (lang_get_regions): Add extra parameter 'have_vma'
1992 which if true will prevent the LMA region being used as a
1993 replacement for a default VMA region.
1994 (lang_leave_output_section_statement): Pass extra parameter.
1995 (lang_leave_overlay): Likewise.
1996 * ld.texinfo (Output Section LMA): Document that the LMA
1997 region can be set to the VMA region if no VMA has been set.
1998 * ldlang.h (struct lang_output_section_phdr_list): Create a
1999 typedef for this type. Minor formatting fixes.
2001 2004-01-13 Nick Clifton <nickc@redhat.com>
2003 * ldlang.c (lang_size_sections_1): If dot is advanced, then
2004 assume that the section should be allocated.
2006 2004-01-13 Alan Modra <amodra@bigpond.net.au>
2008 * ldlang.c (IGNORE_SECTION): Don't ignore SEC_ALLOC && !SEC_LOAD
2009 sections. Do ignore SEC_NEVER_LOAD sections.
2010 (lang_size_sections_1): Remove test made redundant with the above.
2012 2004-01-09 Alan Modra <amodra@bigpond.net.au>
2014 * emultempl/ppc64elf.em (ppc_before_allocation): Clear cached
2015 program_header_size.
2017 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
2019 2003-11-28 Alexandre Oliva <aoliva@redhat.com>
2020 * emulparams/elf32frvfd.sh (EMBEDDED): Clear.
2021 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
2022 * emulparams/elf32frvfd.sh (STACK_ADDR): Unset.
2023 (MAXPAGESIZE): Set to 64Kb.
2024 (OTHER_READONLY_SECTIONS): Define __ROFIXUP_LIST__ and
2025 __ROFIXUP_END__. Don't map .rofixup.got any more.
2026 * emulparams/elf32frv.sh (NOP): Set.
2027 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
2028 * configure.tgt: Add frv-*-*linux*.
2029 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
2030 * Makefile.am (ALL_EMULATIONS): Added eelf32frvfd.o.
2031 (eelf32frvfd.c): New.
2032 * configure.tgt <frv-*-*>: Added it to targ_extra_emuls.
2033 * emulparams/elf32frv.sh: Reverted previous two patches.
2034 * emulparams/elf32frvfd.sh: New.
2035 * Makefile.in: Rebuilt.
2036 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
2037 * emulparams/elf32frv.sh (OTHER_READONLY_SECTIONS): Added
2038 .rofixup.got to .rofixup.
2039 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
2040 * emulparams/elf32frv.sh (MAXPAGESIZE): Make it 256KiB, not 256B.
2041 (TEMPLATE_NAME, GENERATE_SHLIB_SCRIPT): Set.
2043 2004-01-05 Jakub Jelinek <jakub@redhat.com>
2045 * emulparams/elf_s390.sh (NO_SMALL_DATA): Set to yes.
2046 * emulparams/elf64_s390.sh (NO_SMALL_DATA): Set to yes.
2048 2004-01-03 Alan Modra <amodra@bigpond.net.au>
2050 * ldexp.c (align_n): Make static.
2051 * ldexp.h (align_n): Delete declaration.
2052 * ldlang.h (lang_enter_output_section_statement): Remove
2054 * ldlang.c (lang_enter_output_section_statement): Likewise.
2055 (TO_ADDR, TO_SIZE): Define.
2056 (opb_shift): New var.
2057 (init_opb): New function.
2058 (print_input_section): Call init_opb and use TO_ADDR.
2059 (print_data_statement, print_reloc_statement): Likewise.
2060 (print_padding_statement): Likewise.
2061 (size_input_section): Use TO_SIZE and TO_ADDR, and global opb_shift.
2062 (lang_check_section_addresses): Likewise.
2063 (lang_size_sections_1): Likewise.
2064 (lang_do_assignments_1): Likewise.
2065 (lang_set_startof): Likewise.
2066 (lang_one_common): Likewise. Combine power_of_two and opb_shift align.
2067 (lang_process): Call init_opb.
2068 (lang_abs_symbol_at_end_of): Use TO_ADDR and global opb_shift.
2069 (lang_enter_overlay_section): Adjust
2070 lang_enter_output_section_statement call.
2071 * ldgram.y: Likewise.
2072 * mri.c (mri_draw_tree): Likewise.
2073 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Likewise.
2074 * emultempl/mmo.em (mmo_place_orphan): Likewise.
2075 * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Likewise.
2077 * ldfile.c (ldfile_set_output_arch): Add defarch param.
2078 * ldfile.h (ldfile_set_output_arch): Ditto.
2079 * emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Use
2080 ldfile_set_output_arch.
2081 * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Ditto.
2082 * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Ditto.
2083 * emultempl/linux.em (gld${EMULATION_NAME}_before_parse): Ditto.
2084 * emultempl/mipsecoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
2085 * emultempl/pe.em (gld${EMULATION_NAME}_before_parse): Ditto.
2086 * emultempl/sunos.em (gld${EMULATION_NAME}_before_parse): Ditto.
2087 * ldgram.y: Adjust ldfile_set_output_arch call.
2088 * emultempl/armcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
2089 * emultempl/armelf.em (gld${EMULATION_NAME}_before_parse): Ditto.
2090 * emultempl/armelf_oabi.em (gld${EMULATION_NAME}_before_parse): Ditto.
2091 * emultempl/generic.em (gld${EMULATION_NAME}_before_parse): Ditto.
2092 * emultempl/gld960c.em (gld960_set_output_arch): Ditto.
2093 * emultempl/m68kcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
2094 * emultempl/ticoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
2096 2004-01-02 Bernardo Innocenti <bernie@develer.com>
2098 * configure.tgt: Add m68k-uClinux target.
2100 For older changes see ChangeLog-0203
2106 version-control: never