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