* Makefile.am (AM_MAKEINFOFLAGS, TEXI2DVI): Explicitly include
[external/binutils.git] / ld / ChangeLog
1 2005-05-17  Daniel Jacobowitz  <dan@codesourcery.com>
2
3         * Makefile.am (AM_MAKEINFOFLAGS, TEXI2DVI): Explicitly include
4         $(srcdir) before $(BFDDIR)/doc.
5         * Makefile.in: Regenerated.
6
7 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
8
9         PR 797
10         * ldexp.c (exp_fold_tree_1): Renamed from exp_fold_tree and
11         take take a bfd_boolean, mark_used. Ignore assert failure if
12         mark_used is TRUE.
13         (exp_fold_tree) Call exp_fold_tree_1 with mark_used == FALSE.
14         (exp_fold_tree_no_dot): Updated to take a bfd_boolean,
15         mark_used and pass down.
16         (fold_unary): Likewise.
17         (fold_binary): Likewise.
18         (fold_trinary): Likewise.
19         (exp_binop): Add FALSE to call to exp_fold_tree_no_dot.
20         (exp_trinop): Likewise.
21         (exp_unop): Likewise.
22         (exp_nameop): Likewise.
23         (exp_get_vma): Likewise.
24         (exp_get_fill): Likewise.
25         (exp_get_abs_int): Likewise.
26         (fold_name): Likewise. Set SEC_KEEP in output section flags.
27         (exp_mark_used_section): New.
28
29         * ldexp.h (exp_mark_used_section): New.
30
31         * ldlang.c (lang_output_section_statement_lookup_1): Set the
32         ignored field to FALSE.
33         (lang_mark_used_section_1): New.
34         (lang_mark_used_section): Call lang_mark_used_section_1.
35         (strip_excluded_output_sections): Call lang_mark_used_section
36         and check for unused sections.
37         (lang_size_sections_1): Skip an output section if it should
38         be ignored.
39         (lang_do_assignments_1): Likewise.
40         (lang_process): Don't call lang_mark_used_section here.
41
42         * ldlang.h (lang_output_section_statement_type): Change
43         all_input_readonly to bitfield. Add ignored.
44
45 2005-05-17  Lennert Buytenhek  <buytenh@wantstofly.org>
46             Peter S. Mazinger" <ps.m@gmx.net>
47
48         * emulparams/armelf_linux.sh (GENERATE_PIE_SCRIPT): Define as "yes". 
49         * emulparams/hppalinux.sh (GENERATE_PIE_SCRIPT): Define as "yes". 
50
51 2005-05-17  Julian Brown <julian@codesourcery.com>
52
53         * ldlang.c (print_assignment): Do not rely upon a valid result
54         having a section associated with it.
55
56 2005-05-17  Nick Clifton  <nickc@redhat.com>
57
58         * ldlang.c (Scan_for_self_assignment): Check an assignment tree to
59         see if the same value is being used on the rhs as on the lhs.
60         (print_assignment): Call scan_for_self_assignment and if it
61         returns true, do no display the result of the computation but
62         instead just the final value of the symbol on the lhs.
63         * ld.texinfo: Document this behaviour and provide an example of
64         when it will happen.
65
66 2005-05-15  Daniel Jacobowitz  <dan@codesourcery.com>
67
68         * Makefile.am (AM_MAKEINFOFLAGS): Define.
69         (TEXI2DVI): Define.
70         (ldver.texi): Depend on distributed files instead of built files.
71         (ld.info): Include $(srcdir) in the rule target.  Remove actions.
72         (ld.dvi): Remove actions.
73         (MAINTAINERCLEANFILES): Add configdoc.texi.
74         (CONFIG_STATUS_DEPENDENCIES): Add bfd/configure.in.
75         (install-data-local): Renamed from install.
76         (Makefile): Remove explicit dependency.
77         * acinclude.m4: Remove obsolete code.
78         * configure.in: Update AC_PREREQ.  Remove extra $CONFIG_SHELL.
79         * Makefile.in, aclocal.m4, config.in, configure: Regenerated.
80
81 2005-05-11  Bob Wilson  <bob.wilson@acm.org>
82
83         * scripttempl/elfxtensa.sc: Sync up with elf.sc.
84         * emulparams/elf32xtensa.sh (PLT, GOT): Define.
85
86 2005-05-11  Alan Modra  <amodra@bigpond.net.au>
87
88         * ldgram.y: Add SPECIAL token.
89         (sect_constraint): Handle SPECIAL.
90         * ldlang.c (lang_output_section_find_1): Don't match SPECIAL.
91         (map_input_to_output_sections): Likewise.
92         * ldlex.l (SPECIAL): Define.
93         * emulparams/elf32ppc.sh (DATA_GOT, SDATA_GOT, SEPARATE_GOTPLT,
94         GOT, PLT, GOTPLT): Define.
95         * emultempl/ppc32elf.em (old_plt, old_got): New static vars.
96         (ppc_after_open): New function.
97         (PARSE_AND_LIST_PROLOGUE): Define OPTION_OLD_LPT and OPTION_OLD_GOT.
98         (PARSE_AND_LIST_LONGOPTS): Add "bss-plt" and "sdata-got".
99         (PARSE_AND_LIST_OPTIONS): Document them.
100         (PARSE_AND_LIST_ARGS_CASES): Handle them.
101         (LDEMUL_AFTER_OPEN): Define.
102         * scripttempl/elf.sc (PLT): Don't override existing define.
103         (DATA_GOT, SDATA_GOT): Define and use to enable alternate got
104         placement rather than using NO_SMALL_DATA.  Emit GOTPLT for RELRO_NOW.
105
106 2005-05-10  Alan Modra  <amodra@bigpond.net.au>
107
108         * scripttempl/elf.sc (DATA_SEGMENT_RELRO_GOTPLT_END): Delete.
109         (DATA_SEGMENT_RELRO_END): Use SEPARATE_GOTPLT value.
110         (GOTPLT): Remove DATA_SEGMENT_RELRO_GOTPLT_END.  Place after
111         DATA_SEGMENT_RELRO_END in script.
112
113 2005-05-09  H.J. Lu  <hongjiu.lu@intel.com>
114
115         * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols):
116         Don't use a removed section.
117
118 2005-05-09  H.J. Lu  <hongjiu.lu@intel.com>
119
120         * ldmain.c (reloc_overflow): Use output_bfd if the symbol
121         is defined in the ABS section.
122
123 2005-05-06  H.J. Lu  <hongjiu.lu@intel.com>
124
125         * emultempl/elf32.em (gld${EMULATION_NAME}_provide_init_fini_syms):
126         Put back !link_info.relocatable.
127
128 2005-05-06  H.J. Lu  <hongjiu.lu@intel.com>
129
130         PR 878
131         * emultempl/elf32.em (gld${EMULATION_NAME}_provide_init_fini_syms):
132         Just check link_info.executable.
133
134 2005-05-06  Nick Clifton  <nickc@redhat.com>
135
136         * Update the address and phone number of the FSF organization in
137         the GPL notices in the following files:
138         aclocal.m4, deffile.h, deffilep.y, fdl.texi, ld.h, ldcref.c,
139         ldctor.c, ldctor.h, ldemul.c, ldexp.c, ldexp.h, ldfile.c,
140         ldfile.h, 20ldgram.y, ldint.texinfo, ldlang.c, ldlang.h, ldlex.h,
141         ldlex.l, ldmain.c, ldmain.h, ldmisc.c, ldmisc.h, ldver.c, ldver.h,
142         ldwrite.c, ldwrite.h, lexsup.c, mri.c, mri.h, pe-dll.c, pe-dll.h,
143         sysdep.h, emultempl/aix.em, emultempl/alphaelf.em,
144         emultempl/armcoff.em, emultempl/armelf.em, emultempl/beos.em,
145         emultempl/crxelf.em, emultempl/elf32.em, emultempl/generic.em,
146         emultempl/gld960.em, emultempl/gld960c.em, emultempl/hppaelf.em,
147         emultempl/ia64elf.em, emultempl/irix.em,  emultempl/linux.em,
148         emultempl/lnk960.em, emultempl/m68hc1xelf.em,
149         emultempl/m68kcoff.em, emultempl/m68kelf.em,
150         emultempl/mipsecoff.em, emultempl/mmix-elfnmmo.em,
151         emultempl/mmixelf.em, emultempl/mmo.em, emultempl/needrelax.em,
152         emultempl/pe.em, emultempl/ppc32elf.em, emultempl/ppc64elf.em,
153         emultempl/sh64elf.em, emultempl/sunos.em, emultempl/ticoff.em,
154         emultempl/vanilla.em, emultempl/xtensaelf.em
155
156 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
157
158         * scripttempl/elf.sc: Document the usage of __bss_start.
159
160 2005-05-05  Paul Brook  <paul@codesourcery.com>
161
162         * Makefile.am: Add eelf_i386_vxworks.
163         * Makefile.in: Regenerate.
164         * configure.tgt: Make i?86-*-vxworks use targ_emul=elf_i386_vxworks.
165         * emulparams/elf_i386_vxworks.sh: New file.
166         * emulparams/vxworks.sh: New file.
167         * scripttempl/elf.sc: Add DATA_END_SYMBOLS and ETEXT_NAME.
168
169 2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>
170
171         * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols):
172         Call _bfd_elf_provide_section_bound_symbols.
173
174 2005-05-04  Alan Modra  <amodra@bigpond.net.au>
175
176         * ldemul.c: Include bfdlink.h.
177         (ldemul_before_allocation): Assume before_allocation is non-zero.
178         (before_allocation_default): Call strip_excluded_output_sections.
179         * ldlang.c (stripped_excluded_sections): New variable.
180         (lang_add_section): Build input section list for each output
181         section, attached via map_head and map_tail pointers.
182         (strip_excluded_output_sections): Make global.  Traverse the
183         input section lists to find which output sections can go.  Clear
184         link_order pointers and set stripped_excluded_sections.
185         (lang_process): Call strip_excluded_output_sections.
186         * ldlang.h (strip_excluded_output_sections): Declare.
187         * ldwrite.c: Update throuhout for link_order_head -> map_head change.
188         * emultempl/aix.em (before_allocation): Call
189         strip_excluded_output_sections.
190         * emultempl/armcoff.em (before_allocation): Likewise.
191         * emultempl/beos.em (before_allocation): Likewise.
192         * emultempl/linux.em (before_allocation): Likewise.
193         * emultempl/pe.em (before_allocation): Likewise.
194         * emultempl/sunos.em (before_allocation): Likewise.
195         * emultempl/elf32.em (before_allocation): Likewise.  Call
196         bfd_elf_size_dynsym_hash_dynstr too.
197         * emultempl/lnk960.em (lnk960_before_allocation): Delete.
198         (ld_lnk960): Use before_allocation_default.
199
200 2005-05-02  H.J. Lu  <hongjiu.lu@intel.com>
201
202         * emultempl/elf32.em (gld${EMULATION_NAME}_strip_empty_section):
203         Updated for bfd_section_list_remove change.
204         * ldlang.c (lang_insert_orphan): Likewise.
205         (strip_excluded_output_sections): Likewise.
206         (sort_sections_by_lma): New.
207         (lang_check_section_addresses): Sort the sections before
208         checking addresses.
209
210 2005-04-29  Ralf Corsepius <ralf.corsepius@rtems.org>
211
212         * configure.tgt: Add h8300*-*-rtemscoff.
213         Switch h8300*-*-rtems* to elf.
214
215 2005-04-29  Ben Elliston  <bje@au.ibm.com>
216
217         * ldgram.y (lang_memory_region_type): Make static.
218         (ldgram_want_filename): Likewise.
219         * ldemul.c (ld_emulation): Make static.
220         * ldfile.h (ldfile_find_command_file): Remove extern.
221         * ldfile.c (ldfile_find_command_file): Make static.
222         * ldlang.h (unique_section_list): Remove extern declaration.
223         * ldlang.c (unique_section_list): Make static.
224         * mri.h (symbol_truncate): Remove extern declaration.
225         * mri.c (symbol_truncate): Make static.
226         (order, only_load, address, alias): Likewise.
227         (alignment, subalignment): Likewise.
228
229 2005-04-27  H.J. Lu  <hongjiu.lu@intel.com>
230
231         * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols):
232         Use the first SEC_ALLOC section which isn't SEC_READONLY or the
233         last SEC_ALLOC section if such a section doesn't exist.
234
235 2005-04-24  Mark Kettenis  <kettenis@gnu.org>
236
237         * configure.host: Add *-*-openbsd support.
238
239 2005-04-15  Julian Brown  <julian@codesourcery.com>
240
241         * ld.texinfo: Document --use-blx.
242         * emultempl/armelf.em (use_blx): New variable.
243         (arm_elf_create_output_section_statements): Communicate value of
244         use_blx to bfd.
245         (PARSE_AND_LIST_PROLOGUE): Add OPTION_USE_BLX.
246         (PARSE_AND_LIST_OPTIONS): Add --use-blx option.
247         (PARSE_AND_LIST_ARGS_CASES): Add OPTION_USE_BLX case.
248
249 2005-04-14  Alan Modra  <amodra@bigpond.net.au>
250
251         * Makefile.am (NO_WERROR): Define.  Use instead of -Wno-error.
252         * configure.in: Include ../bfd/warning.m4 contents.
253         * Makefile.in: Regenerate.
254         * configure: Regenerate.
255
256 2005-04-12  Alan Modra  <amodra@bigpond.net.au>
257
258         * Makefile.am: Run "make dep-am".
259         (ldgram.o, ldlex.o, deffilep.o): Add -Wno-error to command.
260         * Makefile.in: Regenerate.
261         * config.in: Regenerate.
262
263 2005-04-11  Alan Modra  <amodra@bigpond.net.au>
264
265         * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed): Ignore
266         as_needed libs that were not needed.
267         (gld${EMULATION_NAME}_check_needed): Likewise.
268
269 2005-04-07  Nick Clifton  <nickc@redhat.com>
270
271         * emultempl/m68kcoff.em: Include ldexp.h and ldlang.h so that
272         ldfile.h can use the lang_input_statement type.
273
274 2005-04-06  Jakub Jelinek  <jakub@redhat.com>
275
276         * ldlang.c: Formatting.
277         (walk_wild_consider_section): Remember return value from wildcardp.
278         (is_simple_wild): Use strcspn instead of 2 strpbrk calls and strlen.
279         (wild_spec_can_overlap): Use strcspn instead of strpbrk and strlen.
280
281 2005-04-06  Robert O'Callahan  <rocallahan@novell.com>
282
283         * ld.h (lean_section_userdata_type): Remove.
284         (fat_section_userdata_type): Remove file field.
285         (SECTION_USERDATA_SIZE): Remove.
286         * ldlang.c (init_os): Eliminate initialization of unused
287         lean_section_userdata_type.
288
289         * ldlang.h (callback_t, walk_wild_section_handler_t): New
290         typedefs.
291         (struct lang_wild_statement_struct): Add walk_wild_section_handler
292         and handler_data fields.
293         * ldlang.c (callback_t): Removed.
294         (walk_wild_consider_section, walk_wild_section_general,
295         section_iterator_callback, find_section, is_simple_wild,
296         match_simple_wild, walk_wild_section_specs1_wild0,
297         walk_wild_section_specs1_wild1, walk_wild_section_specs2_wild1,
298         walk_wild_section_specs3_wild2, walk_wild_section_specs4_wild2,
299         wild_spec_can_overlap, analyze_walk_wild_section_handler): New
300         functions.
301         (lang_add_wild): Call analyze_walk_wild_section_handler.
302         (walk_wild_section): Renamed to walk_wild_section_general and
303         created a wrapper function.
304         (section_iterator_callback_data): New typedef.
305
306 2005-04-04  Nick Clifton  <nickc@redhat.com>
307
308         * configure.in: Add a check for <unistd.h> providing a prototype
309         for getopt() which is compatible with the one in
310         include/getopt.h.  If so then define HAVE_DECL_GETOPT.
311         * configure: Regenerate.
312         * config.in (HAVE_DECL_GETOPT): Add.
313         * ldemul.c: Include config.h
314         * lexsup.c: Likewise.
315         * emultempl/elf32.sc: Likewise.
316
317 2005-03-29  Alan Modra  <amodra@bigpond.net.au>
318
319         * emultempl/elf32.em (gld${EMULATION_NAME}_layout_sections_again):
320         New function, extracted from static void gld${EMULATION_NAME}_finish.
321         (gld${EMULATION_NAME}_strip_empty_sections): Likewise.
322         (gld${EMULATION_NAME}_provide_init_fini_syms): Likewise.
323         * emultempl/ppc64elf.em: Revert last change.
324         (ppc_layout_sections_again): Use
325         gld${EMULATION_NAME}_layout_sections_again.
326         (ppc_finish): Don't call gld${EMULATION_NAME}_finish.  Instead call
327         gld${EMULATION_NAME}_strip_empty_sections and
328         gld${EMULATION_NAME}_provide_init_fini_syms.
329         * emultempl/hppaelf.em: Similarly.
330
331 2005-03-29  Alan Modra  <amodra@bigpond.net.au>
332
333         * emultempl/ppc64elf.em (need_laying_out): Delete.  Remove all refs.
334         (ppc_finish): Don't call bfd_elf_discard_info.
335         * emultempl/hppaelf.em: Similarly.
336
337 2005-03-24  Nick Clifton  <nickc@redhat.com>
338
339         * po/fr.po: Updated French translation.
340
341 2005-03-23  Mike Frysinger  <vapier@gentoo.org>
342             Nick Clifton  <nickc@redhat.com>
343
344         * configure.host: Accept any C library to accompany a GNU Linux
345         implementation, not just the GNU C library.
346         * configure.tgt: Likewise.
347         * emultempl/elf32.em: Likewise.
348
349 2005-03-22  H.J. Lu  <hongjiu.lu@intel.com>
350
351         * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols): New
352         (gld${EMULATION_NAME}_finish): Call
353         gld${EMULATION_NAME}_provide_bound_symbols to provide
354         __preinit_array_start, __preinit_array_end, __init_array_start,
355         __init_array_end, __fini_array_start and __fini_array_end.
356
357         * scripttempl/elf.sc: Don't provide __preinit_array_start,
358         __preinit_array_end, __init_array_start, __init_array_end,
359         __fini_array_start nor __fini_array_end.
360
361 2005-03-23  Alan Modra  <amodra@bigpond.net.au>
362
363         * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Set
364         SEC_EXCLUDE on .gnu.warning sections.
365
366 2005-03-22  Alan Modra  <amodra@bigpond.net.au>
367
368         * scripttempl/elf.sc (SBSS): Don't provide sbss start and end syms.
369
370 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
371
372         * emultempl/ppc32elf.em (gld${EMULATION_NAME}_after_allocation): New
373         function.
374         (LDEMUL_AFTER_ALLOCATION): Define.
375
376 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
377
378         * emultempl/ppc64elf.em (ppc_finish): Rename from
379         gld${EMULATION_NAME}_finish.  Call gld${EMULATION_NAME}_finish.
380         (LDEMUL_FINISH): Update.
381         * emultempl/hppaelf.em (hppaelf_finish, LDEMUL_FINISH): Likewise.
382         * emultempl/m68hc1xelf.em (m68hc11elf_finish, LDEMUL_FINISH): Likewise.
383
384 2005-03-18  Julian Brown  <julian@codesourcery.com>
385
386         * scripttempl/armbpapi.sc (.rel.dyn): Add .rel.init_array,
387         .rel.fini_array.
388         (.rela.dyn): Add .rela.init_array, .rela.fini_array.
389         (SECTIONS): Add .rel.other, .rela.other, .reli.other after PLT relocs.
390
391 2005-03-18  H.J. Lu  <hongjiu.lu@intel.com>
392
393         * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Don't set
394         bfd_section when removing unused empty output sections for
395         non-relocatable link.
396
397 2005-03-19  Alan Modra  <amodra@bigpond.net.au>
398
399         * ldlang.c (lang_insert_orphan): Use old section_tail rather than
400         traversing the bfd section list to find pointer to new section.
401
402 2005-03-18  Alan Modra  <amodra@bigpond.net.au>
403
404         * scripttempl/elf.sc: When CREATE_SHLIB, put .sdata2 and .sbss2
405         input sections into .sdata and .sbss output respectively.
406
407 2005-03-16  David Heine  <dlheine@tensilica.com>
408             Bob Wilson  <bob.wilson@acm.org>
409
410         * ldlang.c (IGNORE_SECTION): Remove check for zero size.
411         (lang_check_section_addresses): Ignore zero size sections here.
412
413 2005-03-16  H.J. Lu  <hongjiu.lu@intel.com>
414
415         * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Remove
416         unused empty output sections for non-relocatable link.
417
418         * ld.h (args_type): Remove gc_sections.
419
420         * ldlang.c (lang_mark_used_section): New.
421         (lang_gc_sections): Use link_info.gc_sections instead of
422         command_line.gc_sections.
423         * ldmain.c (main): Likewise.
424         * lexsup.c (parse_args): Likewise.
425         * ldlang.c (lang_process): Call lang_mark_used_section.
426
427         * ldmain.c (main): Initialize link_info.gc_sections to FALSE.
428
429 2005-03-16  Nick Clifton  <nickc@redhat.com>
430             Ben Elliston  <bje@au.ibm.com>
431
432         * configure.in (werror): New switch: Add -Werror to the
433         compiler command line.  Enabled by default.  Disable via
434         --disable-werror.
435         * configure: Regenerate.
436
437 2005-03-16  Alan Modra  <amodra@bigpond.net.au>
438
439         * emulparams/elf32ppclinux.sh (OTHER_READWRITE_SECTION): Delete.
440         (OTHER_RELRO_SECTIONS): Set this instead.
441
442 2005-03-15  Nick Clifton  <nickc@redhat.com>
443
444         * NEWS: Add cutoff for changes in 2.16 release.
445
446 2005-03-15  Mikkel Krautz  <krautz@gmail.com>
447
448         * configure.tgt (x86_64-elf): Add target.
449
450 2005-03-15  Alan Modra  <amodra@bigpond.net.au>
451
452         * po/es.po: Commit new Spanish translation.
453
454 2005-03-14  Alan Modra  <amodra@bigpond.net.au>
455
456         * ldexp.c (exp_fold_tree): Ensure return value is initialized.
457         Tidy etree_assert case.
458
459 2005-03-14  Alan Modra  <amodra@bigpond.net.au>
460
461         * po/tr.po: Commit new Turkish translation.
462
463 2005-03-11  Daniel Jacobowitz  <dan@codesourcery.com>
464
465         * Makefile.am: Remove references to em68klynx.o and esparclynx.o.
466         * Makefile.in: Regenerated.
467         * emulparams/m68klynx.sh, emulparams/sparclynx.sh: Remove.
468
469 2005-03-07  Nick Clifton  <nickc@redhat.com>
470
471         * po/fr.po: Updated translation.
472
473 2005-03-05  Alan Modra  <amodra@bigpond.net.au>
474
475         * po/ld.pot: Regenerate.
476
477 2005-03-02  Jan Beulich  <jbeulich@novell.com>
478
479         * ldmain.c (remove_output): Use unlink_if_ordinary instead of unlink.
480         * pe-dll.c (pe_dll_generate_implib): Likewise.
481
482 2005-02-24  Ben Elliston  <bje@au.ibm.com>
483
484         * ldfile.c: Remove GNU960 conditional code.
485         * emultempl/gld960.em: Likewise.
486         * emultempl/gld960c.em: Likewise.
487         * emultempl/lnk960.em: Likewise.
488
489 2005-02-24  Nick Clifton  <nickc@redhat.com>
490
491         * emultempl/lnk960.em (lnk960_before_parse): Remove redundant
492         empty string from calls to concat.
493
494 2005-02-23  Nick Clifton  <nickc@redhat.com>
495
496         * emultempl/lnk960.em (lnk960_before_parse): Terminate list of
497         arguments passed to concat() with a NULL.
498
499         * emultempl/m68kcoff.em: Include ldexp.h and ldlang.h because they
500         define types needed by ldfile.h
501
502 2005-02-23  Alan Modra  <amodra@bigpond.net.au>
503
504         * pe-dll.c: Warning fixes.
505         * emultempl/sunos.em: Likewise.
506
507 2005-02-22  Daniel Jacobowitz  <dan@codesourcery.com>
508
509         * ldlang.c (section_already_linked): Don't call
510         bfd_section_already_linked for dynamic objects.
511
512 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
513
514         * ldexp.c: Warning fixes.
515         * ldwrite.c: Likewise.
516         * emultempl/elf32.em: Likewise.
517
518 2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>
519
520         * ldlang.c (lang_add_section): Check SEC_TIC54X_BLOCK for TI
521         tic54x input only.
522         (lang_size_sections_1): Check SEC_COFF_SHARED_LIBRARY for COFF
523         and ECOFF output only.
524
525 2005-02-21  Alan Modra  <amodra@bigpond.net.au>
526
527         * config.in: Regenerate.
528         * configure: Regenerate.
529
530 2005-02-17  Zack Weinberg  <zack@codesourcery.com>
531
532         * ldexp.c (assigning_to_dot): New global flag.
533         (fold_name): If assigning_to_dot is true, object immediately to
534         an undefined symbol.
535         (exp_fold_tree): Set and clear assigning_to_dot around the
536         recursive call to exp_fold_tree to process the right-hand side
537         of an assignment to the location counter.
538
539 2005-02-17  Paul Brook  <paul@codesourcery.com>
540
541         * scripttempl/armbpabi.sc: Add dummy name to version block.
542
543 2005-02-17  Alan Modra  <amodra@bigpond.net.au>
544
545         * ldexp.c (new_abs): Init new.str.
546
547 2005-02-15  Mark Mitchell  <mark@codesourcery.com>
548
549         * configure.in (AC_CHECK_FUNCS): Add glob.
550         * configure: Regenerated.
551         * emultempl/elf32.em (<glob.h>): Do not include if HAVE_GLOB is
552         not defined.
553         (gld${EMULATION_NAME}_parse_ld_so_conf_include): Do not use glob
554         if HAVE_GLOB is not defined.
555
556 2005-02-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
557
558         * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Define
559         lib_path if NATIVE is yes.
560
561 2005-02-16  Alan Modra  <amodra@bigpond.net.au>
562
563         * emultempl/ppc64elf.em (ppc_create_output_section_statements): Make
564         an error creating fake bfd fatal.
565         (ppc_before_allocation): Continue on after errors.
566         (gld${EMULATION_NAME}_finish): Likewise.
567
568 2005-02-15  Nick Clifton  <nickc@redhat.com>
569
570         * ldlex.l (YY_NO_UNPUT): Define so that the yy_unput function is
571         not declared.  It is not used and its presence causes a compile
572         time warning.
573
574 2005-02-11  Zack Weinberg  <zack@codesourcery.com>
575
576         * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed):
577         If st.st_ino is zero, do not treat the library as a duplicate.
578
579 2005-02-10  Jakub Jelinek  <jakub@redhat.com>
580
581         * emultempl/hppaelf.em (hppaelf_create_output_section_statements):
582         Set BFD_LINKER_CREATED on the stubs bfd.
583         * emultempl/ppc64elf.em (ppc_create_output_section_statements):
584         Likewise.
585
586 2005-02-08  Mark Mitchell  <mark@codesourcery.com>
587
588         * scripttempl/armbpabi.sc (VERSION): Make special section symbols
589         local.
590         (Image$$ER_RO$$Base): Define whenever RELOCATING.
591         (Image$$ER_RO$$Limit): Likewise.
592         (SHT$$INIT_ARRAY$$Base): Likewise.
593         (SHT$$INIT_ARRAY$$Limit): Likeise.
594
595 2005-02-10  Ben Elliston  <bje@au.ibm.com>
596
597         * emultempl/beos.em: Remove #if 0 and #if 1 blocks.
598
599 2005-02-08  Richard Sandiford  <rsandifo@redhat.com>
600
601         * configure.tgt (mips64*el-*-linux-gnu*): Define targ_extra_libpath
602         to include o32 and n64 emulations.
603         (mips64*-*-linux-gnu*): Likewise.
604
605 2005-02-08  Hans-Peter Nilsson  <hp@axis.com>
606
607         * ldmain.c (warning_callback, warning_find_reloc): Prepend
608         "warning: " to warning messages.
609
610 2005-02-04  Alan Modra  <amodra@bigpond.net.au>
611
612         * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment): Don't
613         look up symbol for etree_provide here.
614
615 2005-02-02  Daniel Jacobowitz  <dan@codesourcery.com>
616
617         * emulparams/elf32bmip.sh (TEXT_DYNAMIC): Always set.
618
619 2005-02-01  Edward Welbourne  <eddy@opera.com>
620             Nick Clifton  <nickc@redhat.com>
621
622         * ld.texinfo (Source Code Reference): New node describing how to
623         access linker script defined variables from source code.
624
625 2005-02-01  Alan Modra  <amodra@bigpond.net.au>
626
627         * ld.texinfo: Clarify --as-needed operation.
628
629 2005-01-31  Andrew Cagney  <cagney@gnu.org>
630
631         * configure: Regenerate to track ../gettext.m4.
632
633 2005-01-31  Nick Clifton  <nickc@redhat.com>
634
635         * ldver.c (ldversion): Bump reported copyright date to 2005.
636
637 2005-01-31  Nick Clifton  <nickc@redhat.com>
638
639         * configure.tgt: Remove obsolete targets m68k-lynxos and
640         sparc-lynxos.
641
642 2005-01-28  Julian Brown  <julian@codesourcery.com>
643
644         * emultempl/armelf.em (fix_v4bx): New variable.
645         (arm_elf_create_output_section_statements): Communicate fix_v4bx flag
646         value to bfd.
647         (PARSE_AND_LIST_PROLOGUE): Add option token OPTION_FIX_V4BX.
648         (PARSE_AND_LIST_LONGOPTS): Add option --fix-v4bx.
649         (PARSE_AND_LIST_OPTIONS): Add option --fix-v4bx.
650         (PARSE_AND_LIST_ARGS_CASES): Add option OPTION_FIX_V4BX.
651         * NEWS: Mention --fix-v4bx.
652         * ld.texinfo: Document --fix-v4bx.
653
654 2005-01-25  Mark Mitchell  <mark@codesourcery.com>
655
656         * emulparams/armsymbian.sh (OTHER_READONLY_SECTIONS): Define, so
657         as to include .ARM.exidx$${Base,Limit}.
658         * ld/scripttempl/armbpabi.sc: Move .plt to end of text segment.
659         Define IMAGE$$ER_RO$${Base,Limit} and SHT$$INIT_ARRAY$${Base,Limit}.
660         Put .init_array, .fini_array, etc. into the read-only data
661         segment.
662
663 2005-01-25  Alan Modra  <amodra@bigpond.net.au>
664
665         * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Formatting.
666         (gld${EMULATION_NAME}_after_open): Ignore needed libs if they were
667         only needed by an as-needed lib that didn't get linked.
668
669 2005-01-23  Alan Modra  <amodra@bigpond.net.au>
670
671         * ld.texinfo (Output Section Keywords <CONSTRUCTORS>): Correct
672         __DTOR_LIST__ description.
673
674 2005-01-23  Alan Modra  <amodra@bigpond.net.au>
675
676         * ld.texinfo (Location Counter <dot outside sections>): Document
677         effects of orphan section placement, and ". = ." workaround.
678         * Makefile.in: Regenerate.
679
680 2005-01-22  Richard Sandiford  <rsandifo@redhat.com>
681
682         * emulparams/elf32bmip.sh (OTHER_GOT_SECTIONS): Add ". = .;".
683         * emulparams/elf32bmipn32-defs.sh (OTHER_GOT_SECTIONS): Likewise.
684
685 2005-01-21  Jakub Jelinek  <jakub@redhat.com>
686
687         * ldgram.y (AS_NEEDED): New token.
688         (input_list): Handle AS_NEEDED ( input_list ).
689         * ldlex.l (AS_NEEDED): Add.
690         * ld.texinfo: Document AS_NEEDED ().
691         * NEWS: Mention AS_NEEDED ().
692
693 2005-01-21  Ben Elliston  <bje@au.ibm.com>
694
695         * ldlang.c (lang_reasonable_defaults): Remove.
696         (lang_process): Don't call lang_reasonable_defaults.
697
698         * ldexp.c (exp_assop): Remove #if 0'd code.
699         (exp_print_tree): Likewise.
700         * ldlang.c (lang_memory_region_lookup): Likewise.
701         (open_output): Likewise.
702         (lang_do_assignments_1): Likewise.
703         (lang_place_orphans): Likewise.
704         (lang_enter_output_section_statement): Likewise.
705         (lang_reasonable_defaults): Likewise.
706         * ldlang.h (struct lang_input_statement_struct): Likewise.
707         * mri.c (mri_draw_tree): Likewise.
708         (mri_load): Likewise.
709         * pe-dll.c (generate_reloc): Likewise.
710         (make_import_fixup_entry): Likewise.
711         (pe_as16): Likewise.
712         * emultempl/beos.em (set_pe_subsystem): Likewise.
713         * emultempl/hppaelf.em (hppaelf_after_parse): Likewise.
714         * emultempl/pe.em: Likewise.
715         * emultempl/xtensaelf.em (xtensa_colocate_literals): Likewise.
716
717 2005-01-20  Daniel Jacobowitz  <dan@codesourcery.com>
718
719         * Makefile.am (ALL_EMULATIONS): Add earmelfb_linux_eabi.o.
720         (earmelfb_linux_eabi.c): New target.
721         * Makefile.in: Regenerated.
722         * configure.tgt (arm*b-*-linux-gnueabi): New target.
723         * emulparams/armelfb_linux_eabi.sh: New file.
724
725 2005-01-20  Nick Hudson  <skrll@netbsd.org>
726
727         PR ld/676
728         * emultempl/hppaelf.em (hppaelf_create_output_section_statements):
729         Handle bfd_elf32_hppa_nbsd_vec.
730
731 2005-01-19  Richard Sandiford  <rsandifo@redhat.com>
732
733         * ldmain.h (ld_sysroot): Change type to a constant string.
734         * ldmain.c (ld_sysroot): Likewise.
735         (get_relative_sysroot, get_sysroot): New functions, adding command-line
736         support for changing the sysroot.
737         (main): Call the new functions.
738         * lexsup.c (OPTION_SYSROOT): New.
739         (ld_options): Add --sysroot.
740         (parse_args): Add a dummy handler for it.
741         * ld.texinfo (--sysroot): Document.
742         * NEWS: Mention the new --sysroot option.
743
744 2005-01-18  Alan Modra  <amodra@bigpond.net.au>
745
746         * ldlang.c (section_already_linked): Adjust bfd_link_just_syms call.
747         (lang_place_orphans): Don't abort on just_syms_flag, instead call
748         bfd_link_just_syms.
749
750 2005-01-16  Danny Smith  <dannysmith@users.sourceforge.net>
751
752         * defilep.y (def_name, def_library): Combine into...
753         (def_image_name): New function.  Strip name to basename,
754         with warning.
755
756 2005-01-12  Mark Kettenis  <kettenis@gnu.org>
757
758         * configure.in: Be sure to invoke config.sub using the shell.
759         * configure: Regenerate.
760
761 2005-01-11  Alan Modra  <amodra@bigpond.net.au>
762
763         * configure.host: Correct sed patterns for last change.
764
765 2005-01-10  Nick Clifton  <nickc@redhat.com>
766
767         PR binutils/609
768         * ldmisc.c (vfinfo): Add an extra argument: is_warning.  Use this
769         to determine whether config.make_executable should be set to FALSE in
770         conjunction with config.fatal_warnings.
771         (info_msg, minfo, lfinof): Pass FALSE as the extra argument.
772         (einfo): Pass TRUE as the extra argument.
773
774 2005-01-10  Greg Schaffer  <gschafer@zip.com.au>
775
776         * configure.host (linux targets): Use "${CC} -dumpspecs" instead
777         of "${CC} --print-file-name=specs" to appease GCC versions >= 4.0.
778         (ia64-*-aix): Delete - this target is obsolete, and would be
779         broken by this patch.
780
781 2005-01-06  Eric Botcazou  <ebotcazou@libertysurf.fr>
782
783         * configure.host (sparc*-*-solaris2*): Rename into sparc-*-solaris2*.
784         (sparc64-sun-solaris2*): New host.
785
786 2005-01-06  Paul Brook  <paul@codesourcery.com>
787
788         * Makefie.am: Add earmelf_vxworks.
789         * Makefile.in: Regenerate.
790         * configure.tgt: Make arm-*-vxworks a separate case.
791         * emulparams/armelf_vxworks.sh: New function.
792
793 2005-01-06  Alan Modra  <amodra@bigpond.net.au>
794
795         * emultempl/ppc64elf.em (no_multi_toc): New var.
796         (gld${EMULATION_NAME}_finish): Pass to ppc64_elf_setup_section_lists.
797         (OPTION_NO_MULTI_TOC): Define.
798         (PARSE_AND_LIST_LONGOPTS): Add --no-multi-toc support.
799         (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Likewise.
800
801 2005-01-05  Nick Clifton  <nickc@redhat.com>
802
803         PR binutils/614
804         * ldmisc.c (vfinfo): Alter output to conform to the GNU Coding
805         Standard's specification for parsable error messages.
806
807 2005-01-04  Paul Brook  <paul@codesourcery.com>
808
809         * Makefile.am: Correct dependency for earmsymbian.c.
810         * Makefile.in: Regenerate.
811
812 2004-12-28  Danny Smith  <dannysmith@users.sourceforge.net>
813
814         * emultempl/pe.em (set_pe_subsystem): Change second arg to
815         lang_add_entry to FALSE.
816
817 2004-12-23  Nick Clifton  <nickc@redhat.com>
818
819         PR 600
820         * emulparams/shelf.sh (.stack): Increase stack start address to
821         0x300000.
822
823 2004-12-20  Nick Clifton  <nickc@redhat.com>
824
825         * ldmain.c (main): Issue an error message if -static and -shared
826         are used together.
827
828 2004-12-17  Jakub Jelinek  <jakub@redhat.com>
829
830         * ldexp.h (exp_data_seg): Add min_base and maxpagesize fields.
831         * ldexp.c (fold_binary) <case DATA_SEGMENT_ALIGN>: Initialize them.
832         * ldlang.c (lang_size_sections): Use them to avoid wasting virtual
833         address space at DATA_SEGMENT_ALIGN.  Fix computation of expected
834         PT_GNU_RELRO segment end.
835
836 2004-12-14  P.J. Darcy  <darcypj@us.ibm.com>
837
838         * configure.tgt: Add s390x-ibm-tpf support.
839
840 2004-12-16  Martin Kögler  <mkoegler@auto.tuwien.ac.at>
841
842         * ldmisc.c (vfinfo): Handle the case where %B is passed a NULL
843         BFD.
844
845 2004-12-07  Ben Elliston  <bje@gnu.org>
846
847         * ldemul.h: Forward declare struct option.
848
849 2004-12-01  Danny Smith  <dannysmith@users.sourceforge.net>
850
851         * scripttempl/pe.sc (.data): Add .jcr subsection.
852
853 2004-11-30  Paul Brook  <paul@codesourcery.com>
854
855         * emultempl/armelf.em: Ignore -p and -no-pipeline-knowledge.
856
857 2004-11-30  Tero Niemela  <tero_niemela@yahoo.com>
858
859         * Makefile.am: Change LOCALEDIR to $(datadir)/share.
860         * Makefile.in: Regenerate.
861
862 2004-11-26  Melissa Mears  <asterisk@graces.dricas.com>
863
864         * emultempl/pe.em: Add --subsystem:xbox as well as
865         --subsystem:%d.
866         * ld.texinfo: (ld_options): Document acceptance of subsystem xbox
867         and numeric subsystems.
868
869 2004-11-24  Alan Modra  <amodra@bigpond.net.au>
870
871         * ldexp.c (fold_name): Correct PR 338 fix.
872
873 2004-11-19  Mark Mitchell  <mark@codesourcery.com>
874
875         * Makefile.am (ALL_EMULATIONS): Add earmelf_linux_eabi.o.
876         (earmelf_linux_eabi.c): New target.
877         * configure.tgt (arm*-*-linux-gnueabi): Handle it.
878         * emulparams/armelf_linux_eabi.sh: New file.
879         * Makefile.in: Regenerated.
880
881 2004-11-19  Nick Clifton  <nickc@redhat.com>
882
883         PR 518
884         * ld.texinfo (MEMORY): Update the descriptions of the ORIGIN and
885         LENGTH fields in the MEMORY command, to explicitly state that
886         symbols cannot be used in their expressions.
887
888 2004-11-19  Jon Beniston <jon@beniston.com>
889
890         * ld/ldlex.l: Allow ORIGIN and LENGTH in EXPRESSION.
891         * ld/ldgram.y: Add ORIGIN and LENGTH expressions.
892         * ld/ldexp.c (fold_name): Implement LENGTH() and ORIGIN() functions
893         which return the length and origin of a memory.
894         * ld/ld.texinfo: Document LENGTH() and ORIGIN() functions.
895         * NEWS: Mention support for ORIGIN and LENGTH operators.
896
897 2004-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
898
899         * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Don't use
900         a dynamic object for stubs.
901
902 2004-11-04  Paul Brook  <paul@codesourcery.com>
903
904         * ld.texinfo: Document --default-imported-symver.
905         * ldmain.c (main): Set link_info.default_imported_symver.
906         * lexsup.c (option_values): Add OPTION_DEFAULT_IMPORTED_SYMVER.
907         (ld_options): Add --default-imported-symver.
908         (parse_args): Handle OPTION_DEFAULT_IMPORTED_SYMVER.
909
910 2004-11-08  Inderpreet Singh   <inderpreetb@nioda.hcltech.com>
911             Vineet Sharma      <vineets@noida.hcltech.com>
912
913         * Makefile.am: Add entries for new maxq-coff target.
914         * Makefile.in: Regenerate.
915         * configure.tgt: Add support for maxq.
916         * emulparams/maxqcoff.sh: New File.
917         * scripttempl/maxqcoff.sc: New linker script for target maxq.
918         * NEWS: Mention the new target.
919
920 2004-11-04  Daniel Jacobowitz  <dan@debian.org>
921
922         * Makefile.am (ALL_EMULATIONS): Remove earmelf_oabi.o.
923         (earmelf_oabi.c): Remove rule.
924         * configure.tgt: Remove arm-*-oabi and thumb-*-oabi.
925         * emulparams/armelf_oabi.sh, emultempl/armelf_oabi.em: Delete files.
926         * Makefile.in: Regenerated.
927
928 2004-11-04  Hans-Peter Nilsson  <hp@axis.com>
929
930         * configure.tgt (crisv32-*-*): Handle like cris-*-* for non-aout.
931         * emulparams/criself.sh (INIT_START): Remove emitted "push srp".
932         (FINI_START): Ditto.
933         (INIT_END): Remove emitted "jump [sp+]".
934         (FINI_END): Ditto.
935
936 2004-11-04  Alan Modra  <amodra@bigpond.net.au>
937
938         * emultempl/ppc64elf.em (no_tls_opt): Rename from notlsopt.
939         (no_opd_opt, no_toc_opt): New static vars.
940         (ppc_before_allocation): Don't edit opt if no_opd_opt.  Call
941         ppc64_elf_edit_toc.
942         (OPTION_NO_OPD_OPT, OPTION_NO_TOC_OPT): Define.
943         (PARSE_AND_LIST_LONGOPTS): Add no-opd-optimize and no-toc-optimize.
944         (PARSE_AND_LIST_OPTIONS): Describe new options.
945         (PARSE_AND_LIST_ARGS_CASES): Handle them.
946
947 2004-10-27  Nick Clifton  <nickc@redhat.com>
948
949         * emultempl/alphaelf.em (alpha_after_parse): Add extra, NULL,
950         parameter to invocation of lang_section_start.
951         * emultempl/aix.em (_handle_option): Likewise.
952
953         * Makefile.am (eelf64alpha.c, eelf64alpha_fbsd.c,
954         eelf64alpha_nbsd.c): Add dependency upon emultempl/alphaelf.em.
955         * Makefile.in: Regenerate.
956
957 2004-10-26  Mark Mitchell  <mark@codesourcery.com>
958
959         * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Do not emit
960         __exidx_{start,end} when not relocating.
961
962 2004-10-25  Mark Mitchell  <mark@codesourcery.com>
963
964         * Makefile.in (earmsymbian.c): Depend on armbpabi.sc, not elf.sc.
965         * ldexp.h (segment_type): New type.
966         (segments): New variable.
967         * ldexp.c (segments): New variable.
968         (exp_print_token): Handle SEGMENT_START.
969         (fold_binary): Likewise.
970         * ldgram.y (SEGMENT_START): Declare it as a token.
971         (exp): Handle SEGMENT_START.
972         * ldlang.h (lang_address_statement_type): Add segment field.
973         (lang_section_start): Change prototype.
974         * ldlang.c (map_input_to_output_sections): Do not process section
975         assignments if a corresponding SEGMENT_START has already been
976         seen.
977         (lang_section_start): Add segment parameter.
978         * ldlex.l (SEGMENT_START): Add it.
979         * lexsup.c (seg_segment_start): New function.
980         (parse_args): Use it for -Tbss, -Tdata, and -Ttext.
981         * ld.texinfo (SEGMENT_START): Document it.
982         * emulparams/armsymbian.sh (EMBEDDED): Set it.
983         * scripttempl/armbpabi.sc: Use SEGMENT_START to control segment
984         base addresses.  Do not map relocations.
985         * NEWS: Mention SEGMENT_START.
986
987 2004-10-26  Paul Brook  <paul@codesourcery.com>
988
989         * ld.texinfo: Document --default-symver.
990         * ldmain.c (main): Set link_info.create_default_symver.
991         * lexsup.c (enum option_values): Add OPTION_DEFAULT_SYMVER.
992         (ld_options): Add default-symver.
993         (parse_args): Handle OPTION_DEFAULT_SYMVER.
994
995 2004-10-24 Danny Smith  <dannysmith@users.sourceforge.net>
996
997         * pe-dll.c (process_def_file): Don't export all symbols by default if
998         building a position-independent executable.
999
1000 2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1001
1002         PR 463
1003         * ldmain.c (reloc_overflow): Accept a pointer to struct
1004         bfd_link_hash_entry. Report symbol location for relocation
1005         overflow.
1006
1007 2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1008
1009         * genscripts.sh (libpath.exp): Really generate for first
1010         emulation only.
1011
1012 2004-10-19  Danny Smith  <dannysmith@users.sourceforge.net>
1013
1014         * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Simplify
1015         comparison and replacement of filenames.
1016
1017 2004-10-19  H.J. Lu  <hongjiu.lu@intel.com>
1018
1019         PR 459
1020         * ldlang.c (load_symbols): Use the same -Bdynamic/-Bstatic
1021         option on linker script as the one for linker script.
1022
1023 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
1024
1025         * ldlang.c (struct excluded_lib, excluded_libs, add_excluded_libs)
1026         (check_excluded_libs): New.
1027         (load_symbols): Call check_excluded_libs.
1028         * ldlang.h (add_excluded_libs): New prototype.
1029         * emultempl/elf32.em (OPTION_EXCLUDED_LIBS): Define.
1030         (gld${EMULATION_NAME}_add_options): Add --exclude-libs.
1031         (gld${EMULATION_NAME}_handle_option): Handle --exclude-libs.
1032         * ld.texinfo (Command Line Variables): Document --exclude-libs.
1033         (Options Specific to i386 PE Targets): Remove --exclude-libs.
1034
1035 2004-10-15  Alan Modra  <amodra@bigpond.net.au>
1036
1037         * ldexp.c (exp_fold_tree): Don't immediately exit ld on a
1038         failing link script assert.
1039
1040         * ldctor.c (ldctor_add_set_entry): Fix comment typo.
1041
1042 2004-10-14  H.J. Lu  <hongjiu.lu@intel.com>
1043
1044         PR 445
1045         * emulparams/elf64_ia64.sh (SMALL_DATA_CTOR): Set.
1046         (SMALL_DATA_DTOR): Set.
1047         * emulparams/elf64_ia64_fbsd.sh (SMALL_DATA_CTOR): Unset.
1048         (SMALL_DATA_DTOR): Unset.
1049         * scripttempl/elf.sc: If SMALL_DATA_CTOR is set, move .ctors
1050         after .data. If SMALL_DATA_DTOR is set, move .dtors after
1051         .data.
1052
1053 2004-10-14  Alan Modra  <amodra@bigpond.net.au>
1054
1055         PR 63
1056         * ldlang.h (lang_output_section_statement_type): Make "next" a
1057         struct lang_output_section_statement_struct *.
1058         (struct orphan_save): Move from elf32.em.  Add "name" and "flags".
1059         (lang_output_section_find_by_flags, lang_insert_orphan): Declare.
1060         * ldlang.c (lang_output_section_find_1): Adjust for changed
1061         output_section_statement "next".
1062         (strip_excluded_output_sections): Likewise.
1063         (lang_record_phdrs): Likewise.
1064         (lang_output_section_find_by_flags): New function.
1065         (output_prev_sec_find): Move from pe.em.  Adjust iterator.
1066         (lang_insert_orphan): New function.  Tail end of elf32.em's
1067         place_orphan merged with that from pe.em.  Allow bfd_section to
1068         be placed first.  New heuristic for placing new output section
1069         statement in existing script, and accompanying split of __start
1070         symbol alignment into a separate assignment to dot.
1071         (lang_add_section): Consistently use output->bfd_section rather than
1072         an alias, section->output_section.
1073         (map_input_to_output_sections): Rename overly long arg.  Move
1074         initialization of data_statement output section to here..
1075         (lang_check_section_addresses): ..from here.
1076         (print_assignment): Correct printing of etree_assert.
1077         (print_all_symbols): Don't bomb if userdata is NULL.
1078         (IGNORE_SECTION): Rearrange.
1079         * emultempl/elf32.em (output_rel_find): Adjust interator.
1080         (output_prev_sec_find): Delete.
1081         (struct orphan_save): Delete.
1082         (gld${EMULATION_NAME}_place_orphan): Cater for zero bfd_section
1083         flags without creating a duplicate output section statement.
1084         Revise code holding history of various orphan section placements.
1085         Allow orphan sections to place before script specified output
1086         sections.  Call lang_output_section_find_by_flags when placement
1087         by name fails.  Use lang_insert_orphan.
1088         * emultempl/mmo.em (output_prev_sec_find): Delete.
1089         (struct orphan_save): Delete.
1090         (mmo_place_orphan): Revise code holding history of orphan placement.
1091         Allow orphans to place before existing output sections.  Use
1092         lang_insert_orphan.
1093         * emultempl/pe.em (output_prev_sec_find): Delete.
1094         (struct orphan_save): Delete.
1095         (gld_${EMULATION_NAME}_place_orphan): Revise to suit use of
1096         lang_insert_orphan.
1097
1098 2004-10-13  Mark Mitchell  <mark@codesourcery.com>
1099
1100         * scripttempl/armbpabi.sc: Do not put .gnu.version.* into a
1101         loadable segment.
1102
1103 2004-10-13  Alan Modra  <amodra@bigpond.net.au>
1104
1105         PR 44
1106         * ldcref.c (check_section_sym_xref): Delete.
1107         (check_local_sym_xref): New function.
1108         (check_nocrossrefs): Adjust call.
1109         * emultempl/pe.em (struct orphan_save): Add os_tail.
1110         (place_orphan): Backport assorted fixes from elf32.em.
1111
1112 2004-10-12  Bob Wilson  <bob.wilson@acm.org>
1113
1114         * emultempl/xtensaelf.em: Use ISO C90 formatting.
1115
1116 2004-10-11  Jakub Jelinek  <jakub@redhat.com>
1117
1118         * emultempl/elf32.em (gld${EMULATION_NAME}_parse_ld_so_conf): Avoid
1119         getline for portability.
1120
1121         * emultempl/elf32.em (gld${EMULATION_NAME}_ld_so_conf): New structure.
1122         (gld${EMULATION_NAME}_parse_ld_so_conf,
1123         gld${EMULATION_NAME}_parse_ld_so_conf_include): New functions.
1124         (gld${EMULATION_NAME}_check_ld_so_conf): Use them.
1125
1126 2004-10-11  Alan Modra  <amodra@bigpond.net.au>
1127
1128         PR 423
1129         * ldfile.c (ldfile_try_open_bfd): Ensure dynamic objects are
1130         rejected when linking statically.
1131
1132 2004-10-08  Daniel Jacobowitz  <dan@debian.org>
1133
1134         * configure.tgt: Include elf_x86_64 for i[3-7]86-*-solaris2*.
1135
1136 2004-10-07  Bob Wilson  <bob.wilson@acm.org>
1137
1138         * ld.texinfo (Xtensa): Describe new linker relaxation to optimize
1139         assembler-generated longcall sequences.  Describe new --size-opt
1140         option.
1141         * emulparams/elf32xtensa.sh (OTHER_SECTIONS): Add .xt.prop section.
1142         * emultempl/xtensaelf.em (remove_section,
1143         replace_insn_sec_with_prop_sec, replace_instruction_table_sections,
1144         elf_xtensa_after_open): New.
1145         (OPTION_OPT_SIZEOPT, OPTION_LITERAL_MOVEMENT,
1146         OPTION_NO_LITERAL_MOVEMENT): Define.
1147         (elf32xtensa_size_opt, elf32xtensa_no_literal_movement): New globals.
1148         (PARSE_AND_LIST_LONGOPTS): Add size-opt and [no-]literal-movement.
1149         (PARSE_AND_LIST_OPTIONS): Add --size-opt.
1150         (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_OPT_SIZEOPT,
1151         OPTION_LITERAL_MOVEMENT, and OPTION_NO_LITERAL_MOVEMENT.
1152         (LDEMUL_AFTER_OPEN): Set to elf_xtensa_after_open.
1153         * scripttempl/elfxtensa.sc: Update with changes from elf.sc.
1154         * Makefile.am (eelf32xtensa.c): Update dependencies.
1155         * Makefile.in: Regenerate.
1156
1157 2004-10-07  Jeff Baker  <jbaker@qnx.com>
1158
1159         * lexsup.c: Handle --warn-shared-textrel option.
1160         (ld_options): Restore alpha sorting of options.
1161         * ldmain.c (main): Initialise warn_shared_info field to FALSE.
1162         * ld.texinfo: Add documentation for --warn-shared-textrel.
1163         * NEWS: Added mention of --warn-shared-textrel option.
1164
1165 2004-10-05  Tomer Levi  <Tomer.Levi@nsc.com>
1166
1167         * emultempl/crxelf.em (disable_relaxation): Add.
1168         (crxelf_before_allocation): Enable --relax option by default.
1169         (PARSE_AND_LIST_PROLOGUE): Add OPTION_NO_RELAX.
1170         (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --no-relax.
1171         (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_NO_RELAX.
1172
1173 2004-10-04  H.J. Lu  <hongjiu.lu@intel.com>
1174
1175         * NEWS: Mention SORT_BY_NAME, SORT_BY_ALIGNMENT and
1176         --sort-section name|alignment.
1177
1178         * ld.texinfo: Document SORT_BY_NAME, SORT_BY_ALIGNMENT and
1179         --sort-section name|alignment.
1180
1181         * ld.h (sort_type): New enum.
1182         (wildcard_spec): Change the type of `sorted' to sort_type.
1183
1184         * ldgram.y (SORT): Removed.
1185         (SORT_BY_NAME): Added.
1186         (SORT_BY_ALIGNMENT): Added.
1187         (wildcard_spec): Updated `sorted'. Handle SORT_BY_NAME and
1188         SORT_BY_ALIGNMENT.
1189         (input_section_spec_no_keep): Updated `sorted'.
1190         (statement): Replace SORT with SORT_BY_NAME.
1191
1192         * ldlang.c (compare_section): New function to compare 2
1193         sections with different sorting schemes.
1194         (wild_sort): Updated. Use compare_section.
1195         (update_wild_statements): New function.
1196         (lang_process): Call update_wild_statements before
1197         map_input_to_output_sections.
1198
1199         * ldlex.l (SORT_BY_NAME): New.
1200         (SORT_BY_ALIGNMENT): New.
1201         (SORT): Return SORT_BY_NAME.
1202
1203         * ldmain.c (sort_section): New. Defined.
1204         (main): Initialize it to none.
1205
1206         * lexsup.c (option_values): Add OPTION_SORT_SECTION.
1207         (ld_options): Add an entry for OPTION_SORT_SECTION.
1208         (parse_args): Handle OPTION_SORT_SECTION.
1209
1210         * mri.c (mri_draw_tree): Updated `sorted'.
1211
1212 2004-10-04  Jakub Jelinek  <jakub@redhat.com>
1213
1214         * ldgram.y (DATA_SEGMENT_RELRO_END): Add one argument.
1215         * scripttempl/elf.sc (DATA_SEGMENT_RELRO_END): Add 0 as first
1216         argument.
1217         (DATA_SEGMENT_RELRO_GOTPLT_END): Pass $SEPARATE_GOTPLT as first
1218         and . as second argument.
1219         (GOTPLT): Move $DATA_SEGMENT_RELRO_GOTPLT_END before the section.
1220         * ldexp.c (fold_unary): Remove DATA_SEGMENT_RELRO_END handling here.
1221         (fold_binary): Add it here.  Insert padding to make relro_end
1222         COMMONPAGESIZE bytes aligned.  For DATA_SEGMENT_ALIGN in
1223         exp_dataseg_relro_adjust phase just use previously computed
1224         exp_data_seg.base.
1225         * ldlang.c (lang_size_sections): Set exp_data_seg.base for
1226         relro_adjust here.  Call lang_size_sections_1 once more if there
1227         was too big padding at DATA_SEGMENT_RELRO_END.
1228         * ld.texinfo (DATA_SEGMENT_RELRO_END): Add documentation.
1229
1230 2004-10-01  Paul Brook  <paul@codesourcery.com>
1231
1232         * emulparams/armelf.sh: Add unwinding table sections.
1233
1234 2004-09-30  Filip Navara  <navaraf@reactos.com>
1235
1236         * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Generate
1237         correct base address for position independant executables.
1238         * pe-dll.c (pe_dll_fill_sections): Don't mark position independant
1239         executables as DLLs.
1240
1241 2004-09-30  Paul Brook  <paul@codesourcery.com>
1242
1243         * ld.texinfo: Document --target2=abs.
1244         * emulparms/armsymbian.sh (TARGET2_TYPE): Set.
1245
1246 2004-09-29  Nick Clifton  <nickc@redhat.com>
1247
1248         * scripttempl/xstormy16.sc: Only perform the assignments to the
1249         ROM region when not performing a relocatable link.  The ROM region
1250         does not start at address 0, but the sections will.
1251         * Makefile.am: Fix linker script dependency for the generation of
1252         eelf32xstormy16.c.
1253         * Makefile.in: Regenerate.
1254
1255 2004-09-18  Filip Navara  <navaraf@reactos.com>
1256
1257         * emulparams/arm_epoc_pe.sh, emulparams/armpe.sh, emulparams/i386pe.sh,
1258         emulparams/i386pe_posix.sh, emulparams/mcorepe.sh,
1259         emulparams/mipspe.sh, emulparams/ppcpe.sh, scripttempl/pe.sc: Define
1260         TARGET_PAGE_SIZE.
1261         * scripttempl/pe.sc: Make the virtual address and file offset synced if
1262         the alignment is lower than the target page size.
1263
1264 2004-09-27  Filip Navara  <navaraf@reactos.com>
1265
1266         * emultempl/pe.em (gld_${EMULATION_NAME}_unrecognized_file): Allow
1267         def_file_parse to handle pe_def_file if NULL and prevent crash with
1268         invalid .def files.
1269
1270 2004-09-27  Alan Modra  <amodra@bigpond.net.au>
1271
1272         * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Enable
1273         --emit-stub-syms automatically when --emit-relocs.
1274
1275 2004-09-24  Paul Brook  <paul@codeosurcery.com>
1276
1277         * scripttempl/elf.sc: Keep .preinit_array, .init_array and
1278         .fini_array sections.
1279
1280 2004-09-19  Andreas Schwab  <schwab@suse.de>
1281
1282         * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Adjust data segment
1283         base so that relro end is suitably aligned.
1284
1285 2004-09-17  Paul Brook  <paul@codesourcery.com>
1286
1287         * ld.texinfo: Rename arm-specific section.  Document --target*
1288         * emulparams/armelf_fbsd.sh: Set TARGET2_TYPE.
1289         * emulparams/armelf_linux.sh: Ditto.
1290         * emulparams/armelf_nbsd.sh: Ditto.
1291         * emultempl/armelf.em: Set default for TARGET2_TYPE.
1292         (target2_type): New variable.
1293         (arm_elf_before_allocation): Don't pass target1_type.
1294         (arm_elf_create_output_section_statements): New function.
1295         (PARSE_AND_LIST_PROLOGUE): Add OPTION_TARGET2.
1296         (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --target=.
1297         (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_TARGET2.
1298         (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Set.
1299         * emultempl/armelf_oabi.em (_before_allocation): Remove extra
1300         argument to bfd_elf32_arm_process_before_allocation.
1301
1302 2004-09-17  Alan Modra  <amodra@bigpond.net.au>
1303
1304         * ldexp.c (fold_name): Update u.undef.next refs.
1305         * emultempl/pe.em: Likewise.
1306         * emultempl/sunos.em: Likewise.
1307
1308 2004-09-17  Alan Modra  <amodra@bigpond.net.au>
1309
1310         * Makefile.am: Run "make dep-am".
1311         * Makefile.in: Regenerate.
1312         * config.in: Regenerate.
1313         * configure: Regenerate.
1314         * aclocal.m4: Regenerate.
1315         * po/ld.pot: Regenerate.
1316
1317 2004-09-16  Tomer Levi  <Tomer.Levi@nsc.com>
1318
1319         * scripttempl/elf32crx.sc (.init): Add KEEP for section's *personality*.
1320         (.fini): Likewise.
1321         (.jcr): Likewise.
1322
1323 2004-09-16  Alan Modra  <amodra@bigpond.net.au>
1324
1325         * emultempl/armelf_oabi.em (before_allocation): Add extra zero param
1326         to bfd_elf32_arm_process_before_allocation call.
1327
1328 2004-09-13  Paul Brook  <paul@codesourcery.com>
1329
1330         * emulparams/armsymbian.sh: Set TARGET1_IS_REL.
1331         * emultempl/armelf.em: Use TARGET1_IS_REL.  Add --target1-{rel,abs}.
1332
1333 2004-09-07  H.J. Lu  <hongjiu.lu@intel.com>
1334
1335         * configure: Regenerated with autconfig 2.13.
1336
1337 2004-09-07  Andreas Schwab  <schwab@suse.de>
1338
1339         * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Apply data segment
1340         alignment before adjusting DATA_SEGMENT_RELRO_END.
1341
1342 2004-09-06  Mark Mitchell  <mark@codesourcery.com>
1343
1344         * emulparams/armsymbian.sh: Use armbpabi script.
1345         * scripttempl/armbpabi.sc: New script.
1346
1347 2004-09-02  Mark Mitchell  <mark@codesourcery.com>
1348
1349         * Makefile.am (ALL_EMULATIONS): Add earmsymbian.o.
1350         (earmsymbian.c): New target.
1351         * configure.tgt: Use armsymbian emulation for arm*-*-symbianelf*.
1352         * Makefile.in: Regenerated.
1353         * aclocal.m4: Likewise.
1354         * configure: Likewise.
1355         * emulparams/armsymbian.sh: New file.
1356
1357 2004-09-03  Tomer Levi  <Tomer.Levi@nsc.com>
1358
1359         * scripttempl/elf32crx.sc: Edit file with comments.
1360         (.init): Add new section.
1361         (.fini): Likewise.
1362         (.ctor): Control the linkage order.
1363         (.dtor): Likewise.
1364
1365 2004-08-27  Nick Clifton  <nickc@redhat.com>
1366
1367         * emultempl/pe.em (after_open): Do not assume that either bfd is
1368         an archive.
1369
1370 2004-08-26  Alan Modra  <amodra@bigpond.net.au>
1371
1372         * ldlang.c (lang_init): Don't compare with TRUE.
1373
1374 2004-08-25  Dmitry Diky  <diwil@spec.ru>
1375
1376         * emulparams/msp430all.sh: Fix RAM sizes for all targets.
1377         * scripttempl/elf32msp430.sc: Add .profiler section definition.
1378
1379 2004-08-24  H.J. Lu  <hongjiu.lu@intel.com>
1380
1381         * ldlang.c (wildcardp): Defined as a macro with strpbrk.
1382
1383 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
1384
1385         * configure.tgt (arm*-*-symbianelf*): New target.
1386         (arm*-*-eabi*): Likewise.
1387
1388 2004-08-19  Jakub Jelinek  <jakub@redhat.com>
1389
1390         * emultempl/ppc64elf.em (non_overlapping_opd): New variable.
1391         (ppc_before_allocation): Pass it to ppc64_elf_edit_opd).
1392         (OPTION_NON_OVERLAPPING_OPD): Define.
1393         (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Add
1394         --non-overlapping-opd option.
1395
1396 2004-08-18  Alan Modra  <amodra@bigpond.net.au>
1397
1398         PR 338
1399         * ldexp.c (fold_name): Don't call bfd_link_add_undef if the symbol
1400         was already on the undefs list.
1401
1402 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
1403
1404         * emultempl/ppc64elf.em (gld${EMULATION_NAME}_new_vers_pattern): Dot
1405         prefix the symbol field too.
1406
1407 2004-08-13  Alan Modra  <amodra@bigpond.net.au>
1408
1409         * ldmain.c (link_callbacks): Remove "error_handler".
1410         * ldmisc.c: Include elf-bfd.h.
1411         (vfinfo): Sort comment.  Handle %A.  Use %A instead of
1412         bfd_get_section_indent.
1413         (error_handler): Delete.
1414         * ldmisc.h (error_handler): Delete declaration.
1415
1416 2004-08-10  Alan Modra  <amodra@bigpond.net.au>
1417
1418         * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Call
1419         ppc64_elf_restore_symbols.
1420
1421 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
1422
1423         * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Error if
1424         .toc is too large on relocatable linking.
1425
1426 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
1427
1428         * emultempl/ppc64elf.em (ppc_after_open): Delete.
1429         (LDEMUL_AFTER_OPEN): Don't define.
1430
1431 2004-08-02  Stephane Carrez  <stcarrez@nerim.fr>
1432
1433         * ld.texinfo (Top): Document specific options of 68HC11 and 68HC12.
1434
1435 2004-08-01  Stephane Carrez  <stcarrez@nerim.fr>
1436
1437         * scripttempl/elfm68hc12.sc: Align text, rodata and data section
1438         on power of 2.
1439
1440 2004-07-27  Jason Thorpe  <thorpej@wasabisystems.com>
1441
1442         * emulparams/hppanbsd.sh (OUTPUT_FORMAT): Set to "elf32-hppa-netbsd".
1443
1444 2004-07-26  Dmitry Diky  <diwil@spec.ru>
1445
1446         * Makefile.am: Add new subtargets: msp430x1610, msp430x1611,
1447         msp430x1612, msp430x415, msp430x417, msp430xG437, msp430xG438,
1448         msp430xG439.
1449         * configure.tgt: Likewise.
1450         * emulparams/msp430all.sh: Likewise.
1451         * Makefile.in: Regenerate.
1452
1453 2004-07-23  Nick Clifton  <nickc@redhat.com>
1454
1455         * emultempl/elf32.em (_place_orphan): Use an already existing
1456         section name if that section does not have any flags set.
1457
1458 2004-07-21  H.J. Lu  <hongjiu.lu@intel.com>
1459
1460         * ldlang.c (already_linked_hash_entry): Removed.
1461         (already_linked): Likewise.
1462         (already_linked_table): Likewise.
1463         (section_already_linked): Call bfd_section_already_linked.
1464         (lang_process): Replace already_linked_table_init with
1465         bfd_section_already_linked_table_init and check return. Replace
1466         already_linked_table_free with bfd_section_already_linked_table_free.
1467
1468 2004-07-21  Nick Clifton  <nickc@redhat.com>
1469
1470         * ldlang.c (init_os): Make sure that the newly allocated userdata
1471         structure is zeroed out.
1472
1473 2004-07-19  H.J. Lu  <hongjiu.lu@intel.com>
1474
1475         * NEWS: Mention the new --add-needed/--no-add-needed and
1476         --as-needed/--no-as-needed options.
1477
1478 2004-07-19  H.J. Lu  <hongjiu.lu@intel.com>
1479
1480         * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): Also
1481         check the add_needed field.
1482         (dt_needed): New struct.
1483         (gld${EMULATION_NAME}_try_needed): Change the first argument
1484         to a pointer to struct dt_needed. Check the DYN_NO_ADD_NEEDED
1485         bit in the file where the DT_NEEDED entry comes from.
1486         (gld${EMULATION_NAME}_search_needed): Change the second
1487         argument to a pointer to struct dt_needed.
1488         (gld${EMULATION_NAME}_check_ld_so_conf): Updated.
1489         (gld${EMULATION_NAME}_after_open): Likewise.
1490
1491         * ld.texinfo: Add --add-needed document.
1492         * ldlang.c (new_afile): Set p->add_needed.
1493         * ldlang.h (lang_input_statement_type): Add add_needed field.
1494         * ldmain.h (add_needed): Declare.
1495         * ldmain.c (add_needed): New global var.
1496         * lexsup.c (option_values): Add OPTION_ADD_NEEDED and
1497         OPTION_NO_ADD_NEEDED.
1498         (ld_options): Likewise.
1499         (parse_args): Handle them.
1500
1501 2004-07-13  Christof Petig  <christof@petig-baender.de>
1502
1503         * emultempl/pe.em (make_import_fixup): Use bfd_get_32 to correct
1504         for endian-ness of extracted addend.
1505
1506 2004-07-13  Danny Smith  <dannysmith@usesr.sourceforge.net>
1507
1508         * pe-dll.c (auto_export):  Filter on just the import prefix,
1509         "_imp_", not "_imp__".
1510
1511 2004-07-09  Nick Clifton  <nickc@redhat.com>
1512
1513         * configure.tgt: Change sh-sybmian-elf to sh-*-symbianelf.
1514
1515 2004-07-06  Tomer Levi  <Tomer.Levi@nsc.com>
1516
1517         * Makefile.am (ALL_EMULATIONS): Add eelf32crx.o.
1518         (eelf32crx.c): New target.
1519         * Makefile.in: Regenerate.
1520         * configure.tgt: Handle crx-*-elf*.
1521         * emulparams/elf32crx.sh: New file.
1522         * emultempl/crxelf.em: New file.
1523         * scripttempl/elf32crx.sc: New file.
1524         * NEWS: Mention new target.
1525
1526 2004-07-06  Nick Clifton  <nickc@redhat.com>
1527
1528         * Makefile.am: Add eshlsymbian.c.
1529         * Makefile.in: Regenerate.
1530         * configure.tgt: Add sh*-symbian-elf target.
1531         * emulparams/shlsymbian.sh: New file.  Configure the
1532         sh-symbian-elf linker scripts.
1533         * scripttemp/elf32sh-symbian.sc: New file.  Linker script
1534         template for the sh-symbian-elf target.
1535
1536 2004-07-05  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1537
1538         * emulparams/hppa64linux.sh: Define PLT_BEFORE_GOT.
1539         * emulparams/hppalinux.sh: Likewise.
1540         * scripttempl/elf.sc: Place .plt just before .got when .plt is in
1541         data segment and PLT_BEFORE_GOT is defined.
1542
1543 2004-07-03  Aaron W. LaFramboise  <aaron98wiridge9@aaronwl.com>
1544
1545         * ld.texinfo (WIN32): Document PE weak symbols.
1546
1547 2004-07-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1548
1549         * emulparams/shlelf32_linux.sh (COMMONPAGESIZE): Set to 4KB.
1550
1551 2004-07-01  H.J. Lu  <hongjiu.lu@intel.com>
1552
1553         * ldmisc.c (vfinfo): Call bfd_get_section_ident to identify
1554         the section.
1555
1556 2004-06-29  Alan Modra  <amodra@bigpond.net.au>
1557
1558         * ldlang.c (lang_reset_memory_regions): Save last relax pass section
1559         size in rawsize.
1560
1561 2004-06-24  Alan Modra  <amodra@bigpond.net.au>
1562
1563         * ldlang.c (print_output_section_statement): Don't print size before
1564         relaxation.
1565         (IGNORE_SECTION): Remove bfd arg.  Update all callers.
1566
1567         * ldexp.c (fold_name): .. See below.
1568         * ldlang.c (section_already_linked, print_output_section_statement,
1569         print_input_section, insert_pad, size_input_section,
1570         lang_check_section_addresses, lang_size_sections_1,
1571         lang_size_sections, lang_do_assignments_1, lang_set_startof,
1572         lang_one_common, lang_reset_memory_regions, lang_process,
1573         lang_abs_symbol_at_end_of, lang_do_version_exports_section): ..
1574         * ldwrite.c (build_link_order, clone_section, ds, split_sections): ..
1575         * pe-dll.c (process_def_file, generate_reloc): ..
1576         * emultempl/elf32.em (gld${EMULATION_NAME}_find_statement_assignment,
1577         gld${EMULATION_NAME}_before_allocation): ..
1578         * emultempl/mmix-elfnmmo.em (mmix_after_allocation): ..
1579         * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation,
1580         sh64_elf_${EMULATION_NAME}_after_allocation): ..
1581         * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): ..
1582         * emultempl/xtensaelf.em (ld_assign_relative_paged_dot,
1583         ld_local_file_relocations_fit, ld_xtensa_insert_page_offsets): Use
1584         "size" instead of "_raw_size" and "_cooked_size".  Expand
1585         bfd_section_size macro invocations.
1586
1587 2004-06-22  Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
1588
1589         * ld/scripttemp/pe.sc (.CRT): Define ___crt_xc_start__,
1590         ___crt_xc_end__, ___crt_xi_start__, ___crt_xi_end__, ___crt_xl_start__,
1591         ___crt_xp_start__, ___crt_xp_end__, ___crt_xt_start__ and
1592         ___crt_xt_end__.
1593         (.tls): Define ___tls_start__ and ___tls_end__.
1594
1595 2004-06-21  Alexandre Oliva  <aoliva@redhat.com>
1596
1597         * emulparams/elf32frvfd.sh (GENERATE_PIE_SCRIPT): Set to yes.
1598
1599 2004-06-18  Adam Nemet  <anemet@lnxw.com>
1600
1601         * configure.in: Set EXTRA_SHLIB_EXTENSION to .a for LynxOS.
1602         * configure: Regenerate.
1603
1604 2004-06-15  Jakub Jelinek  <jakub@redhat.com>
1605
1606         * scripttempl/elf.sc: Readd KEEP and .gcc_except_table.* to
1607         .gcc_except_table output sections lost accidentally with
1608         -z relro patch.
1609
1610 2004-06-15  Alan Modra  <amodra@bigpond.net.au>
1611
1612         * ldwrite.c (build_link_order): Use bfd_get_section_size
1613         instead of bfd_get_section_size_before_reloc or _raw_size.
1614         * pe-dll.c (process_def_file): Likewise.
1615
1616 2004-06-14  Alan Modra  <amodra@bigpond.net.au>
1617
1618         From Richard Wirth <r.wirth@wirthware.de>
1619         * ldlang.c (lang_finish): Don't free lang_definedness_table.
1620
1621 2004-05-29  Alan Modra  <amodra@bigpond.net.au>
1622
1623         * ldlang.c (gc_section_callback): Move SEC_EXCLUDE twiddles..
1624         (lang_gc_sections): .. to a LANG_FOR_EACH_INPUT_STATEMENT loop here.
1625
1626 2004-05-28  Alan Modra  <amodra@bigpond.net.au>
1627
1628         * ldlang.c: Formatting.  Wrap long lines, expand bfd_get_section_flags
1629         throughout file.
1630         * lexsup.c: Formatting.  Wrap long lines.
1631         * ldwrite.c: Update copyright date.
1632
1633         * ldlang.c (lang_add_section): Don't twidlle SEC_EXCLUDE here.
1634         (output_section_callback): Nor SEC_KEEP here.
1635         (gc_section_callback): Twiddle SEC_EXCLUDE here.
1636         (lang_gc_wild): Delete.  Fold into..
1637         (lang_gc_sections_1): ..here.  Only call bfd_gc_sections when garbage
1638         collecting.
1639         (lang_process): Always call lang_gc_sections.
1640         (lang_place_orphans): Handle SEC_EXCLUDE sections.
1641         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Remove
1642         SEC_EXCLUDE code.
1643
1644 2004-05-26  H.J. Lu  <hongjiu.lu@intel.com>
1645
1646         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Clear
1647         SEC_EXCLUDE on non-SEC_DEBUGGING sections for relocatable link.
1648         * ldlang.c (lang_add_section): Likewise.
1649
1650 2004-05-26  Alan Modra  <amodra@bigpond.net.au>
1651
1652         * ldlang.c (lang_add_section): Set SEC_EXCLUDE for SEC_GROUP
1653         sections when doing a final link.  Clear SEC_EXCLUDE when doing
1654         a relocable link, except for SEC_DEBUGGING sections.
1655         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Use the
1656         same condition here to drop SEC_EXCLUDE orphan sections.
1657
1658 2004-05-25  Alan Modra  <amodra@bigpond.net.au>
1659
1660         * ldlang.c (lang_process): Call bfd_merge_sections later, and
1661         only when not a relocatable link.
1662         (print_input_section): Handle SEC_EXCLUDE sections.
1663         (size_input_section): Don't update dot on SEC_EXCLUDE sections.
1664         (lang_do_assignments_1): Likewise.
1665         * ldwrite.c (build_link_order): Ignore SEC_EXCLUDE input sections.
1666         * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Likewise.
1667         * emultempl/hppaelf.em (build_section_lists): Likewise.
1668         * emultempl/ppc64elf.em (build_toc_list): Likewise.
1669         (build_section_lists): Likewise.
1670
1671 2004-05-23  Andreas Schwab  <schwab@suse.de>
1672
1673         * ld.texinfo (Options): Fix typo in last change.
1674
1675 2004-05-21  Andy Chittenden  <achittenden@bluearc.com>
1676
1677         * ld.h (ld_config_type): Add new field: hash_table_size.
1678         * ldmain.c: Initialise the new field to zero.  If it is non-zero
1679         after parsing the linker's command line call
1680         bfd_hash_set_default_size.
1681         * lexsup.c (option_values): Add OPTION_HASH_SIZE.
1682         (ld_options): Add hash-size.
1683         (parse_args): Parse --hash-size option.  Allow
1684         --reduce-memory-overheads to set the default hash table size as
1685         well.
1686         * ld.texinfo: Document the new switch.  Also mention that
1687         --reduce-memory-overheads can affect the hash table size.
1688         * NEWS: Mention the new feature.
1689
1690 2004-05-19  J"orn Rennecke <joern.rennecke@superh.com>
1691
1692         * NEWS: Mention new linker map file generation and the
1693         --reduce-memory-overheads option.
1694         * ld.texinfo: Document --reduce-memory-overheads option.
1695         * ld.h (map_symbol_def): New struct.
1696         (struct user_section_struct, section_userdata_type): Rename to:
1697         (struct lean_user_section_struct, lean_section_userdata_type).
1698         (struct fat_user_section_struct, fat_section_userdata_type): New.
1699         (SECTION_USERDATA_SIZE): Define.
1700         (args_type): New member reduce_memory_overheads.
1701         * ldlang.c (map_obstack): New static variable.
1702         (init_map_userdata, print_all_symbols, sort_def_symbol): New functions.
1703         (lang_map): Unless command_line.reduce_memory_overheads is set,
1704         initialize lists of defined symbols for each section.
1705         (print_input_section): Unless command_line.reduce_memory_overheads
1706         is set, use print_all_symbols.
1707         (init_os): Use lean_section_userdata_type / SECTION_USERDATA_SIZE.
1708         * ldmain.c (main): Initialize command_line.reduce_memory_overheads.
1709         * lexsup.c (enum option_values): Add OPTION_REDUCE_MEMORY_OVERHEADS.
1710         (ld_options): Add entry for --reduce-memory-overheads.
1711         (parse_args): Handle OPTION_REDUCE_MEMORY_OVERHEADS.
1712
1713 2004-05-19  Jakub Jelinek  <jakub@redhat.com>
1714
1715         * ldgram.y (sect_constraint): New.
1716         (ONLY_IF_RO, ONLY_IF_RW): New tokens.
1717         (section): Add sect_constraint.  Pass additional argument
1718         to lang_enter_output_section_statement.
1719         * mri.c (mri_draw_tree): Pass additional argument to
1720         lang_enter_output_section_statement.
1721         * emultempl/pe.em (place_orphan): Likewise.
1722         (output_prev_sec_find): Disregard output section statements with
1723         constraint == -1.
1724         * emultempl/mmo.em (output_prev_sec_find): Likewise.
1725         (mmo_place_orphan): Pass additional argument to
1726         lang_enter_output_section_statement.
1727         * emultempl/elf32.em (output_prev_sec_find): Disregard output section
1728         statements with constraint == -1.
1729         (place_orphan): Pass additional argument to
1730         lang_enter_output_section_statement.
1731         * ldlang.c (lang_enter_overlay_section): Likewise.
1732         (lang_output_section_find_1): New.
1733         (lang_output_section_find): Use it.
1734         (lang_output_section_statement_lookup_1): New.
1735         (lang_output_section_statement_lookup): Use it.
1736         (check_section_callback, check_input_sections): New.
1737         (map_input_to_output_sections): Check if all input sections
1738         are readonly if ONLY_IF_RO or ONLY_IF_RW was seen.
1739         (strip_excluded_output_sections): Disregard output section statements
1740         with constraint == -1.
1741         (lang_record_phdrs): Likewise.
1742         (lang_enter_output_section_statement): Add constraint argument.
1743         Use lang_output_section_statement_lookup_1.
1744         * ldlang.h (lang_output_section_statement_type): Add constraint
1745         and all_input_readonly fields.
1746         (lang_enter_output_section_statement): Adjust prototype.
1747         * ldlex.l (ONLY_IF_RO, ONLY_IF_RW): New tokens.
1748         * scripttempl/elf.sc (.eh_frame, .gcc_except_table): Move into text
1749         segment if all input sections are readonly.
1750
1751 2004-05-19  Adam Nemet  <anemet@lnxw.com>
1752
1753         * scripttempl/i386lynx.sc: Remove file.
1754
1755 2004-05-17  Bob Wilson  <bob.wilson@acm.org>
1756
1757         * ld.texinfo (Output Section Address): Correct subsection name.
1758
1759 2004-05-17  Adam Nemet  <anemet@lnxw.com>
1760
1761         * configure.tgt (powerpc-*-lynxos* case): New case.
1762         * configure.host (i[3-7]86-*-lynxos* case): Remove case.
1763         * emulparams/ppclynx.sh: New file.
1764         * emulparams/i386lynx.sh (SCRIPT_NAME): Update to LynxOS 4.0.
1765         * Makefile.am (ALL_EMULATIONS): Add eppclynx.o
1766         (ei386lynx.c): Update rule to LynxOS 4.0 ELF.
1767         (eppclynx.c): New rule.
1768         * Makefile.in: Regenerate.
1769
1770 2004-05-13  Joel Sherrill <joel@oarcorp.com>
1771
1772         * configure.tgt (or32-*-rtems*): Switch to elf and
1773         support versioned targets.
1774
1775 2004-05-13  Nick Clifton  <nickc@redhat.com>
1776
1777         * po/fr.po: Updated French translation.
1778
1779 2004-05-11  Jakub Jelinek  <jakub@redhat.com>
1780
1781         * genscripts.sh: Generate -z combreloc -z now -z relro scripts
1782         for binaries, -shared and -pie.
1783         * emulparams/elf_i386.sh (SEPARATE_GOTPLT): Set.
1784         * emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Set.
1785         * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Rename to...
1786         (OTHER_RELRO_SECTIONS): ... this.
1787         * ldlex.l (DATA_SEGMENT_RELRO_END): Add.
1788         * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
1789         -z relro and -z norelro.
1790         (gld${EMULATION_NAME}_list_options): Add it to usage.
1791         (gld${EMULATION_NAME}_get_script): Return -z combreloc -z now
1792         -z relro scripts when appropriate.
1793         * scripttempl/elf.sc: Unset SEPARATE_GOTPLT if RELRO_NOW is set.
1794         Create separate .got.plt section if SEPARATE_GOTPLT.
1795         Move sections which are only written during relocation handling
1796         to the beginning of RW segment.  If NO_SMALL_DATA, move .got
1797         before .data.  Add DATA_SEGMENT_RELRO_END directive.
1798         Include OTHER_RELRO_SECTIONS.
1799         * ldgram.y (DATA_SEGMENT_RELRO_END): Add.
1800         * ldexp.c (exp_print_token): Handle DATA_SEGMENT_RELRO_END.
1801         (fold_unary): Likewise.
1802         (fold_binary): Handle -z relro.
1803         * ldexp.h (struct exp_data_seg): Add exp_dataseg_relro_seen and
1804         exp_dataseg_relro_adjust phases.  Add relro_end field.
1805         * ldmain.c (main): Initialize link_info.relro to FALSE.
1806         * ldlang.c (lang_size_sections): Handle -z relro.
1807
1808 2004-05-08  Marek Michalkiewicz  <marekm@amelek.gda.pl>
1809
1810         * scripttempl/avr.sc: Do not set LMA for "eeprom" section.
1811
1812 2004-05-07  J"orn Rennecke <joern.rennecke@superh.com>
1813
1814         * ldlang.c (print_padding_statement): Cast size_t to bfd_vma
1815         before printing it with %W.
1816
1817 2004-05-07  Brian Ford  <ford@vss.fsi.com>
1818             DJ Delorie  <dj@redhat.com>
1819
1820         * emultempl/pe.em (real_flags): New static.
1821         (OPTION_LARGE_ADDRESS_AWARE): New define.
1822         (gld${EMULATION_NAME}_add_options): Add --large-address-aware option.
1823         (gld_${EMULATION_NAME}_list_options): Likewise.
1824         (gld${EMULATION_NAME}_handle_option): Likewise.
1825         (gld_${EMULATION_NAME}_after_open): Pass real_flags to PE private data.
1826         * ld.texinfo: Document it.
1827         * NEWS: Mention it.
1828
1829 2004-05-07  Brian Ford  <ford@vss.fsi.com>
1830
1831         * NEWS: Mention DWARF 2 support for i386pe.
1832
1833 2004-05-05  Alexandre Oliva  <aoliva@redhat.com>
1834
1835         * emulparams/elf32frvfd.sh (OUTPUT_FORMAT): Switch to new
1836         elf32-frvfdpic.
1837
1838 2004-04-30  Alan Modra  <amodra@bigpond.net.au>
1839
1840         * ldlang.c (unique_section_p): Pass section parm, return true on
1841         group sections.
1842         (output_section_callback): Adjust.
1843         * ldlang.h (unique_section_p): Update prototype.
1844         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust.
1845
1846 2004-04-30  Eric Botcazou  <ebotcazou@act-europe.fr>
1847
1848         * ld.texinfo (--gc-sections): Remove restriction for
1849         dynamic linking.
1850
1851 2004-04-29  Brian Ford  <ford@vss.fsi.com>
1852
1853         * scripttempl/pe.sc: Handle .debug* and .gnu.linkonce.wi.* sections
1854         for DWARF 2/3.  Update stab section's syntax.
1855
1856 2004-04-29  Alan Modra  <amodra@bigpond.net.au>
1857
1858         * pe-dll.c: Revert changes accidentally committed 2004-03-08.
1859         (fill_edata): Correct pointer arithmetic.
1860
1861 2004-04-21  Chris Demetriou  <cgd@broadcom.com>
1862
1863         * ld.texinfo: Remove MIPS --embedded-relocs documentation.
1864         * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Remove definition.
1865         * emulparams/mipsidt.sh (TEMPLATE_NAME): Use generic.em.
1866         (EXTRA_EM_FILE): Use mipsecoff.em
1867         * emulparams/mipsidtl.sh (TEMPLATE_NAME): Use generic.em.
1868         (EXTRA_EM_FILE): Use mipsecoff.em
1869         * emultempl/mipsecoff.em: Restructure to be included as an
1870         extra emulation file.
1871         (check_sections, gld${EMULATION_NAME}_after_open)
1872         (gld${EMULATION_NAME}_after_allocation)
1873         (gld${EMULATION_NAME}_get_script)
1874         (ld_${EMULATION_NAME}_emulation): Remove
1875         (gld${EMULATION_NAME}_before_parse): Rename to...
1876         (mipsecoff_before_parse): This.
1877         (LDEMUL_BEFORE_PARSE): Define.
1878         * emultempl/mipself.em: Remove file.
1879         * scripttempl/mips.sc (.rel.sdata): Do not include in output.
1880         (__runtime_reloc_start, __runtime_reloc_stop): Stop providing
1881         these symbols.
1882         * Makefile.am: Remove dependencies on emultempl/mipself.em.
1883         * Makefile.in: Regenerate.
1884
1885 2004-04-21      Anil Paranjpe   <anilp1@kpitcummins.com>
1886
1887         * ld.texinfo (synthesizing on H8/300): Information about linker
1888         relaxation support for bit manipulation instructions and system
1889         control instructions is added.
1890
1891 2004-04-21  Hans-Peter Nilsson  <hp@axis.com>
1892
1893         * NEWS: Mention change in DEFINED semantics.
1894
1895 2004-04-21  Eric Botcazou  <ebotcazou@act-europe.fr>
1896
1897         * scripttempl/elf.sc (.text): Add KEEP for .text.*personality*.
1898         (.data): Add KEEP for .gnu.linkonce.d.*personality*.
1899         (.gcc_except_table): Add KEEP for self and accept .gcc_except_table.*.
1900
1901 2004-04-21  Ben Elliston  <bje@au.ibm.com>
1902
1903         * ld.texinfo (Simple Example): Add missing punctuation.
1904
1905 2004-04-20  Chris Demetriou  <cgd@broadcom.com>
1906
1907         * NEWS: Note that MIPS --embedded-relocs option is deprecated.
1908
1909 2004-04-19  Jakub Jelinek  <jakub@redhat.com>
1910
1911         * ldlang.c (lang_do_assignments_1): Handle .tbss output section
1912         specially.
1913
1914 2004-04-18  Danny Smith  <dannysmith@users.sourceforge.net>
1915
1916         * scriptempl/pe.sc:  Put numbered .ctors.* after .ctors
1917         with default priority. Likewise for dtors.
1918
1919 2004-04-11  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
1920
1921         * configure.host: Remove mips*-dec-bsd* target.
1922         * configure.tgt: Likewise.
1923
1924 2004-04-08  Richard Sandiford  <rsandifo@redhat.com>
1925
1926         * emulparams/elf32bsmip.sh (EXTRA_EM_FILE): Define to irix.
1927         * emulparams/elf64bmip.sh (EXTRA_EM_FILE): Likewise.
1928         * emulparams/elf32bmipn32.sh (EXTRA_EM_FILE): Likewise.
1929         * emultempl/irix.em: New file.
1930         * Makefile.am (eelf32bsmip.c, eelf32bmipn32.c, eelf64bmip.c): Update
1931         dependencies.
1932         * Makefile.in: Regenerate.
1933
1934 2004-04-01  Paul Brook  <paul@codesourcery.com>
1935
1936         * emultempl/armelf.em (byteswap_code): Add.
1937         (arm_elf_before_allocation): Pass extra parameter.
1938         (PARSE_AND_LIST_PROLOGUE): Add OPTION_BE8.
1939         (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add be8.
1940         (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_BE8.
1941         * emultempl/armelf_oabi.em: Pass extra parameter.
1942         * ld.texinfo: Document --be8.
1943
1944 2004-03-30  Stan Shebs  <shebs@apple.com>
1945
1946         Remove long-obsolete MPW support.
1947         * mpw-config.in, mpw-make.sed, mac-ld.r: Remove files.
1948         * Makefile.am (mpw): Remove file-presynthesizing actions.
1949         * Makefile.in: Likewise.
1950         * ldfile.c (slash): Remove MPW case.
1951         * ldlex.l [MPW]: Remove unused definition.
1952
1953 2004-03-30  Galit Heller  <Galit.Heller@nsc.com>
1954
1955         * Makefile.am (ALL_EMULATIONS): Add eelf32cr16c.o.
1956         (eelf32cr16c.c): New target.
1957         * Makefile.in: Regenerate.
1958         * configure.tgt: Handle cr16c-*-elf*.
1959         * emulparams/elf32cr16c.sh: New file.
1960         * scripttempl/elfcr16c.sc: Likewise
1961         * NEWS: Mention support for new target.
1962
1963 2004-03-30  Nick Clifton  <nickc@redhat.com>
1964
1965         * po/sv.po: Updated Swedish translation.
1966
1967 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
1968
1969         * emultempl/elf32.em: Update new bfd_elf_discard_info name.
1970         * emultempl/hppaelf.em: Likewise.
1971         * emultempl/ppc64elf.em: Likewise.
1972         * emultempl/sh64elf.em: Likewise.
1973
1974 2004-03-25  Alan Modra  <amodra@bigpond.net.au>
1975
1976         * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Update
1977         size_dynamic_sections call.
1978
1979 2004-03-23  Alan Modra  <amodra@bigpond.net.au>
1980
1981         PR 51.
1982         * emultempl/ppc64elf.em (ppc_create_output_section_statements): Set
1983         link_info.wrap_char.
1984
1985 2004-03-20  H.J. Lu  <hongjiu.lu@intel.com>
1986
1987         * lexsup.c (parse_args): Don't set unresolved_syms_in_objects
1988         or unresolved_syms_in_shared_libs for -Bdynamic and -Bstatic.
1989
1990 2004-03-20  Alexandre Oliva  <aoliva@redhat.com>
1991
1992         * emulparams/elf32frvfd.sh (MAXPAGESIZE): Change to 16Kb.
1993
1994 2004-03-19  Alan Modra  <amodra@bigpond.net.au>
1995
1996         * config.in: Regenerate.
1997         * po/ld.pot: Regenerate.
1998
1999 2004-03-18  Alan Modra  <amodra@bigpond.net.au>
2000
2001         * ld.texinfo: Add --as-needed doco.
2002         * ldmain.c (as_needed): New global var.
2003         * ldmain.h (as_needed): Declare.
2004         * lexsup.c (option_values): Add OPTION_AS_NEEDED and
2005         OPTION_NO_AS_NEEDED.
2006         (ld_options): Likewise.
2007         (parse_args): Handle them.
2008         * ldlang.h (lang_input_statement_type): Add as_needed field.
2009         * ldlang.c (new_afile): Set p->as_needed.
2010         * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): New function.
2011         (gld${EMULATION_NAME}_try_needed): Use bfd_elf_set_dyn_lib_class.
2012         (ld_${EMULATION_NAME}_emulation): Set LDEMUL_RECOGNIZED_FILE entry.
2013
2014         * ldlang.c (open_input_bfds): Remove useless cast.
2015         (lang_do_assignments_1): Likewise.
2016         (lang_for_each_input_section): Delete.
2017
2018 2004-03-17  Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2019
2020         * configure.tgt: Switch sh-*-rtems* to ELF.  Add sh-*-rtemscoff*.
2021
2022 2004-03-08  Danny Smith  <dannysmith@users.sourceforge.net>
2023
2024         * pe-dll.c (pe_dll_generate_implib): Skip sections marked as
2025         private when building implib.
2026
2027 2004-03-05  Nathan Sidwell  <nathan@codesourcery.com>
2028
2029         * ldlang.c (lang_add_section): Don't force SEC_LOAD on
2030         SEC_THREAD_LOCAL.
2031         (IGNORE_SECTION): Ignore .tbss sections too.
2032         (lang_size_sections_1): .tbss sections do not advance dot.
2033
2034 2004-03-01  Andreas Schwab  <schwab@suse.de>
2035
2036         * ld.texinfo (Options): Fix example for --wrap.
2037
2038 2004-02-25  Danny Smith  <dannysmith@users.sourceforge.net>
2039
2040         * pe-dll.c (fill_edata): Check that exported_symbol_sections is
2041         not NULL.
2042
2043 2004-02-23  Ian Lance Taylor  <ian@wasabisystems.com>
2044
2045         * ldlang.c (lang_check): Use %P, not %E, in error message.
2046
2047 2004-02-23  Nathan Sidwell  <nathan@codesourcery.com>
2048
2049         * ldlang.h (struct lang_output_section_state): Change processed
2050         field's type.
2051         * ldexp.c (check, invalid): Remove.
2052         (fold_name): Move valid_p assignments. Create undefined symbol
2053         when needed. Directly exampine section's processd flag.
2054         * ldlang.c (lang_output_section_statement_lookup): Adjust
2055         processed field init.
2056         (lang_size_sections_1): Allow LOADADDR when determining section's
2057         VMA. Adjust error message. Fold data statement's expr.
2058         (lang_size_sections): Correctly increment lang_statement_iteration.
2059
2060 2004-02-23  Alan Modra <amodra@bigpond.net.au>
2061
2062         * ldexp.c (fold_tree): Follow indirect symbols.
2063
2064 2004-02-20  Nathan Sidwell  <nathan@codesourcery.com>
2065
2066         * ldgram.y (exp): Add two operand ALIGN.
2067         * ldexp.c (fold_binary): Add ALIGN_K case.
2068         * ld.texinfo (ALIGN): Document two operand version.
2069
2070 2004-02-19  Nathan Sidwell  <nathan@codesourcery.com>
2071
2072         * ldlang.c (map_input_to_output_sections): Initialize sections
2073         mentioned in a data statement expression.
2074         (lang_do_assignments_1): Add data statement's expression's
2075         section's vma.
2076
2077 2004-02-18  Nathan Sidwell  <nathan@codesourcery.com>
2078
2079         * ldgram.y (statement_anywhere): Add assert rule.
2080         * ldlang.c (exp_init_os): Add assert case.
2081
2082 2004-02-14  Andrew Cagney  <cagney@redhat.com>
2083
2084         * ldmain.c (remove_output): Call bfd_cache_close.
2085
2086 2004-02-14  Richard Sandiford  <rsandifo@redhat.com>
2087
2088         * emulparams/elf32bmipn32-defs.sh (OTHER_SECTIONS): Discard
2089         .MIPS.content* and .MIPS.events* sections.
2090
2091 2004-02-09  Daniel Jacobowitz  <drow@mvista.com>
2092
2093         * emulparams/armelf.sh, emulparams/armelf_linux.sh: Move
2094         .note.gnu.arm.ident to after allocated sections.  Mark its
2095         address as 0.
2096
2097 2004-02-09  Daniel Jacobowitz  <drow@mvista.com>
2098
2099         * emulparams/armelf_linux.sh (COMMONPAGESIZE): Set to 4KB.
2100         * emulparams/elf32bmip.sh (COMMONPAGESIZE): Likewise.
2101         * emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Likewise.
2102         * emulparams/elf32btsmipn32.sh (COMMONPAGESIZE): Likewise.
2103         * emulparams/shlelf_linux.sh (COMMONPAGESIZE): Likewise.
2104
2105 2004-02-05  Nick Clifton  <nickc@redhat.com>
2106
2107         * emultempl/pe.em (_after_open): Fix typo in previous delta.
2108
2109 2004-02-04  Danny Smith  <dannysmith@users.sourceforge.net>
2110
2111         * emultempl/pe.em (_after_open): Fix thinko in 2003-12-18 patch.
2112
2113 2004-01-28  Alan Modra  <amodra@bigpond.net.au>
2114
2115         * genscripts.sh: Fix typo.
2116
2117         * genscripts.sh: Apply $LIBPATH_SUFFIX to $tool_lib and $libdir too.
2118
2119 2004-01-24  Jakub Jelinek  <jakub@redhat.com>
2120
2121         * emulparams/elf64_ia64.sh: Put .rela.opd into
2122         OTHER_GOT_RELOC_SECTIONS instead of OTHER_PLT_RELOC_SECTIONS.
2123
2124 2004-01-20  Danny Smith  <dannysmith@users.sourceforge.net>
2125
2126         * pe-dll.c (pe_create_import_fixup): Clear WP_TEXT flag.
2127         * ld.texinfo (--omagic): Note that writable text section
2128         does not conform to published PE-COFF specs.
2129         (--enable-auto-import): Likewise.
2130
2131 2004-01-15  Alan Modra  <amodra@bigpond.net.au>
2132
2133         * emulparams/elf32ppc.sh (COMMONPAGESIZE): Define.
2134
2135 2004-01-13  Nick Clifton  <nickc@redhat.com>
2136
2137         * ldlang.c (lang_get_regions): Add extra parameter 'have_vma'
2138         which if true will prevent the LMA region being used as a
2139         replacement for a default VMA region.
2140         (lang_leave_output_section_statement): Pass extra parameter.
2141         (lang_leave_overlay): Likewise.
2142         * ld.texinfo (Output Section LMA): Document that the LMA
2143         region can be set to the VMA region if no VMA has been set.
2144         * ldlang.h (struct lang_output_section_phdr_list): Create a
2145         typedef for this type.  Minor formatting fixes.
2146
2147 2004-01-13  Nick Clifton  <nickc@redhat.com>
2148
2149         * ldlang.c (lang_size_sections_1): If dot is advanced, then
2150         assume that the section should be allocated.
2151
2152 2004-01-13  Alan Modra  <amodra@bigpond.net.au>
2153
2154         * ldlang.c (IGNORE_SECTION): Don't ignore SEC_ALLOC && !SEC_LOAD
2155         sections.  Do ignore SEC_NEVER_LOAD sections.
2156         (lang_size_sections_1): Remove test made redundant with the above.
2157
2158 2004-01-09  Alan Modra  <amodra@bigpond.net.au>
2159
2160         * emultempl/ppc64elf.em (ppc_before_allocation): Clear cached
2161         program_header_size.
2162
2163 2004-01-06  Alexandre Oliva  <aoliva@redhat.com>
2164
2165         2003-11-28  Alexandre Oliva  <aoliva@redhat.com>
2166         * emulparams/elf32frvfd.sh (EMBEDDED): Clear.
2167         2003-11-05  Alexandre Oliva  <aoliva@redhat.com>
2168         * emulparams/elf32frvfd.sh (STACK_ADDR): Unset.
2169         (MAXPAGESIZE): Set to 64Kb.
2170         (OTHER_READONLY_SECTIONS): Define __ROFIXUP_LIST__ and
2171         __ROFIXUP_END__.  Don't map .rofixup.got any more.
2172         * emulparams/elf32frv.sh (NOP): Set.
2173         2003-10-31  Alexandre Oliva  <aoliva@redhat.com>
2174         * configure.tgt: Add frv-*-*linux*.
2175         2003-09-30  Alexandre Oliva  <aoliva@redhat.com>
2176         * Makefile.am (ALL_EMULATIONS): Added eelf32frvfd.o.
2177         (eelf32frvfd.c): New.
2178         * configure.tgt <frv-*-*>: Added it to targ_extra_emuls.
2179         * emulparams/elf32frv.sh: Reverted previous two patches.
2180         * emulparams/elf32frvfd.sh: New.
2181         * Makefile.in: Rebuilt.
2182         2003-09-18  Alexandre Oliva  <aoliva@redhat.com>
2183         * emulparams/elf32frv.sh (OTHER_READONLY_SECTIONS): Added
2184         .rofixup.got to .rofixup.
2185         2003-09-15  Alexandre Oliva  <aoliva@redhat.com>
2186         * emulparams/elf32frv.sh (MAXPAGESIZE): Make it 256KiB, not 256B.
2187         (TEMPLATE_NAME, GENERATE_SHLIB_SCRIPT): Set.
2188
2189 2004-01-05  Jakub Jelinek  <jakub@redhat.com>
2190
2191         * emulparams/elf_s390.sh (NO_SMALL_DATA): Set to yes.
2192         * emulparams/elf64_s390.sh (NO_SMALL_DATA): Set to yes.
2193
2194 2004-01-03  Alan Modra  <amodra@bigpond.net.au>
2195
2196         * ldexp.c (align_n): Make static.
2197         * ldexp.h (align_n): Delete declaration.
2198         * ldlang.h (lang_enter_output_section_statement): Remove
2199         block_value param.
2200         * ldlang.c (lang_enter_output_section_statement): Likewise.
2201         (TO_ADDR, TO_SIZE): Define.
2202         (opb_shift): New var.
2203         (init_opb): New function.
2204         (print_input_section): Call init_opb and use TO_ADDR.
2205         (print_data_statement, print_reloc_statement): Likewise.
2206         (print_padding_statement): Likewise.
2207         (size_input_section): Use TO_SIZE and TO_ADDR, and global opb_shift.
2208         (lang_check_section_addresses): Likewise.
2209         (lang_size_sections_1): Likewise.
2210         (lang_do_assignments_1): Likewise.
2211         (lang_set_startof): Likewise.
2212         (lang_one_common): Likewise.  Combine power_of_two and opb_shift align.
2213         (lang_process): Call init_opb.
2214         (lang_abs_symbol_at_end_of): Use TO_ADDR and global opb_shift.
2215         (lang_enter_overlay_section): Adjust
2216         lang_enter_output_section_statement call.
2217         * ldgram.y: Likewise.
2218         * mri.c (mri_draw_tree): Likewise.
2219         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Likewise.
2220         * emultempl/mmo.em (mmo_place_orphan): Likewise.
2221         * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Likewise.
2222
2223         * ldfile.c (ldfile_set_output_arch): Add defarch param.
2224         * ldfile.h (ldfile_set_output_arch): Ditto.
2225         * emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Use
2226         ldfile_set_output_arch.
2227         * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Ditto.
2228         * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Ditto.
2229         * emultempl/linux.em (gld${EMULATION_NAME}_before_parse): Ditto.
2230         * emultempl/mipsecoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
2231         * emultempl/pe.em (gld${EMULATION_NAME}_before_parse): Ditto.
2232         * emultempl/sunos.em (gld${EMULATION_NAME}_before_parse): Ditto.
2233         * ldgram.y: Adjust ldfile_set_output_arch call.
2234         * emultempl/armcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
2235         * emultempl/armelf.em (gld${EMULATION_NAME}_before_parse): Ditto.
2236         * emultempl/armelf_oabi.em (gld${EMULATION_NAME}_before_parse): Ditto.
2237         * emultempl/generic.em (gld${EMULATION_NAME}_before_parse): Ditto.
2238         * emultempl/gld960c.em (gld960_set_output_arch): Ditto.
2239         * emultempl/m68kcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
2240         * emultempl/ticoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
2241
2242 2004-01-02  Bernardo Innocenti  <bernie@develer.com>
2243
2244         * configure.tgt: Add m68k-uClinux target.
2245
2246 For older changes see ChangeLog-0203
2247 \f
2248 Local Variables:
2249 mode: change-log
2250 left-margin: 8
2251 fill-column: 74
2252 version-control: never
2253 End: