bfd/
[external/binutils.git] / ld / ChangeLog
1 2004-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
2
3         * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Don't use
4         a dynamic object for stubs.
5
6 2004-11-04  Paul Brook  <paul@codesourcery.com>
7
8         * ld.texinfo: Document --default-imported-symver.
9         * ldmain.c (main): Set link_info.default_imported_symver.
10         * lexsup.c (option_values): Add OPTION_DEFAULT_IMPORTED_SYMVER.
11         (ld_options): Add --default-imported-symver.
12         (parse_args): Handle OPTION_DEFAULT_IMPORTED_SYMVER.
13
14 2004-11-08  Inderpreet Singh   <inderpreetb@nioda.hcltech.com>
15             Vineet Sharma      <vineets@noida.hcltech.com>
16
17         * Makefile.am: Add entries for new maxq-coff target.
18         * Makefile.in: Regenerate.
19         * configure.tgt: Add support for maxq.
20         * emulparams/maxqcoff.sh: New File.
21         * scripttempl/maxqcoff.sc: New linker script for target maxq.
22         * NEWS: Mention the new target.
23
24 2004-11-08  Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
25
26         * testsuite/ld-scripts/weak.exp: Enable test on PE,
27         XFAIL non-i386 PE.
28         * testsuite/ld-undefined/weak-undef.exp: Enable test on PE,
29         XFAIL non-i386 PE.
30         * testsuite/lib/ld-lib.exp (is_pecoff_format): New.
31
32 2004-11-04  Daniel Jacobowitz  <dan@debian.org>
33
34         * Makefile.am (ALL_EMULATIONS): Remove earmelf_oabi.o.
35         (earmelf_oabi.c): Remove rule.
36         * configure.tgt: Remove arm-*-oabi and thumb-*-oabi.
37         * emulparams/armelf_oabi.sh, emultempl/armelf_oabi.em: Delete files.
38         * Makefile.in: Regenerated.
39
40 2004-11-04  Hans-Peter Nilsson  <hp@axis.com>
41
42         * configure.tgt (crisv32-*-*): Handle like cris-*-* for non-aout.
43         * emulparams/criself.sh (INIT_START): Remove emitted "push srp".
44         (FINI_START): Ditto.
45         (INIT_END): Remove emitted "jump [sp+]".
46         (FINI_END): Ditto.
47
48 2004-11-04  Alan Modra  <amodra@bigpond.net.au>
49
50         * emultempl/ppc64elf.em (no_tls_opt): Rename from notlsopt.
51         (no_opd_opt, no_toc_opt): New static vars.
52         (ppc_before_allocation): Don't edit opt if no_opd_opt.  Call
53         ppc64_elf_edit_toc.
54         (OPTION_NO_OPD_OPT, OPTION_NO_TOC_OPT): Define.
55         (PARSE_AND_LIST_LONGOPTS): Add no-opd-optimize and no-toc-optimize.
56         (PARSE_AND_LIST_OPTIONS): Describe new options.
57         (PARSE_AND_LIST_ARGS_CASES): Handle them.
58
59 2004-10-27  Nick Clifton  <nickc@redhat.com>
60
61         * emultempl/alphaelf.em (alpha_after_parse): Add extra, NULL,
62         parameter to invocation of lang_section_start.
63         * emultempl/aix.em (_handle_option): Likewise.
64
65         * Makefile.am (eelf64alpha.c, eelf64alpha_fbsd.c,
66         eelf64alpha_nbsd.c): Add dependency upon emultempl/alphaelf.em.
67         * Makefile.in: Regenerate.
68
69 2004-10-26  Mark Mitchell  <mark@codesourcery.com>
70
71         * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Do not emit
72         __exidx_{start,end} when not relocating.
73
74 2004-10-25  Mark Mitchell  <mark@codesourcery.com>
75
76         * Makefile.in (earmsymbian.c): Depend on armbpabi.sc, not elf.sc.
77         * ldexp.h (segment_type): New type.
78         (segments): New variable.
79         * ldexp.c (segments): New variable.
80         (exp_print_token): Handle SEGMENT_START.
81         (fold_binary): Likewise.
82         * ldgram.y (SEGMENT_START): Declare it as a token.
83         (exp): Handle SEGMENT_START.
84         * ldlang.h (lang_address_statement_type): Add segment field.
85         (lang_section_start): Change prototype.
86         * ldlang.c (map_input_to_output_sections): Do not process section
87         assignments if a corresponding SEGMENT_START has already been
88         seen.
89         (lang_section_start): Add segment parameter.
90         * ldlex.l (SEGMENT_START): Add it.
91         * lexsup.c (seg_segment_start): New function.
92         (parse_args): Use it for -Tbss, -Tdata, and -Ttext.
93         * ld.texinfo (SEGMENT_START): Document it.
94         * emulparams/armsymbian.sh (EMBEDDED): Set it.
95         * scripttempl/armbpabi.sc: Use SEGMENT_START to control segment
96         base addresses.  Do not map relocations.
97         * NEWS: Mention SEGMENT_START.
98
99 2004-10-26  Paul Brook  <paul@codesourcery.com>
100
101         * ld.texinfo: Document --default-symver.
102         * ldmain.c (main): Set link_info.create_default_symver.
103         * lexsup.c (enum option_values): Add OPTION_DEFAULT_SYMVER.
104         (ld_options): Add default-symver.
105         (parse_args): Handle OPTION_DEFAULT_SYMVER.
106
107 2004-10-24 Danny Smith  <dannysmith@users.sourceforge.net>
108
109         * pe-dll.c (process_def_file): Don't export all symbols by default if
110         building a position-independent executable.
111
112 2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
113
114         PR 463
115         * ldmain.c (reloc_overflow): Accept a pointer to struct
116         bfd_link_hash_entry. Report symbol location for relocation
117         overflow.
118
119 2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
120
121         * genscripts.sh (libpath.exp): Really generate for first
122         emulation only.
123
124 2004-10-19  Danny Smith  <dannysmith@users.sourceforge.net>
125
126         * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Simplify
127         comparison and replacement of filenames.
128
129 2004-10-19  H.J. Lu  <hongjiu.lu@intel.com>
130
131         PR 459
132         * ldlang.c (load_symbols): Use the same -Bdynamic/-Bstatic
133         option on linker script as the one for linker script.
134
135 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
136
137         * ldlang.c (struct excluded_lib, excluded_libs, add_excluded_libs)
138         (check_excluded_libs): New.
139         (load_symbols): Call check_excluded_libs.
140         * ldlang.h (add_excluded_libs): New prototype.
141         * emultempl/elf32.em (OPTION_EXCLUDED_LIBS): Define.
142         (gld${EMULATION_NAME}_add_options): Add --exclude-libs.
143         (gld${EMULATION_NAME}_handle_option): Handle --exclude-libs.
144         * ld.texinfo (Command Line Variables): Document --exclude-libs.
145         (Options Specific to i386 PE Targets): Remove --exclude-libs.
146
147 2004-10-15  Alan Modra  <amodra@bigpond.net.au>
148
149         * ldexp.c (exp_fold_tree): Don't immediately exit ld on a
150         failing link script assert.
151
152         * ldctor.c (ldctor_add_set_entry): Fix comment typo.
153
154 2004-10-14  H.J. Lu  <hongjiu.lu@intel.com>
155
156         PR 445
157         * emulparams/elf64_ia64.sh (SMALL_DATA_CTOR): Set.
158         (SMALL_DATA_DTOR): Set.
159         * emulparams/elf64_ia64_fbsd.sh (SMALL_DATA_CTOR): Unset.
160         (SMALL_DATA_DTOR): Unset.
161         * scripttempl/elf.sc: If SMALL_DATA_CTOR is set, move .ctors
162         after .data. If SMALL_DATA_DTOR is set, move .dtors after
163         .data.
164
165 2004-10-14  Alan Modra  <amodra@bigpond.net.au>
166
167         PR 63
168         * ldlang.h (lang_output_section_statement_type): Make "next" a
169         struct lang_output_section_statement_struct *.
170         (struct orphan_save): Move from elf32.em.  Add "name" and "flags".
171         (lang_output_section_find_by_flags, lang_insert_orphan): Declare.
172         * ldlang.c (lang_output_section_find_1): Adjust for changed
173         output_section_statement "next".
174         (strip_excluded_output_sections): Likewise.
175         (lang_record_phdrs): Likewise.
176         (lang_output_section_find_by_flags): New function.
177         (output_prev_sec_find): Move from pe.em.  Adjust iterator.
178         (lang_insert_orphan): New function.  Tail end of elf32.em's
179         place_orphan merged with that from pe.em.  Allow bfd_section to
180         be placed first.  New heuristic for placing new output section
181         statement in existing script, and accompanying split of __start
182         symbol alignment into a separate assignment to dot.
183         (lang_add_section): Consistently use output->bfd_section rather than
184         an alias, section->output_section.
185         (map_input_to_output_sections): Rename overly long arg.  Move
186         initialization of data_statement output section to here..
187         (lang_check_section_addresses): ..from here.
188         (print_assignment): Correct printing of etree_assert.
189         (print_all_symbols): Don't bomb if userdata is NULL.
190         (IGNORE_SECTION): Rearrange.
191         * emultempl/elf32.em (output_rel_find): Adjust interator.
192         (output_prev_sec_find): Delete.
193         (struct orphan_save): Delete.
194         (gld${EMULATION_NAME}_place_orphan): Cater for zero bfd_section
195         flags without creating a duplicate output section statement.
196         Revise code holding history of various orphan section placements.
197         Allow orphan sections to place before script specified output
198         sections.  Call lang_output_section_find_by_flags when placement
199         by name fails.  Use lang_insert_orphan.
200         * emultempl/mmo.em (output_prev_sec_find): Delete.
201         (struct orphan_save): Delete.
202         (mmo_place_orphan): Revise code holding history of orphan placement.
203         Allow orphans to place before existing output sections.  Use
204         lang_insert_orphan.
205         * emultempl/pe.em (output_prev_sec_find): Delete.
206         (struct orphan_save): Delete.
207         (gld_${EMULATION_NAME}_place_orphan): Revise to suit use of
208         lang_insert_orphan.
209
210 2004-10-13  Mark Mitchell  <mark@codesourcery.com>
211
212         * scripttempl/armbpabi.sc: Do not put .gnu.version.* into a
213         loadable segment.
214
215 2004-10-13  Alan Modra  <amodra@bigpond.net.au>
216
217         PR 44
218         * ldcref.c (check_section_sym_xref): Delete.
219         (check_local_sym_xref): New function.
220         (check_nocrossrefs): Adjust call.
221         * emultempl/pe.em (struct orphan_save): Add os_tail.
222         (place_orphan): Backport assorted fixes from elf32.em.
223
224 2004-10-12  Bob Wilson  <bob.wilson@acm.org>
225
226         * emultempl/xtensaelf.em: Use ISO C90 formatting.
227
228 2004-10-11  Jakub Jelinek  <jakub@redhat.com>
229
230         * emultempl/elf32.em (gld${EMULATION_NAME}_parse_ld_so_conf): Avoid
231         getline for portability.
232
233         * emultempl/elf32.em (gld${EMULATION_NAME}_ld_so_conf): New structure.
234         (gld${EMULATION_NAME}_parse_ld_so_conf,
235         gld${EMULATION_NAME}_parse_ld_so_conf_include): New functions.
236         (gld${EMULATION_NAME}_check_ld_so_conf): Use them.
237
238 2004-10-11  Alan Modra  <amodra@bigpond.net.au>
239
240         PR 423
241         * ldfile.c (ldfile_try_open_bfd): Ensure dynamic objects are
242         rejected when linking statically.
243
244 2004-10-08  Daniel Jacobowitz  <dan@debian.org>
245
246         * configure.tgt: Include elf_x86_64 for i[3-7]86-*-solaris2*.
247
248 2004-10-07  Bob Wilson  <bob.wilson@acm.org>
249
250         * ld.texinfo (Xtensa): Describe new linker relaxation to optimize
251         assembler-generated longcall sequences.  Describe new --size-opt
252         option.
253         * emulparams/elf32xtensa.sh (OTHER_SECTIONS): Add .xt.prop section.
254         * emultempl/xtensaelf.em (remove_section,
255         replace_insn_sec_with_prop_sec, replace_instruction_table_sections,
256         elf_xtensa_after_open): New.
257         (OPTION_OPT_SIZEOPT, OPTION_LITERAL_MOVEMENT,
258         OPTION_NO_LITERAL_MOVEMENT): Define.
259         (elf32xtensa_size_opt, elf32xtensa_no_literal_movement): New globals.
260         (PARSE_AND_LIST_LONGOPTS): Add size-opt and [no-]literal-movement.
261         (PARSE_AND_LIST_OPTIONS): Add --size-opt.
262         (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_OPT_SIZEOPT,
263         OPTION_LITERAL_MOVEMENT, and OPTION_NO_LITERAL_MOVEMENT.
264         (LDEMUL_AFTER_OPEN): Set to elf_xtensa_after_open.
265         * scripttempl/elfxtensa.sc: Update with changes from elf.sc.
266         * Makefile.am (eelf32xtensa.c): Update dependencies.
267         * Makefile.in: Regenerate.
268
269 2004-10-07  Jeff Baker  <jbaker@qnx.com>
270
271         * lexsup.c: Handle --warn-shared-textrel option.
272         (ld_options): Restore alpha sorting of options.
273         * ldmain.c (main): Initialise warn_shared_info field to FALSE.
274         * ld.texinfo: Add documentation for --warn-shared-textrel.
275         * NEWS: Added mention of --warn-shared-textrel option.
276
277 2004-10-05  Tomer Levi  <Tomer.Levi@nsc.com>
278
279         * emultempl/crxelf.em (disable_relaxation): Add.
280         (crxelf_before_allocation): Enable --relax option by default.
281         (PARSE_AND_LIST_PROLOGUE): Add OPTION_NO_RELAX.
282         (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --no-relax.
283         (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_NO_RELAX.
284
285 2004-10-04  H.J. Lu  <hongjiu.lu@intel.com>
286
287         * NEWS: Mention SORT_BY_NAME, SORT_BY_ALIGNMENT and
288         --sort-section name|alignment.
289
290         * ld.texinfo: Document SORT_BY_NAME, SORT_BY_ALIGNMENT and
291         --sort-section name|alignment.
292
293         * ld.h (sort_type): New enum.
294         (wildcard_spec): Change the type of `sorted' to sort_type.
295
296         * ldgram.y (SORT): Removed.
297         (SORT_BY_NAME): Added.
298         (SORT_BY_ALIGNMENT): Added.
299         (wildcard_spec): Updated `sorted'. Handle SORT_BY_NAME and
300         SORT_BY_ALIGNMENT.
301         (input_section_spec_no_keep): Updated `sorted'.
302         (statement): Replace SORT with SORT_BY_NAME.
303
304         * ldlang.c (compare_section): New function to compare 2
305         sections with different sorting schemes.
306         (wild_sort): Updated. Use compare_section.
307         (update_wild_statements): New function.
308         (lang_process): Call update_wild_statements before
309         map_input_to_output_sections.
310
311         * ldlex.l (SORT_BY_NAME): New.
312         (SORT_BY_ALIGNMENT): New.
313         (SORT): Return SORT_BY_NAME.
314
315         * ldmain.c (sort_section): New. Defined.
316         (main): Initialize it to none.
317
318         * lexsup.c (option_values): Add OPTION_SORT_SECTION.
319         (ld_options): Add an entry for OPTION_SORT_SECTION.
320         (parse_args): Handle OPTION_SORT_SECTION.
321
322         * mri.c (mri_draw_tree): Updated `sorted'.
323
324 2004-10-04  Jakub Jelinek  <jakub@redhat.com>
325
326         * ldgram.y (DATA_SEGMENT_RELRO_END): Add one argument.
327         * scripttempl/elf.sc (DATA_SEGMENT_RELRO_END): Add 0 as first
328         argument.
329         (DATA_SEGMENT_RELRO_GOTPLT_END): Pass $SEPARATE_GOTPLT as first
330         and . as second argument.
331         (GOTPLT): Move $DATA_SEGMENT_RELRO_GOTPLT_END before the section.
332         * ldexp.c (fold_unary): Remove DATA_SEGMENT_RELRO_END handling here.
333         (fold_binary): Add it here.  Insert padding to make relro_end
334         COMMONPAGESIZE bytes aligned.  For DATA_SEGMENT_ALIGN in
335         exp_dataseg_relro_adjust phase just use previously computed
336         exp_data_seg.base.
337         * ldlang.c (lang_size_sections): Set exp_data_seg.base for
338         relro_adjust here.  Call lang_size_sections_1 once more if there
339         was too big padding at DATA_SEGMENT_RELRO_END.
340         * ld.texinfo (DATA_SEGMENT_RELRO_END): Add documentation.
341
342 2004-10-01  Paul Brook  <paul@codesourcery.com>
343
344         * emulparams/armelf.sh: Add unwinding table sections.
345
346 2004-09-30  Filip Navara  <navaraf@reactos.com>
347
348         * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Generate
349         correct base address for position independant executables.
350         * pe-dll.c (pe_dll_fill_sections): Don't mark position independant
351         executables as DLLs.
352
353 2004-09-30  Paul Brook  <paul@codesourcery.com>
354
355         * ld.texinfo: Document --target2=abs.
356         * emulparms/armsymbian.sh (TARGET2_TYPE): Set.
357
358 2004-09-29  Nick Clifton  <nickc@redhat.com>
359
360         * scripttempl/xstormy16.sc: Only perform the assignments to the
361         ROM region when not performing a relocatable link.  The ROM region
362         does not start at address 0, but the sections will.
363         * Makefile.am: Fix linker script dependency for the generation of
364         eelf32xstormy16.c.
365         * Makefile.in: Regenerate.
366
367 2004-09-18  Filip Navara  <navaraf@reactos.com>
368
369         * emulparams/arm_epoc_pe.sh, emulparams/armpe.sh, emulparams/i386pe.sh,
370         emulparams/i386pe_posix.sh, emulparams/mcorepe.sh,
371         emulparams/mipspe.sh, emulparams/ppcpe.sh, scripttempl/pe.sc: Define
372         TARGET_PAGE_SIZE.
373         * scripttempl/pe.sc: Make the virtual address and file offset synced if
374         the alignment is lower than the target page size.
375
376 2004-09-27  Filip Navara  <navaraf@reactos.com>
377
378         * emultempl/pe.em (gld_${EMULATION_NAME}_unrecognized_file): Allow
379         def_file_parse to handle pe_def_file if NULL and prevent crash with
380         invalid .def files.
381
382 2004-09-27  Alan Modra  <amodra@bigpond.net.au>
383
384         * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Enable
385         --emit-stub-syms automatically when --emit-relocs.
386
387 2004-09-24  Paul Brook  <paul@codeosurcery.com>
388
389         * scripttempl/elf.sc: Keep .preinit_array, .init_array and
390         .fini_array sections.
391
392 2004-09-19  Andreas Schwab  <schwab@suse.de>
393
394         * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Adjust data segment
395         base so that relro end is suitably aligned.
396
397 2004-09-17  Paul Brook  <paul@codesourcery.com>
398
399         * ld.texinfo: Rename arm-specific section.  Document --target*
400         * emulparams/armelf_fbsd.sh: Set TARGET2_TYPE.
401         * emulparams/armelf_linux.sh: Ditto.
402         * emulparams/armelf_nbsd.sh: Ditto.
403         * emultempl/armelf.em: Set default for TARGET2_TYPE.
404         (target2_type): New variable.
405         (arm_elf_before_allocation): Don't pass target1_type.
406         (arm_elf_create_output_section_statements): New function.
407         (PARSE_AND_LIST_PROLOGUE): Add OPTION_TARGET2.
408         (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --target=.
409         (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_TARGET2.
410         (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Set.
411         * emultempl/armelf_oabi.em (_before_allocation): Remove extra
412         argument to bfd_elf32_arm_process_before_allocation.
413
414 2004-09-17  Alan Modra  <amodra@bigpond.net.au>
415
416         * ldexp.c (fold_name): Update u.undef.next refs.
417         * emultempl/pe.em: Likewise.
418         * emultempl/sunos.em: Likewise.
419
420 2004-09-17  Alan Modra  <amodra@bigpond.net.au>
421
422         * Makefile.am: Run "make dep-am".
423         * Makefile.in: Regenerate.
424         * config.in: Regenerate.
425         * configure: Regenerate.
426         * aclocal.m4: Regenerate.
427         * po/ld.pot: Regenerate.
428
429 2004-09-16  Tomer Levi  <Tomer.Levi@nsc.com>
430
431         * scripttempl/elf32crx.sc (.init): Add KEEP for section's *personality*.
432         (.fini): Likewise.
433         (.jcr): Likewise.
434
435 2004-09-16  Alan Modra  <amodra@bigpond.net.au>
436
437         * emultempl/armelf_oabi.em (before_allocation): Add extra zero param
438         to bfd_elf32_arm_process_before_allocation call.
439
440 2004-09-13  Paul Brook  <paul@codesourcery.com>
441
442         * emulparams/armsymbian.sh: Set TARGET1_IS_REL.
443         * emultempl/armelf.em: Use TARGET1_IS_REL.  Add --target1-{rel,abs}.
444
445 2004-09-07  H.J. Lu  <hongjiu.lu@intel.com>
446
447         * configure: Regenerated with autconfig 2.13.
448
449 2004-09-07  Andreas Schwab  <schwab@suse.de>
450
451         * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Apply data segment
452         alignment before adjusting DATA_SEGMENT_RELRO_END.
453
454 2004-09-06  Mark Mitchell  <mark@codesourcery.com>
455
456         * emulparams/armsymbian.sh: Use armbpabi script.
457         * scripttempl/armbpabi.sc: New script.
458
459 2004-09-02  Mark Mitchell  <mark@codesourcery.com>
460
461         * Makefile.am (ALL_EMULATIONS): Add earmsymbian.o.
462         (earmsymbian.c): New target.
463         * configure.tgt: Use armsymbian emulation for arm*-*-symbianelf*.
464         * Makefile.in: Regenerated.
465         * aclocal.m4: Likewise.
466         * configure: Likewise.
467         * emulparams/armsymbian.sh: New file.
468
469 2004-09-03  Tomer Levi  <Tomer.Levi@nsc.com>
470
471         * scripttempl/elf32crx.sc: Edit file with comments.
472         (.init): Add new section.
473         (.fini): Likewise.
474         (.ctor): Control the linkage order.
475         (.dtor): Likewise.
476
477 2004-08-27  Nick Clifton  <nickc@redhat.com>
478
479         * emultempl/pe.em (after_open): Do not assume that either bfd is
480         an archive.
481
482 2004-08-26  Alan Modra  <amodra@bigpond.net.au>
483
484         * ldlang.c (lang_init): Don't compare with TRUE.
485
486 2004-08-25  Dmitry Diky  <diwil@spec.ru>
487
488         * emulparams/msp430all.sh: Fix RAM sizes for all targets.
489         * scripttempl/elf32msp430.sc: Add .profiler section definition.
490
491 2004-08-24  H.J. Lu  <hongjiu.lu@intel.com>
492
493         * ldlang.c (wildcardp): Defined as a macro with strpbrk.
494
495 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
496
497         * configure.tgt (arm*-*-symbianelf*): New target.
498         (arm*-*-eabi*): Likewise.
499
500 2004-08-19  Jakub Jelinek  <jakub@redhat.com>
501
502         * emultempl/ppc64elf.em (non_overlapping_opd): New variable.
503         (ppc_before_allocation): Pass it to ppc64_elf_edit_opd).
504         (OPTION_NON_OVERLAPPING_OPD): Define.
505         (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Add
506         --non-overlapping-opd option.
507
508 2004-08-18  Alan Modra  <amodra@bigpond.net.au>
509
510         PR 338
511         * ldexp.c (fold_name): Don't call bfd_link_add_undef if the symbol
512         was already on the undefs list.
513
514 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
515
516         * emultempl/ppc64elf.em (gld${EMULATION_NAME}_new_vers_pattern): Dot
517         prefix the symbol field too.
518
519 2004-08-13  Alan Modra  <amodra@bigpond.net.au>
520
521         * ldmain.c (link_callbacks): Remove "error_handler".
522         * ldmisc.c: Include elf-bfd.h.
523         (vfinfo): Sort comment.  Handle %A.  Use %A instead of
524         bfd_get_section_indent.
525         (error_handler): Delete.
526         * ldmisc.h (error_handler): Delete declaration.
527
528 2004-08-10  Alan Modra  <amodra@bigpond.net.au>
529
530         * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Call
531         ppc64_elf_restore_symbols.
532
533 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
534
535         * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Error if
536         .toc is too large on relocatable linking.
537
538 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
539
540         * emultempl/ppc64elf.em (ppc_after_open): Delete.
541         (LDEMUL_AFTER_OPEN): Don't define.
542
543 2004-08-02  Stephane Carrez  <stcarrez@nerim.fr>
544
545         * ld.texinfo (Top): Document specific options of 68HC11 and 68HC12.
546
547 2004-08-01  Stephane Carrez  <stcarrez@nerim.fr>
548
549         * scripttempl/elfm68hc12.sc: Align text, rodata and data section
550         on power of 2.
551
552 2004-07-27  Jason Thorpe  <thorpej@wasabisystems.com>
553
554         * emulparams/hppanbsd.sh (OUTPUT_FORMAT): Set to "elf32-hppa-netbsd".
555
556 2004-07-26  Dmitry Diky  <diwil@spec.ru>
557
558         * Makefile.am: Add new subtargets: msp430x1610, msp430x1611,
559         msp430x1612, msp430x415, msp430x417, msp430xG437, msp430xG438,
560         msp430xG439.
561         * configure.tgt: Likewise.
562         * emulparams/msp430all.sh: Likewise.
563         * Makefile.in: Regenerate.
564
565 2004-07-23  Nick Clifton  <nickc@redhat.com>
566
567         * emultempl/elf32.em (_place_orphan): Use an already existing
568         section name if that section does not have any flags set.
569
570 2004-07-21  H.J. Lu  <hongjiu.lu@intel.com>
571
572         * ldlang.c (already_linked_hash_entry): Removed.
573         (already_linked): Likewise.
574         (already_linked_table): Likewise.
575         (section_already_linked): Call bfd_section_already_linked.
576         (lang_process): Replace already_linked_table_init with
577         bfd_section_already_linked_table_init and check return. Replace
578         already_linked_table_free with bfd_section_already_linked_table_free.
579
580 2004-07-21  Nick Clifton  <nickc@redhat.com>
581
582         * ldlang.c (init_os): Make sure that the newly allocated userdata
583         structure is zeroed out.
584
585 2004-07-19  H.J. Lu  <hongjiu.lu@intel.com>
586
587         * NEWS: Mention the new --add-needed/--no-add-needed and
588         --as-needed/--no-as-needed options.
589
590 2004-07-19  H.J. Lu  <hongjiu.lu@intel.com>
591
592         * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): Also
593         check the add_needed field.
594         (dt_needed): New struct.
595         (gld${EMULATION_NAME}_try_needed): Change the first argument
596         to a pointer to struct dt_needed. Check the DYN_NO_ADD_NEEDED
597         bit in the file where the DT_NEEDED entry comes from.
598         (gld${EMULATION_NAME}_search_needed): Change the second
599         argument to a pointer to struct dt_needed.
600         (gld${EMULATION_NAME}_check_ld_so_conf): Updated.
601         (gld${EMULATION_NAME}_after_open): Likewise.
602
603         * ld.texinfo: Add --add-needed document.
604         * ldlang.c (new_afile): Set p->add_needed.
605         * ldlang.h (lang_input_statement_type): Add add_needed field.
606         * ldmain.h (add_needed): Declare.
607         * ldmain.c (add_needed): New global var.
608         * lexsup.c (option_values): Add OPTION_ADD_NEEDED and
609         OPTION_NO_ADD_NEEDED.
610         (ld_options): Likewise.
611         (parse_args): Handle them.
612
613 2004-07-13  Christof Petig  <christof@petig-baender.de>
614
615         * emultempl/pe.em (make_import_fixup): Use bfd_get_32 to correct
616         for endian-ness of extracted addend.
617
618 2004-07-13  Danny Smith  <dannysmith@usesr.sourceforge.net>
619
620         * pe-dll.c (auto_export):  Filter on just the import prefix,
621         "_imp_", not "_imp__".
622
623 2004-07-09  Nick Clifton  <nickc@redhat.com>
624
625         * configure.tgt: Change sh-sybmian-elf to sh-*-symbianelf.
626
627 2004-07-06  Tomer Levi  <Tomer.Levi@nsc.com>
628
629         * Makefile.am (ALL_EMULATIONS): Add eelf32crx.o.
630         (eelf32crx.c): New target.
631         * Makefile.in: Regenerate.
632         * configure.tgt: Handle crx-*-elf*.
633         * emulparams/elf32crx.sh: New file.
634         * emultempl/crxelf.em: New file.
635         * scripttempl/elf32crx.sc: New file.
636         * NEWS: Mention new target.
637
638 2004-07-06  Nick Clifton  <nickc@redhat.com>
639
640         * Makefile.am: Add eshlsymbian.c.
641         * Makefile.in: Regenerate.
642         * configure.tgt: Add sh*-symbian-elf target.
643         * emulparams/shlsymbian.sh: New file.  Configure the
644         sh-symbian-elf linker scripts.
645         * scripttemp/elf32sh-symbian.sc: New file.  Linker script
646         template for the sh-symbian-elf target.
647
648 2004-07-05  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
649
650         * emulparams/hppa64linux.sh: Define PLT_BEFORE_GOT.
651         * emulparams/hppalinux.sh: Likewise.
652         * scripttempl/elf.sc: Place .plt just before .got when .plt is in
653         data segment and PLT_BEFORE_GOT is defined.
654
655 2004-07-03  Aaron W. LaFramboise  <aaron98wiridge9@aaronwl.com>
656
657         * ld.texinfo (WIN32): Document PE weak symbols.
658
659 2004-07-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
660
661         * emulparams/shlelf32_linux.sh (COMMONPAGESIZE): Set to 4KB.
662
663 2004-07-01  H.J. Lu  <hongjiu.lu@intel.com>
664
665         * ldmisc.c (vfinfo): Call bfd_get_section_ident to identify
666         the section.
667
668 2004-06-29  Alan Modra  <amodra@bigpond.net.au>
669
670         * ldlang.c (lang_reset_memory_regions): Save last relax pass section
671         size in rawsize.
672
673 2004-06-24  Alan Modra  <amodra@bigpond.net.au>
674
675         * ldlang.c (print_output_section_statement): Don't print size before
676         relaxation.
677         (IGNORE_SECTION): Remove bfd arg.  Update all callers.
678
679         * ldexp.c (fold_name): .. See below.
680         * ldlang.c (section_already_linked, print_output_section_statement,
681         print_input_section, insert_pad, size_input_section,
682         lang_check_section_addresses, lang_size_sections_1,
683         lang_size_sections, lang_do_assignments_1, lang_set_startof,
684         lang_one_common, lang_reset_memory_regions, lang_process,
685         lang_abs_symbol_at_end_of, lang_do_version_exports_section): ..
686         * ldwrite.c (build_link_order, clone_section, ds, split_sections): ..
687         * pe-dll.c (process_def_file, generate_reloc): ..
688         * emultempl/elf32.em (gld${EMULATION_NAME}_find_statement_assignment,
689         gld${EMULATION_NAME}_before_allocation): ..
690         * emultempl/mmix-elfnmmo.em (mmix_after_allocation): ..
691         * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation,
692         sh64_elf_${EMULATION_NAME}_after_allocation): ..
693         * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): ..
694         * emultempl/xtensaelf.em (ld_assign_relative_paged_dot,
695         ld_local_file_relocations_fit, ld_xtensa_insert_page_offsets): Use
696         "size" instead of "_raw_size" and "_cooked_size".  Expand
697         bfd_section_size macro invocations.
698
699 2004-06-22  Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
700
701         * ld/scripttemp/pe.sc (.CRT): Define ___crt_xc_start__,
702         ___crt_xc_end__, ___crt_xi_start__, ___crt_xi_end__, ___crt_xl_start__,
703         ___crt_xp_start__, ___crt_xp_end__, ___crt_xt_start__ and
704         ___crt_xt_end__.
705         (.tls): Define ___tls_start__ and ___tls_end__.
706
707 2004-06-21  Alexandre Oliva  <aoliva@redhat.com>
708
709         * emulparams/elf32frvfd.sh (GENERATE_PIE_SCRIPT): Set to yes.
710
711 2004-06-18  Adam Nemet  <anemet@lnxw.com>
712
713         * configure.in: Set EXTRA_SHLIB_EXTENSION to .a for LynxOS.
714         * configure: Regenerate.
715
716 2004-06-15  Jakub Jelinek  <jakub@redhat.com>
717
718         * scripttempl/elf.sc: Readd KEEP and .gcc_except_table.* to
719         .gcc_except_table output sections lost accidentally with
720         -z relro patch.
721
722 2004-06-15  Alan Modra  <amodra@bigpond.net.au>
723
724         * ldwrite.c (build_link_order): Use bfd_get_section_size
725         instead of bfd_get_section_size_before_reloc or _raw_size.
726         * pe-dll.c (process_def_file): Likewise.
727
728 2004-06-14  Alan Modra  <amodra@bigpond.net.au>
729
730         From Richard Wirth <r.wirth@wirthware.de>
731         * ldlang.c (lang_finish): Don't free lang_definedness_table.
732
733 2004-05-29  Alan Modra  <amodra@bigpond.net.au>
734
735         * ldlang.c (gc_section_callback): Move SEC_EXCLUDE twiddles..
736         (lang_gc_sections): .. to a LANG_FOR_EACH_INPUT_STATEMENT loop here.
737
738 2004-05-28  Andrew Stubbs <andrew.stubbs@superh.com>
739
740         * testsuite/ld-sh/arch/arch.exp: New test script.
741         * testsuite/ld-sh/arch/arch_expected.txt: New file.
742         * testsuite/ld-sh/arch/sh.s: New file.
743         * testsuite/ld-sh/arch/sh2.s: New file.
744         * testsuite/ld-sh/arch/sh-dsp.s: New file.
745         * testsuite/ld-sh/arch/sh2e.s: New file.
746         * testsuite/ld-sh/arch/sh3-nommu.s: New file.
747         * testsuite/ld-sh/arch/sh3.s: New file.
748         * testsuite/ld-sh/arch/sh3-dsp.s: New file.
749         * testsuite/ld-sh/arch/sh3e.s: New file.
750         * testsuite/ld-sh/arch/sh4-nommu-nofpu.s: New file.
751         * testsuite/ld-sh/arch/sh4-nofpu.s: New file.
752         * testsuite/ld-sh/arch/sh4.s: New file.
753         * testsuite/ld-sh/arch/sh4a-nofpu.s: New file.
754         * testsuite/ld-sh/arch/sh4al-dsp.s: New file.
755         * testsuite/ld-sh/arch/sh4a.s: New file.
756
757 2004-05-28  Alan Modra  <amodra@bigpond.net.au>
758
759         * ldlang.c: Formatting.  Wrap long lines, expand bfd_get_section_flags
760         throughout file.
761         * lexsup.c: Formatting.  Wrap long lines.
762         * ldwrite.c: Update copyright date.
763
764         * ldlang.c (lang_add_section): Don't twidlle SEC_EXCLUDE here.
765         (output_section_callback): Nor SEC_KEEP here.
766         (gc_section_callback): Twiddle SEC_EXCLUDE here.
767         (lang_gc_wild): Delete.  Fold into..
768         (lang_gc_sections_1): ..here.  Only call bfd_gc_sections when garbage
769         collecting.
770         (lang_process): Always call lang_gc_sections.
771         (lang_place_orphans): Handle SEC_EXCLUDE sections.
772         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Remove
773         SEC_EXCLUDE code.
774
775 2004-05-26  H.J. Lu  <hongjiu.lu@intel.com>
776
777         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Clear
778         SEC_EXCLUDE on non-SEC_DEBUGGING sections for relocatable link.
779         * ldlang.c (lang_add_section): Likewise.
780
781 2004-05-26  Alan Modra  <amodra@bigpond.net.au>
782
783         * ldlang.c (lang_add_section): Set SEC_EXCLUDE for SEC_GROUP
784         sections when doing a final link.  Clear SEC_EXCLUDE when doing
785         a relocable link, except for SEC_DEBUGGING sections.
786         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Use the
787         same condition here to drop SEC_EXCLUDE orphan sections.
788
789 2004-05-25  Alan Modra  <amodra@bigpond.net.au>
790
791         * ldlang.c (lang_process): Call bfd_merge_sections later, and
792         only when not a relocatable link.
793         (print_input_section): Handle SEC_EXCLUDE sections.
794         (size_input_section): Don't update dot on SEC_EXCLUDE sections.
795         (lang_do_assignments_1): Likewise.
796         * ldwrite.c (build_link_order): Ignore SEC_EXCLUDE input sections.
797         * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Likewise.
798         * emultempl/hppaelf.em (build_section_lists): Likewise.
799         * emultempl/ppc64elf.em (build_toc_list): Likewise.
800         (build_section_lists): Likewise.
801
802 2004-05-23  Andreas Schwab  <schwab@suse.de>
803
804         * ld.texinfo (Options): Fix typo in last change.
805
806 2004-05-21  Andy Chittenden  <achittenden@bluearc.com>
807
808         * ld.h (ld_config_type): Add new field: hash_table_size.
809         * ldmain.c: Initialise the new field to zero.  If it is non-zero
810         after parsing the linker's command line call
811         bfd_hash_set_default_size.
812         * lexsup.c (option_values): Add OPTION_HASH_SIZE.
813         (ld_options): Add hash-size.
814         (parse_args): Parse --hash-size option.  Allow
815         --reduce-memory-overheads to set the default hash table size as
816         well.
817         * ld.texinfo: Document the new switch.  Also mention that
818         --reduce-memory-overheads can affect the hash table size.
819         * NEWS: Mention the new feature.
820
821 2004-05-19  J"orn Rennecke <joern.rennecke@superh.com>
822
823         * NEWS: Mention new linker map file generation and the
824         --reduce-memory-overheads option.
825         * ld.texinfo: Document --reduce-memory-overheads option.
826         * ld.h (map_symbol_def): New struct.
827         (struct user_section_struct, section_userdata_type): Rename to:
828         (struct lean_user_section_struct, lean_section_userdata_type).
829         (struct fat_user_section_struct, fat_section_userdata_type): New.
830         (SECTION_USERDATA_SIZE): Define.
831         (args_type): New member reduce_memory_overheads.
832         * ldlang.c (map_obstack): New static variable.
833         (init_map_userdata, print_all_symbols, sort_def_symbol): New functions.
834         (lang_map): Unless command_line.reduce_memory_overheads is set,
835         initialize lists of defined symbols for each section.
836         (print_input_section): Unless command_line.reduce_memory_overheads
837         is set, use print_all_symbols.
838         (init_os): Use lean_section_userdata_type / SECTION_USERDATA_SIZE.
839         * ldmain.c (main): Initialize command_line.reduce_memory_overheads.
840         * lexsup.c (enum option_values): Add OPTION_REDUCE_MEMORY_OVERHEADS.
841         (ld_options): Add entry for --reduce-memory-overheads.
842         (parse_args): Handle OPTION_REDUCE_MEMORY_OVERHEADS.
843
844 2004-05-19  Jakub Jelinek  <jakub@redhat.com>
845
846         * ldgram.y (sect_constraint): New.
847         (ONLY_IF_RO, ONLY_IF_RW): New tokens.
848         (section): Add sect_constraint.  Pass additional argument
849         to lang_enter_output_section_statement.
850         * mri.c (mri_draw_tree): Pass additional argument to
851         lang_enter_output_section_statement.
852         * emultempl/pe.em (place_orphan): Likewise.
853         (output_prev_sec_find): Disregard output section statements with
854         constraint == -1.
855         * emultempl/mmo.em (output_prev_sec_find): Likewise.
856         (mmo_place_orphan): Pass additional argument to
857         lang_enter_output_section_statement.
858         * emultempl/elf32.em (output_prev_sec_find): Disregard output section
859         statements with constraint == -1.
860         (place_orphan): Pass additional argument to
861         lang_enter_output_section_statement.
862         * ldlang.c (lang_enter_overlay_section): Likewise.
863         (lang_output_section_find_1): New.
864         (lang_output_section_find): Use it.
865         (lang_output_section_statement_lookup_1): New.
866         (lang_output_section_statement_lookup): Use it.
867         (check_section_callback, check_input_sections): New.
868         (map_input_to_output_sections): Check if all input sections
869         are readonly if ONLY_IF_RO or ONLY_IF_RW was seen.
870         (strip_excluded_output_sections): Disregard output section statements
871         with constraint == -1.
872         (lang_record_phdrs): Likewise.
873         (lang_enter_output_section_statement): Add constraint argument.
874         Use lang_output_section_statement_lookup_1.
875         * ldlang.h (lang_output_section_statement_type): Add constraint
876         and all_input_readonly fields.
877         (lang_enter_output_section_statement): Adjust prototype.
878         * ldlex.l (ONLY_IF_RO, ONLY_IF_RW): New tokens.
879         * scripttempl/elf.sc (.eh_frame, .gcc_except_table): Move into text
880         segment if all input sections are readonly.
881
882 2004-05-19  Adam Nemet  <anemet@lnxw.com>
883
884         * scripttempl/i386lynx.sc: Remove file.
885
886 2004-05-17  Bob Wilson  <bob.wilson@acm.org>
887
888         * ld.texinfo (Output Section Address): Correct subsection name.
889
890 2004-05-17  Adam Nemet  <anemet@lnxw.com>
891
892         * configure.tgt (powerpc-*-lynxos* case): New case.
893         * configure.host (i[3-7]86-*-lynxos* case): Remove case.
894         * emulparams/ppclynx.sh: New file.
895         * emulparams/i386lynx.sh (SCRIPT_NAME): Update to LynxOS 4.0.
896         * Makefile.am (ALL_EMULATIONS): Add eppclynx.o
897         (ei386lynx.c): Update rule to LynxOS 4.0 ELF.
898         (eppclynx.c): New rule.
899         * Makefile.in: Regenerate.
900
901 2004-05-13  Joel Sherrill <joel@oarcorp.com>
902
903         * configure.tgt (or32-*-rtems*): Switch to elf and
904         support versioned targets.
905
906 2004-05-13  Nick Clifton  <nickc@redhat.com>
907
908         * po/fr.po: Updated French translation.
909
910 2004-05-11  Jakub Jelinek  <jakub@redhat.com>
911
912         * genscripts.sh: Generate -z combreloc -z now -z relro scripts
913         for binaries, -shared and -pie.
914         * emulparams/elf_i386.sh (SEPARATE_GOTPLT): Set.
915         * emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Set.
916         * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Rename to...
917         (OTHER_RELRO_SECTIONS): ... this.
918         * ldlex.l (DATA_SEGMENT_RELRO_END): Add.
919         * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
920         -z relro and -z norelro.
921         (gld${EMULATION_NAME}_list_options): Add it to usage.
922         (gld${EMULATION_NAME}_get_script): Return -z combreloc -z now
923         -z relro scripts when appropriate.
924         * scripttempl/elf.sc: Unset SEPARATE_GOTPLT if RELRO_NOW is set.
925         Create separate .got.plt section if SEPARATE_GOTPLT.
926         Move sections which are only written during relocation handling
927         to the beginning of RW segment.  If NO_SMALL_DATA, move .got
928         before .data.  Add DATA_SEGMENT_RELRO_END directive.
929         Include OTHER_RELRO_SECTIONS.
930         * ldgram.y (DATA_SEGMENT_RELRO_END): Add.
931         * ldexp.c (exp_print_token): Handle DATA_SEGMENT_RELRO_END.
932         (fold_unary): Likewise.
933         (fold_binary): Handle -z relro.
934         * ldexp.h (struct exp_data_seg): Add exp_dataseg_relro_seen and
935         exp_dataseg_relro_adjust phases.  Add relro_end field.
936         * ldmain.c (main): Initialize link_info.relro to FALSE.
937         * ldlang.c (lang_size_sections): Handle -z relro.
938
939 2004-05-08  Marek Michalkiewicz  <marekm@amelek.gda.pl>
940
941         * scripttempl/avr.sc: Do not set LMA for "eeprom" section.
942
943 2004-05-07  J"orn Rennecke <joern.rennecke@superh.com>
944
945         * ldlang.c (print_padding_statement): Cast size_t to bfd_vma
946         before printing it with %W.
947
948 2004-05-07  Brian Ford  <ford@vss.fsi.com>
949             DJ Delorie  <dj@redhat.com>
950
951         * emultempl/pe.em (real_flags): New static.
952         (OPTION_LARGE_ADDRESS_AWARE): New define.
953         (gld${EMULATION_NAME}_add_options): Add --large-address-aware option.
954         (gld_${EMULATION_NAME}_list_options): Likewise.
955         (gld${EMULATION_NAME}_handle_option): Likewise.
956         (gld_${EMULATION_NAME}_after_open): Pass real_flags to PE private data.
957         * ld.texinfo: Document it.
958         * NEWS: Mention it.
959
960 2004-05-07  Brian Ford  <ford@vss.fsi.com>
961
962         * NEWS: Mention DWARF 2 support for i386pe.
963
964 2004-05-05  Alexandre Oliva  <aoliva@redhat.com>
965
966         * emulparams/elf32frvfd.sh (OUTPUT_FORMAT): Switch to new
967         elf32-frvfdpic.
968
969 2004-04-30  Alan Modra  <amodra@bigpond.net.au>
970
971         * ldlang.c (unique_section_p): Pass section parm, return true on
972         group sections.
973         (output_section_callback): Adjust.
974         * ldlang.h (unique_section_p): Update prototype.
975         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust.
976
977 2004-04-30  Eric Botcazou  <ebotcazou@act-europe.fr>
978
979         * ld.texinfo (--gc-sections): Remove restriction for
980         dynamic linking.
981
982 2004-04-29  Brian Ford  <ford@vss.fsi.com>
983
984         * scripttempl/pe.sc: Handle .debug* and .gnu.linkonce.wi.* sections
985         for DWARF 2/3.  Update stab section's syntax.
986
987 2004-04-29  Alan Modra  <amodra@bigpond.net.au>
988
989         * pe-dll.c: Revert changes accidentally committed 2004-03-08.
990         (fill_edata): Correct pointer arithmetic.
991
992 2004-04-21  Chris Demetriou  <cgd@broadcom.com>
993
994         * ld.texinfo: Remove MIPS --embedded-relocs documentation.
995         * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Remove definition.
996         * emulparams/mipsidt.sh (TEMPLATE_NAME): Use generic.em.
997         (EXTRA_EM_FILE): Use mipsecoff.em
998         * emulparams/mipsidtl.sh (TEMPLATE_NAME): Use generic.em.
999         (EXTRA_EM_FILE): Use mipsecoff.em
1000         * emultempl/mipsecoff.em: Restructure to be included as an
1001         extra emulation file.
1002         (check_sections, gld${EMULATION_NAME}_after_open)
1003         (gld${EMULATION_NAME}_after_allocation)
1004         (gld${EMULATION_NAME}_get_script)
1005         (ld_${EMULATION_NAME}_emulation): Remove
1006         (gld${EMULATION_NAME}_before_parse): Rename to...
1007         (mipsecoff_before_parse): This.
1008         (LDEMUL_BEFORE_PARSE): Define.
1009         * emultempl/mipself.em: Remove file.
1010         * scripttempl/mips.sc (.rel.sdata): Do not include in output.
1011         (__runtime_reloc_start, __runtime_reloc_stop): Stop providing
1012         these symbols.
1013         * Makefile.am: Remove dependencies on emultempl/mipself.em.
1014         * Makefile.in: Regenerate.
1015
1016 2004-04-21      Anil Paranjpe   <anilp1@kpitcummins.com>
1017
1018         * ld.texinfo (synthesizing on H8/300): Information about linker
1019         relaxation support for bit manipulation instructions and system
1020         control instructions is added.
1021
1022 2004-04-21  Hans-Peter Nilsson  <hp@axis.com>
1023
1024         * NEWS: Mention change in DEFINED semantics.
1025
1026 2004-04-21  Eric Botcazou  <ebotcazou@act-europe.fr>
1027
1028         * scripttempl/elf.sc (.text): Add KEEP for .text.*personality*.
1029         (.data): Add KEEP for .gnu.linkonce.d.*personality*.
1030         (.gcc_except_table): Add KEEP for self and accept .gcc_except_table.*.
1031
1032 2004-04-21  Ben Elliston  <bje@au.ibm.com>
1033
1034         * ld.texinfo (Simple Example): Add missing punctuation.
1035
1036 2004-04-20  Chris Demetriou  <cgd@broadcom.com>
1037
1038         * NEWS: Note that MIPS --embedded-relocs option is deprecated.
1039
1040 2004-04-19  Jakub Jelinek  <jakub@redhat.com>
1041
1042         * ldlang.c (lang_do_assignments_1): Handle .tbss output section
1043         specially.
1044
1045 2004-04-18  Danny Smith  <dannysmith@users.sourceforge.net>
1046
1047         * scriptempl/pe.sc:  Put numbered .ctors.* after .ctors
1048         with default priority. Likewise for dtors.
1049
1050 2004-04-11  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
1051
1052         * configure.host: Remove mips*-dec-bsd* target.
1053         * configure.tgt: Likewise.
1054
1055 2004-04-08  Richard Sandiford  <rsandifo@redhat.com>
1056
1057         * emulparams/elf32bsmip.sh (EXTRA_EM_FILE): Define to irix.
1058         * emulparams/elf64bmip.sh (EXTRA_EM_FILE): Likewise.
1059         * emulparams/elf32bmipn32.sh (EXTRA_EM_FILE): Likewise.
1060         * emultempl/irix.em: New file.
1061         * Makefile.am (eelf32bsmip.c, eelf32bmipn32.c, eelf64bmip.c): Update
1062         dependencies.
1063         * Makefile.in: Regenerate.
1064
1065 2004-04-01  Paul Brook  <paul@codesourcery.com>
1066
1067         * emultempl/armelf.em (byteswap_code): Add.
1068         (arm_elf_before_allocation): Pass extra parameter.
1069         (PARSE_AND_LIST_PROLOGUE): Add OPTION_BE8.
1070         (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add be8.
1071         (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_BE8.
1072         * emultempl/armelf_oabi.em: Pass extra parameter.
1073         * ld.texinfo: Document --be8.
1074
1075 2004-03-30  Stan Shebs  <shebs@apple.com>
1076
1077         Remove long-obsolete MPW support.
1078         * mpw-config.in, mpw-make.sed, mac-ld.r: Remove files.
1079         * Makefile.am (mpw): Remove file-presynthesizing actions.
1080         * Makefile.in: Likewise.
1081         * ldfile.c (slash): Remove MPW case.
1082         * ldlex.l [MPW]: Remove unused definition.
1083
1084 2004-03-30  Galit Heller  <Galit.Heller@nsc.com>
1085
1086         * Makefile.am (ALL_EMULATIONS): Add eelf32cr16c.o.
1087         (eelf32cr16c.c): New target.
1088         * Makefile.in: Regenerate.
1089         * configure.tgt: Handle cr16c-*-elf*.
1090         * emulparams/elf32cr16c.sh: New file.
1091         * scripttempl/elfcr16c.sc: Likewise
1092         * NEWS: Mention support for new target.
1093
1094 2004-03-30  Nick Clifton  <nickc@redhat.com>
1095
1096         * po/sv.po: Updated Swedish translation.
1097
1098 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
1099
1100         * emultempl/elf32.em: Update new bfd_elf_discard_info name.
1101         * emultempl/hppaelf.em: Likewise.
1102         * emultempl/ppc64elf.em: Likewise.
1103         * emultempl/sh64elf.em: Likewise.
1104
1105 2004-03-25  Alan Modra  <amodra@bigpond.net.au>
1106
1107         * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Update
1108         size_dynamic_sections call.
1109
1110 2004-03-23  Alan Modra  <amodra@bigpond.net.au>
1111
1112         PR 51.
1113         * emultempl/ppc64elf.em (ppc_create_output_section_statements): Set
1114         link_info.wrap_char.
1115
1116 2004-03-20  H.J. Lu  <hongjiu.lu@intel.com>
1117
1118         * lexsup.c (parse_args): Don't set unresolved_syms_in_objects
1119         or unresolved_syms_in_shared_libs for -Bdynamic and -Bstatic.
1120
1121 2004-03-20  Alexandre Oliva  <aoliva@redhat.com>
1122
1123         * emulparams/elf32frvfd.sh (MAXPAGESIZE): Change to 16Kb.
1124
1125 2004-03-19  Alan Modra  <amodra@bigpond.net.au>
1126
1127         * config.in: Regenerate.
1128         * po/ld.pot: Regenerate.
1129
1130 2004-03-18  Alan Modra  <amodra@bigpond.net.au>
1131
1132         * ld.texinfo: Add --as-needed doco.
1133         * ldmain.c (as_needed): New global var.
1134         * ldmain.h (as_needed): Declare.
1135         * lexsup.c (option_values): Add OPTION_AS_NEEDED and
1136         OPTION_NO_AS_NEEDED.
1137         (ld_options): Likewise.
1138         (parse_args): Handle them.
1139         * ldlang.h (lang_input_statement_type): Add as_needed field.
1140         * ldlang.c (new_afile): Set p->as_needed.
1141         * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): New function.
1142         (gld${EMULATION_NAME}_try_needed): Use bfd_elf_set_dyn_lib_class.
1143         (ld_${EMULATION_NAME}_emulation): Set LDEMUL_RECOGNIZED_FILE entry.
1144
1145         * ldlang.c (open_input_bfds): Remove useless cast.
1146         (lang_do_assignments_1): Likewise.
1147         (lang_for_each_input_section): Delete.
1148
1149 2004-03-17  Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1150
1151         * configure.tgt: Switch sh-*-rtems* to ELF.  Add sh-*-rtemscoff*.
1152
1153 2004-03-08  Danny Smith  <dannysmith@users.sourceforge.net>
1154
1155         * pe-dll.c (pe_dll_generate_implib): Skip sections marked as
1156         private when building implib.
1157
1158 2004-03-05  Nathan Sidwell  <nathan@codesourcery.com>
1159
1160         * ldlang.c (lang_add_section): Don't force SEC_LOAD on
1161         SEC_THREAD_LOCAL.
1162         (IGNORE_SECTION): Ignore .tbss sections too.
1163         (lang_size_sections_1): .tbss sections do not advance dot.
1164
1165 2004-03-01  Andreas Schwab  <schwab@suse.de>
1166
1167         * ld.texinfo (Options): Fix example for --wrap.
1168
1169 2004-02-25  Danny Smith  <dannysmith@users.sourceforge.net>
1170
1171         * pe-dll.c (fill_edata): Check that exported_symbol_sections is
1172         not NULL.
1173
1174 2004-02-23  Ian Lance Taylor  <ian@wasabisystems.com>
1175
1176         * ldlang.c (lang_check): Use %P, not %E, in error message.
1177
1178 2004-02-23  Nathan Sidwell  <nathan@codesourcery.com>
1179
1180         * ldlang.h (struct lang_output_section_state): Change processed
1181         field's type.
1182         * ldexp.c (check, invalid): Remove.
1183         (fold_name): Move valid_p assignments. Create undefined symbol
1184         when needed. Directly exampine section's processd flag.
1185         * ldlang.c (lang_output_section_statement_lookup): Adjust
1186         processed field init.
1187         (lang_size_sections_1): Allow LOADADDR when determining section's
1188         VMA. Adjust error message. Fold data statement's expr.
1189         (lang_size_sections): Correctly increment lang_statement_iteration.
1190
1191 2004-02-23  Alan Modra <amodra@bigpond.net.au>
1192
1193         * ldexp.c (fold_tree): Follow indirect symbols.
1194
1195 2004-02-20  Nathan Sidwell  <nathan@codesourcery.com>
1196
1197         * ldgram.y (exp): Add two operand ALIGN.
1198         * ldexp.c (fold_binary): Add ALIGN_K case.
1199         * ld.texinfo (ALIGN): Document two operand version.
1200
1201 2004-02-19  Nathan Sidwell  <nathan@codesourcery.com>
1202
1203         * ldlang.c (map_input_to_output_sections): Initialize sections
1204         mentioned in a data statement expression.
1205         (lang_do_assignments_1): Add data statement's expression's
1206         section's vma.
1207
1208 2004-02-18  Nathan Sidwell  <nathan@codesourcery.com>
1209
1210         * ldgram.y (statement_anywhere): Add assert rule.
1211         * ldlang.c (exp_init_os): Add assert case.
1212
1213 2004-02-14  Andrew Cagney  <cagney@redhat.com>
1214
1215         * ldmain.c (remove_output): Call bfd_cache_close.
1216
1217 2004-02-14  Richard Sandiford  <rsandifo@redhat.com>
1218
1219         * emulparams/elf32bmipn32-defs.sh (OTHER_SECTIONS): Discard
1220         .MIPS.content* and .MIPS.events* sections.
1221
1222 2004-02-09  Daniel Jacobowitz  <drow@mvista.com>
1223
1224         * emulparams/armelf.sh, emulparams/armelf_linux.sh: Move
1225         .note.gnu.arm.ident to after allocated sections.  Mark its
1226         address as 0.
1227
1228 2004-02-09  Daniel Jacobowitz  <drow@mvista.com>
1229
1230         * emulparams/armelf_linux.sh (COMMONPAGESIZE): Set to 4KB.
1231         * emulparams/elf32bmip.sh (COMMONPAGESIZE): Likewise.
1232         * emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Likewise.
1233         * emulparams/elf32btsmipn32.sh (COMMONPAGESIZE): Likewise.
1234         * emulparams/shlelf_linux.sh (COMMONPAGESIZE): Likewise.
1235
1236 2004-02-05  Nick Clifton  <nickc@redhat.com>
1237
1238         * emultempl/pe.em (_after_open): Fix typo in previous delta.
1239
1240 2004-02-04  Danny Smith  <dannysmith@users.sourceforge.net>
1241
1242         * emultempl/pe.em (_after_open): Fix thinko in 2003-12-18 patch.
1243
1244 2004-01-28  Alan Modra  <amodra@bigpond.net.au>
1245
1246         * genscripts.sh: Fix typo.
1247
1248         * genscripts.sh: Apply $LIBPATH_SUFFIX to $tool_lib and $libdir too.
1249
1250 2004-01-24  Jakub Jelinek  <jakub@redhat.com>
1251
1252         * emulparams/elf64_ia64.sh: Put .rela.opd into
1253         OTHER_GOT_RELOC_SECTIONS instead of OTHER_PLT_RELOC_SECTIONS.
1254
1255 2004-01-20  Danny Smith  <dannysmith@users.sourceforge.net>
1256
1257         * pe-dll.c (pe_create_import_fixup): Clear WP_TEXT flag.
1258         * ld.texinfo (--omagic): Note that writable text section
1259         does not conform to published PE-COFF specs.
1260         (--enable-auto-import): Likewise.
1261
1262 2004-01-15  Alan Modra  <amodra@bigpond.net.au>
1263
1264         * emulparams/elf32ppc.sh (COMMONPAGESIZE): Define.
1265
1266 2004-01-13  Nick Clifton  <nickc@redhat.com>
1267
1268         * ldlang.c (lang_get_regions): Add extra parameter 'have_vma'
1269         which if true will prevent the LMA region being used as a
1270         replacement for a default VMA region.
1271         (lang_leave_output_section_statement): Pass extra parameter.
1272         (lang_leave_overlay): Likewise.
1273         * ld.texinfo (Output Section LMA): Document that the LMA
1274         region can be set to the VMA region if no VMA has been set.
1275         * ldlang.h (struct lang_output_section_phdr_list): Create a
1276         typedef for this type.  Minor formatting fixes.
1277
1278 2004-01-13  Nick Clifton  <nickc@redhat.com>
1279
1280         * ldlang.c (lang_size_sections_1): If dot is advanced, then
1281         assume that the section should be allocated.
1282
1283 2004-01-13  Alan Modra  <amodra@bigpond.net.au>
1284
1285         * ldlang.c (IGNORE_SECTION): Don't ignore SEC_ALLOC && !SEC_LOAD
1286         sections.  Do ignore SEC_NEVER_LOAD sections.
1287         (lang_size_sections_1): Remove test made redundant with the above.
1288
1289 2004-01-09  Alan Modra  <amodra@bigpond.net.au>
1290
1291         * emultempl/ppc64elf.em (ppc_before_allocation): Clear cached
1292         program_header_size.
1293
1294 2004-01-06  Alexandre Oliva  <aoliva@redhat.com>
1295
1296         2003-11-28  Alexandre Oliva  <aoliva@redhat.com>
1297         * emulparams/elf32frvfd.sh (EMBEDDED): Clear.
1298         2003-11-05  Alexandre Oliva  <aoliva@redhat.com>
1299         * emulparams/elf32frvfd.sh (STACK_ADDR): Unset.
1300         (MAXPAGESIZE): Set to 64Kb.
1301         (OTHER_READONLY_SECTIONS): Define __ROFIXUP_LIST__ and
1302         __ROFIXUP_END__.  Don't map .rofixup.got any more.
1303         * emulparams/elf32frv.sh (NOP): Set.
1304         2003-10-31  Alexandre Oliva  <aoliva@redhat.com>
1305         * configure.tgt: Add frv-*-*linux*.
1306         2003-09-30  Alexandre Oliva  <aoliva@redhat.com>
1307         * Makefile.am (ALL_EMULATIONS): Added eelf32frvfd.o.
1308         (eelf32frvfd.c): New.
1309         * configure.tgt <frv-*-*>: Added it to targ_extra_emuls.
1310         * emulparams/elf32frv.sh: Reverted previous two patches.
1311         * emulparams/elf32frvfd.sh: New.
1312         * Makefile.in: Rebuilt.
1313         2003-09-18  Alexandre Oliva  <aoliva@redhat.com>
1314         * emulparams/elf32frv.sh (OTHER_READONLY_SECTIONS): Added
1315         .rofixup.got to .rofixup.
1316         2003-09-15  Alexandre Oliva  <aoliva@redhat.com>
1317         * emulparams/elf32frv.sh (MAXPAGESIZE): Make it 256KiB, not 256B.
1318         (TEMPLATE_NAME, GENERATE_SHLIB_SCRIPT): Set.
1319
1320 2004-01-05  Jakub Jelinek  <jakub@redhat.com>
1321
1322         * emulparams/elf_s390.sh (NO_SMALL_DATA): Set to yes.
1323         * emulparams/elf64_s390.sh (NO_SMALL_DATA): Set to yes.
1324
1325 2004-01-03  Alan Modra  <amodra@bigpond.net.au>
1326
1327         * ldexp.c (align_n): Make static.
1328         * ldexp.h (align_n): Delete declaration.
1329         * ldlang.h (lang_enter_output_section_statement): Remove
1330         block_value param.
1331         * ldlang.c (lang_enter_output_section_statement): Likewise.
1332         (TO_ADDR, TO_SIZE): Define.
1333         (opb_shift): New var.
1334         (init_opb): New function.
1335         (print_input_section): Call init_opb and use TO_ADDR.
1336         (print_data_statement, print_reloc_statement): Likewise.
1337         (print_padding_statement): Likewise.
1338         (size_input_section): Use TO_SIZE and TO_ADDR, and global opb_shift.
1339         (lang_check_section_addresses): Likewise.
1340         (lang_size_sections_1): Likewise.
1341         (lang_do_assignments_1): Likewise.
1342         (lang_set_startof): Likewise.
1343         (lang_one_common): Likewise.  Combine power_of_two and opb_shift align.
1344         (lang_process): Call init_opb.
1345         (lang_abs_symbol_at_end_of): Use TO_ADDR and global opb_shift.
1346         (lang_enter_overlay_section): Adjust
1347         lang_enter_output_section_statement call.
1348         * ldgram.y: Likewise.
1349         * mri.c (mri_draw_tree): Likewise.
1350         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Likewise.
1351         * emultempl/mmo.em (mmo_place_orphan): Likewise.
1352         * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Likewise.
1353
1354         * ldfile.c (ldfile_set_output_arch): Add defarch param.
1355         * ldfile.h (ldfile_set_output_arch): Ditto.
1356         * emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Use
1357         ldfile_set_output_arch.
1358         * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Ditto.
1359         * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Ditto.
1360         * emultempl/linux.em (gld${EMULATION_NAME}_before_parse): Ditto.
1361         * emultempl/mipsecoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
1362         * emultempl/pe.em (gld${EMULATION_NAME}_before_parse): Ditto.
1363         * emultempl/sunos.em (gld${EMULATION_NAME}_before_parse): Ditto.
1364         * ldgram.y: Adjust ldfile_set_output_arch call.
1365         * emultempl/armcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
1366         * emultempl/armelf.em (gld${EMULATION_NAME}_before_parse): Ditto.
1367         * emultempl/armelf_oabi.em (gld${EMULATION_NAME}_before_parse): Ditto.
1368         * emultempl/generic.em (gld${EMULATION_NAME}_before_parse): Ditto.
1369         * emultempl/gld960c.em (gld960_set_output_arch): Ditto.
1370         * emultempl/m68kcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
1371         * emultempl/ticoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
1372
1373 2004-01-02  Bernardo Innocenti  <bernie@develer.com>
1374
1375         * configure.tgt: Add m68k-uClinux target.
1376
1377 For older changes see ChangeLog-0203
1378 \f
1379 Local Variables:
1380 mode: change-log
1381 left-margin: 8
1382 fill-column: 74
1383 version-control: never
1384 End: