Fix potential use-after-free bugs.
[binutils.git] / ld / ChangeLog
blob85c784af459087ebb2bbeedb2ce69fd10bc25b59
1 2010-10-15  Dave Korn  <dave.korn.cygwin@gmail.com>
3         * plugin.c (add_input_file): Take copy of input string.
4         (add_input_library): Likewise.
5         (set_extra_library_path): Likewise.
7 2010-10-14  Dave Korn  <dave.korn.cygwin@gmail.com> 
9         Apply LD plugin patch series (part 6/6).
10         * ldlang.c (load_symbols): Handle bfd subsitution when calling the
11         add_archive_element callback.
12         * ldmain.c (add_archive_element)[ENABLE_PLUGINS]: Offer the archive
13         member to the plugins and if claimed set "subsbfd" output parameter to
14         point to the dummy IR-only BFD.
16 2010-10-14  Dave Korn  <dave.korn.cygwin@gmail.com> 
18         Apply LD plugin patch series (part 5/6).
19         * plugin.c (asymbol_from_plugin_symbol): If the bfd is an ELF bfd,
20         find the elf symbol data and set the visibility in the st_other field.
22 2010-10-14  Dave Korn  <dave.korn.cygwin@gmail.com> 
24         Apply LD plugin patch series (part 4/6).
25         * ldlang.c (lang_process)[ENABLE_PLUGINS]: Move invocation of
26         plugin_call_all_symbols_read to before setting of gc_sym_list, and
27         open any new input files that may have been added during it.
28         * ldmain.c (multiple_definition)[ENABLE_PLUGINS]: Call out to
29         plugin_multiple_definition and let it have first say over what to do
30         with the clashing definitions.
31         * plugin.c (no_more_claiming): New boolean variable.
32         (plugin_cached_allow_multiple_defs): Likewise.
33         (add_input_file): Implement.
34         (add_input_library): Likewise.
35         (set_extra_library_path): Likewise.
36         (plugin_call_claim_file): Don't do anything when no_more_claiming set.
37         (plugin_call_all_symbols_read): Set it.  Disable link info
38         "allow_multiple_definition" flag, but cache its value.
39         (plugin_multiple_definition): New function.
40         * plugin.h (plugin_multiple_definition): Add prototype.
41         * testplug.c (addfile_enum_t): New enumerated typedef.
42         (add_file_t): New struct typedef.
43         (addfiles_list): New variable.
44         (addfiles_tail_chain_ptr): Likewise.
45         (record_add_file): New function.
46         (parse_option): Parse "add:", "lib:" and "dir:" options and call it.
47         (onall_symbols_read): Iterate the list of new files, libs and dirs,
48         adding them.
50 2010-10-14  Dave Korn  <dave.korn.cygwin@gmail.com> 
52         Apply LD plugin patch series (part 3/6).
53         * ldmain.c (notice)[ENABLE_PLUGINS]: Call plugin_notice.
54         * plugin.c (non_ironly_hash): Add new bfd hash table.
55         (plugin_load_plugins): Exit early if no plugins to load.  If plugins
56         do load successfully, set notice_all flag in link info.
57         (get_symbols): Implement.
58         (plugin_load_plugins): Exit early if no plugins to load, else after
59         loading plugins successfully enable notice_all mode.
60         (init_non_ironly_hash): Lazily init non_ironly_hash table.
61         (plugin_notice): Record symbols referenced from non-IR files in the
62         non_ironly_hash.  Suppress tracing, cref generation and nocrossrefs
63         tracking for symbols from dummy IR bfds.
64         * plugin.h: Fix formatting.
65         (plugin_notice): Add prototype.
66         * testplug.c (dumpresolutions): New global var.
67         (parse_options): Accept "dumpresolutions".
68         (onall_symbols_read): Get syms and dump resolutions if it was given.
70 2010-10-14  Dave Korn  <dave.korn.cygwin@gmail.com> 
72         Apply LD plugin patch series (part 2/6).
73         * ldfile.c (ldfile_try_open_bfd)[ENABLE_PLUGINS]: Don't return early
74         during compat checks if they pass, instead offer any successfully
75         opened and accepted file to the plugin claim file hooks chain.  Create
76         a dummy bfd to accept symbols added by the plugin, if the plugin
77         claims the file.
78         * ldlang.c (lang_process)[ENABLE_PLUGINS]: Call plugin all symbols
79         read hook chain before ldemul_after_open.
80         * ldlang.h (struct lang_input_statement_struct): Add new single-bit
81         'claimed' flag.
82         * plugin.c (IRONLY_SUFFIX): New macro for dummy bfd file suffix.
83         (IRONLY_SUFFIX_LEN): Length of the above string.
84         (plugin_get_ir_dummy_bfd): New function to create the dummy bfd used
85         to store symbols for ir-only files.
86         (is_ir_dummy_bfd): New function to check if a bfd is ir-only.
87         (asymbol_from_plugin_symbol): New function converts symbol formats.
88         (add_symbols): Call it to convert plugin syms to bfd syms and add
89         them to the dummy bfd.
90         * plugin.h: Add missing include guards.
91         (plugin_get_ir_dummy_bfd): Add prototype.
92         (is_ir_dummy_bfd): Likewise.
93         * testplug.c (TV_MESSAGE): New helper macro.
94         (struct claim_file): New struct.
95         (claim_file_t): New typedef.
96         (tag_names[]): Make static and const.
97         (claimfiles_list): New variable.
98         (claimfiles_tail_chain_ptr): Likewise.
99         (last_claimfile): Likewise.
100         (record_claim_file): Record a file to claim on a singly-linked list.
101         (parse_symdefstr): Parse an ASCII representation of a symbol from a
102         plugin option into the fields of a struct ld_plugin_symbol.
103         (record_claimed_file_symbol):  Use it to parse plugin option for
104         adding a symbol.
105         (parse_option): Parse claim file and add symbol options.
106         (dump_tv_tag): Use TV_MESSAGE.
107         (onload): Likewise.
108         (onclaim_file): Make static.  Use TV_MESSAGE.  Scan list of files to
109         claim and claim this file if required, adding any symbols specified.
110         (onall_symbols_read): Make static and use TV_MESSAGE.
111         (oncleanup): Likewise.
113 2010-10-14  Dave Korn  <dave.korn.cygwin@gmail.com> 
115         Apply LD plugin patch series (part 1/6).
116         * configure.in: Add AC_CHECKs for file io and dlfcn headers and
117         functions and AC_SEARCH for -ldl.
118         (enable_plugins): New shell variable set if above tests find dlopen
119         functionality.
120         (ENABLE_PLUGINS): Add related automake conditional.
121         * configure: Regenerate.
122         * config.in: Likewise.
123         * Makefile.am (PLUGIN_C): Declare plugin C source file, conditional
124         on ENABLE_PLUGINS being defined.
125         (PLUGIN_H): Likewise for header file.
126         (PLUGIN_OBJECT): Likewise for object file.
127         (PLUGIN_CFLAGS): Likewise -D flag required to compile plugin support.
128         (AM_CPPFLAGS): Use PLUGIN_CFLAGS.
129         (CFILES): Use PLUGIN_C.
130         (HFILES): Use PLUGIN_H.
131         (OFILES): Use PLUGIN_OBJECT.
132         (ld_new_SOURCES): Use PLUGIN_C.
133         (noinst_LTLIBRARIES)[ENABLE_PLUGINS]: Declare test plugin.
134         (libldtestplug_la_SOURCES)[ENABLE_PLUGINS]: Add automake definition
135         for test plugin.
136         (libldtestplug_la_CFLAGS)[ENABLE_PLUGINS]: Likewise.
137         (libldtestplug_la_LDFLAGS)[ENABLE_PLUGINS]: Likewise.
138         * Makefile.in: Regenerate.
139         * sysdep.h: Include stdarg.h, unistd.h and one of fcntl.h or
140         sys/file.h where available.  Include dlfcn.h when ENABLE_PLUGINS.
141         (O_RDONLY): Supply default definition likewise to bfd's sysdep.h
142         (O_WRONLY): Likewise.
143         (O_RDWR): Likewise.
144         (O_ACCMODE): Likewise.
145         (O_BINARY): Likewise.
146         (SEEK_SET): Likewise.
147         (SEEK_CUR): Likewise.
148         (SEEK_END): Likewise.
149         * ldmisc.c (vfinfo): Make non-static.  Add %p format char.
150         * ldmisc.h (vfinfo): Declare extern prototype.
151         * lexsup.c (enum option_values)[ENABLE_PLUGINS]: Add new entries for
152         OPTION_PLUGIN and OPTION_PLUGIN_OPT.
153         (ld_options[])[ENABLE_PLUGINS]: Add option data for the above two.
154         (parse_args)[ENABLE_PLUGINS]: Handle them, and load all plugins once
155         option parsing is complete.
156         * ldmain.c (main)[ENABLE_PLUGINS]: Call plugin cleanup hooks just
157         after lang_finish.
158         * plugin.c: New source file.
159         * plugin.h: Likewise new header.
160         * testplug.c: New source file.
162 2010-10-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
164         * emultempl/solaris2.em (elf_solaris2_before_allocation): Renamed
165         basever_syms to global_syms.
166         Emit global_syms into .dynamic section for all executables and
167         shared objects.
168         (elf_solaris2_after_allocation): New function.
169         (LDEMUL_AFTER_ALLOCATION): Use it.
170         * emulparams/solaris2.sh: New file.
171         * emulparams/elf32_sparc_sol2.sh: Use it.
172         * emulparams/elf64_sparc_sol2.sh: Likewise.
173         * emulparams/elf_i386_sol2.sh: Likewise.
174         * emulparams/elf_x86_64_sol2.sh: Likewise.
175         * Makefile.am (eelf32_sparc_sol2.c): Depend on
176         $(srcdir)/emulparams/solaris2.sh.
177         (eelf64_sparc_sol2.c): Likewise.
178         (eelf_x86_64_sol2.c): Likewise.
179         (eelf_i386_sol2.c): Likewise.
180         * Makefile.in: Regenerate.
182 2010-10-06  Nick Clifton  <nickc@redhat.com>
184         * ld.texinfo: Update description of computation of VMA and LMA
185         addresses for output sections.
187 2010-10-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
189         * Makefile.am (ALL_64_EMULATIONS): Fix typo in last commit.
190         * Makefile.in: Regenerate.
192         * Makefile.am (ALL_EMULATIONS): Rewrite in terms of ...
193         (ALL_EMULATION_SOURCES): ... this new variable.
194         (ALL_64_EMULATIONS): Rewrite in terms of ...
195         (ALL_64_EMULATION_SOURCES): ... this new variable.
196         (EXTRA_ld_new_SOURCES): Rewrite in terms of the _SOURCES
197         variables.
198         (eelf32microblaze.c): Fix indentation.
199         * Makefile.in: Regenerate.
201 2010-10-04  Bernd Schmidt  <bernds@codesourcery.com>
203         * emultempl/xtensaelf.em (replace_insn_sec_with_prop_sec): Use
204         _bfd_elf_single_rel_hdr.
206 2010-10-01  Alan Modra  <amodra@gmail.com>
208         PR ld/12066
209         * ldexp.c (fold_name): Treat absolute symbols as plain numbers.
210         * ld.texinfo (Expression Section): Don't say absolute symbols
211         are addresses.
213 2010-09-29  Alan Modra  <amodra@gmail.com>
215         * ldlang.c (lang_place_orphans): Zero vma when relocatable or non-load
216         section for orphans handled here.
218 2010-09-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
220         * configure: Regenerate.
222 2010-09-23  Dave Korn  <dave.korn.cygwin@gmail.com>
224         * scripttempl/armcoff.sc: Revert 2010-09-22 change.
226 2010-09-23  Alan Modra  <amodra@gmail.com>
228         * ldlang.c (lang_add_section): Don't copy SEC_RELOC from input
229         to output section on a final link.
231 2010-09-22  Kai Tietz  <kai.tietz@onevision.com>
233         * ldlang.c (lang_add_section): Allow for debugging
234         section to be marked as noload but to keep content.
235         (IGNORE_SECTION): Likewise.
236         (lang_check_section_addresses): Likewise.
237         * ldwrite.c (build_link_order): Likewise.
239         * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Add
240         idata to orphan set.
241         * emultempl/pep.em: Likewise.
242         * scripttempl/armcoff.sc: Separate idata
243         and add __IAT_start__ and __IAT_end__ labels.
244         * scripttempl/pe.sc: Likewise.
245         * scripttempl/pep.sc: Likewise.
247 2010-09-20  David S. Miller  <davem@davemloft.net>
249         * emulparams/elf32_sparc.sh: Set NOP to 0x01000000
251 2010-09-16  Alan Modra  <amodra@gmail.com>
253         * ld.texinfo (NOLOAD): Do not erroneously state that contents will
254         appear in output file.
255         * ldlang.c (lang_add_section): Clear SEC_HAS_CONTENTS on noload
256         unless SEC_COFF_SHARED_LIBRARY.
257         (map_input_to_output_sections): Don't set SEC_HAS_CONTENTS for noload
258         output sections.
259         (lang_size_sections_1): Don't test SEC_NEVER_LOAD when deciding
260         to update dot in region.  Ditto when setting SEC_ALLOC if dot
261         advanced due to assignment.
262         * ldwrite.c (build_link_order): Don't test SEC_NEVER_LOAD.
264 2010-09-15  Kai Tietz  <kai.tietz@onevision.com>
266         * scripttempl/pep.sc: Add .xdata segment and
267         put into .pdata all segments beginning with .pdata.
269 2010-09-10  Alan Modra  <amodra@gmail.com>
271         PR ld/11931
272         * ldlang.h (lang_for_each_statement_worker): Declare.
273         * ldlang.c (lang_for_each_statement_worker): Make global.  Don't
274         recurse into children of output_section_statement with constraint
275         set to -1.
276         (print_assignment): Handle NULL output_section->bfd_section.
277         (lang_size_sections_1): Ignore output section statement address
278         when constraint is -1.
279         * emultempl/xtensaelf.em (lang_for_each_statement_worker): Delete.
281 2010-09-09  Tristan Gingold  <gingold@adacore.com>
283         * NEWS: Add a entry for alpha-vms.
285 2010-09-07  Andrew Burgess  <aburgess@broadcom.com>
287         * ldwrite.c (clone_section): Call bfd_copy_private_section_data on
288         newly cloned section.
290 2010-09-02  Richard Henderson  <rth@redhat.com>
292         * configure.tgt (x86_64-*-mingw*): Add 32-bit pe emulations too.
294 2010-08-31  Nick Clifton  <nickc@redhat.com>
296         * ldlex.l (WILDCHAR): Add the caret and exclamation point
297         characters, so that they can be used inside globs.
299 2010-08-31  Nick Clifton  <nickc@redhat.com>
301         * ld.texinfo (MEMORY): Clarify the behaviour of the ! character in
302         a region's attributes.
304 2010-08-31  Alan Modra  <amodra@gmail.com>
306         * scripttempl/mmo.sc: Move assignment to "Main" inside .text
307         output section statement.
309 2010-08-25  H.J. Lu  <hongjiu.lu@intel.com>
311         PR ld/11946
312         * emultempl/elf32.em (_before_allocation): Check audit entry
313         only on ELF input.
315 2010-08-22  H.J. Lu  <hongjiu.lu@intel.com>
317         PR ld/11937
318         * emultempl/elf32.em (_after_open): Find one .eh_frame section
319         for --eh-frame-hdr.
321 2010-08-22  H.J. Lu  <hongjiu.lu@intel.com>
323         PR ld/11937
324         * emultempl/elf32.em (_after_open): Find an ELF input for
325         --build-id and --eh-frame-hdr.
327 2010-08-20  Maciej W. Rozycki  <macro@codesourcery.com>
329         * Makefile.am (eshlelf_fd.c): Correct the name of the tool
330         directory.
331         * Makefile.in: Regenerate.
333 2010-08-20  Nick Clifton  <nickc@redhat.com>
335         * emultempl/elf32.em (_after_open): Check for get_elf_backend_data
336         returning NULL.
338 2010-08-19  Alan Modra  <amodra@gmail.com>
340         * NEWS: Mention change in linker script expression evaluation.
342 2010-08-19  Alan Modra  <amodra@gmail.com>
344         * ld.texinfo (Expression Section): Detail expression evaluation.
345         (Builtin Functions <ADDR>): Correct.
346         (Builtin Functions <LOADADDR>): Don't mention LOADADDR normally
347         the same as ADDR.
348         (Builtin Functions <SEGMENT_START>): Typo fix.
349         * ldexp.c (new_number): New function.
350         (make_abs, exp_get_abs_int): Cope with NULL expld.result.section.
351         (fold_unary <'~', '!', '-'>): Don't make_abs.
352         (fold_binary): Simplify result section logic.  Return NULL section
353         for logical ops.
354         (fold_binary <SEGMENT_START>): Use new_rel_from_abs to set value to
355         a consistent result.
356         (fold_name <SIZEOF_HEADERS>): Return new_number, not new_abs.
357         (fold_name <DEFINED, SIZEOF, ALIGNOF, LENGTH, CONSTANT>): Likewise.
358         (fold_name <NAME>): No need to handle absolute symbols differently
359         from relative ones.
360         (fold_name <ORIGIN>): Don't return valid result when
361         lang_first_phase_enum.  Return new_rel_from_abs, not new_abs.
362         (exp_fold_tree_1 <etree_value>): Return new_number, not new_rel.
363         (exp_fold_tree_1): Ajust for NULL expld.result.section.  When assigning
364         a plain number to dot, assume the value is relative to expld.section.
365         Make terms not in an output section, absolute.
366         * ldlang.c (print_assignment): Fix style nit.
367         (lang_size_sections_1): Cope with NULL expld.result.section.
368         (lang_do_assignments_1): Likewise.
370 2010-08-12  Alan Modra  <amodra@gmail.com>
372         * ldexp.c (new_rel): Remove "str".  Update all call sites.
373         (exp_fold_tree_1): When assigning to dot, calculate nextdot
374         using expld.result.section rather than expld.section.
376 2010-08-06  Alan Modra  <amodra@gmail.com>
378         PR ld/11887
379         * ldlang.c (lang_add_vers_depend): Don't leave version_needed
380         uninitialised.
382 2010-07-28  Alan Modra  <amodra@gmail.com>
384         * ldexp.c (exp_print_tree): Print function-like binary nodes as
385         functions rather than in-fix operators.  Use fputs and fputc
386         where appropriate.
388 2010-07-23  Naveen.H.S  <naveen.S@kpitcummins.com>
389             Ina Pandit  <ina.pandit@kpitcummins.com>
391         * configure.tgt: Match all v850 targets.
393 2010-07-20  Mike Frysinger  <vapier@gentoo.org>
395         * ld.texinfo (VERSION): Remove "int" from example script and add ";".
396         Declare the default language as C.
398 2010-07-17  Alan Modra  <amodra@gmail.com>
400         * ldlang.c (lang_check_section_addresses): Catch overlap for
401         sections that wrap around the address space.
403 2010-06-29  Nick Clifton  <nickc@redhat.com>
405         * scripttempl/xstormy16.sc (.gcc_except_table): Include sections
406         with the .gcc_except_table. prefix.
408 2010-06-29  Alan Modra  <amodra@gmail.com>
410         * emulparams/maxqcoff.sh: Delete file.
411         * scripttempl/maxqcoff.sc: Delete file.
412         * Makefile.am: Remove references to maxq.
413         * configure.tgt: Likewise.
414         * Makefile.in: Regenerate.
415         * configure: Regenerate.
416         * po/POTFILES.in: Regenerate.
418 2010-06-27  Alan Modra  <amodra@gmail.com>
420         * pe-dll.c (fill_edata): Avoid set but unused warning.
421         (pe_walk_relocs_of_symbol): Delete set but unused variables.
422         (generate_reloc, pe_implied_import_dll): Likewise.
423         * emultempl/aix.em (open_dynamic_archive): Likewise.
424         * emultempl/xtensaelf.em (replace_insn_sec_with_prop_sec): Likewise.
425         (xtensa_layout_wild): Likewise.
426         (xtensa_colocate_output_literals_callback): Likewise.
428 2010-06-25  Alan Modra  <amodra@gmail.com>
430         * emultempl/ppc64elf.em (prelim_size_sections): New function.
431         (ppc_before_allocation): Use it.  Size sections before toc edit too.
433 2010-06-25  Alan Modra  <amodra@gmail.com>
435         * emultempl/elf32.em (find_exp_assignment): Handle etree_provided.
437 2010-06-20  Danny Smith  <dannysmith@users.sourceforge.net>
439         * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse): Make
440         auto-import and merge-rdata defaults same for i[3-7]86 and
441         x86_64 mingw.
443 2010-06-15  Joseph Myers  <joseph@codesourcery.com>
445         * emulparams/elf32_tic6x_le.sh (ATTRS_SECTIONS): Define.
447 2010-06-09  Dave Korn  <dave.korn.cygwin@gmail.com>
449         PR ld/11603
450         * pe-dll.c (process_def_file_and_drectve): Reorder check for
451         forwarded export name after check for ordinary export.
453 2010-06-08  Bernd Schmidt  <bernds@codesourcery.com>
455         * emulparams/elf32_tic6x_le.sh (OTHER_BSS_SECTIONS): New.
457 2010-06-08  Nick Clifton  <nickc@redhat.com>
459         * fdl.texi: Replace with v1.3 text.
460         * ld.texinfo: Replace abbreviated 20th century year numbers with
461         full versions.
462         * ldint.texinfo: Likewise.
463         Relicense under GFDL v1.3.  Replace text of v1.1 FDL with an
464         include of the fdl.texi file.
466 2010-06-01  Tristan Gingold  <gingold@adacore.com>
468         * scripttempl/alphavms.sc: Add comments. Move $LINK$ to the
469         readonly output-section. Handle LIB$INITIALIZE and sections
470         created by gcc.
471         * emultempl/vms.em (vms_place_orphan): Add comments.
473 2010-05-28  Nick Clifton  <nickc@redhat.com>
475         * Makefile.am (eshlelf_fd.c): Fix typo in rule.
476         * Makefile.in: Regenerate.
478 2010-05-26  H.J. Lu  <hongjiu.lu@intel.com>
480         PR ld/11628
481         * ldexp.c (fold_binary): Warn if value of SEGMENT_START isn't
482         multiple of maximum page size.
484 2010-05-25  Nick Clifton  <nickc@redhat.com>
486         * Makefile.am: Fix typo.
487         * Makefile.in: Regenerate.
489 2010-05-25  Daniel Jacobowitz  <dan@codesourcery.com>
490             Joseph Myers  <joseph@codesourcery.com>
491             Andrew Stubbs  <ams@codesourcery.com>
493         * Makefile.am (ALL_EMULATIONS): Add eshelf_fd.o and eshlelf_fd.o.
494         (eshelf_fd.c, eshlelf_fd.c): New rules.
495         * Makefile.in: Regenerate.
496         * configure.tgt (sh-*-uclinux*): Add shelf_fd and shlelf_fd
497         emulations.
498         * emulparams/shelf_fd.sh: New file.
499         * emulparams/shlelf_fd.sh: New file.
500         * emulparams/shlelf_linux.sh: Update comment.
502 2010-05-25  Jay Krell  <jay.krell@cornell.edu>
504         PR ld/11621
505         * Makefile.am: Replace all occurences of .o with .@OBJEXT@
506         * Makefile.in: Regenerate.
508 2010-05-25  Kai Tietz  <kai.tietz@onevision.com>
510         * deffilep.y (opt_name): Allow leading dot.
511         (dot_name): Likewise.
512         (anylang_id): Likewise.
513         * emultempl/pep.em (gld_${EMULATION_NAME}_before_parse): Enable by
514         default auto_import.
515         (gld${EMULATION_NAME}_handle_option): Warn about v1.
516         (pep_find_data_imports): Remove superflous warnings about
517         auto-import.
518         (gld_${EMULATION_NAME}_get_script): Don't merge for auto-import
519         and active pseudo-relocation-v2 rdata into data section.
520         * emultempl/pe.em (default_merge_rdata): New shell variable.
521         (MERGE_RDATA_V2): New macro.
522         (gld_${EMULATION_NAME}_get_script): Adjust rule for auto-import
523         selected script.
525 2010-05-15  Kai Tietz  <kai.tietz@onevision.com>
527         * emultempl/pe.em (is_underscoring): New helper function.
528         (gld_${EMULATION_NAME}_before_parse): Replace code
529         for pe(p)_leading_underscore detection by is_underscoring.
530         (U): Likewise.
531         (GET_INIT_SYMBOL_NAME): Likewise.
532         (U_SIZE): Likewise.
533         (set_pe_name):
534         (set_entry_point):
535         (gld_${EMULATION_NAME}_set_symbols):
536         * emultempl/pep.em: Likewise.
537         * pe-dll.c (pe_detail_list): Set default
538         underscoring for x64 target.
539         (pe_dll_id_target): Add initialization of
540         pe(p)_leading_underscore.
542 2010-05-15  Dave Korn  <dave.korn.cygwin@gmail.com>
544         * pe-dll.c: Removed trailing whitespaces.
546 2010-05-14  Alan Modra  <amodra@gmail.com>
548         PR ld/11583
549         * ldexp.c (exp_fold_tree_1): If assignment source expression is
550         invalid, make the destination symbol undefined.
552 2010-05-11  Kai Tietz  <kai.tietz@onevision.com>
554         * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse):
555         Initialize pe(p)_leading_underscore variable.
556         (set_pe_name): Likewise.
557         * emultempl/pep.em: Likewise.
558         Additional change default to non-underscore for
559         pep_leading_underscore equal to -1.
561 2010-05-07  Tristan Gingold  <gingold@adacore.com>
563         * Makefile.in: Regenerate with automake 1.11.1.
564         * aclocal.m4: Ditto.
566 2010-05-05  Nick Clifton  <nickc@redhat.com>
568         * po/es.po: Updated Spanish translation.
570 2010-04-27  Kai Tietz  <kai.tietz@onevision.com>
572         * pe-dll.c (_nm_-symbols): Use always underscored variant
573         for symbols.
574         (__imp_-symbols): Likewise.
575         (___imp_-symbols): Likewise.
576         * NEWS: Mention ABI change for x64 PE-COFF.
578 2010-04-27  H.J. Lu  <hongjiu.lu@intel.com>
580         * Makefile.am (install-exec-local): Properly install ld as
581         default cross linker.
582         * Makefile.in: Regenerated.
584 2010-04-27  H.J. Lu  <hongjiu.lu@intel.com>
585             Nick Clifton  <nickc@redhat.com>
587         * configure.in (install_as_default): Define and set to true
588         unless --enable-gold=both/gold has been specified.
589         * configure: Regenerate.
591         * Makefile.am (transform): Use ld.bfd as the default name of
592         the linker.
593         (install-exec-local): Also install the executable as a binary
594         named 'ld' if install_as_default is true.
595         * Makefile.in: Regenerate.
597 2010-04-22  Nick Clifton  <nickc@redhat.com>
599         * po/ld.pot: Updated by the Translation project.
600         * po/vi.po: Updated Vietnamese translation.
601         * po/bg.po: Updated Bulgarian translation.
603 2010-04-15  Andrew Haley  <aph@redhat.com>
605         * emultempl/armelf.em (merge_exidx_entries): New variable.
606         (OPTION_NO_MERGE_EXIDX_ENTRIES): New definition.
607         ("no-merge-exidx-entries"): New option.
608         * ld.texinfo (merge-exidx-entries): Document this option.
610 2010-04-14  Tristan Gingold  <gingold@adacore.com>
612         * emulparams/alphavms.sh: New file.
613         * emultempl/vms.em: New file.
614         * scripttempl/alphavms.sc: New file.
615         * configure.tgt (alpha*-*-*vms*): Added.
616         * Makefile.am (ALL_EMULATIONS): Add ealphavms.o
617         (ealphavms.c): New target.
618         * Makefile.in: Regenerate.
620 2010-04-09  Nick Clifton  <nickc@redhat.com>
622         * ldlang.c (wild_sort): Remove unused variable section_name.
624 2010-04-07  Alan Modra  <amodra@gmail.com>
626         * configure: Regenerate.
628 2010-04-06  H.J. Lu  <hongjiu.lu@intel.com>
630         PR ld/11434
631         * ld/testsuite/ld-x86-64/unique1.d: New.
632         * ld/testsuite/ld-x86-64/unique1.s: Likewise.
634         * ld-x86-64/x86-64.exp: Run unique1.
636 2010-04-05  Kai Tietz  <kai.tietz@onevision.com>
638         * emultempl/pep.em (U): Macro modified.
639         (U_SIZE): New helper macro.
640         (GET_INIT_SYMBOL_NAME): Likewise.
641         (enum options): Add OPTION_NO_LEADING_UNDERSCORE
642         and OPTION_LEADING_UNDERSCORE enumerator-values.
643         (gld${EMULATION_NAME}_add_options): Add --(no-)leading-underscore
644         option.
645         (definfo): Add new member is_c_symbol.
646         (D): Add to macro underscore mode parameter.
647         (init): Add definition for is_c_symbol.
648         (gld_${EMULATION_NAME}_list_options): Display new options.
649         (set_pep_name): Adjust underscoring dependent fixed
650         symbol handling.
651         (gld_${EMULATION_NAME}_set_symbols): Likewise.
652         (saw_option): Likewise.
653         (gld_${EMULATION_NAME}_unrecognized_file): Likewise.
654         (set_entry_point): Initial initial_symbol_char dependent to
655         target's default and new option flag pep_leading_underscore.
656         * emultempl/pe.em (U): Macro modified.
657         (U_SIZE): New helper macro.
658         (GET_INIT_SYMBOL_NAME): Likewise.
659         (OPTION_LEADING_UNDERSCORE): Add new option define.
660         (OPTION_NO_LEADING_UNDERSCORE): Likewise.
661         (gld${EMULATION_NAME}_add_options): Add --(no-)leading-underscore
662         option.
663         (definfo): Add new member is_c_symbol.
664         (D): Add to macro underscore mode parameter.
665         (init): Add definition for is_c_symbol.
666         (gld_${EMULATION_NAME}_list_options): Display new options.
667         (set_pep_name): Adjust underscoring dependent fixed
668         symbol handling.
669         (gld_${EMULATION_NAME}_set_symbols): Likewise.
670         (saw_option): Likewise.
671         (gld_${EMULATION_NAME}_unrecognized_file): Likewise.
672         (set_entry_point): Initial initial_symbol_char dependent to
673         target's default and new option flag pep_leading_underscore.
674         * pe-dll.c (pe_leading_underscore): New flag variable.
675         (pe_detail_list): Remove const to allow modify of
676         member underscore.
677         (pe_dll_id_target): Initialize pe_details' underscore variable
678         dependent to target's default and flag pe_leading_underscore.
679         * pe-dll.h (pe_leading_underscore): Add extern declaration of
680         option flag.
681         * pep-dll.c (pe_leading_underscore): Add alias define for
682         pep_leading_underscore.
683         * pep-dll.h (pep_leading_underscore) Add extern declaration of
684         option flag.
685         * ld.texinfo: Add documentation for --(no-)leading-underscore
686         option.
688 2010-03-26  Alan Modra  <amodra@gmail.com>
690         PR ld/11426
691         * configure.host (many linux targets <HOSTING_CRT0>): Remove edits.
692         (m68*-motorola-sysv <HOSTING_LIBS>): Use here doc, not echo.
694 2010-03-25  Joseph Myers  <joseph@codesourcery.com>
696         * Makefile.am (ALL_EMULATIONS): Add eelf32_tic6x_be.o and
697         eelf32_tic6x_le.o.
698         (eelf32_tic6x_be.c, eelf32_tic6x_le.c): New.
699         * NEWS: Add news entry for TI C6X support.
700         * configure.tgt (tic6x-*-*): New.
701         * emulparams/elf32_tic6x_be.sh, emulparams/elf32_tic6x_le.sh: New.
703 2010-03-23  Joseph Myers  <joseph@codesourcery.com>
705         * scripttempl/elf.sc (RODATA_NAME, SDATA_NAME, SBSS_NAME,
706         BSS_NAME): Define if not already defined.  Use in place of some
707         hardcoded section names.
709 2010-03-18  H.J. Lu  <hongjiu.lu@intel.com>
711         * scripttempl/elf.sc (INIT_ARRAY): Re-indent.
713 2010-03-18  Aymeric Vincent  <vincent@labri.fr>
715         PR ld/11384
716         * emultempl/sh64elf.em: Add missing EOF.
718 2010-03-18  Doug Semler  <dougsemler@gmail.com>
720         * pe-dll.c (make_one): Make text section readonly.
721         (make_one): Add *ABS* symbol @feat.00 with value 1 to tag
722         the jump stub on X86 as /SAFESEH compatible for
723         native toolchains.
725 2010-03-17  Alan Modra  <amodra@gmail.com>
727         * ldlang.c (lang_size_sections_1): Remove "s" param.  Set "s" from
728         *prev instead.  Update all callers.
730 2010-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
732         * ldlang.c (lang_insert_orphan): Place loadable orphans in the same
733         region and phdrs as their placement section.
735 2010-03-15  Alan Modra  <amodra@gmail.com>
737         * emultempl/ppc64elf.em (move_input_section, sort_toc_sections): New.
738         (ppc_before_allocation): Call sort_toc_sections.
739         (no_toc_sort, OPTION_NO_TOC_SORT): New.
740         (PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_LONGOPTS,
741          PARSE_AND_LIST_OPTIONS): Handle --no-toc-sort.
743 2010-03-14  Alan Modra  <amodra@gmail.com>
745         PR ld/11378
746         * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation): Call
747         ppc64_elf_check_init_fini and warn if .init/.fini use different TOCs.
749 2010-03-11  George Gensure  <werkt0@gmail.com>
751         PR ld/11367
752         * ldcref.c (handle_asneeded_cref): Correct copying of refs.
754 2010-03-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
756         * Makefile.am (ALL_EMULATIONS): Add eelf32_sparc_sol2.o,
757         eelf_i386_sol2.o.
758         (ALL_64_EMULATIONS): Add eelf_x86_64_sol2.o, eelf64_sparc_sol2.o.
759         (eelf32_sparc_sol2.c): New rule.
760         (eelf64_sparc_sol2.c): Likewise.
761         (eelf_x86_64_sol2.c): Likewise.
762         (eelf_i386_sol2.c): Likewise.
763         * Makefile.in: Regenerate.
764         * configure.tgt (i[3-7]86-*-solaris2*): Change targ_emul to
765         elf_i386_sol2.
766         Add elf_i386_ldso, elf_x86_64_sol2 to targ_extra_emuls.
767         (x86_64-*-solaris2*): Change targ_emul to elf_x86_64_sol2.
768         Add elf_x86_64, elf_i386_sol2, elf_i386 to targ_extra_emuls.
769         (sparc-*-solaris2.[0-6]*): Change targ_emul to elf32_sparc_sol2.
770         Add target_extra_emuls.
771         (sparc-*-solaris2*): Change targ_emul to elf32_sparc_sol2.
772         Add elf32_sparc, elf64_sparc_sol2 to targ_extra_emuls.
773         (sparcv9-*-solaris2*): Change targ_emul to elf64_sparc_sol2.
774         Add elf64_sparc, elf32_sparc_sol2 to target_extra_emuls.
775         * emulparams/elf32_sparc_sol2.sh: New file.
776         * emulparams/elf64_sparc_sol2.sh: New file.
777         * emulparams/elf_i386_sol2.sh: New file.
778         * emulparams/elf_x86_64_sol2.sh: New file.
779         * emultempl/solaris2.em: New file.
781 2010-02-27  H.J. Lu  <hongjiu.lu@intel.com>
783         PR ld/11330
784         * ld.texinfo: Replace explicitely with explicitly.
786 2010-02-27  Jie Zhang  <jie@codesourcery.com>
788         * scripttempl/armbpabi.sc: Don't combine .init_array.* or
789         .fini_array.* when do relocatable linking.
790         * scripttempl/elf.sc: Likewise.
791         * scripttempl/elf32sh-symbian.sc: Likewise.
792         * scripttempl/elf64hppa.sc: Likewise.
793         * scripttempl/elfxtensa.sc: Likewise.
795 2010-02-26  Alan Modra  <amodra@gmail.com>
797         * scripttempl/elf.sc (.fini_array): Place input .fini_array after
798         .fini_array.*.
799         * scripttempl/armbpabi.sc: Likewise.
800         * scripttempl/elf32sh-symbian.sc: Likewise.
801         * scripttempl/elf64hppa.sc: Likewise.
802         * scripttempl/elfxtensa.sc: Likewise.
804 2010-02-25  Alan Modra  <amodra@gmail.com>
806         PR ld/11304
807         * ldlang.c (init_os): Remove isec param.  Don't check for
808         bfd_section already set or call bfd_init_private_section_data
809         here.
810         (exp_init_os): Update init_os call.
811         (lang_add_section): Tidy.  Really don't set SEC_LINK_ONCE
812         flags.  Call bfd_init_private_section_data here.
813         (map_input_to_output_sections): Tidy.  Update init_os calls.
814         Use os->sectype to select sec flags for lang_data_statement.
816 2010-02-23  Alan Modra  <amodra@gmail.com>
818         PR ld/11304
819         * ldlang.c: Revert last patch.
821 2010-02-23  Nick Clifton  <nickc@redhat.com>
823         * po/bg.po: Updated Bulgarian translation.
825 2010-02-22  Alan Modra  <amodra@gmail.com>
827         PR ld/11304
828         * ldlang.c (exp_init_os): Delete forward declaration.
829         (init_os): Don't check for bfd_section already created and don't
830         init addr_tree and load_base expressions here.
831         (map_input_to_output_sections): Only map input to output sections
832         and set constraints here, and as an exception, create output
833         sections which have their address set.  Move all the other code to..
834         (create_other_output_sections): ..here.  New function.  Handle init
835         of addr_tree and load_base here too.
836         (lang_process): Call create_other_output_sections.
838 2010-02-19  Alan Modra  <amodra@gmail.com>
840         * Makefile.am (eelf32_i960.c): Depend on ELF_GEN_DEPS, not ELF_DEPS.
841         * Makefile.in: Regenerate.
843 2010-02-19  Alan Modra  <amodra@gmail.com>
845         * ldlang.c (unique_section_p): Add os param.  Allow group
846         sections to match /DISCARD/.  Update all callers.
847         * emultempl/genelf.em (gld${EMULATION_NAME}_before_allocation): New.
848         (LDEMUL_BEFORE_ALLOCATION): Define.
850 2010-02-15  Nick Clifton  <nickc@redhat.com>
852         * po/vi.po: Updated Vietnamese translation.
854 2010-02-10  Richard Sandiford  <r.sandiford@uk.ibm.com>
856         * Makefile.am (CFILES): Add ldlex-wrapper.c.
857         (OFILES): Replace ldlex.c with ldlex-wrapper.c.
858         (ldlex.o): Replace with...
859         (ldlex-wrapper.o): ...this new rule.
860         (EXTRA_ld_new_SOURCES): Add ldlex.l.
861         (ld_new_SOURCES): Replace ldlex.l with ldlex-wrapper.c.
862         * Makefile.in: Regenerate.
863         * ldlex.l (sysdep.h): Don't include here.
864         * ldlex-wrapper.c: New file.
866 2010-02-09  Alan Modra  <amodra@gmail.com>
868         * emultempl/ppc64elf.em (ppc_before_allocation): Update for changed
869         function parameters.
871 2010-02-05  Nick Clifton  <nickc@redhat.com>
873         * configure.in (ALL_LIBGUAS): Add bg.
874         * configure: Regenerate.
875         * po/bg.po: New Bulgarian translation.
877 2010-02-05  Ryan Mansfield  <rmansfield@qnx.com>
879         * emultempl/armelf.em (PARSE_AND_LIST_OPTIONS): Fix help for
880         --target1-abs and --target1-rel options.
882 2010-02-03  Nick Clifton  <nickc@redhat.com>
884         * emultempl/alphaelf.em: Update value expected from elf_object_id.
885         * emultempl/hppaelf.em: Likewise.
886         * emultempl/mipself.em: Likewise.
887         * emultempl/ppc32elf.em: Likewise.
888         * emultempl/ppc64elf.em: Likewise.
890 2010-02-03  Alan Modra  <amodra@gmail.com>
892         * emultempl/ppc64elf.em (build_toc_list): Report errors from
893         ppc64_elf_next_toc_section.
894         (after_allocation): Update for changed function names and params.
895         Run second pass of multitoc partitioning.
897 2010-01-21  Jon Grant  <jg@jguk.org>
898             Nick Clifton  <nickc@redhat.com>
900         PR 4437
901         * ldfile.c: (ldfile_open_file): Do not stop link upon encountering
902         a missing file or library.  Instead mark the entry as missing and
903         set the global flag to indicate that missing files were
904         encountered.
905         * ldlang.c (missing_files): New exported variable.
906         (load_symbols): Skip loading if the file is missing.
907         (open_input_bfds): Terminate link if any input files were
908         missing.
909         * ldlang.h (struct lang_input_statement_struct): Add missing_file
910         field.
911         Add export of missing_file variable.
913 2010-01-13  DJ Delorie  <dj@redhat.com>
915         * emultempl/elf32.em (_place_orphan): If an input section doesn't
916         match an existing output section, but an unused output section
917         statement does match, use it.
918         * emultempl/pe.em (_place_orphan): Likewise.
919         * emultempl/pep.em (_place_orphan): Likewise.
921 2010-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
923         * configure: Regenerate.
924         * Makefile.in: Regenerate.
926 2010-01-08  H.J. Lu  <hongjiu.lu@intel.com>
928         * ldver.c (ldversion): Change to "Copyright 2010".
930 2010-01-08  Alan Modra  <amodra@gmail.com>
932         PR 11107
933         * emultempl/vxworks.em: Expand tr arguments to suit non-GNU tr.
935 For older changes see ChangeLog-2009
937 Local Variables:
938 mode: change-log
939 left-margin: 8
940 fill-column: 74
941 version-control: never
942 End: