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