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