* as.c (show_usage): Document "@FILE".
[binutils.git] / ld / ChangeLog
blobe8861458159198abdf011c2ce2398f072cd841e2
1 2005-10-30  Mark Mitchell  <mark@codesourcery.com>
3         * lexsup.c (help): Document "@FILE".
5 2005-10-30  H.J. Lu  <hongjiu.lu@intel.com>
7         * Makefile.am: Run "make dep-am".
8         * Makefile.in: Regenerated.
10         * dep-in.sed: Replace " ./" with " ".
12 2005-10-25  Arnold Metselaar  <arnold.metselaar@planet.nl>
14         * Makefile.am: Add support for Z80
15         * Makefile.in: Regenerated
16         * configure.tgt: Add z80-*-coff
17         * emulparams/z80.sh: New file.
18         * emultempl/z80.em: New file.
19         * scripttempl/z80.sc New file.
20         * NEWS: Mention this new support.
22 2005-10-25  Alan Modra  <amodra@bigpond.net.au>
24         * po/ld.pot: Regenerate.
26 2005-10-25  Chris Metcalf <cdmetcalf@comcast.net>
28         * ld.texinfo (--reduce-memory-overheads): Fix typo.
30 2005-10-23  H.J. Lu  <hongjiu.lu@intel.com>
32         PR ld/1487
33         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
34         bfd_match_sections_by_type to match section types.
36         * ldlang.c (init_os): Take the input section. Call
37         bfd_init_private_section_data if the input section isn't NULL.
38         (exp_init_os): Pass NULL to init_os.
39         (map_input_to_output_sections): Likewise.
40         (lang_add_section): Pass the input section to init_os.
42 2005-10-19  Paul Brook  <paul@codesourcery.com>
44         * emulparams/armelf.sh: Add .ARM.attributes to OTHER_SECTIONS.
46 2005-10-15  H.J. Lu  <hongjiu.lu@intel.com>
48         PR ld/1467
49         * emultempl/elf32.em: Include "elf-bfd.h".
50         (gld${EMULATION_NAME}_place_orphan): Check section type and
51         don't use section name for ELF input sections.
53         * ld.texinfo: Document orphan section processing.
55         * ldlang.c (lang_output_section_find_by_flags): Match section
56         types by calling bfd_match_sections_by_type.
58 2005-10-13  Mark Mitchell  <mark@codesourcery.com>
60         * ld.texino: Describe double-quoted string syntax for version
61         nodes.
62         * ldlang.h (lang_new_vers_pattern): Add literal_p parameter.
63         * ldgram.y (vers_defns): Allow NAME as well as VERS_IDENTIFIER.
64         Adjust calls to lang_new_vers_pattern to pass literal_p argument.
65         * ldlang.c (lang_vers_match): Fix indentation.  Do not glob-match
66         version nodes without a pattern.
67         (lang_new_vers_pattern): Add literal_p parameter.
68         (lang_do_version_exports_section): Pass it.
70 2005-10-12  Mark Mitchell  <mark@codesourcery.com>
72         * NEWS: Mention @file.
74 2005-10-05  H.J. Lu  <hongjiu.lu@intel.com>
76         PR ld/1396
77         * ldcref.c (check_refs): Accept bfd_boolean.
78         (check_local_sym_xref): Pass FALSE to check_refs.
79         (check_nocrossref): Pass TRUE to check_refs.
80         (check_refs_info): Add bfd_boolean.
81         (check_refs): Add bfd_boolean to check_refs_info.
82         (check_reloc_refs): Match relocations with proper symbols.
84         * ldmisc.c (vfinfo): Don't add extra ":\n".
86 2005-10-05  Danny Smith  <dannysmith@users.sourceforge.net>
88         * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse): Set
89         default entry symbol to ENTRY here.
90         * scripttempl/pe.sc: Not here.
92 2005-09-30  James E Wilson  <wilson@specifix.com>
94         * ldlang.c (lang_startup): Add missing ": " to einfo call.
96 2005-09-30  H.J. Lu  <hongjiu.lu@intel.com>
98         * Makefile.am: Run "make dep-am".
99         * Makefile.in: Regenerated.
100         * aclocal.m4: Likewise.
102 2005-09-30  H.J. Lu  <hongjiu.lu@intel.com>
104         * ldlang.c (output_statement_hash_entry): New type.
105         (output_statement_table): New variable for hash table.
106         (output_statement_newfunc): New function.
107         (output_statement_table_init): Likewise.
108         (output_statement_table_free): Likewise.
109         (lang_init): Call output_statement_table_init.
110         (lang_finish): Renamed to ...
111         (lang_end): This.
112         (lang_process): Updated.
113         (lang_finish): New function.
114         (lang_output_section_find_1): Use hash table.
115         (lang_output_section_statement_lookup_1): Likewise.
117         * ldlang.h (lang_finish): New.
119         * ldmain.c (main): Call lang_finish.
121 2005-09-30  Mark Mitchell  <mark@codesourcery.com>
123         * ldmain.c (main): Use expandargv.
125 2005-09-30  Catherine Moore  <clm@cm00re.com>
126         
127         * Makefile.am: Bfin support.
128         * Makefile.in: Regenerated.
129         * aclocal.m4: Regenerated.
130         * configure.tgt: Bfin support.
131         * emulparams/bfin.sh: New file.
132         * emultempl/bfin.em: New file.
134 2005-09-30  Matthias Kurz  <mk@baerlap.north.de>
136         * ld.h: Prevent the inclusion of <libintl.h> from the Solaris
137         version of <locale.h> when ENABLE_NLS is not defined.
139 2005-09-27  H.J. Lu  <hongjiu.lu@intel.com>
141         * ld.texinfo (ALIGN): Document it as forcing output section
142         alignment.
144         * ldgram.y (ALIGN): Support it for forcing output section
145         alignment.
147 2005-09-20  Alan Modra  <amodra@bigpond.net.au>
149         * ldlang.h (lang_output_section_statement_struct): Change type of
150         "processed" to bfd_boolean.
151         * ldexp.c (fold_name): Update references to os->processed.
152         * ldlang.c (lang_output_section_statement_lookup_1): Likewise.
153         (lang_size_sections_1): Likewise.
154         (lang_reset_memory_regions): Likewise.
156         PR ld/1353
157         * ldlang.c (lang_size_sections_1): Process addr_tree earlier,
158         so that unused output section statements affect dot.
160 2005-09-08  Jakub Jelinek  <jakub@redhat.com>
162         * ld.texinfo: Document -z {no,}execstack, -z {no,}relro
163         and --eh-frame-hdr options.
165 2005-09-07  Alan Modra  <amodra@bigpond.net.au>
167         * ldexp.c (fold_name <SIZEOF>): Return 0 for non-existent section.
168         (exp_fold_tree_1): Print assert message only in final stage of
169         linking.  Trigger assertion failure if expression cannot be
170         evaluated.
172 2005-09-06  H.J. Lu  <hongjiu.lu@intel.com>
174         PR ld/1263
175         * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): Check
176         --just-symbols on DSO.
178 2005-08-18  Alan Modra  <amodra@bigpond.net.au>
180         * scripttempl/elf.sc: Remove commented out defines.
182 2005-08-18  Alan Modra  <amodra@bigpond.net.au>
184         * emulparams/a29k.sh: Delete.
185         * emulparams/ebmon29k.sh: Delete.
186         * emulparams/sa29200.sh: Delete.
187         * Makefile.am: Remove a29k support.
188         * configure.tgt: Likewise.
189         * ld.texinfo: Likewise.
190         * Makefile.in: Regenerate.
192 2005-08-17  Jakub Jelinek  <jakub@redhat.com>
194         * ldgram.y (vers_defns): Don't lose pattern list before
195         extern NAME {}.  Handle global, local and extern symbol names.
197 2005-08-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
199         * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_after_allocation):
200         Don't increment rel_count of .cranges here.  Set rawsize of .cranges.
202 2005-08-10  Nick Clifton  <nickc@redhat.com>
204         * pe-dll.c (pe_exe_fill_sections): Call lang_reset_memory_regions
205         before lang_size_sections.
207 2005-08-09  Alan Modra  <amodra@bigpond.net.au>
209         * emulparams/hppa64linux.sh (LARGE_SECTIONS): Remove .tbss.
211 2005-08-08  Eric Doenges <Eric.Doenges@betty-tv.com>
213         * Makefile.am (ALL_EMULATIONS): Add msp430x21xx variants.
214         Add rules to build these emulations.
215         * Makefile.in: Regenerate.
216         * configure.tgt (msp430): Add the new variants to the
217         targ_extra_emuls list.
218         * emulparams/msp430all.sh: Add entries for the msp430x21xx
219         variants.
221 2005-08-05  H.J. Lu  <hongjiu.lu@intel.com>
223         * ld.texinfo: Document PROVIDE_HIDDEN.
225         * ldexp.c (exp_fold_tree_1): Hide a provided symbol if asked.
226         (exp_provide): Add and set hidden.
228         * ldexp.h (etree_type): Add hidden to assign.
230         * ldgram.y (PROVIDE_HIDDEN): New.
231         * ldlex.l (PROVIDE_HIDDEN): Likewise.
233         * scripttempl/elf.sc: Use PROVIDE_HIDDEN on array bound
234         symbols.
236 2005-08-05  Alan Modra  <amodra@bigpond.net.au>
238         * emulparams/elf_x86_64.sh: Revert last change.
239         * scripttempl/elf.sc (REL_LARGE, LARGE_SECTIONS): Define here.
241 2005-08-05  Alan Modra  <amodra@bigpond.net.au>
243         * emulparams/armelf.sh (OTHER_BSS_END_SYMBOLS): Split out from
244         OTHER_END_SYMBOLS.
245         * emulparams/armelf_linux.sh: Likewise.
246         * emulparams/armnto.sh: Likewise.
247         * emulparams/criself.sh: Likewise.
248         * emulparams/elf32mcore.sh: Likewise.
249         * emulparams/criself.sh (OTHER_SYMBOLS): Define.
250         * emulparams/crislinux.sh (OTHER_SYMBOLS): Define.
251         (OTHER_END_SYMBOLS): Don't define.
252         * emulparams/elf32fr30.sh: Likewise.
253         * emulparams/elf64mmix.sh: Likewise.
254         * emulparams/hppa64linux.sh: Likewise.
255         * emulparams/m32relf.sh: Likewise.
256         * emulparams/vxworks.sh: Likewise.
257         * scripttempl/armbpabi.sc (OTHER_BSS_SECTIONS): Delete.
258         (OTHER_BSS_END_SYMBOLS): Add.
259         (OTHER_END_SYMBOLS): Move before current end sym definitions.
260         (OTHER_SYMBOLS): Replace OTHER_END_SYMBOLS near end of script.
261         * scripttempl/elf.sc: Likewise.
262         * scripttempl/elf32sh-symbian.sc: Likewise.
263         * scripttempl/elf_chaos.sc: Likewise.
264         * scripttempl/elfxtensa.sc: Likewise.
265         * scripttempl/iq2000.sc: Likewise.
266         * scripttempl/xstormy16.sc: Likewise.
268         * scripttempl/elf.sc (LBSS, LARGE_SECTIONS): Delete.
269         (REL_LDATA, REL_LBSS, REL_LRODATA): Delete.
270         (REL_LARGE, LARGE_SECTIONS): Add.
271         * emulparams/elf_x86_64.sh (LARGE_SECTIONS): Define as script text.
272         (REL_LARGE): Define.
273         * emulparams/hppa64linux.sh (OTHER_BSS_SECTIONS): Don't define.
274         (LARGE_SECTIONS): Define.
275         * emulparams/hppa64linux.sh (OTHER_BSS_SECTIONS): Don't define.
276         (LARGE_SECTIONS): Define.
278 2005-08-04  Alan Modra  <amodra@bigpond.net.au>
280         * ldemul.c (ldemul_do_assignments, do_assignments_default): Delete.
281         * ldemul.h (ldemul_do_assignments, do_assignments_default): Delete.
282         (struct ld_emulation_xfer_struct): Remove do_assignments field.
283         * ldlang.c (lang_do_assignments): Don't call ldemul_do_assignments.
284         * emulparams/elf32ppc.sh (SDATA_START_SYMBOLS): New.
285         (SDATA2_START_SYMBOLS, SBSS_START_SYMBOLS, SBSS_END_SYMBOLS): New.
286         * emultempl/aix.em (ld_*_emulation): Delete do_assignments init.
287         * emultempl/armcoff.em: Likewise.
288         * emultempl/beos.em: Likewise.
289         * emultempl/generic.em: Likewise.
290         * emultempl/gld960.em: Likewise.
291         * emultempl/gld960c.em: Likewise.
292         * emultempl/linux.em: Likewise.
293         * emultempl/lnk960.em: Likewise.
294         * emultempl/m68kcoff.em: Likewise.
295         * emultempl/pe.em: Likewise.
296         * emultempl/sunos.em: Likewise.
297         * emultempl/ticoff.em: Likewise.
298         * emultempl/vanilla.em: Likewise.
299         * emultempl/elf32.em: Likewise.
300         (gld*_provide_bound_symbols): Delete.
301         (gld*_provide_init_fini_syms): Delete.
302         (gld*_before_allocation): Don't call ldemul_do_assignments.
303         * emultempl/ppc32elf.em (ppc_do_assignments): Delete.
304         (LDEMUL_DO_ASSIGNMENTS): Delete.
305         * scripttempl/elf.sc: Provide init/fini syms.  Add SBSS_START_SYMBOLS,
306         SBSS_END_SYMBOLS, SDATA2_START_SYMBOLS.
308 2005-08-04  Alan Modra  <amodra@bigpond.net.au>
310         * Makefile.am (eelf32m32c.c): Fix dependencies.
311         * Makefile.in: Regenerate.
313 2005-08-04  Alan Modra  <amodra@bigpond.net.au>
315         * ldemul.c (ldemul_finish): Call ld_emulation->finish unconditionally.
316         (finish_default): New function.
317         * ldemul.h (finish_default): Declare.
318         * emultempl/aix.em (gld*_before_allocation): Call
319         before_allocation_default rather than strip_excluded_output_sections.
320         (ld_*_emulation): Init finish field to finish_default.
321         * emultempl/armcoff.em: Likewise.
322         * emultempl/beos.em: Likewise.
323         * emultempl/elf32.em: Likewise.
324         * emultempl/generic.em: Likewise.
325         * emultempl/gld960.em: Likewise.
326         * emultempl/gld960c.em: Likewise.
327         * emultempl/hppaelf.em: Likewise.
328         * emultempl/linux.em: Likewise.
329         * emultempl/lnk960.em: Likewise.
330         * emultempl/m68kcoff.em: Likewise.
331         * emultempl/mmo.em: Likewise.
332         * emultempl/pe.em: Likewise.
333         * emultempl/ppc64elf.em: Likewise.
334         * emultempl/sunos.em: Likewise.
335         * emultempl/ticoff.em: Likewise.
336         * emultempl/vanilla.em: Likewise.
338 2005-08-03  Alan Modra  <amodra@bigpond.net.au>
340         * ldlang.c (exp_init_os): Handle etree_provide.
341         * emulparams/armelf.sh (OTHER_END_SYMBOLS): Rename from..
342         (OTHER_BSS_END_SYMBOLS): ..this.
343         * emulparams/armelf_linux.sh: Likewise.
344         * emulparams/armnto.sh: Likewise.
345         * emulparams/criself.sh: Likewise.
346         * emulparams/crislinux.sh: Likewise.
347         * emulparams/elf32frv.sh: Likewise.
348         * emulparams/elf32mcore.sh: Likewise.
349         * emulparams/elf32ppc.sh: Likewise.
350         * emulparams/elf32ppclinux.sh: Likewise.
351         * emulparams/hppa64linux.sh: Likewise.
352         * scripttempl/armbpabi.sc: Substitute $OTHER_END_SYMBOLS, not
353         $OTHER_BSS_END_SYMBOLS.
354         * scripttempl/elf32sh-symbian.sc: Likewise.
355         * scripttempl/elf_chaos.sc: Likewise.
356         * scripttempl/iq2000.sc: Likewise.
357         * scripttempl/xstormy16.sc: Likewise.
358         * scripttempl/elf.sc: Likewise.  Delete __bss_start comment.
359         * scripttempl/elfxtensa.sc: Likewise.
361 2005-07-29  Nick Clifton  <nickc@redhat.com>
363         * ldmain.c (main): Allow -shared and -static to be used together.
364         * ld.texinfo (-static): Mention that it is allowed with -shared.
366 2005-07-28  DJ Delorie  <dj@redhat.com>
368         * ldlang.c (lang_output_section_statement_lookup_1): Don't cast a
369         unary & address operator, as that breaks GCC's strict aliasing
370         rules.
372 2005-07-25  Jan Hubicka  <jh@suse.cz>
373             H.J. Lu  <hongjiu.lu@intel.com>
375         * emulparams/elf_x86_64.sh (LARGE_SECTIONS): New.
377         * scripttempl/elf.sc: Updated for large section support.
379 2005-07-21  Ralf Corsepius  <ralf.corsepius@rtems.org>
381         * configure.tgt: Remove i[3-7]86-*-rtemself*.
382         Remove sparc-*-rtemself*.
384 2005-07-21  Ben Elliston  <bje@gnu.org>
386         * ldgram.y (ldgram_want_filename): Remove unused static.
388 2005-07-20  DJ Delorie  <dj@redhat.com>
390         * emulparams/elf32m32c.sh (TEMPLATE_NAME): New.
391         (EXTRA_EM_FILE): New.
393 2005-07-19  H.J. Lu  <hongjiu.lu@intel.com>
395         * ldmain.c (main): Reindent.
397 2005-07-19  Paul Brook  <paul@codesourcery.com>
399         * configure.host (HOSTING_CRT0): Parse output of gcc --help --verbose
400         to determine dynamic linker name.
402 2005-07-18  Nick Clifton  <nickc@redhat.com>
404         * configure.tgt: Restore alpha ordering to list of arches.
406 2005-07-16  Alan Modra  <amodra@bigpond.net.au>
408         * emultempl/elf32.em (gld*_provide_init_fini_syms): Prototype.
409         (gld*_before_allocation): Call ldemul_do_assignments rather than
410         gld*_provide_init_fini_syms directly.
411         * emultempl/ppc32elf.em (gld*_after_allocation): Delete.
412         (ppc_do_assignments): New function.
413         (LDEMUL_AFTER_ALLOCATION): Don't define.
414         (LDEMUL_DO_ASSIGNMENTS): Define.
416 2005-07-16  Alan Modra  <amodra@bigpond.net.au>
418         * Makefile.am: Run "make dep-am".
419         (emipsidt.c, emipsidtl.c): Depend on generic.em.
420         * Makefile.in: Regenerate.
422 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
424         * ldemul.c (ldemul_do_assignments): New function.
425         (do_assignments_default): New function.
426         * ldemul.h (ldemul_do_assignments): Declare.
427         (do_assignments_default): Declare.
428         (struct ld_emulation_xfer_struct): Add do_assignments.
429         * ldlang.c (lang_do_assignments) Call ldemul_do_assignments.
430         * emultempl/aix.em (ld_*_emulation): Init do_assignments field.
431         * emultempl/armcoff.em: Likewise.
432         * emultempl/beos.em: Likewise.
433         * emultempl/generic.em: Likewise.
434         * emultempl/gld960.em: Likewise.
435         * emultempl/gld960c.em: Likewise.
436         * emultempl/linux.em: Likewise.
437         * emultempl/lnk960.em: Likewise.
438         * emultempl/m68kcoff.em: Likewise.
439         * emultempl/pe.em: Likewise.
440         * emultempl/sunos.em: Likewise.
441         * emultempl/ticoff.em: Likewise.
442         * emultempl/vanilla.em: Likewise.
443         * emultempl/elf32.em: Likewise, to call gld*_provide_init_fini_syms.
444         (gld*_find_exp_assignment): Adjust bfd_elf_record_link_assignment call.
446 2005-07-14  Jim Blandy  <jimb@redhat.com>
448         Add support for the Renesas M32C and M16C.
449         * Makefile.am (ALL_EMULATIONS): Add eelf32m32c.o.
450         (eelf32m32c.c): New target.
451         * Makefile.in: Regenerated.
452         * configure.tgt: Add case for m32c-*-elf.
453         * emulparams/elf32m32c.sh: New file.
455 2005-07-14  Alan Modra  <amodra@bigpond.net.au>
457         * ldlang.c (strip_excluded_output_sections): Don't call
458         bfd_gc_sections.
459         * emultempl/elf32.em (gld*_provide_bound_symbols): Move.
460         (gld*_provide_init_fini_syms): Move.
461         (gld*_before_allocation): Call the above from here..
462         (gld*_finish): ..not here.  Call _bfd_elf_fix_excluded_sec_syms.
463         * emultempl/hppaelf.em (hppaelf_finish): Likewise.
464         * emultempl/ppc64elf.em (ppc_finish): Likewise.
466 2005-07-10  Ralf Corsepius <ralf.corsepius@rtems.org>
468         * configure.tgt: Remove sparc*-*-rtemsaout*, i[3-7]86-go32-rtems*,
469         i[3-7]86-*-rtemscoff*, hppa*-*-rtems*, mips*el-*-rtems*,
470         powerpcle-*-rtems*.
472 2005-07-09  Christopher Faylor  <cgf@timesys.com>
474         * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse): Enable runtime
475         relocation by default.
476         (compute_dll_image_base): Avoid linking into cygwin dll address space.
478 2005-07-08  Alan Modra  <amodra@bigpond.net.au>
480         * ldlang.c (wild_sort): Formatting.
481         (strip_excluded_output_sections): Strip zero size sections here.
482         * emultempl/elf32.em (gld*_strip_empty_sections): Delete.
483         (gld*_finish): Don't call the above.
484         * emultempl/hppaelf.em (hppaelf_finish): Likewise.
485         * emultempl/ppc64elf.em (ppc_finish): Likewise.
487 2005-07-05  Paul Brook  <paul@codesourcery.com>
489         * Makefile.am (ALL_EMULATIONS): Add eelf32ppcvxworks.o.
490         (eelf32ppcvxworks.o): Add dependencies.
491         * Makefile.in: Regenerate.
492         * configure.tgt: Add entry for powerpc-vxworks.
493         * emulparams/elf32-ppc.c: Mention elf32ppcvxworks.sh in comment.
494         * emulparams/elf32ppcvxworks.sh: New file.
495         * emultempl/ppc32elf.em (bfd_elf32_powerpc_vxworks_vec): Declare.
496         (is_ppc_elf32_vec): New function.
497         (ppc_after_open, ppc_before_allocation,
498         gld${EMULATION_NAME}_after_allocation): Use it.
500 2005-07-05  Peter S. Mazinger" <ps.m@gmx.net>
502         * emulparams/elf32bmip.sh (GENERATE_PIE_SCRIPT): Define as "yes".
503         * emulparams/elf32bmipn32-defs.sh (GENERATE_PIE_SCRIPT): Define as "yes".
505 2005-07-04  Mike Frysinger <vapier@gentoo.org>
507         * emulparams/hppalinux.sh (GENERATE_PIE_SCRIPT): Fix typo in
508         name.
510 2005-07-04  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
512         * emulparams/m32relf_linux.sh (GENERATE_PIE_SCRIPT): Set to yes.
514 2005-07-04  Aurelien Jarno  <aurel32@debian.org>
516         * emultempl/elf32.em: Enable use of ld.so.conf for *-*-k*bsd-*.
518 2005-07-01  Alan Modra  <amodra@bigpond.net.au>
520         * scripttempl/elf.sc (.gcc_except_table): Don't KEEP.
522 2005-06-30  Ben Elliston  <bje@gnu.org>
524         * Makefile.am (check-DEJAGNU): Don't search for expect.
525         * Makefile.in: Regenerate.
527 2005-06-30  Ben Elliston  <bje@gnu.org>
529         * Makefile.am (EXPECT): Set to expect.
530         (RUNTEST): Likewise, set to runtest.
531         * Makefile.in: Regenerate.
533 2005-06-16  Alexander Klimov  <alserkli@inbox.ru>
535         * emultempl/armelf.em: Add quotes to avoid a null test
536         expression.
538 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
540         * ld.texinfo (Command Line Options): Add @item for --hash-size.
542 2005-06-10  Alan Modra  <amodra@bigpond.net.au>
544         * scripttempt/elf.sc (.bss): Align tail in a way that allows
545         empty section pruning.
547 2005-06-09  Steve Ellcey  <sje@cup.hp.com>
549         * configure.in (AM_BINUTILS_WARNINGS): Add.
550         (BFD_NEED_DECLARATION) Replace with AC_CHECK_DECLS.
551         * config.in: Regenerate.
552         * configure: Regenerate.
553         * sysdep.h (NEED_DECLARATION_*): Replace with HAVE_DECL_*
554         * ldmain.c: Ditto.
556 2005-06-09  Alan Modra  <amodra@bigpond.net.au>
558         * ldexp.c (fold_unary <ALIGN_K>): Revert last change.
560 2005-06-09  Alan Modra  <amodra@bigpond.net.au>
562         * ld.h (lang_phase_type): Move to..
563         * ldexp.h: ..here.  Add lang_mark_phase_enum.
564         (node_type): Remove etree_undef and etree_unspec.
565         (exp_data_seg): Delete.
566         (struct ldexp_control, expld): New.
567         (invalid, exp_mark_used_section): Delete.
568         (exp_fold_tree, exp_get_vma, exp_get_value_int, exp_get_fill,
569         exp_get_abs_int): Update prototypes.
570         * ldexp.c (assigning_to_dot): Delete.
571         (expld): Define.
572         (make_abs): Operate directly on expld.result.  Update all callers.
573         (new_abs): Likewise.  Return void.
574         (new_rel_from_abs): Rename from new_rel_from_section.
575         (new_rel, new_rel_from_abs): Operate on expld.result and return void.
576         Update all callers.
577         (fold_unary): Operate on expld.result and return void.  Remove
578         "current_section", "allocation_done", "dot", "dotp" and "mark_used"
579         params.  Update all callers.
580         (fold_binary, fold_trinary, fold_name, exp_fold_tree_1): Likewise.
581         (fold_unary <ALIGN_K>): Ensure alignment is absolute.
582         (fold_unary <ABSOLUTE>): Use make_abs.
583         (fold_unary <DATA_SEGMENT_END>): Evaluate mark_phase as for
584         allocating_phase.
585         (fold_binary <DATA_SEGMENT_ALIGN, DATA_SEGMENT_RELRO_END, >): Ditto.
586         (fold_binary <'%','/'>): Don't error if marking.
587         (fold_name <SIZEOF_HEADERS>): Don't call bfd_sizeof_headers when
588         marking.
589         (fold_name <NAME>): Remove FIXME; -R is handled correctly.  Don't
590         error when marking.
591         (fold_name <ADDR, LOADADDR, SIZEOF>): Don't set SEC_KEEP.
592         (exp_fold_tree_1): Don't error when marking.
593         (exp_fold_tree_1 <etree_rel>): Evaluate in all phases except first.
594         (exp_fold_tree_1 <etree_assign to dot>): Don't check for NULL
595         current section, instead check for NULL dotp.
596         (exp_fold_tree_1 <etree_provide>): Don't evaluate the assignment
597         source unless the symbol is referenced and undefined.
598         (exp_fold_tree): Remove "allocation_done" and "dot" params.  Save
599         params to expld.
600         (exp_fold_tree_no_dot): Remove "current_section", "allocation_done
601         and "mark_used" params.  Save params to expld.  Update all callers.
602         (exp_assop): Do without temp var.
603         (exp_print_tree <etree_undef>): Delete code.
604         (exp_get_vma): Remove "allocation_done" param.  Correct error return.
605         (exp_get_fill, exp_get_abs_int): Likewise.
606         (exp_get_value_int): Remove "allocation_done" param.
607         (exp_mark_used_section): Delete.
608         * ldgram.y (fill_exp): Update exp_get_fill call.
609         (origin_spec, length_spec): Update exp_get_vma call.
610         * ldlang.c (lang_init): Don't bother clearing lang_statement_iteration.
611         (lang_mark_used_section_1, lang_mark_used_section): Delete.
612         (strip_excluded_output_sections): Call one_lang_size_sections_pass in
613         marking mode.  Merge old lang_mark_used_section code.  Correct handling
614         of output sections with excluded input sections and data statements.
615         Don't drop non-zero sized sections.  Don't zap os->bfd_section.
616         Do set SEC_EXCLUDE when appropriate.
617         (print_output_section_statement): Update for changed ldexp.c
618         interface.
619         (print_assignment, lang_size_sections_1): Likewise.
620         (lang_do_assignments_1, lang_enter_output_section_statement): Likewise.
621         (lang_new_phdr, lang_record_phdrs): Likewise.
622         (lang_size_sections): Likewise.
623         (insert_pad): Use following statement if it is a pad, rather than
624         creating a new one.
625         (lang_size_sections_1 <lang_output_section_statement_enum>): Do
626         process ignored output section to set vma and lma, but don't
627         update dot for these sections.  Don't error if marking.
628         (lang_size_sections_1 <lang_assignment_statement_enum>): Don't
629         update dot for ignored sections.
630         (lang_size_sections_1 <lang_data_statement_enum>): Don't mark absolute
631         section with SEC_ALLOC.
632         (one_lang_size_sections_pass): New function.
633         (lang_size_sections): Remove first five params.  Set expld.phase on
634         entry and exit.   Use one_lang_size_sections_pass.
635         (lang_do_assignments): Remove all params.  Update all callers.
636         (lang_reset_memory_regions): Clear os->processed for all output
637         section statements.
638         * ldlang.h (lang_do_assignments): Update prototype.
639         (lang_size_sections): Likewise.
640         (one_lang_size_sections_pass): Declare.
641         * pe-dll.c (pe_dll_fill_sections, pe_exe_fill_sections): Update
642         lang_size_sections and lang_do_assignments calls.
643         * emultempl/elf32.em (layout_sections_again): Likewise.
644         * emultempl/ppc64elf.em (ppc_before_allocation): Use
645         one_lang_size_sections_pass.
647 2005-06-08  Aldy Hernandez  <aldyh@redhat.com>
649         * emulparams/elf32ms1.sh: New.
651 2005-06-07  Eric Christopher  <echristo@redhat.com>
653         * Makefile.am (eelf32ms1.c): Use tab.
654         * Makefile.in: Regenerate.
656 2005-06-07  Aldy Hernandez  <aldyh@redhat.com>
657             Michael Snyder  <msnyder@redhat.com>
658             Stan Cox  <scox@redhat.com>
660         * configure.tgt: Same.
662         * Makefile.am (ALL_EMULATIONS): Depend on eelf32ms1.o.
663         (eelf32ms1.c): Add eelf32ms1.c rule.
665         * Makefile.in: Regenerate.
667 2005-06-06  Alan Modra  <amodra@bigpond.net.au>
669         * emultempl/ppc64elf.em (ppc_before_allocation): Always run
670         ppc64_elf_edit_opd.
672 2005-06-05  H.J. Lu  <hongjiu.lu@intel.com>
674         * ldexp.c (exp_mark_used_section): Set SEC_KEEP on current
675         section only if the symbol will be defined.
677 2005-06-04  H.J. Lu  <hongjiu.lu@intel.com>
679         PR 992
680         * ldexp.c (exp_mark_used_section): Set SEC_KEEP on current
681         section for etree_assign, etree_provide and etree_provided.
682         Call fold_binary on etree_binary.
684         * ldlang.c (lang_mark_used_section_1): Handle load base.
686 2005-06-03  Alan Modra  <amodra@bigpond.net.au>
688         * ldmain.c (link_callbacks): Add einfo.
689         (add_archive_element): Use passed info, not link_info.
690         (constructor_callback): Likewise.
691         (reloc_overflow): Don't handle null bfd specially.
692         (reloc_dangerous, unattached_reloc): Likewise.
693         * ldmisc.c (vfinfo <B>): Print "ld generated" for null bfd.
694         (vfinfo <C, D, G>): Handle null bfd.  Wrap comments.
696 2005-06-02  Alan Modra  <amodra@bigpond.net.au>
698         * ldexp.h (etree_value_type): Use "asection *" in place of
699         "struct lang_output_section_statement_struct *" for "section".
700         (exp_fold_tree): Likewise.
701         (exp_mark_used_section): Likewise.
702         * ldexp.c (new_rel, new_rel_from_section, fold_unary, fold_binary,
703         fold_trinary, fold_name, exp_fold_tree_1, exp_fold_tree,
704         exp_mark_used_section): Likewise for "current_section" param.
705         (make_abs, new_abs, exp_binop, exp_unop, exp_get_vma, exp_get_fill,
706         exp_get_abs_int): Adjust for above changes.
707         * ldlang.c (lang_mark_used_section_1, print_assignment,
708         lang_size_sections_1, lang_do_assignments_1): Likewise.
709         * ldexp.c (fold_name): Init entire result struct.
711 2005-06-01  Maciej W. Rozycki  <macro@linux-mips.org>
713         * emulparams/elf32btsmip.sh: Unset DATA_ADDR.
715 2005-05-31  Zack Weinberg  <zack@codesourcery.com>
717         * ldlang.c (entry_symbol_default): New file-scope global.
718         (lang_finish): Use it, not a hardwired "start".
719         (lang_default_entry): Set it.
720         * ldlang.h: Declare lang_default_entry.
721         * emultempl/beos.em, emultempl/pe.em: Use lang_default_entry,
722         not lang_add_entry, to override default entry point symbol.
724 2005-05-29  Richard Henderson  <rth@redhat.com>
726         * emulparams/elf64alpha.sh (PLT): New.
727         (TEXT_PLT): New.
728         * emultempl/alphaelf.em (disable_relaxation): New.
729         (limit_32bit): Rename from elf64alpha_32bit; update all users.
730         (elf64_alpha_use_secureplt): Declare.
731         (bfd_elf64_alpha_vec, bfd_elf64_alpha_freebsd_vec): Declare.
732         (alpha_after_open): New.
733         (alpha_before_allocation): New.
734         (OPTION_NO_RELAX, OPTION_SECUREPLT, OPTION_NO_SECUREPLT): New.
735         (PARSE_AND_LIST_LONGOPTS): Include them.
736         (PARSE_AND_LIST_OPTIONS): Likewise.
737         (PARSE_AND_LIST_ARGS_CASES): Likewise.
738         (LDEMUL_AFTER_OPEN, LDEMUL_BEFORE_ALLOCATION): New.
739         * scripttempl/elf.sc (TEXT_PLT): New.
740         (PLT): Use it.
742 2005-05-27  Andreas Schwab  <schwab@suse.de>
744         * configure.host (HOSTING_LIBS): Add libunwind.a if it exists.
746 2005-05-24  Alan Modra  <amodra@bigpond.net.au>
748         * emultempl/ppc32elf.em (after_allocation): Don't call
749         ppc_elf_set_sdata_syms when relocatable.
751 2005-05-21  H.J. Lu  <hongjiu.lu@intel.com>
753         * Makefile.am (ld.1): Revert the last 2 changes.
754         (info-recursive): Depend on ld.1.
755         * Makefile.in: Regenerated.
757 2005-05-21  H.J. Lu  <hongjiu.lu@intel.com>
759         * Makefile.am (ld.1): Depend on "info" instead of
760         "configdoc.texi ldver.texi".
761         * Makefile.in: Regenerated.
763 2005-05-21  H.J. Lu  <hongjiu.lu@intel.com>
765         * Makefile.am (ld.1): Depend on "info".
766         * Makefile.in: Regenerated.
768 2005-05-19  Zack Weinberg  <zack@codesourcery.com>
770         * Makefile.am: Have 'all' depend on 'info' and 'ld.1'.
771         * Makefile.in: Regenerate.
773 2005-05-17  Zack Weinberg  <zack@codesourcery.com>
775         * ld-arm/mixed-app.d: Adjust expected disassembly a little.
777 2005-05-17  Daniel Jacobowitz  <dan@codesourcery.com>
779         * Makefile.am (ldver.texi): Don't use $<.
780         * Makefile.in: Regenerated.
782 2005-05-17  Daniel Jacobowitz  <dan@codesourcery.com>
784         * Makefile.am (AM_MAKEINFOFLAGS, TEXI2DVI): Explicitly include
785         $(srcdir) before $(BFDDIR)/doc.
786         * Makefile.in: Regenerated.
788 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
790         PR 797
791         * ldexp.c (exp_fold_tree_1): Renamed from exp_fold_tree and
792         take take a bfd_boolean, mark_used. Ignore assert failure if
793         mark_used is TRUE.
794         (exp_fold_tree) Call exp_fold_tree_1 with mark_used == FALSE.
795         (exp_fold_tree_no_dot): Updated to take a bfd_boolean,
796         mark_used and pass down.
797         (fold_unary): Likewise.
798         (fold_binary): Likewise.
799         (fold_trinary): Likewise.
800         (exp_binop): Add FALSE to call to exp_fold_tree_no_dot.
801         (exp_trinop): Likewise.
802         (exp_unop): Likewise.
803         (exp_nameop): Likewise.
804         (exp_get_vma): Likewise.
805         (exp_get_fill): Likewise.
806         (exp_get_abs_int): Likewise.
807         (fold_name): Likewise. Set SEC_KEEP in output section flags.
808         (exp_mark_used_section): New.
810         * ldexp.h (exp_mark_used_section): New.
812         * ldlang.c (lang_output_section_statement_lookup_1): Set the
813         ignored field to FALSE.
814         (lang_mark_used_section_1): New.
815         (lang_mark_used_section): Call lang_mark_used_section_1.
816         (strip_excluded_output_sections): Call lang_mark_used_section
817         and check for unused sections.
818         (lang_size_sections_1): Skip an output section if it should
819         be ignored.
820         (lang_do_assignments_1): Likewise.
821         (lang_process): Don't call lang_mark_used_section here.
823         * ldlang.h (lang_output_section_statement_type): Change
824         all_input_readonly to bitfield. Add ignored.
826 2005-05-17  Lennert Buytenhek  <buytenh@wantstofly.org>
827             Peter S. Mazinger" <ps.m@gmx.net>
829         * emulparams/armelf_linux.sh (GENERATE_PIE_SCRIPT): Define as "yes".
830         * emulparams/hppalinux.sh (GENERATE_PIE_SCRIPT): Define as "yes".
832 2005-05-17  Julian Brown <julian@codesourcery.com>
834         * ldlang.c (print_assignment): Do not rely upon a valid result
835         having a section associated with it.
837 2005-05-17  Nick Clifton  <nickc@redhat.com>
839         * ldlang.c (Scan_for_self_assignment): Check an assignment tree to
840         see if the same value is being used on the rhs as on the lhs.
841         (print_assignment): Call scan_for_self_assignment and if it
842         returns true, do no display the result of the computation but
843         instead just the final value of the symbol on the lhs.
844         * ld.texinfo: Document this behaviour and provide an example of
845         when it will happen.
847 2005-05-15  Daniel Jacobowitz  <dan@codesourcery.com>
849         * Makefile.am (AM_MAKEINFOFLAGS): Define.
850         (TEXI2DVI): Define.
851         (ldver.texi): Depend on distributed files instead of built files.
852         (ld.info): Include $(srcdir) in the rule target.  Remove actions.
853         (ld.dvi): Remove actions.
854         (MAINTAINERCLEANFILES): Add configdoc.texi.
855         (CONFIG_STATUS_DEPENDENCIES): Add bfd/configure.in.
856         (install-data-local): Renamed from install.
857         (Makefile): Remove explicit dependency.
858         * acinclude.m4: Remove obsolete code.
859         * configure.in: Update AC_PREREQ.  Remove extra $CONFIG_SHELL.
860         * Makefile.in, aclocal.m4, config.in, configure: Regenerated.
862 2005-05-11  Bob Wilson  <bob.wilson@acm.org>
864         * scripttempl/elfxtensa.sc: Sync up with elf.sc.
865         * emulparams/elf32xtensa.sh (PLT, GOT): Define.
867 2005-05-11  Alan Modra  <amodra@bigpond.net.au>
869         * ldgram.y: Add SPECIAL token.
870         (sect_constraint): Handle SPECIAL.
871         * ldlang.c (lang_output_section_find_1): Don't match SPECIAL.
872         (map_input_to_output_sections): Likewise.
873         * ldlex.l (SPECIAL): Define.
874         * emulparams/elf32ppc.sh (DATA_GOT, SDATA_GOT, SEPARATE_GOTPLT,
875         GOT, PLT, GOTPLT): Define.
876         * emultempl/ppc32elf.em (old_plt, old_got): New static vars.
877         (ppc_after_open): New function.
878         (PARSE_AND_LIST_PROLOGUE): Define OPTION_OLD_LPT and OPTION_OLD_GOT.
879         (PARSE_AND_LIST_LONGOPTS): Add "bss-plt" and "sdata-got".
880         (PARSE_AND_LIST_OPTIONS): Document them.
881         (PARSE_AND_LIST_ARGS_CASES): Handle them.
882         (LDEMUL_AFTER_OPEN): Define.
883         * scripttempl/elf.sc (PLT): Don't override existing define.
884         (DATA_GOT, SDATA_GOT): Define and use to enable alternate got
885         placement rather than using NO_SMALL_DATA.  Emit GOTPLT for RELRO_NOW.
887 2005-05-10  Alan Modra  <amodra@bigpond.net.au>
889         * scripttempl/elf.sc (DATA_SEGMENT_RELRO_GOTPLT_END): Delete.
890         (DATA_SEGMENT_RELRO_END): Use SEPARATE_GOTPLT value.
891         (GOTPLT): Remove DATA_SEGMENT_RELRO_GOTPLT_END.  Place after
892         DATA_SEGMENT_RELRO_END in script.
894 2005-05-09  H.J. Lu  <hongjiu.lu@intel.com>
896         * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols):
897         Don't use a removed section.
899 2005-05-09  H.J. Lu  <hongjiu.lu@intel.com>
901         * ldmain.c (reloc_overflow): Use output_bfd if the symbol
902         is defined in the ABS section.
904 2005-05-06  H.J. Lu  <hongjiu.lu@intel.com>
906         * emultempl/elf32.em (gld${EMULATION_NAME}_provide_init_fini_syms):
907         Put back !link_info.relocatable.
909 2005-05-06  H.J. Lu  <hongjiu.lu@intel.com>
911         PR 878
912         * emultempl/elf32.em (gld${EMULATION_NAME}_provide_init_fini_syms):
913         Just check link_info.executable.
915 2005-05-06  Nick Clifton  <nickc@redhat.com>
917         * Update the address and phone number of the FSF organization in
918         the GPL notices in the following files:
919         aclocal.m4, deffile.h, deffilep.y, fdl.texi, ld.h, ldcref.c,
920         ldctor.c, ldctor.h, ldemul.c, ldexp.c, ldexp.h, ldfile.c,
921         ldfile.h, 20ldgram.y, ldint.texinfo, ldlang.c, ldlang.h, ldlex.h,
922         ldlex.l, ldmain.c, ldmain.h, ldmisc.c, ldmisc.h, ldver.c, ldver.h,
923         ldwrite.c, ldwrite.h, lexsup.c, mri.c, mri.h, pe-dll.c, pe-dll.h,
924         sysdep.h, emultempl/aix.em, emultempl/alphaelf.em,
925         emultempl/armcoff.em, emultempl/armelf.em, emultempl/beos.em,
926         emultempl/crxelf.em, emultempl/elf32.em, emultempl/generic.em,
927         emultempl/gld960.em, emultempl/gld960c.em, emultempl/hppaelf.em,
928         emultempl/ia64elf.em, emultempl/irix.em,  emultempl/linux.em,
929         emultempl/lnk960.em, emultempl/m68hc1xelf.em,
930         emultempl/m68kcoff.em, emultempl/m68kelf.em,
931         emultempl/mipsecoff.em, emultempl/mmix-elfnmmo.em,
932         emultempl/mmixelf.em, emultempl/mmo.em, emultempl/needrelax.em,
933         emultempl/pe.em, emultempl/ppc32elf.em, emultempl/ppc64elf.em,
934         emultempl/sh64elf.em, emultempl/sunos.em, emultempl/ticoff.em,
935         emultempl/vanilla.em, emultempl/xtensaelf.em
937 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
939         * scripttempl/elf.sc: Document the usage of __bss_start.
941 2005-05-05  Paul Brook  <paul@codesourcery.com>
943         * Makefile.am: Add eelf_i386_vxworks.
944         * Makefile.in: Regenerate.
945         * configure.tgt: Make i?86-*-vxworks use targ_emul=elf_i386_vxworks.
946         * emulparams/elf_i386_vxworks.sh: New file.
947         * emulparams/vxworks.sh: New file.
948         * scripttempl/elf.sc: Add DATA_END_SYMBOLS and ETEXT_NAME.
950 2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>
952         * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols):
953         Call _bfd_elf_provide_section_bound_symbols.
955 2005-05-04  Alan Modra  <amodra@bigpond.net.au>
957         * ldemul.c: Include bfdlink.h.
958         (ldemul_before_allocation): Assume before_allocation is non-zero.
959         (before_allocation_default): Call strip_excluded_output_sections.
960         * ldlang.c (stripped_excluded_sections): New variable.
961         (lang_add_section): Build input section list for each output
962         section, attached via map_head and map_tail pointers.
963         (strip_excluded_output_sections): Make global.  Traverse the
964         input section lists to find which output sections can go.  Clear
965         link_order pointers and set stripped_excluded_sections.
966         (lang_process): Call strip_excluded_output_sections.
967         * ldlang.h (strip_excluded_output_sections): Declare.
968         * ldwrite.c: Update throuhout for link_order_head -> map_head change.
969         * emultempl/aix.em (before_allocation): Call
970         strip_excluded_output_sections.
971         * emultempl/armcoff.em (before_allocation): Likewise.
972         * emultempl/beos.em (before_allocation): Likewise.
973         * emultempl/linux.em (before_allocation): Likewise.
974         * emultempl/pe.em (before_allocation): Likewise.
975         * emultempl/sunos.em (before_allocation): Likewise.
976         * emultempl/elf32.em (before_allocation): Likewise.  Call
977         bfd_elf_size_dynsym_hash_dynstr too.
978         * emultempl/lnk960.em (lnk960_before_allocation): Delete.
979         (ld_lnk960): Use before_allocation_default.
981 2005-05-02  H.J. Lu  <hongjiu.lu@intel.com>
983         * emultempl/elf32.em (gld${EMULATION_NAME}_strip_empty_section):
984         Updated for bfd_section_list_remove change.
985         * ldlang.c (lang_insert_orphan): Likewise.
986         (strip_excluded_output_sections): Likewise.
987         (sort_sections_by_lma): New.
988         (lang_check_section_addresses): Sort the sections before
989         checking addresses.
991 2005-04-29  Ralf Corsepius <ralf.corsepius@rtems.org>
993         * configure.tgt: Add h8300*-*-rtemscoff.
994         Switch h8300*-*-rtems* to elf.
996 2005-04-29  Ben Elliston  <bje@au.ibm.com>
998         * ldgram.y (lang_memory_region_type): Make static.
999         (ldgram_want_filename): Likewise.
1000         * ldemul.c (ld_emulation): Make static.
1001         * ldfile.h (ldfile_find_command_file): Remove extern.
1002         * ldfile.c (ldfile_find_command_file): Make static.
1003         * ldlang.h (unique_section_list): Remove extern declaration.
1004         * ldlang.c (unique_section_list): Make static.
1005         * mri.h (symbol_truncate): Remove extern declaration.
1006         * mri.c (symbol_truncate): Make static.
1007         (order, only_load, address, alias): Likewise.
1008         (alignment, subalignment): Likewise.
1010 2005-04-27  H.J. Lu  <hongjiu.lu@intel.com>
1012         * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols):
1013         Use the first SEC_ALLOC section which isn't SEC_READONLY or the
1014         last SEC_ALLOC section if such a section doesn't exist.
1016 2005-04-24  Mark Kettenis  <kettenis@gnu.org>
1018         * configure.host: Add *-*-openbsd support.
1020 2005-04-15  Julian Brown  <julian@codesourcery.com>
1022         * ld.texinfo: Document --use-blx.
1023         * emultempl/armelf.em (use_blx): New variable.
1024         (arm_elf_create_output_section_statements): Communicate value of
1025         use_blx to bfd.
1026         (PARSE_AND_LIST_PROLOGUE): Add OPTION_USE_BLX.
1027         (PARSE_AND_LIST_OPTIONS): Add --use-blx option.
1028         (PARSE_AND_LIST_ARGS_CASES): Add OPTION_USE_BLX case.
1030 2005-04-14  Alan Modra  <amodra@bigpond.net.au>
1032         * Makefile.am (NO_WERROR): Define.  Use instead of -Wno-error.
1033         * configure.in: Include ../bfd/warning.m4 contents.
1034         * Makefile.in: Regenerate.
1035         * configure: Regenerate.
1037 2005-04-12  Alan Modra  <amodra@bigpond.net.au>
1039         * Makefile.am: Run "make dep-am".
1040         (ldgram.o, ldlex.o, deffilep.o): Add -Wno-error to command.
1041         * Makefile.in: Regenerate.
1042         * config.in: Regenerate.
1044 2005-04-11  Alan Modra  <amodra@bigpond.net.au>
1046         * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed): Ignore
1047         as_needed libs that were not needed.
1048         (gld${EMULATION_NAME}_check_needed): Likewise.
1050 2005-04-07  Nick Clifton  <nickc@redhat.com>
1052         * emultempl/m68kcoff.em: Include ldexp.h and ldlang.h so that
1053         ldfile.h can use the lang_input_statement type.
1055 2005-04-06  Jakub Jelinek  <jakub@redhat.com>
1057         * ldlang.c: Formatting.
1058         (walk_wild_consider_section): Remember return value from wildcardp.
1059         (is_simple_wild): Use strcspn instead of 2 strpbrk calls and strlen.
1060         (wild_spec_can_overlap): Use strcspn instead of strpbrk and strlen.
1062 2005-04-06  Robert O'Callahan  <rocallahan@novell.com>
1064         * ld.h (lean_section_userdata_type): Remove.
1065         (fat_section_userdata_type): Remove file field.
1066         (SECTION_USERDATA_SIZE): Remove.
1067         * ldlang.c (init_os): Eliminate initialization of unused
1068         lean_section_userdata_type.
1070         * ldlang.h (callback_t, walk_wild_section_handler_t): New
1071         typedefs.
1072         (struct lang_wild_statement_struct): Add walk_wild_section_handler
1073         and handler_data fields.
1074         * ldlang.c (callback_t): Removed.
1075         (walk_wild_consider_section, walk_wild_section_general,
1076         section_iterator_callback, find_section, is_simple_wild,
1077         match_simple_wild, walk_wild_section_specs1_wild0,
1078         walk_wild_section_specs1_wild1, walk_wild_section_specs2_wild1,
1079         walk_wild_section_specs3_wild2, walk_wild_section_specs4_wild2,
1080         wild_spec_can_overlap, analyze_walk_wild_section_handler): New
1081         functions.
1082         (lang_add_wild): Call analyze_walk_wild_section_handler.
1083         (walk_wild_section): Renamed to walk_wild_section_general and
1084         created a wrapper function.
1085         (section_iterator_callback_data): New typedef.
1087 2005-04-04  Nick Clifton  <nickc@redhat.com>
1089         * configure.in: Add a check for <unistd.h> providing a prototype
1090         for getopt() which is compatible with the one in
1091         include/getopt.h.  If so then define HAVE_DECL_GETOPT.
1092         * configure: Regenerate.
1093         * config.in (HAVE_DECL_GETOPT): Add.
1094         * ldemul.c: Include config.h
1095         * lexsup.c: Likewise.
1096         * emultempl/elf32.sc: Likewise.
1098 2005-03-29  Alan Modra  <amodra@bigpond.net.au>
1100         * emultempl/elf32.em (gld${EMULATION_NAME}_layout_sections_again):
1101         New function, extracted from static void gld${EMULATION_NAME}_finish.
1102         (gld${EMULATION_NAME}_strip_empty_sections): Likewise.
1103         (gld${EMULATION_NAME}_provide_init_fini_syms): Likewise.
1104         * emultempl/ppc64elf.em: Revert last change.
1105         (ppc_layout_sections_again): Use
1106         gld${EMULATION_NAME}_layout_sections_again.
1107         (ppc_finish): Don't call gld${EMULATION_NAME}_finish.  Instead call
1108         gld${EMULATION_NAME}_strip_empty_sections and
1109         gld${EMULATION_NAME}_provide_init_fini_syms.
1110         * emultempl/hppaelf.em: Similarly.
1112 2005-03-29  Alan Modra  <amodra@bigpond.net.au>
1114         * emultempl/ppc64elf.em (need_laying_out): Delete.  Remove all refs.
1115         (ppc_finish): Don't call bfd_elf_discard_info.
1116         * emultempl/hppaelf.em: Similarly.
1118 2005-03-24  Nick Clifton  <nickc@redhat.com>
1120         * po/fr.po: Updated French translation.
1122 2005-03-23  Mike Frysinger  <vapier@gentoo.org>
1123             Nick Clifton  <nickc@redhat.com>
1125         * configure.host: Accept any C library to accompany a GNU Linux
1126         implementation, not just the GNU C library.
1127         * configure.tgt: Likewise.
1128         * emultempl/elf32.em: Likewise.
1130 2005-03-22  H.J. Lu  <hongjiu.lu@intel.com>
1132         * emultempl/elf32.em (gld${EMULATION_NAME}_provide_bound_symbols): New
1133         (gld${EMULATION_NAME}_finish): Call
1134         gld${EMULATION_NAME}_provide_bound_symbols to provide
1135         __preinit_array_start, __preinit_array_end, __init_array_start,
1136         __init_array_end, __fini_array_start and __fini_array_end.
1138         * scripttempl/elf.sc: Don't provide __preinit_array_start,
1139         __preinit_array_end, __init_array_start, __init_array_end,
1140         __fini_array_start nor __fini_array_end.
1142 2005-03-23  Alan Modra  <amodra@bigpond.net.au>
1144         * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Set
1145         SEC_EXCLUDE on .gnu.warning sections.
1147 2005-03-22  Alan Modra  <amodra@bigpond.net.au>
1149         * scripttempl/elf.sc (SBSS): Don't provide sbss start and end syms.
1151 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
1153         * emultempl/ppc32elf.em (gld${EMULATION_NAME}_after_allocation): New
1154         function.
1155         (LDEMUL_AFTER_ALLOCATION): Define.
1157 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
1159         * emultempl/ppc64elf.em (ppc_finish): Rename from
1160         gld${EMULATION_NAME}_finish.  Call gld${EMULATION_NAME}_finish.
1161         (LDEMUL_FINISH): Update.
1162         * emultempl/hppaelf.em (hppaelf_finish, LDEMUL_FINISH): Likewise.
1163         * emultempl/m68hc1xelf.em (m68hc11elf_finish, LDEMUL_FINISH): Likewise.
1165 2005-03-18  Julian Brown  <julian@codesourcery.com>
1167         * scripttempl/armbpapi.sc (.rel.dyn): Add .rel.init_array,
1168         .rel.fini_array.
1169         (.rela.dyn): Add .rela.init_array, .rela.fini_array.
1170         (SECTIONS): Add .rel.other, .rela.other, .reli.other after PLT relocs.
1172 2005-03-18  H.J. Lu  <hongjiu.lu@intel.com>
1174         * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Don't set
1175         bfd_section when removing unused empty output sections for
1176         non-relocatable link.
1178 2005-03-19  Alan Modra  <amodra@bigpond.net.au>
1180         * ldlang.c (lang_insert_orphan): Use old section_tail rather than
1181         traversing the bfd section list to find pointer to new section.
1183 2005-03-18  Alan Modra  <amodra@bigpond.net.au>
1185         * scripttempl/elf.sc: When CREATE_SHLIB, put .sdata2 and .sbss2
1186         input sections into .sdata and .sbss output respectively.
1188 2005-03-16  David Heine  <dlheine@tensilica.com>
1189             Bob Wilson  <bob.wilson@acm.org>
1191         * ldlang.c (IGNORE_SECTION): Remove check for zero size.
1192         (lang_check_section_addresses): Ignore zero size sections here.
1194 2005-03-16  H.J. Lu  <hongjiu.lu@intel.com>
1196         * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Remove
1197         unused empty output sections for non-relocatable link.
1199         * ld.h (args_type): Remove gc_sections.
1201         * ldlang.c (lang_mark_used_section): New.
1202         (lang_gc_sections): Use link_info.gc_sections instead of
1203         command_line.gc_sections.
1204         * ldmain.c (main): Likewise.
1205         * lexsup.c (parse_args): Likewise.
1206         * ldlang.c (lang_process): Call lang_mark_used_section.
1208         * ldmain.c (main): Initialize link_info.gc_sections to FALSE.
1210 2005-03-16  Nick Clifton  <nickc@redhat.com>
1211             Ben Elliston  <bje@au.ibm.com>
1213         * configure.in (werror): New switch: Add -Werror to the
1214         compiler command line.  Enabled by default.  Disable via
1215         --disable-werror.
1216         * configure: Regenerate.
1218 2005-03-16  Alan Modra  <amodra@bigpond.net.au>
1220         * emulparams/elf32ppclinux.sh (OTHER_READWRITE_SECTION): Delete.
1221         (OTHER_RELRO_SECTIONS): Set this instead.
1223 2005-03-15  Nick Clifton  <nickc@redhat.com>
1225         * NEWS: Add cutoff for changes in 2.16 release.
1227 2005-03-15  Mikkel Krautz  <krautz@gmail.com>
1229         * configure.tgt (x86_64-elf): Add target.
1231 2005-03-15  Alan Modra  <amodra@bigpond.net.au>
1233         * po/es.po: Commit new Spanish translation.
1235 2005-03-14  Alan Modra  <amodra@bigpond.net.au>
1237         * ldexp.c (exp_fold_tree): Ensure return value is initialized.
1238         Tidy etree_assert case.
1240 2005-03-14  Alan Modra  <amodra@bigpond.net.au>
1242         * po/tr.po: Commit new Turkish translation.
1244 2005-03-11  Daniel Jacobowitz  <dan@codesourcery.com>
1246         * Makefile.am: Remove references to em68klynx.o and esparclynx.o.
1247         * Makefile.in: Regenerated.
1248         * emulparams/m68klynx.sh, emulparams/sparclynx.sh: Remove.
1250 2005-03-07  Nick Clifton  <nickc@redhat.com>
1252         * po/fr.po: Updated translation.
1254 2005-03-05  Alan Modra  <amodra@bigpond.net.au>
1256         * po/ld.pot: Regenerate.
1258 2005-03-02  Jan Beulich  <jbeulich@novell.com>
1260         * ldmain.c (remove_output): Use unlink_if_ordinary instead of unlink.
1261         * pe-dll.c (pe_dll_generate_implib): Likewise.
1263 2005-02-24  Ben Elliston  <bje@au.ibm.com>
1265         * ldfile.c: Remove GNU960 conditional code.
1266         * emultempl/gld960.em: Likewise.
1267         * emultempl/gld960c.em: Likewise.
1268         * emultempl/lnk960.em: Likewise.
1270 2005-02-24  Nick Clifton  <nickc@redhat.com>
1272         * emultempl/lnk960.em (lnk960_before_parse): Remove redundant
1273         empty string from calls to concat.
1275 2005-02-23  Nick Clifton  <nickc@redhat.com>
1277         * emultempl/lnk960.em (lnk960_before_parse): Terminate list of
1278         arguments passed to concat() with a NULL.
1280         * emultempl/m68kcoff.em: Include ldexp.h and ldlang.h because they
1281         define types needed by ldfile.h
1283 2005-02-23  Alan Modra  <amodra@bigpond.net.au>
1285         * pe-dll.c: Warning fixes.
1286         * emultempl/sunos.em: Likewise.
1288 2005-02-22  Daniel Jacobowitz  <dan@codesourcery.com>
1290         * ldlang.c (section_already_linked): Don't call
1291         bfd_section_already_linked for dynamic objects.
1293 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
1295         * ldexp.c: Warning fixes.
1296         * ldwrite.c: Likewise.
1297         * emultempl/elf32.em: Likewise.
1299 2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>
1301         * ldlang.c (lang_add_section): Check SEC_TIC54X_BLOCK for TI
1302         tic54x input only.
1303         (lang_size_sections_1): Check SEC_COFF_SHARED_LIBRARY for COFF
1304         and ECOFF output only.
1306 2005-02-21  Alan Modra  <amodra@bigpond.net.au>
1308         * config.in: Regenerate.
1309         * configure: Regenerate.
1311 2005-02-17  Zack Weinberg  <zack@codesourcery.com>
1313         * ldexp.c (assigning_to_dot): New global flag.
1314         (fold_name): If assigning_to_dot is true, object immediately to
1315         an undefined symbol.
1316         (exp_fold_tree): Set and clear assigning_to_dot around the
1317         recursive call to exp_fold_tree to process the right-hand side
1318         of an assignment to the location counter.
1320 2005-02-17  Paul Brook  <paul@codesourcery.com>
1322         * scripttempl/armbpabi.sc: Add dummy name to version block.
1324 2005-02-17  Alan Modra  <amodra@bigpond.net.au>
1326         * ldexp.c (new_abs): Init new.str.
1328 2005-02-15  Mark Mitchell  <mark@codesourcery.com>
1330         * configure.in (AC_CHECK_FUNCS): Add glob.
1331         * configure: Regenerated.
1332         * emultempl/elf32.em (<glob.h>): Do not include if HAVE_GLOB is
1333         not defined.
1334         (gld${EMULATION_NAME}_parse_ld_so_conf_include): Do not use glob
1335         if HAVE_GLOB is not defined.
1337 2005-02-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1339         * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Define
1340         lib_path if NATIVE is yes.
1342 2005-02-16  Alan Modra  <amodra@bigpond.net.au>
1344         * emultempl/ppc64elf.em (ppc_create_output_section_statements): Make
1345         an error creating fake bfd fatal.
1346         (ppc_before_allocation): Continue on after errors.
1347         (gld${EMULATION_NAME}_finish): Likewise.
1349 2005-02-15  Nick Clifton  <nickc@redhat.com>
1351         * ldlex.l (YY_NO_UNPUT): Define so that the yy_unput function is
1352         not declared.  It is not used and its presence causes a compile
1353         time warning.
1355 2005-02-11  Zack Weinberg  <zack@codesourcery.com>
1357         * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed):
1358         If st.st_ino is zero, do not treat the library as a duplicate.
1360 2005-02-10  Jakub Jelinek  <jakub@redhat.com>
1362         * emultempl/hppaelf.em (hppaelf_create_output_section_statements):
1363         Set BFD_LINKER_CREATED on the stubs bfd.
1364         * emultempl/ppc64elf.em (ppc_create_output_section_statements):
1365         Likewise.
1367 2005-02-08  Mark Mitchell  <mark@codesourcery.com>
1369         * scripttempl/armbpabi.sc (VERSION): Make special section symbols
1370         local.
1371         (Image$$ER_RO$$Base): Define whenever RELOCATING.
1372         (Image$$ER_RO$$Limit): Likewise.
1373         (SHT$$INIT_ARRAY$$Base): Likewise.
1374         (SHT$$INIT_ARRAY$$Limit): Likeise.
1376 2005-02-10  Ben Elliston  <bje@au.ibm.com>
1378         * emultempl/beos.em: Remove #if 0 and #if 1 blocks.
1380 2005-02-08  Richard Sandiford  <rsandifo@redhat.com>
1382         * configure.tgt (mips64*el-*-linux-gnu*): Define targ_extra_libpath
1383         to include o32 and n64 emulations.
1384         (mips64*-*-linux-gnu*): Likewise.
1386 2005-02-08  Hans-Peter Nilsson  <hp@axis.com>
1388         * ldmain.c (warning_callback, warning_find_reloc): Prepend
1389         "warning: " to warning messages.
1391 2005-02-04  Alan Modra  <amodra@bigpond.net.au>
1393         * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment): Don't
1394         look up symbol for etree_provide here.
1396 2005-02-02  Daniel Jacobowitz  <dan@codesourcery.com>
1398         * emulparams/elf32bmip.sh (TEXT_DYNAMIC): Always set.
1400 2005-02-01  Edward Welbourne  <eddy@opera.com>
1401             Nick Clifton  <nickc@redhat.com>
1403         * ld.texinfo (Source Code Reference): New node describing how to
1404         access linker script defined variables from source code.
1406 2005-02-01  Alan Modra  <amodra@bigpond.net.au>
1408         * ld.texinfo: Clarify --as-needed operation.
1410 2005-01-31  Andrew Cagney  <cagney@gnu.org>
1412         * configure: Regenerate to track ../gettext.m4.
1414 2005-01-31  Nick Clifton  <nickc@redhat.com>
1416         * ldver.c (ldversion): Bump reported copyright date to 2005.
1418 2005-01-31  Nick Clifton  <nickc@redhat.com>
1420         * configure.tgt: Remove obsolete targets m68k-lynxos and
1421         sparc-lynxos.
1423 2005-01-28  Julian Brown  <julian@codesourcery.com>
1425         * emultempl/armelf.em (fix_v4bx): New variable.
1426         (arm_elf_create_output_section_statements): Communicate fix_v4bx flag
1427         value to bfd.
1428         (PARSE_AND_LIST_PROLOGUE): Add option token OPTION_FIX_V4BX.
1429         (PARSE_AND_LIST_LONGOPTS): Add option --fix-v4bx.
1430         (PARSE_AND_LIST_OPTIONS): Add option --fix-v4bx.
1431         (PARSE_AND_LIST_ARGS_CASES): Add option OPTION_FIX_V4BX.
1432         * NEWS: Mention --fix-v4bx.
1433         * ld.texinfo: Document --fix-v4bx.
1435 2005-01-25  Mark Mitchell  <mark@codesourcery.com>
1437         * emulparams/armsymbian.sh (OTHER_READONLY_SECTIONS): Define, so
1438         as to include .ARM.exidx$${Base,Limit}.
1439         * ld/scripttempl/armbpabi.sc: Move .plt to end of text segment.
1440         Define IMAGE$$ER_RO$${Base,Limit} and SHT$$INIT_ARRAY$${Base,Limit}.
1441         Put .init_array, .fini_array, etc. into the read-only data
1442         segment.
1444 2005-01-25  Alan Modra  <amodra@bigpond.net.au>
1446         * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Formatting.
1447         (gld${EMULATION_NAME}_after_open): Ignore needed libs if they were
1448         only needed by an as-needed lib that didn't get linked.
1450 2005-01-23  Alan Modra  <amodra@bigpond.net.au>
1452         * ld.texinfo (Output Section Keywords <CONSTRUCTORS>): Correct
1453         __DTOR_LIST__ description.
1455 2005-01-23  Alan Modra  <amodra@bigpond.net.au>
1457         * ld.texinfo (Location Counter <dot outside sections>): Document
1458         effects of orphan section placement, and ". = ." workaround.
1459         * Makefile.in: Regenerate.
1461 2005-01-22  Richard Sandiford  <rsandifo@redhat.com>
1463         * emulparams/elf32bmip.sh (OTHER_GOT_SECTIONS): Add ". = .;".
1464         * emulparams/elf32bmipn32-defs.sh (OTHER_GOT_SECTIONS): Likewise.
1466 2005-01-21  Jakub Jelinek  <jakub@redhat.com>
1468         * ldgram.y (AS_NEEDED): New token.
1469         (input_list): Handle AS_NEEDED ( input_list ).
1470         * ldlex.l (AS_NEEDED): Add.
1471         * ld.texinfo: Document AS_NEEDED ().
1472         * NEWS: Mention AS_NEEDED ().
1474 2005-01-21  Ben Elliston  <bje@au.ibm.com>
1476         * ldlang.c (lang_reasonable_defaults): Remove.
1477         (lang_process): Don't call lang_reasonable_defaults.
1479         * ldexp.c (exp_assop): Remove #if 0'd code.
1480         (exp_print_tree): Likewise.
1481         * ldlang.c (lang_memory_region_lookup): Likewise.
1482         (open_output): Likewise.
1483         (lang_do_assignments_1): Likewise.
1484         (lang_place_orphans): Likewise.
1485         (lang_enter_output_section_statement): Likewise.
1486         (lang_reasonable_defaults): Likewise.
1487         * ldlang.h (struct lang_input_statement_struct): Likewise.
1488         * mri.c (mri_draw_tree): Likewise.
1489         (mri_load): Likewise.
1490         * pe-dll.c (generate_reloc): Likewise.
1491         (make_import_fixup_entry): Likewise.
1492         (pe_as16): Likewise.
1493         * emultempl/beos.em (set_pe_subsystem): Likewise.
1494         * emultempl/hppaelf.em (hppaelf_after_parse): Likewise.
1495         * emultempl/pe.em: Likewise.
1496         * emultempl/xtensaelf.em (xtensa_colocate_literals): Likewise.
1498 2005-01-20  Daniel Jacobowitz  <dan@codesourcery.com>
1500         * Makefile.am (ALL_EMULATIONS): Add earmelfb_linux_eabi.o.
1501         (earmelfb_linux_eabi.c): New target.
1502         * Makefile.in: Regenerated.
1503         * configure.tgt (arm*b-*-linux-gnueabi): New target.
1504         * emulparams/armelfb_linux_eabi.sh: New file.
1506 2005-01-20  Nick Hudson  <skrll@netbsd.org>
1508         PR ld/676
1509         * emultempl/hppaelf.em (hppaelf_create_output_section_statements):
1510         Handle bfd_elf32_hppa_nbsd_vec.
1512 2005-01-19  Richard Sandiford  <rsandifo@redhat.com>
1514         * ldmain.h (ld_sysroot): Change type to a constant string.
1515         * ldmain.c (ld_sysroot): Likewise.
1516         (get_relative_sysroot, get_sysroot): New functions, adding command-line
1517         support for changing the sysroot.
1518         (main): Call the new functions.
1519         * lexsup.c (OPTION_SYSROOT): New.
1520         (ld_options): Add --sysroot.
1521         (parse_args): Add a dummy handler for it.
1522         * ld.texinfo (--sysroot): Document.
1523         * NEWS: Mention the new --sysroot option.
1525 2005-01-18  Alan Modra  <amodra@bigpond.net.au>
1527         * ldlang.c (section_already_linked): Adjust bfd_link_just_syms call.
1528         (lang_place_orphans): Don't abort on just_syms_flag, instead call
1529         bfd_link_just_syms.
1531 2005-01-16  Danny Smith  <dannysmith@users.sourceforge.net>
1533         * defilep.y (def_name, def_library): Combine into...
1534         (def_image_name): New function.  Strip name to basename,
1535         with warning.
1537 2005-01-12  Mark Kettenis  <kettenis@gnu.org>
1539         * configure.in: Be sure to invoke config.sub using the shell.
1540         * configure: Regenerate.
1542 2005-01-11  Alan Modra  <amodra@bigpond.net.au>
1544         * configure.host: Correct sed patterns for last change.
1546 2005-01-10  Nick Clifton  <nickc@redhat.com>
1548         PR binutils/609
1549         * ldmisc.c (vfinfo): Add an extra argument: is_warning.  Use this
1550         to determine whether config.make_executable should be set to FALSE in
1551         conjunction with config.fatal_warnings.
1552         (info_msg, minfo, lfinof): Pass FALSE as the extra argument.
1553         (einfo): Pass TRUE as the extra argument.
1555 2005-01-10  Greg Schaffer  <gschafer@zip.com.au>
1557         * configure.host (linux targets): Use "${CC} -dumpspecs" instead
1558         of "${CC} --print-file-name=specs" to appease GCC versions >= 4.0.
1559         (ia64-*-aix): Delete - this target is obsolete, and would be
1560         broken by this patch.
1562 2005-01-06  Eric Botcazou  <ebotcazou@libertysurf.fr>
1564         * configure.host (sparc*-*-solaris2*): Rename into sparc-*-solaris2*.
1565         (sparc64-sun-solaris2*): New host.
1567 2005-01-06  Paul Brook  <paul@codesourcery.com>
1569         * Makefie.am: Add earmelf_vxworks.
1570         * Makefile.in: Regenerate.
1571         * configure.tgt: Make arm-*-vxworks a separate case.
1572         * emulparams/armelf_vxworks.sh: New function.
1574 2005-01-06  Alan Modra  <amodra@bigpond.net.au>
1576         * emultempl/ppc64elf.em (no_multi_toc): New var.
1577         (gld${EMULATION_NAME}_finish): Pass to ppc64_elf_setup_section_lists.
1578         (OPTION_NO_MULTI_TOC): Define.
1579         (PARSE_AND_LIST_LONGOPTS): Add --no-multi-toc support.
1580         (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Likewise.
1582 2005-01-05  Nick Clifton  <nickc@redhat.com>
1584         PR binutils/614
1585         * ldmisc.c (vfinfo): Alter output to conform to the GNU Coding
1586         Standard's specification for parsable error messages.
1588 2005-01-04  Paul Brook  <paul@codesourcery.com>
1590         * Makefile.am: Correct dependency for earmsymbian.c.
1591         * Makefile.in: Regenerate.
1593 2004-12-28  Danny Smith  <dannysmith@users.sourceforge.net>
1595         * emultempl/pe.em (set_pe_subsystem): Change second arg to
1596         lang_add_entry to FALSE.
1598 2004-12-23  Nick Clifton  <nickc@redhat.com>
1600         PR 600
1601         * emulparams/shelf.sh (.stack): Increase stack start address to
1602         0x300000.
1604 2004-12-20  Nick Clifton  <nickc@redhat.com>
1606         * ldmain.c (main): Issue an error message if -static and -shared
1607         are used together.
1609 2004-12-17  Jakub Jelinek  <jakub@redhat.com>
1611         * ldexp.h (exp_data_seg): Add min_base and maxpagesize fields.
1612         * ldexp.c (fold_binary) <case DATA_SEGMENT_ALIGN>: Initialize them.
1613         * ldlang.c (lang_size_sections): Use them to avoid wasting virtual
1614         address space at DATA_SEGMENT_ALIGN.  Fix computation of expected
1615         PT_GNU_RELRO segment end.
1617 2004-12-14  P.J. Darcy  <darcypj@us.ibm.com>
1619         * configure.tgt: Add s390x-ibm-tpf support.
1621 2004-12-16  Martin Kögler  <mkoegler@auto.tuwien.ac.at>
1623         * ldmisc.c (vfinfo): Handle the case where %B is passed a NULL
1624         BFD.
1626 2004-12-07  Ben Elliston  <bje@gnu.org>
1628         * ldemul.h: Forward declare struct option.
1630 2004-12-01  Danny Smith  <dannysmith@users.sourceforge.net>
1632         * scripttempl/pe.sc (.data): Add .jcr subsection.
1634 2004-11-30  Paul Brook  <paul@codesourcery.com>
1636         * emultempl/armelf.em: Ignore -p and -no-pipeline-knowledge.
1638 2004-11-30  Tero Niemela  <tero_niemela@yahoo.com>
1640         * Makefile.am: Change LOCALEDIR to $(datadir)/share.
1641         * Makefile.in: Regenerate.
1643 2004-11-26  Melissa Mears  <asterisk@graces.dricas.com>
1645         * emultempl/pe.em: Add --subsystem:xbox as well as
1646         --subsystem:%d.
1647         * ld.texinfo: (ld_options): Document acceptance of subsystem xbox
1648         and numeric subsystems.
1650 2004-11-24  Alan Modra  <amodra@bigpond.net.au>
1652         * ldexp.c (fold_name): Correct PR 338 fix.
1654 2004-11-19  Mark Mitchell  <mark@codesourcery.com>
1656         * Makefile.am (ALL_EMULATIONS): Add earmelf_linux_eabi.o.
1657         (earmelf_linux_eabi.c): New target.
1658         * configure.tgt (arm*-*-linux-gnueabi): Handle it.
1659         * emulparams/armelf_linux_eabi.sh: New file.
1660         * Makefile.in: Regenerated.
1662 2004-11-19  Nick Clifton  <nickc@redhat.com>
1664         PR 518
1665         * ld.texinfo (MEMORY): Update the descriptions of the ORIGIN and
1666         LENGTH fields in the MEMORY command, to explicitly state that
1667         symbols cannot be used in their expressions.
1669 2004-11-19  Jon Beniston <jon@beniston.com>
1671         * ld/ldlex.l: Allow ORIGIN and LENGTH in EXPRESSION.
1672         * ld/ldgram.y: Add ORIGIN and LENGTH expressions.
1673         * ld/ldexp.c (fold_name): Implement LENGTH() and ORIGIN() functions
1674         which return the length and origin of a memory.
1675         * ld/ld.texinfo: Document LENGTH() and ORIGIN() functions.
1676         * NEWS: Mention support for ORIGIN and LENGTH operators.
1678 2004-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
1680         * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Don't use
1681         a dynamic object for stubs.
1683 2004-11-04  Paul Brook  <paul@codesourcery.com>
1685         * ld.texinfo: Document --default-imported-symver.
1686         * ldmain.c (main): Set link_info.default_imported_symver.
1687         * lexsup.c (option_values): Add OPTION_DEFAULT_IMPORTED_SYMVER.
1688         (ld_options): Add --default-imported-symver.
1689         (parse_args): Handle OPTION_DEFAULT_IMPORTED_SYMVER.
1691 2004-11-08  Inderpreet Singh   <inderpreetb@nioda.hcltech.com>
1692             Vineet Sharma      <vineets@noida.hcltech.com>
1694         * Makefile.am: Add entries for new maxq-coff target.
1695         * Makefile.in: Regenerate.
1696         * configure.tgt: Add support for maxq.
1697         * emulparams/maxqcoff.sh: New File.
1698         * scripttempl/maxqcoff.sc: New linker script for target maxq.
1699         * NEWS: Mention the new target.
1701 2004-11-04  Daniel Jacobowitz  <dan@debian.org>
1703         * Makefile.am (ALL_EMULATIONS): Remove earmelf_oabi.o.
1704         (earmelf_oabi.c): Remove rule.
1705         * configure.tgt: Remove arm-*-oabi and thumb-*-oabi.
1706         * emulparams/armelf_oabi.sh, emultempl/armelf_oabi.em: Delete files.
1707         * Makefile.in: Regenerated.
1709 2004-11-04  Hans-Peter Nilsson  <hp@axis.com>
1711         * configure.tgt (crisv32-*-*): Handle like cris-*-* for non-aout.
1712         * emulparams/criself.sh (INIT_START): Remove emitted "push srp".
1713         (FINI_START): Ditto.
1714         (INIT_END): Remove emitted "jump [sp+]".
1715         (FINI_END): Ditto.
1717 2004-11-04  Alan Modra  <amodra@bigpond.net.au>
1719         * emultempl/ppc64elf.em (no_tls_opt): Rename from notlsopt.
1720         (no_opd_opt, no_toc_opt): New static vars.
1721         (ppc_before_allocation): Don't edit opt if no_opd_opt.  Call
1722         ppc64_elf_edit_toc.
1723         (OPTION_NO_OPD_OPT, OPTION_NO_TOC_OPT): Define.
1724         (PARSE_AND_LIST_LONGOPTS): Add no-opd-optimize and no-toc-optimize.
1725         (PARSE_AND_LIST_OPTIONS): Describe new options.
1726         (PARSE_AND_LIST_ARGS_CASES): Handle them.
1728 2004-10-27  Nick Clifton  <nickc@redhat.com>
1730         * emultempl/alphaelf.em (alpha_after_parse): Add extra, NULL,
1731         parameter to invocation of lang_section_start.
1732         * emultempl/aix.em (_handle_option): Likewise.
1734         * Makefile.am (eelf64alpha.c, eelf64alpha_fbsd.c,
1735         eelf64alpha_nbsd.c): Add dependency upon emultempl/alphaelf.em.
1736         * Makefile.in: Regenerate.
1738 2004-10-26  Mark Mitchell  <mark@codesourcery.com>
1740         * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Do not emit
1741         __exidx_{start,end} when not relocating.
1743 2004-10-25  Mark Mitchell  <mark@codesourcery.com>
1745         * Makefile.in (earmsymbian.c): Depend on armbpabi.sc, not elf.sc.
1746         * ldexp.h (segment_type): New type.
1747         (segments): New variable.
1748         * ldexp.c (segments): New variable.
1749         (exp_print_token): Handle SEGMENT_START.
1750         (fold_binary): Likewise.
1751         * ldgram.y (SEGMENT_START): Declare it as a token.
1752         (exp): Handle SEGMENT_START.
1753         * ldlang.h (lang_address_statement_type): Add segment field.
1754         (lang_section_start): Change prototype.
1755         * ldlang.c (map_input_to_output_sections): Do not process section
1756         assignments if a corresponding SEGMENT_START has already been
1757         seen.
1758         (lang_section_start): Add segment parameter.
1759         * ldlex.l (SEGMENT_START): Add it.
1760         * lexsup.c (seg_segment_start): New function.
1761         (parse_args): Use it for -Tbss, -Tdata, and -Ttext.
1762         * ld.texinfo (SEGMENT_START): Document it.
1763         * emulparams/armsymbian.sh (EMBEDDED): Set it.
1764         * scripttempl/armbpabi.sc: Use SEGMENT_START to control segment
1765         base addresses.  Do not map relocations.
1766         * NEWS: Mention SEGMENT_START.
1768 2004-10-26  Paul Brook  <paul@codesourcery.com>
1770         * ld.texinfo: Document --default-symver.
1771         * ldmain.c (main): Set link_info.create_default_symver.
1772         * lexsup.c (enum option_values): Add OPTION_DEFAULT_SYMVER.
1773         (ld_options): Add default-symver.
1774         (parse_args): Handle OPTION_DEFAULT_SYMVER.
1776 2004-10-24 Danny Smith  <dannysmith@users.sourceforge.net>
1778         * pe-dll.c (process_def_file): Don't export all symbols by default if
1779         building a position-independent executable.
1781 2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1783         PR 463
1784         * ldmain.c (reloc_overflow): Accept a pointer to struct
1785         bfd_link_hash_entry. Report symbol location for relocation
1786         overflow.
1788 2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1790         * genscripts.sh (libpath.exp): Really generate for first
1791         emulation only.
1793 2004-10-19  Danny Smith  <dannysmith@users.sourceforge.net>
1795         * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Simplify
1796         comparison and replacement of filenames.
1798 2004-10-19  H.J. Lu  <hongjiu.lu@intel.com>
1800         PR 459
1801         * ldlang.c (load_symbols): Use the same -Bdynamic/-Bstatic
1802         option on linker script as the one for linker script.
1804 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
1806         * ldlang.c (struct excluded_lib, excluded_libs, add_excluded_libs)
1807         (check_excluded_libs): New.
1808         (load_symbols): Call check_excluded_libs.
1809         * ldlang.h (add_excluded_libs): New prototype.
1810         * emultempl/elf32.em (OPTION_EXCLUDED_LIBS): Define.
1811         (gld${EMULATION_NAME}_add_options): Add --exclude-libs.
1812         (gld${EMULATION_NAME}_handle_option): Handle --exclude-libs.
1813         * ld.texinfo (Command Line Variables): Document --exclude-libs.
1814         (Options Specific to i386 PE Targets): Remove --exclude-libs.
1816 2004-10-15  Alan Modra  <amodra@bigpond.net.au>
1818         * ldexp.c (exp_fold_tree): Don't immediately exit ld on a
1819         failing link script assert.
1821         * ldctor.c (ldctor_add_set_entry): Fix comment typo.
1823 2004-10-14  H.J. Lu  <hongjiu.lu@intel.com>
1825         PR 445
1826         * emulparams/elf64_ia64.sh (SMALL_DATA_CTOR): Set.
1827         (SMALL_DATA_DTOR): Set.
1828         * emulparams/elf64_ia64_fbsd.sh (SMALL_DATA_CTOR): Unset.
1829         (SMALL_DATA_DTOR): Unset.
1830         * scripttempl/elf.sc: If SMALL_DATA_CTOR is set, move .ctors
1831         after .data. If SMALL_DATA_DTOR is set, move .dtors after
1832         .data.
1834 2004-10-14  Alan Modra  <amodra@bigpond.net.au>
1836         PR 63
1837         * ldlang.h (lang_output_section_statement_type): Make "next" a
1838         struct lang_output_section_statement_struct *.
1839         (struct orphan_save): Move from elf32.em.  Add "name" and "flags".
1840         (lang_output_section_find_by_flags, lang_insert_orphan): Declare.
1841         * ldlang.c (lang_output_section_find_1): Adjust for changed
1842         output_section_statement "next".
1843         (strip_excluded_output_sections): Likewise.
1844         (lang_record_phdrs): Likewise.
1845         (lang_output_section_find_by_flags): New function.
1846         (output_prev_sec_find): Move from pe.em.  Adjust iterator.
1847         (lang_insert_orphan): New function.  Tail end of elf32.em's
1848         place_orphan merged with that from pe.em.  Allow bfd_section to
1849         be placed first.  New heuristic for placing new output section
1850         statement in existing script, and accompanying split of __start
1851         symbol alignment into a separate assignment to dot.
1852         (lang_add_section): Consistently use output->bfd_section rather than
1853         an alias, section->output_section.
1854         (map_input_to_output_sections): Rename overly long arg.  Move
1855         initialization of data_statement output section to here..
1856         (lang_check_section_addresses): ..from here.
1857         (print_assignment): Correct printing of etree_assert.
1858         (print_all_symbols): Don't bomb if userdata is NULL.
1859         (IGNORE_SECTION): Rearrange.
1860         * emultempl/elf32.em (output_rel_find): Adjust interator.
1861         (output_prev_sec_find): Delete.
1862         (struct orphan_save): Delete.
1863         (gld${EMULATION_NAME}_place_orphan): Cater for zero bfd_section
1864         flags without creating a duplicate output section statement.
1865         Revise code holding history of various orphan section placements.
1866         Allow orphan sections to place before script specified output
1867         sections.  Call lang_output_section_find_by_flags when placement
1868         by name fails.  Use lang_insert_orphan.
1869         * emultempl/mmo.em (output_prev_sec_find): Delete.
1870         (struct orphan_save): Delete.
1871         (mmo_place_orphan): Revise code holding history of orphan placement.
1872         Allow orphans to place before existing output sections.  Use
1873         lang_insert_orphan.
1874         * emultempl/pe.em (output_prev_sec_find): Delete.
1875         (struct orphan_save): Delete.
1876         (gld_${EMULATION_NAME}_place_orphan): Revise to suit use of
1877         lang_insert_orphan.
1879 2004-10-13  Mark Mitchell  <mark@codesourcery.com>
1881         * scripttempl/armbpabi.sc: Do not put .gnu.version.* into a
1882         loadable segment.
1884 2004-10-13  Alan Modra  <amodra@bigpond.net.au>
1886         PR 44
1887         * ldcref.c (check_section_sym_xref): Delete.
1888         (check_local_sym_xref): New function.
1889         (check_nocrossrefs): Adjust call.
1890         * emultempl/pe.em (struct orphan_save): Add os_tail.
1891         (place_orphan): Backport assorted fixes from elf32.em.
1893 2004-10-12  Bob Wilson  <bob.wilson@acm.org>
1895         * emultempl/xtensaelf.em: Use ISO C90 formatting.
1897 2004-10-11  Jakub Jelinek  <jakub@redhat.com>
1899         * emultempl/elf32.em (gld${EMULATION_NAME}_parse_ld_so_conf): Avoid
1900         getline for portability.
1902         * emultempl/elf32.em (gld${EMULATION_NAME}_ld_so_conf): New structure.
1903         (gld${EMULATION_NAME}_parse_ld_so_conf,
1904         gld${EMULATION_NAME}_parse_ld_so_conf_include): New functions.
1905         (gld${EMULATION_NAME}_check_ld_so_conf): Use them.
1907 2004-10-11  Alan Modra  <amodra@bigpond.net.au>
1909         PR 423
1910         * ldfile.c (ldfile_try_open_bfd): Ensure dynamic objects are
1911         rejected when linking statically.
1913 2004-10-08  Daniel Jacobowitz  <dan@debian.org>
1915         * configure.tgt: Include elf_x86_64 for i[3-7]86-*-solaris2*.
1917 2004-10-07  Bob Wilson  <bob.wilson@acm.org>
1919         * ld.texinfo (Xtensa): Describe new linker relaxation to optimize
1920         assembler-generated longcall sequences.  Describe new --size-opt
1921         option.
1922         * emulparams/elf32xtensa.sh (OTHER_SECTIONS): Add .xt.prop section.
1923         * emultempl/xtensaelf.em (remove_section,
1924         replace_insn_sec_with_prop_sec, replace_instruction_table_sections,
1925         elf_xtensa_after_open): New.
1926         (OPTION_OPT_SIZEOPT, OPTION_LITERAL_MOVEMENT,
1927         OPTION_NO_LITERAL_MOVEMENT): Define.
1928         (elf32xtensa_size_opt, elf32xtensa_no_literal_movement): New globals.
1929         (PARSE_AND_LIST_LONGOPTS): Add size-opt and [no-]literal-movement.
1930         (PARSE_AND_LIST_OPTIONS): Add --size-opt.
1931         (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_OPT_SIZEOPT,
1932         OPTION_LITERAL_MOVEMENT, and OPTION_NO_LITERAL_MOVEMENT.
1933         (LDEMUL_AFTER_OPEN): Set to elf_xtensa_after_open.
1934         * scripttempl/elfxtensa.sc: Update with changes from elf.sc.
1935         * Makefile.am (eelf32xtensa.c): Update dependencies.
1936         * Makefile.in: Regenerate.
1938 2004-10-07  Jeff Baker  <jbaker@qnx.com>
1940         * lexsup.c: Handle --warn-shared-textrel option.
1941         (ld_options): Restore alpha sorting of options.
1942         * ldmain.c (main): Initialise warn_shared_info field to FALSE.
1943         * ld.texinfo: Add documentation for --warn-shared-textrel.
1944         * NEWS: Added mention of --warn-shared-textrel option.
1946 2004-10-05  Tomer Levi  <Tomer.Levi@nsc.com>
1948         * emultempl/crxelf.em (disable_relaxation): Add.
1949         (crxelf_before_allocation): Enable --relax option by default.
1950         (PARSE_AND_LIST_PROLOGUE): Add OPTION_NO_RELAX.
1951         (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --no-relax.
1952         (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_NO_RELAX.
1954 2004-10-04  H.J. Lu  <hongjiu.lu@intel.com>
1956         * NEWS: Mention SORT_BY_NAME, SORT_BY_ALIGNMENT and
1957         --sort-section name|alignment.
1959         * ld.texinfo: Document SORT_BY_NAME, SORT_BY_ALIGNMENT and
1960         --sort-section name|alignment.
1962         * ld.h (sort_type): New enum.
1963         (wildcard_spec): Change the type of `sorted' to sort_type.
1965         * ldgram.y (SORT): Removed.
1966         (SORT_BY_NAME): Added.
1967         (SORT_BY_ALIGNMENT): Added.
1968         (wildcard_spec): Updated `sorted'. Handle SORT_BY_NAME and
1969         SORT_BY_ALIGNMENT.
1970         (input_section_spec_no_keep): Updated `sorted'.
1971         (statement): Replace SORT with SORT_BY_NAME.
1973         * ldlang.c (compare_section): New function to compare 2
1974         sections with different sorting schemes.
1975         (wild_sort): Updated. Use compare_section.
1976         (update_wild_statements): New function.
1977         (lang_process): Call update_wild_statements before
1978         map_input_to_output_sections.
1980         * ldlex.l (SORT_BY_NAME): New.
1981         (SORT_BY_ALIGNMENT): New.
1982         (SORT): Return SORT_BY_NAME.
1984         * ldmain.c (sort_section): New. Defined.
1985         (main): Initialize it to none.
1987         * lexsup.c (option_values): Add OPTION_SORT_SECTION.
1988         (ld_options): Add an entry for OPTION_SORT_SECTION.
1989         (parse_args): Handle OPTION_SORT_SECTION.
1991         * mri.c (mri_draw_tree): Updated `sorted'.
1993 2004-10-04  Jakub Jelinek  <jakub@redhat.com>
1995         * ldgram.y (DATA_SEGMENT_RELRO_END): Add one argument.
1996         * scripttempl/elf.sc (DATA_SEGMENT_RELRO_END): Add 0 as first
1997         argument.
1998         (DATA_SEGMENT_RELRO_GOTPLT_END): Pass $SEPARATE_GOTPLT as first
1999         and . as second argument.
2000         (GOTPLT): Move $DATA_SEGMENT_RELRO_GOTPLT_END before the section.
2001         * ldexp.c (fold_unary): Remove DATA_SEGMENT_RELRO_END handling here.
2002         (fold_binary): Add it here.  Insert padding to make relro_end
2003         COMMONPAGESIZE bytes aligned.  For DATA_SEGMENT_ALIGN in
2004         exp_dataseg_relro_adjust phase just use previously computed
2005         exp_data_seg.base.
2006         * ldlang.c (lang_size_sections): Set exp_data_seg.base for
2007         relro_adjust here.  Call lang_size_sections_1 once more if there
2008         was too big padding at DATA_SEGMENT_RELRO_END.
2009         * ld.texinfo (DATA_SEGMENT_RELRO_END): Add documentation.
2011 2004-10-01  Paul Brook  <paul@codesourcery.com>
2013         * emulparams/armelf.sh: Add unwinding table sections.
2015 2004-09-30  Filip Navara  <navaraf@reactos.com>
2017         * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Generate
2018         correct base address for position independant executables.
2019         * pe-dll.c (pe_dll_fill_sections): Don't mark position independant
2020         executables as DLLs.
2022 2004-09-30  Paul Brook  <paul@codesourcery.com>
2024         * ld.texinfo: Document --target2=abs.
2025         * emulparms/armsymbian.sh (TARGET2_TYPE): Set.
2027 2004-09-29  Nick Clifton  <nickc@redhat.com>
2029         * scripttempl/xstormy16.sc: Only perform the assignments to the
2030         ROM region when not performing a relocatable link.  The ROM region
2031         does not start at address 0, but the sections will.
2032         * Makefile.am: Fix linker script dependency for the generation of
2033         eelf32xstormy16.c.
2034         * Makefile.in: Regenerate.
2036 2004-09-18  Filip Navara  <navaraf@reactos.com>
2038         * emulparams/arm_epoc_pe.sh, emulparams/armpe.sh, emulparams/i386pe.sh,
2039         emulparams/i386pe_posix.sh, emulparams/mcorepe.sh,
2040         emulparams/mipspe.sh, emulparams/ppcpe.sh, scripttempl/pe.sc: Define
2041         TARGET_PAGE_SIZE.
2042         * scripttempl/pe.sc: Make the virtual address and file offset synced if
2043         the alignment is lower than the target page size.
2045 2004-09-27  Filip Navara  <navaraf@reactos.com>
2047         * emultempl/pe.em (gld_${EMULATION_NAME}_unrecognized_file): Allow
2048         def_file_parse to handle pe_def_file if NULL and prevent crash with
2049         invalid .def files.
2051 2004-09-27  Alan Modra  <amodra@bigpond.net.au>
2053         * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Enable
2054         --emit-stub-syms automatically when --emit-relocs.
2056 2004-09-24  Paul Brook  <paul@codeosurcery.com>
2058         * scripttempl/elf.sc: Keep .preinit_array, .init_array and
2059         .fini_array sections.
2061 2004-09-19  Andreas Schwab  <schwab@suse.de>
2063         * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Adjust data segment
2064         base so that relro end is suitably aligned.
2066 2004-09-17  Paul Brook  <paul@codesourcery.com>
2068         * ld.texinfo: Rename arm-specific section.  Document --target*
2069         * emulparams/armelf_fbsd.sh: Set TARGET2_TYPE.
2070         * emulparams/armelf_linux.sh: Ditto.
2071         * emulparams/armelf_nbsd.sh: Ditto.
2072         * emultempl/armelf.em: Set default for TARGET2_TYPE.
2073         (target2_type): New variable.
2074         (arm_elf_before_allocation): Don't pass target1_type.
2075         (arm_elf_create_output_section_statements): New function.
2076         (PARSE_AND_LIST_PROLOGUE): Add OPTION_TARGET2.
2077         (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --target=.
2078         (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_TARGET2.
2079         (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Set.
2080         * emultempl/armelf_oabi.em (_before_allocation): Remove extra
2081         argument to bfd_elf32_arm_process_before_allocation.
2083 2004-09-17  Alan Modra  <amodra@bigpond.net.au>
2085         * ldexp.c (fold_name): Update u.undef.next refs.
2086         * emultempl/pe.em: Likewise.
2087         * emultempl/sunos.em: Likewise.
2089 2004-09-17  Alan Modra  <amodra@bigpond.net.au>
2091         * Makefile.am: Run "make dep-am".
2092         * Makefile.in: Regenerate.
2093         * config.in: Regenerate.
2094         * configure: Regenerate.
2095         * aclocal.m4: Regenerate.
2096         * po/ld.pot: Regenerate.
2098 2004-09-16  Tomer Levi  <Tomer.Levi@nsc.com>
2100         * scripttempl/elf32crx.sc (.init): Add KEEP for section's *personality*.
2101         (.fini): Likewise.
2102         (.jcr): Likewise.
2104 2004-09-16  Alan Modra  <amodra@bigpond.net.au>
2106         * emultempl/armelf_oabi.em (before_allocation): Add extra zero param
2107         to bfd_elf32_arm_process_before_allocation call.
2109 2004-09-13  Paul Brook  <paul@codesourcery.com>
2111         * emulparams/armsymbian.sh: Set TARGET1_IS_REL.
2112         * emultempl/armelf.em: Use TARGET1_IS_REL.  Add --target1-{rel,abs}.
2114 2004-09-07  H.J. Lu  <hongjiu.lu@intel.com>
2116         * configure: Regenerated with autconfig 2.13.
2118 2004-09-07  Andreas Schwab  <schwab@suse.de>
2120         * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Apply data segment
2121         alignment before adjusting DATA_SEGMENT_RELRO_END.
2123 2004-09-06  Mark Mitchell  <mark@codesourcery.com>
2125         * emulparams/armsymbian.sh: Use armbpabi script.
2126         * scripttempl/armbpabi.sc: New script.
2128 2004-09-02  Mark Mitchell  <mark@codesourcery.com>
2130         * Makefile.am (ALL_EMULATIONS): Add earmsymbian.o.
2131         (earmsymbian.c): New target.
2132         * configure.tgt: Use armsymbian emulation for arm*-*-symbianelf*.
2133         * Makefile.in: Regenerated.
2134         * aclocal.m4: Likewise.
2135         * configure: Likewise.
2136         * emulparams/armsymbian.sh: New file.
2138 2004-09-03  Tomer Levi  <Tomer.Levi@nsc.com>
2140         * scripttempl/elf32crx.sc: Edit file with comments.
2141         (.init): Add new section.
2142         (.fini): Likewise.
2143         (.ctor): Control the linkage order.
2144         (.dtor): Likewise.
2146 2004-08-27  Nick Clifton  <nickc@redhat.com>
2148         * emultempl/pe.em (after_open): Do not assume that either bfd is
2149         an archive.
2151 2004-08-26  Alan Modra  <amodra@bigpond.net.au>
2153         * ldlang.c (lang_init): Don't compare with TRUE.
2155 2004-08-25  Dmitry Diky  <diwil@spec.ru>
2157         * emulparams/msp430all.sh: Fix RAM sizes for all targets.
2158         * scripttempl/elf32msp430.sc: Add .profiler section definition.
2160 2004-08-24  H.J. Lu  <hongjiu.lu@intel.com>
2162         * ldlang.c (wildcardp): Defined as a macro with strpbrk.
2164 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
2166         * configure.tgt (arm*-*-symbianelf*): New target.
2167         (arm*-*-eabi*): Likewise.
2169 2004-08-19  Jakub Jelinek  <jakub@redhat.com>
2171         * emultempl/ppc64elf.em (non_overlapping_opd): New variable.
2172         (ppc_before_allocation): Pass it to ppc64_elf_edit_opd).
2173         (OPTION_NON_OVERLAPPING_OPD): Define.
2174         (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Add
2175         --non-overlapping-opd option.
2177 2004-08-18  Alan Modra  <amodra@bigpond.net.au>
2179         PR 338
2180         * ldexp.c (fold_name): Don't call bfd_link_add_undef if the symbol
2181         was already on the undefs list.
2183 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
2185         * emultempl/ppc64elf.em (gld${EMULATION_NAME}_new_vers_pattern): Dot
2186         prefix the symbol field too.
2188 2004-08-13  Alan Modra  <amodra@bigpond.net.au>
2190         * ldmain.c (link_callbacks): Remove "error_handler".
2191         * ldmisc.c: Include elf-bfd.h.
2192         (vfinfo): Sort comment.  Handle %A.  Use %A instead of
2193         bfd_get_section_indent.
2194         (error_handler): Delete.
2195         * ldmisc.h (error_handler): Delete declaration.
2197 2004-08-10  Alan Modra  <amodra@bigpond.net.au>
2199         * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Call
2200         ppc64_elf_restore_symbols.
2202 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
2204         * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Error if
2205         .toc is too large on relocatable linking.
2207 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
2209         * emultempl/ppc64elf.em (ppc_after_open): Delete.
2210         (LDEMUL_AFTER_OPEN): Don't define.
2212 2004-08-02  Stephane Carrez  <stcarrez@nerim.fr>
2214         * ld.texinfo (Top): Document specific options of 68HC11 and 68HC12.
2216 2004-08-01  Stephane Carrez  <stcarrez@nerim.fr>
2218         * scripttempl/elfm68hc12.sc: Align text, rodata and data section
2219         on power of 2.
2221 2004-07-27  Jason Thorpe  <thorpej@wasabisystems.com>
2223         * emulparams/hppanbsd.sh (OUTPUT_FORMAT): Set to "elf32-hppa-netbsd".
2225 2004-07-26  Dmitry Diky  <diwil@spec.ru>
2227         * Makefile.am: Add new subtargets: msp430x1610, msp430x1611,
2228         msp430x1612, msp430x415, msp430x417, msp430xG437, msp430xG438,
2229         msp430xG439.
2230         * configure.tgt: Likewise.
2231         * emulparams/msp430all.sh: Likewise.
2232         * Makefile.in: Regenerate.
2234 2004-07-23  Nick Clifton  <nickc@redhat.com>
2236         * emultempl/elf32.em (_place_orphan): Use an already existing
2237         section name if that section does not have any flags set.
2239 2004-07-21  H.J. Lu  <hongjiu.lu@intel.com>
2241         * ldlang.c (already_linked_hash_entry): Removed.
2242         (already_linked): Likewise.
2243         (already_linked_table): Likewise.
2244         (section_already_linked): Call bfd_section_already_linked.
2245         (lang_process): Replace already_linked_table_init with
2246         bfd_section_already_linked_table_init and check return. Replace
2247         already_linked_table_free with bfd_section_already_linked_table_free.
2249 2004-07-21  Nick Clifton  <nickc@redhat.com>
2251         * ldlang.c (init_os): Make sure that the newly allocated userdata
2252         structure is zeroed out.
2254 2004-07-19  H.J. Lu  <hongjiu.lu@intel.com>
2256         * NEWS: Mention the new --add-needed/--no-add-needed and
2257         --as-needed/--no-as-needed options.
2259 2004-07-19  H.J. Lu  <hongjiu.lu@intel.com>
2261         * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): Also
2262         check the add_needed field.
2263         (dt_needed): New struct.
2264         (gld${EMULATION_NAME}_try_needed): Change the first argument
2265         to a pointer to struct dt_needed. Check the DYN_NO_ADD_NEEDED
2266         bit in the file where the DT_NEEDED entry comes from.
2267         (gld${EMULATION_NAME}_search_needed): Change the second
2268         argument to a pointer to struct dt_needed.
2269         (gld${EMULATION_NAME}_check_ld_so_conf): Updated.
2270         (gld${EMULATION_NAME}_after_open): Likewise.
2272         * ld.texinfo: Add --add-needed document.
2273         * ldlang.c (new_afile): Set p->add_needed.
2274         * ldlang.h (lang_input_statement_type): Add add_needed field.
2275         * ldmain.h (add_needed): Declare.
2276         * ldmain.c (add_needed): New global var.
2277         * lexsup.c (option_values): Add OPTION_ADD_NEEDED and
2278         OPTION_NO_ADD_NEEDED.
2279         (ld_options): Likewise.
2280         (parse_args): Handle them.
2282 2004-07-13  Christof Petig  <christof@petig-baender.de>
2284         * emultempl/pe.em (make_import_fixup): Use bfd_get_32 to correct
2285         for endian-ness of extracted addend.
2287 2004-07-13  Danny Smith  <dannysmith@usesr.sourceforge.net>
2289         * pe-dll.c (auto_export):  Filter on just the import prefix,
2290         "_imp_", not "_imp__".
2292 2004-07-09  Nick Clifton  <nickc@redhat.com>
2294         * configure.tgt: Change sh-sybmian-elf to sh-*-symbianelf.
2296 2004-07-06  Tomer Levi  <Tomer.Levi@nsc.com>
2298         * Makefile.am (ALL_EMULATIONS): Add eelf32crx.o.
2299         (eelf32crx.c): New target.
2300         * Makefile.in: Regenerate.
2301         * configure.tgt: Handle crx-*-elf*.
2302         * emulparams/elf32crx.sh: New file.
2303         * emultempl/crxelf.em: New file.
2304         * scripttempl/elf32crx.sc: New file.
2305         * NEWS: Mention new target.
2307 2004-07-06  Nick Clifton  <nickc@redhat.com>
2309         * Makefile.am: Add eshlsymbian.c.
2310         * Makefile.in: Regenerate.
2311         * configure.tgt: Add sh*-symbian-elf target.
2312         * emulparams/shlsymbian.sh: New file.  Configure the
2313         sh-symbian-elf linker scripts.
2314         * scripttemp/elf32sh-symbian.sc: New file.  Linker script
2315         template for the sh-symbian-elf target.
2317 2004-07-05  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2319         * emulparams/hppa64linux.sh: Define PLT_BEFORE_GOT.
2320         * emulparams/hppalinux.sh: Likewise.
2321         * scripttempl/elf.sc: Place .plt just before .got when .plt is in
2322         data segment and PLT_BEFORE_GOT is defined.
2324 2004-07-03  Aaron W. LaFramboise  <aaron98wiridge9@aaronwl.com>
2326         * ld.texinfo (WIN32): Document PE weak symbols.
2328 2004-07-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2330         * emulparams/shlelf32_linux.sh (COMMONPAGESIZE): Set to 4KB.
2332 2004-07-01  H.J. Lu  <hongjiu.lu@intel.com>
2334         * ldmisc.c (vfinfo): Call bfd_get_section_ident to identify
2335         the section.
2337 2004-06-29  Alan Modra  <amodra@bigpond.net.au>
2339         * ldlang.c (lang_reset_memory_regions): Save last relax pass section
2340         size in rawsize.
2342 2004-06-24  Alan Modra  <amodra@bigpond.net.au>
2344         * ldlang.c (print_output_section_statement): Don't print size before
2345         relaxation.
2346         (IGNORE_SECTION): Remove bfd arg.  Update all callers.
2348         * ldexp.c (fold_name): .. See below.
2349         * ldlang.c (section_already_linked, print_output_section_statement,
2350         print_input_section, insert_pad, size_input_section,
2351         lang_check_section_addresses, lang_size_sections_1,
2352         lang_size_sections, lang_do_assignments_1, lang_set_startof,
2353         lang_one_common, lang_reset_memory_regions, lang_process,
2354         lang_abs_symbol_at_end_of, lang_do_version_exports_section): ..
2355         * ldwrite.c (build_link_order, clone_section, ds, split_sections): ..
2356         * pe-dll.c (process_def_file, generate_reloc): ..
2357         * emultempl/elf32.em (gld${EMULATION_NAME}_find_statement_assignment,
2358         gld${EMULATION_NAME}_before_allocation): ..
2359         * emultempl/mmix-elfnmmo.em (mmix_after_allocation): ..
2360         * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation,
2361         sh64_elf_${EMULATION_NAME}_after_allocation): ..
2362         * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): ..
2363         * emultempl/xtensaelf.em (ld_assign_relative_paged_dot,
2364         ld_local_file_relocations_fit, ld_xtensa_insert_page_offsets): Use
2365         "size" instead of "_raw_size" and "_cooked_size".  Expand
2366         bfd_section_size macro invocations.
2368 2004-06-22  Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2370         * ld/scripttemp/pe.sc (.CRT): Define ___crt_xc_start__,
2371         ___crt_xc_end__, ___crt_xi_start__, ___crt_xi_end__, ___crt_xl_start__,
2372         ___crt_xp_start__, ___crt_xp_end__, ___crt_xt_start__ and
2373         ___crt_xt_end__.
2374         (.tls): Define ___tls_start__ and ___tls_end__.
2376 2004-06-21  Alexandre Oliva  <aoliva@redhat.com>
2378         * emulparams/elf32frvfd.sh (GENERATE_PIE_SCRIPT): Set to yes.
2380 2004-06-18  Adam Nemet  <anemet@lnxw.com>
2382         * configure.in: Set EXTRA_SHLIB_EXTENSION to .a for LynxOS.
2383         * configure: Regenerate.
2385 2004-06-15  Jakub Jelinek  <jakub@redhat.com>
2387         * scripttempl/elf.sc: Readd KEEP and .gcc_except_table.* to
2388         .gcc_except_table output sections lost accidentally with
2389         -z relro patch.
2391 2004-06-15  Alan Modra  <amodra@bigpond.net.au>
2393         * ldwrite.c (build_link_order): Use bfd_get_section_size
2394         instead of bfd_get_section_size_before_reloc or _raw_size.
2395         * pe-dll.c (process_def_file): Likewise.
2397 2004-06-14  Alan Modra  <amodra@bigpond.net.au>
2399         From Richard Wirth <r.wirth@wirthware.de>
2400         * ldlang.c (lang_finish): Don't free lang_definedness_table.
2402 2004-05-29  Alan Modra  <amodra@bigpond.net.au>
2404         * ldlang.c (gc_section_callback): Move SEC_EXCLUDE twiddles..
2405         (lang_gc_sections): .. to a LANG_FOR_EACH_INPUT_STATEMENT loop here.
2407 2004-05-28  Alan Modra  <amodra@bigpond.net.au>
2409         * ldlang.c: Formatting.  Wrap long lines, expand bfd_get_section_flags
2410         throughout file.
2411         * lexsup.c: Formatting.  Wrap long lines.
2412         * ldwrite.c: Update copyright date.
2414         * ldlang.c (lang_add_section): Don't twidlle SEC_EXCLUDE here.
2415         (output_section_callback): Nor SEC_KEEP here.
2416         (gc_section_callback): Twiddle SEC_EXCLUDE here.
2417         (lang_gc_wild): Delete.  Fold into..
2418         (lang_gc_sections_1): ..here.  Only call bfd_gc_sections when garbage
2419         collecting.
2420         (lang_process): Always call lang_gc_sections.
2421         (lang_place_orphans): Handle SEC_EXCLUDE sections.
2422         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Remove
2423         SEC_EXCLUDE code.
2425 2004-05-26  H.J. Lu  <hongjiu.lu@intel.com>
2427         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Clear
2428         SEC_EXCLUDE on non-SEC_DEBUGGING sections for relocatable link.
2429         * ldlang.c (lang_add_section): Likewise.
2431 2004-05-26  Alan Modra  <amodra@bigpond.net.au>
2433         * ldlang.c (lang_add_section): Set SEC_EXCLUDE for SEC_GROUP
2434         sections when doing a final link.  Clear SEC_EXCLUDE when doing
2435         a relocable link, except for SEC_DEBUGGING sections.
2436         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Use the
2437         same condition here to drop SEC_EXCLUDE orphan sections.
2439 2004-05-25  Alan Modra  <amodra@bigpond.net.au>
2441         * ldlang.c (lang_process): Call bfd_merge_sections later, and
2442         only when not a relocatable link.
2443         (print_input_section): Handle SEC_EXCLUDE sections.
2444         (size_input_section): Don't update dot on SEC_EXCLUDE sections.
2445         (lang_do_assignments_1): Likewise.
2446         * ldwrite.c (build_link_order): Ignore SEC_EXCLUDE input sections.
2447         * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Likewise.
2448         * emultempl/hppaelf.em (build_section_lists): Likewise.
2449         * emultempl/ppc64elf.em (build_toc_list): Likewise.
2450         (build_section_lists): Likewise.
2452 2004-05-23  Andreas Schwab  <schwab@suse.de>
2454         * ld.texinfo (Options): Fix typo in last change.
2456 2004-05-21  Andy Chittenden  <achittenden@bluearc.com>
2458         * ld.h (ld_config_type): Add new field: hash_table_size.
2459         * ldmain.c: Initialise the new field to zero.  If it is non-zero
2460         after parsing the linker's command line call
2461         bfd_hash_set_default_size.
2462         * lexsup.c (option_values): Add OPTION_HASH_SIZE.
2463         (ld_options): Add hash-size.
2464         (parse_args): Parse --hash-size option.  Allow
2465         --reduce-memory-overheads to set the default hash table size as
2466         well.
2467         * ld.texinfo: Document the new switch.  Also mention that
2468         --reduce-memory-overheads can affect the hash table size.
2469         * NEWS: Mention the new feature.
2471 2004-05-19  J"orn Rennecke <joern.rennecke@superh.com>
2473         * NEWS: Mention new linker map file generation and the
2474         --reduce-memory-overheads option.
2475         * ld.texinfo: Document --reduce-memory-overheads option.
2476         * ld.h (map_symbol_def): New struct.
2477         (struct user_section_struct, section_userdata_type): Rename to:
2478         (struct lean_user_section_struct, lean_section_userdata_type).
2479         (struct fat_user_section_struct, fat_section_userdata_type): New.
2480         (SECTION_USERDATA_SIZE): Define.
2481         (args_type): New member reduce_memory_overheads.
2482         * ldlang.c (map_obstack): New static variable.
2483         (init_map_userdata, print_all_symbols, sort_def_symbol): New functions.
2484         (lang_map): Unless command_line.reduce_memory_overheads is set,
2485         initialize lists of defined symbols for each section.
2486         (print_input_section): Unless command_line.reduce_memory_overheads
2487         is set, use print_all_symbols.
2488         (init_os): Use lean_section_userdata_type / SECTION_USERDATA_SIZE.
2489         * ldmain.c (main): Initialize command_line.reduce_memory_overheads.
2490         * lexsup.c (enum option_values): Add OPTION_REDUCE_MEMORY_OVERHEADS.
2491         (ld_options): Add entry for --reduce-memory-overheads.
2492         (parse_args): Handle OPTION_REDUCE_MEMORY_OVERHEADS.
2494 2004-05-19  Jakub Jelinek  <jakub@redhat.com>
2496         * ldgram.y (sect_constraint): New.
2497         (ONLY_IF_RO, ONLY_IF_RW): New tokens.
2498         (section): Add sect_constraint.  Pass additional argument
2499         to lang_enter_output_section_statement.
2500         * mri.c (mri_draw_tree): Pass additional argument to
2501         lang_enter_output_section_statement.
2502         * emultempl/pe.em (place_orphan): Likewise.
2503         (output_prev_sec_find): Disregard output section statements with
2504         constraint == -1.
2505         * emultempl/mmo.em (output_prev_sec_find): Likewise.
2506         (mmo_place_orphan): Pass additional argument to
2507         lang_enter_output_section_statement.
2508         * emultempl/elf32.em (output_prev_sec_find): Disregard output section
2509         statements with constraint == -1.
2510         (place_orphan): Pass additional argument to
2511         lang_enter_output_section_statement.
2512         * ldlang.c (lang_enter_overlay_section): Likewise.
2513         (lang_output_section_find_1): New.
2514         (lang_output_section_find): Use it.
2515         (lang_output_section_statement_lookup_1): New.
2516         (lang_output_section_statement_lookup): Use it.
2517         (check_section_callback, check_input_sections): New.
2518         (map_input_to_output_sections): Check if all input sections
2519         are readonly if ONLY_IF_RO or ONLY_IF_RW was seen.
2520         (strip_excluded_output_sections): Disregard output section statements
2521         with constraint == -1.
2522         (lang_record_phdrs): Likewise.
2523         (lang_enter_output_section_statement): Add constraint argument.
2524         Use lang_output_section_statement_lookup_1.
2525         * ldlang.h (lang_output_section_statement_type): Add constraint
2526         and all_input_readonly fields.
2527         (lang_enter_output_section_statement): Adjust prototype.
2528         * ldlex.l (ONLY_IF_RO, ONLY_IF_RW): New tokens.
2529         * scripttempl/elf.sc (.eh_frame, .gcc_except_table): Move into text
2530         segment if all input sections are readonly.
2532 2004-05-19  Adam Nemet  <anemet@lnxw.com>
2534         * scripttempl/i386lynx.sc: Remove file.
2536 2004-05-17  Bob Wilson  <bob.wilson@acm.org>
2538         * ld.texinfo (Output Section Address): Correct subsection name.
2540 2004-05-17  Adam Nemet  <anemet@lnxw.com>
2542         * configure.tgt (powerpc-*-lynxos* case): New case.
2543         * configure.host (i[3-7]86-*-lynxos* case): Remove case.
2544         * emulparams/ppclynx.sh: New file.
2545         * emulparams/i386lynx.sh (SCRIPT_NAME): Update to LynxOS 4.0.
2546         * Makefile.am (ALL_EMULATIONS): Add eppclynx.o
2547         (ei386lynx.c): Update rule to LynxOS 4.0 ELF.
2548         (eppclynx.c): New rule.
2549         * Makefile.in: Regenerate.
2551 2004-05-13  Joel Sherrill <joel@oarcorp.com>
2553         * configure.tgt (or32-*-rtems*): Switch to elf and
2554         support versioned targets.
2556 2004-05-13  Nick Clifton  <nickc@redhat.com>
2558         * po/fr.po: Updated French translation.
2560 2004-05-11  Jakub Jelinek  <jakub@redhat.com>
2562         * genscripts.sh: Generate -z combreloc -z now -z relro scripts
2563         for binaries, -shared and -pie.
2564         * emulparams/elf_i386.sh (SEPARATE_GOTPLT): Set.
2565         * emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Set.
2566         * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Rename to...
2567         (OTHER_RELRO_SECTIONS): ... this.
2568         * ldlex.l (DATA_SEGMENT_RELRO_END): Add.
2569         * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
2570         -z relro and -z norelro.
2571         (gld${EMULATION_NAME}_list_options): Add it to usage.
2572         (gld${EMULATION_NAME}_get_script): Return -z combreloc -z now
2573         -z relro scripts when appropriate.
2574         * scripttempl/elf.sc: Unset SEPARATE_GOTPLT if RELRO_NOW is set.
2575         Create separate .got.plt section if SEPARATE_GOTPLT.
2576         Move sections which are only written during relocation handling
2577         to the beginning of RW segment.  If NO_SMALL_DATA, move .got
2578         before .data.  Add DATA_SEGMENT_RELRO_END directive.
2579         Include OTHER_RELRO_SECTIONS.
2580         * ldgram.y (DATA_SEGMENT_RELRO_END): Add.
2581         * ldexp.c (exp_print_token): Handle DATA_SEGMENT_RELRO_END.
2582         (fold_unary): Likewise.
2583         (fold_binary): Handle -z relro.
2584         * ldexp.h (struct exp_data_seg): Add exp_dataseg_relro_seen and
2585         exp_dataseg_relro_adjust phases.  Add relro_end field.
2586         * ldmain.c (main): Initialize link_info.relro to FALSE.
2587         * ldlang.c (lang_size_sections): Handle -z relro.
2589 2004-05-08  Marek Michalkiewicz  <marekm@amelek.gda.pl>
2591         * scripttempl/avr.sc: Do not set LMA for "eeprom" section.
2593 2004-05-07  J"orn Rennecke <joern.rennecke@superh.com>
2595         * ldlang.c (print_padding_statement): Cast size_t to bfd_vma
2596         before printing it with %W.
2598 2004-05-07  Brian Ford  <ford@vss.fsi.com>
2599             DJ Delorie  <dj@redhat.com>
2601         * emultempl/pe.em (real_flags): New static.
2602         (OPTION_LARGE_ADDRESS_AWARE): New define.
2603         (gld${EMULATION_NAME}_add_options): Add --large-address-aware option.
2604         (gld_${EMULATION_NAME}_list_options): Likewise.
2605         (gld${EMULATION_NAME}_handle_option): Likewise.
2606         (gld_${EMULATION_NAME}_after_open): Pass real_flags to PE private data.
2607         * ld.texinfo: Document it.
2608         * NEWS: Mention it.
2610 2004-05-07  Brian Ford  <ford@vss.fsi.com>
2612         * NEWS: Mention DWARF 2 support for i386pe.
2614 2004-05-05  Alexandre Oliva  <aoliva@redhat.com>
2616         * emulparams/elf32frvfd.sh (OUTPUT_FORMAT): Switch to new
2617         elf32-frvfdpic.
2619 2004-04-30  Alan Modra  <amodra@bigpond.net.au>
2621         * ldlang.c (unique_section_p): Pass section parm, return true on
2622         group sections.
2623         (output_section_callback): Adjust.
2624         * ldlang.h (unique_section_p): Update prototype.
2625         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust.
2627 2004-04-30  Eric Botcazou  <ebotcazou@act-europe.fr>
2629         * ld.texinfo (--gc-sections): Remove restriction for
2630         dynamic linking.
2632 2004-04-29  Brian Ford  <ford@vss.fsi.com>
2634         * scripttempl/pe.sc: Handle .debug* and .gnu.linkonce.wi.* sections
2635         for DWARF 2/3.  Update stab section's syntax.
2637 2004-04-29  Alan Modra  <amodra@bigpond.net.au>
2639         * pe-dll.c: Revert changes accidentally committed 2004-03-08.
2640         (fill_edata): Correct pointer arithmetic.
2642 2004-04-21  Chris Demetriou  <cgd@broadcom.com>
2644         * ld.texinfo: Remove MIPS --embedded-relocs documentation.
2645         * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Remove definition.
2646         * emulparams/mipsidt.sh (TEMPLATE_NAME): Use generic.em.
2647         (EXTRA_EM_FILE): Use mipsecoff.em
2648         * emulparams/mipsidtl.sh (TEMPLATE_NAME): Use generic.em.
2649         (EXTRA_EM_FILE): Use mipsecoff.em
2650         * emultempl/mipsecoff.em: Restructure to be included as an
2651         extra emulation file.
2652         (check_sections, gld${EMULATION_NAME}_after_open)
2653         (gld${EMULATION_NAME}_after_allocation)
2654         (gld${EMULATION_NAME}_get_script)
2655         (ld_${EMULATION_NAME}_emulation): Remove
2656         (gld${EMULATION_NAME}_before_parse): Rename to...
2657         (mipsecoff_before_parse): This.
2658         (LDEMUL_BEFORE_PARSE): Define.
2659         * emultempl/mipself.em: Remove file.
2660         * scripttempl/mips.sc (.rel.sdata): Do not include in output.
2661         (__runtime_reloc_start, __runtime_reloc_stop): Stop providing
2662         these symbols.
2663         * Makefile.am: Remove dependencies on emultempl/mipself.em.
2664         * Makefile.in: Regenerate.
2666 2004-04-21      Anil Paranjpe   <anilp1@kpitcummins.com>
2668         * ld.texinfo (synthesizing on H8/300): Information about linker
2669         relaxation support for bit manipulation instructions and system
2670         control instructions is added.
2672 2004-04-21  Hans-Peter Nilsson  <hp@axis.com>
2674         * NEWS: Mention change in DEFINED semantics.
2676 2004-04-21  Eric Botcazou  <ebotcazou@act-europe.fr>
2678         * scripttempl/elf.sc (.text): Add KEEP for .text.*personality*.
2679         (.data): Add KEEP for .gnu.linkonce.d.*personality*.
2680         (.gcc_except_table): Add KEEP for self and accept .gcc_except_table.*.
2682 2004-04-21  Ben Elliston  <bje@au.ibm.com>
2684         * ld.texinfo (Simple Example): Add missing punctuation.
2686 2004-04-20  Chris Demetriou  <cgd@broadcom.com>
2688         * NEWS: Note that MIPS --embedded-relocs option is deprecated.
2690 2004-04-19  Jakub Jelinek  <jakub@redhat.com>
2692         * ldlang.c (lang_do_assignments_1): Handle .tbss output section
2693         specially.
2695 2004-04-18  Danny Smith  <dannysmith@users.sourceforge.net>
2697         * scriptempl/pe.sc:  Put numbered .ctors.* after .ctors
2698         with default priority. Likewise for dtors.
2700 2004-04-11  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
2702         * configure.host: Remove mips*-dec-bsd* target.
2703         * configure.tgt: Likewise.
2705 2004-04-08  Richard Sandiford  <rsandifo@redhat.com>
2707         * emulparams/elf32bsmip.sh (EXTRA_EM_FILE): Define to irix.
2708         * emulparams/elf64bmip.sh (EXTRA_EM_FILE): Likewise.
2709         * emulparams/elf32bmipn32.sh (EXTRA_EM_FILE): Likewise.
2710         * emultempl/irix.em: New file.
2711         * Makefile.am (eelf32bsmip.c, eelf32bmipn32.c, eelf64bmip.c): Update
2712         dependencies.
2713         * Makefile.in: Regenerate.
2715 2004-04-01  Paul Brook  <paul@codesourcery.com>
2717         * emultempl/armelf.em (byteswap_code): Add.
2718         (arm_elf_before_allocation): Pass extra parameter.
2719         (PARSE_AND_LIST_PROLOGUE): Add OPTION_BE8.
2720         (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add be8.
2721         (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_BE8.
2722         * emultempl/armelf_oabi.em: Pass extra parameter.
2723         * ld.texinfo: Document --be8.
2725 2004-03-30  Stan Shebs  <shebs@apple.com>
2727         Remove long-obsolete MPW support.
2728         * mpw-config.in, mpw-make.sed, mac-ld.r: Remove files.
2729         * Makefile.am (mpw): Remove file-presynthesizing actions.
2730         * Makefile.in: Likewise.
2731         * ldfile.c (slash): Remove MPW case.
2732         * ldlex.l [MPW]: Remove unused definition.
2734 2004-03-30  Galit Heller  <Galit.Heller@nsc.com>
2736         * Makefile.am (ALL_EMULATIONS): Add eelf32cr16c.o.
2737         (eelf32cr16c.c): New target.
2738         * Makefile.in: Regenerate.
2739         * configure.tgt: Handle cr16c-*-elf*.
2740         * emulparams/elf32cr16c.sh: New file.
2741         * scripttempl/elfcr16c.sc: Likewise
2742         * NEWS: Mention support for new target.
2744 2004-03-30  Nick Clifton  <nickc@redhat.com>
2746         * po/sv.po: Updated Swedish translation.
2748 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
2750         * emultempl/elf32.em: Update new bfd_elf_discard_info name.
2751         * emultempl/hppaelf.em: Likewise.
2752         * emultempl/ppc64elf.em: Likewise.
2753         * emultempl/sh64elf.em: Likewise.
2755 2004-03-25  Alan Modra  <amodra@bigpond.net.au>
2757         * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Update
2758         size_dynamic_sections call.
2760 2004-03-23  Alan Modra  <amodra@bigpond.net.au>
2762         PR 51.
2763         * emultempl/ppc64elf.em (ppc_create_output_section_statements): Set
2764         link_info.wrap_char.
2766 2004-03-20  H.J. Lu  <hongjiu.lu@intel.com>
2768         * lexsup.c (parse_args): Don't set unresolved_syms_in_objects
2769         or unresolved_syms_in_shared_libs for -Bdynamic and -Bstatic.
2771 2004-03-20  Alexandre Oliva  <aoliva@redhat.com>
2773         * emulparams/elf32frvfd.sh (MAXPAGESIZE): Change to 16Kb.
2775 2004-03-19  Alan Modra  <amodra@bigpond.net.au>
2777         * config.in: Regenerate.
2778         * po/ld.pot: Regenerate.
2780 2004-03-18  Alan Modra  <amodra@bigpond.net.au>
2782         * ld.texinfo: Add --as-needed doco.
2783         * ldmain.c (as_needed): New global var.
2784         * ldmain.h (as_needed): Declare.
2785         * lexsup.c (option_values): Add OPTION_AS_NEEDED and
2786         OPTION_NO_AS_NEEDED.
2787         (ld_options): Likewise.
2788         (parse_args): Handle them.
2789         * ldlang.h (lang_input_statement_type): Add as_needed field.
2790         * ldlang.c (new_afile): Set p->as_needed.
2791         * emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): New function.
2792         (gld${EMULATION_NAME}_try_needed): Use bfd_elf_set_dyn_lib_class.
2793         (ld_${EMULATION_NAME}_emulation): Set LDEMUL_RECOGNIZED_FILE entry.
2795         * ldlang.c (open_input_bfds): Remove useless cast.
2796         (lang_do_assignments_1): Likewise.
2797         (lang_for_each_input_section): Delete.
2799 2004-03-17  Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2801         * configure.tgt: Switch sh-*-rtems* to ELF.  Add sh-*-rtemscoff*.
2803 2004-03-08  Danny Smith  <dannysmith@users.sourceforge.net>
2805         * pe-dll.c (pe_dll_generate_implib): Skip sections marked as
2806         private when building implib.
2808 2004-03-05  Nathan Sidwell  <nathan@codesourcery.com>
2810         * ldlang.c (lang_add_section): Don't force SEC_LOAD on
2811         SEC_THREAD_LOCAL.
2812         (IGNORE_SECTION): Ignore .tbss sections too.
2813         (lang_size_sections_1): .tbss sections do not advance dot.
2815 2004-03-01  Andreas Schwab  <schwab@suse.de>
2817         * ld.texinfo (Options): Fix example for --wrap.
2819 2004-02-25  Danny Smith  <dannysmith@users.sourceforge.net>
2821         * pe-dll.c (fill_edata): Check that exported_symbol_sections is
2822         not NULL.
2824 2004-02-23  Ian Lance Taylor  <ian@wasabisystems.com>
2826         * ldlang.c (lang_check): Use %P, not %E, in error message.
2828 2004-02-23  Nathan Sidwell  <nathan@codesourcery.com>
2830         * ldlang.h (struct lang_output_section_state): Change processed
2831         field's type.
2832         * ldexp.c (check, invalid): Remove.
2833         (fold_name): Move valid_p assignments. Create undefined symbol
2834         when needed. Directly exampine section's processd flag.
2835         * ldlang.c (lang_output_section_statement_lookup): Adjust
2836         processed field init.
2837         (lang_size_sections_1): Allow LOADADDR when determining section's
2838         VMA. Adjust error message. Fold data statement's expr.
2839         (lang_size_sections): Correctly increment lang_statement_iteration.
2841 2004-02-23  Alan Modra <amodra@bigpond.net.au>
2843         * ldexp.c (fold_tree): Follow indirect symbols.
2845 2004-02-20  Nathan Sidwell  <nathan@codesourcery.com>
2847         * ldgram.y (exp): Add two operand ALIGN.
2848         * ldexp.c (fold_binary): Add ALIGN_K case.
2849         * ld.texinfo (ALIGN): Document two operand version.
2851 2004-02-19  Nathan Sidwell  <nathan@codesourcery.com>
2853         * ldlang.c (map_input_to_output_sections): Initialize sections
2854         mentioned in a data statement expression.
2855         (lang_do_assignments_1): Add data statement's expression's
2856         section's vma.
2858 2004-02-18  Nathan Sidwell  <nathan@codesourcery.com>
2860         * ldgram.y (statement_anywhere): Add assert rule.
2861         * ldlang.c (exp_init_os): Add assert case.
2863 2004-02-14  Andrew Cagney  <cagney@redhat.com>
2865         * ldmain.c (remove_output): Call bfd_cache_close.
2867 2004-02-14  Richard Sandiford  <rsandifo@redhat.com>
2869         * emulparams/elf32bmipn32-defs.sh (OTHER_SECTIONS): Discard
2870         .MIPS.content* and .MIPS.events* sections.
2872 2004-02-09  Daniel Jacobowitz  <drow@mvista.com>
2874         * emulparams/armelf.sh, emulparams/armelf_linux.sh: Move
2875         .note.gnu.arm.ident to after allocated sections.  Mark its
2876         address as 0.
2878 2004-02-09  Daniel Jacobowitz  <drow@mvista.com>
2880         * emulparams/armelf_linux.sh (COMMONPAGESIZE): Set to 4KB.
2881         * emulparams/elf32bmip.sh (COMMONPAGESIZE): Likewise.
2882         * emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Likewise.
2883         * emulparams/elf32btsmipn32.sh (COMMONPAGESIZE): Likewise.
2884         * emulparams/shlelf_linux.sh (COMMONPAGESIZE): Likewise.
2886 2004-02-05  Nick Clifton  <nickc@redhat.com>
2888         * emultempl/pe.em (_after_open): Fix typo in previous delta.
2890 2004-02-04  Danny Smith  <dannysmith@users.sourceforge.net>
2892         * emultempl/pe.em (_after_open): Fix thinko in 2003-12-18 patch.
2894 2004-01-28  Alan Modra  <amodra@bigpond.net.au>
2896         * genscripts.sh: Fix typo.
2898         * genscripts.sh: Apply $LIBPATH_SUFFIX to $tool_lib and $libdir too.
2900 2004-01-24  Jakub Jelinek  <jakub@redhat.com>
2902         * emulparams/elf64_ia64.sh: Put .rela.opd into
2903         OTHER_GOT_RELOC_SECTIONS instead of OTHER_PLT_RELOC_SECTIONS.
2905 2004-01-20  Danny Smith  <dannysmith@users.sourceforge.net>
2907         * pe-dll.c (pe_create_import_fixup): Clear WP_TEXT flag.
2908         * ld.texinfo (--omagic): Note that writable text section
2909         does not conform to published PE-COFF specs.
2910         (--enable-auto-import): Likewise.
2912 2004-01-15  Alan Modra  <amodra@bigpond.net.au>
2914         * emulparams/elf32ppc.sh (COMMONPAGESIZE): Define.
2916 2004-01-13  Nick Clifton  <nickc@redhat.com>
2918         * ldlang.c (lang_get_regions): Add extra parameter 'have_vma'
2919         which if true will prevent the LMA region being used as a
2920         replacement for a default VMA region.
2921         (lang_leave_output_section_statement): Pass extra parameter.
2922         (lang_leave_overlay): Likewise.
2923         * ld.texinfo (Output Section LMA): Document that the LMA
2924         region can be set to the VMA region if no VMA has been set.
2925         * ldlang.h (struct lang_output_section_phdr_list): Create a
2926         typedef for this type.  Minor formatting fixes.
2928 2004-01-13  Nick Clifton  <nickc@redhat.com>
2930         * ldlang.c (lang_size_sections_1): If dot is advanced, then
2931         assume that the section should be allocated.
2933 2004-01-13  Alan Modra  <amodra@bigpond.net.au>
2935         * ldlang.c (IGNORE_SECTION): Don't ignore SEC_ALLOC && !SEC_LOAD
2936         sections.  Do ignore SEC_NEVER_LOAD sections.
2937         (lang_size_sections_1): Remove test made redundant with the above.
2939 2004-01-09  Alan Modra  <amodra@bigpond.net.au>
2941         * emultempl/ppc64elf.em (ppc_before_allocation): Clear cached
2942         program_header_size.
2944 2004-01-06  Alexandre Oliva  <aoliva@redhat.com>
2946         2003-11-28  Alexandre Oliva  <aoliva@redhat.com>
2947         * emulparams/elf32frvfd.sh (EMBEDDED): Clear.
2948         2003-11-05  Alexandre Oliva  <aoliva@redhat.com>
2949         * emulparams/elf32frvfd.sh (STACK_ADDR): Unset.
2950         (MAXPAGESIZE): Set to 64Kb.
2951         (OTHER_READONLY_SECTIONS): Define __ROFIXUP_LIST__ and
2952         __ROFIXUP_END__.  Don't map .rofixup.got any more.
2953         * emulparams/elf32frv.sh (NOP): Set.
2954         2003-10-31  Alexandre Oliva  <aoliva@redhat.com>
2955         * configure.tgt: Add frv-*-*linux*.
2956         2003-09-30  Alexandre Oliva  <aoliva@redhat.com>
2957         * Makefile.am (ALL_EMULATIONS): Added eelf32frvfd.o.
2958         (eelf32frvfd.c): New.
2959         * configure.tgt <frv-*-*>: Added it to targ_extra_emuls.
2960         * emulparams/elf32frv.sh: Reverted previous two patches.
2961         * emulparams/elf32frvfd.sh: New.
2962         * Makefile.in: Rebuilt.
2963         2003-09-18  Alexandre Oliva  <aoliva@redhat.com>
2964         * emulparams/elf32frv.sh (OTHER_READONLY_SECTIONS): Added
2965         .rofixup.got to .rofixup.
2966         2003-09-15  Alexandre Oliva  <aoliva@redhat.com>
2967         * emulparams/elf32frv.sh (MAXPAGESIZE): Make it 256KiB, not 256B.
2968         (TEMPLATE_NAME, GENERATE_SHLIB_SCRIPT): Set.
2970 2004-01-05  Jakub Jelinek  <jakub@redhat.com>
2972         * emulparams/elf_s390.sh (NO_SMALL_DATA): Set to yes.
2973         * emulparams/elf64_s390.sh (NO_SMALL_DATA): Set to yes.
2975 2004-01-03  Alan Modra  <amodra@bigpond.net.au>
2977         * ldexp.c (align_n): Make static.
2978         * ldexp.h (align_n): Delete declaration.
2979         * ldlang.h (lang_enter_output_section_statement): Remove
2980         block_value param.
2981         * ldlang.c (lang_enter_output_section_statement): Likewise.
2982         (TO_ADDR, TO_SIZE): Define.
2983         (opb_shift): New var.
2984         (init_opb): New function.
2985         (print_input_section): Call init_opb and use TO_ADDR.
2986         (print_data_statement, print_reloc_statement): Likewise.
2987         (print_padding_statement): Likewise.
2988         (size_input_section): Use TO_SIZE and TO_ADDR, and global opb_shift.
2989         (lang_check_section_addresses): Likewise.
2990         (lang_size_sections_1): Likewise.
2991         (lang_do_assignments_1): Likewise.
2992         (lang_set_startof): Likewise.
2993         (lang_one_common): Likewise.  Combine power_of_two and opb_shift align.
2994         (lang_process): Call init_opb.
2995         (lang_abs_symbol_at_end_of): Use TO_ADDR and global opb_shift.
2996         (lang_enter_overlay_section): Adjust
2997         lang_enter_output_section_statement call.
2998         * ldgram.y: Likewise.
2999         * mri.c (mri_draw_tree): Likewise.
3000         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Likewise.
3001         * emultempl/mmo.em (mmo_place_orphan): Likewise.
3002         * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Likewise.
3004         * ldfile.c (ldfile_set_output_arch): Add defarch param.
3005         * ldfile.h (ldfile_set_output_arch): Ditto.
3006         * emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Use
3007         ldfile_set_output_arch.
3008         * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Ditto.
3009         * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Ditto.
3010         * emultempl/linux.em (gld${EMULATION_NAME}_before_parse): Ditto.
3011         * emultempl/mipsecoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
3012         * emultempl/pe.em (gld${EMULATION_NAME}_before_parse): Ditto.
3013         * emultempl/sunos.em (gld${EMULATION_NAME}_before_parse): Ditto.
3014         * ldgram.y: Adjust ldfile_set_output_arch call.
3015         * emultempl/armcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
3016         * emultempl/armelf.em (gld${EMULATION_NAME}_before_parse): Ditto.
3017         * emultempl/armelf_oabi.em (gld${EMULATION_NAME}_before_parse): Ditto.
3018         * emultempl/generic.em (gld${EMULATION_NAME}_before_parse): Ditto.
3019         * emultempl/gld960c.em (gld960_set_output_arch): Ditto.
3020         * emultempl/m68kcoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
3021         * emultempl/ticoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
3023 2004-01-02  Bernardo Innocenti  <bernie@develer.com>
3025         * configure.tgt: Add m68k-uClinux target.
3027 For older changes see ChangeLog-0203
3029 Local Variables:
3030 mode: change-log
3031 left-margin: 8
3032 fill-column: 74
3033 version-control: never
3034 End: