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