2011-11-02 Tristan Gingold <gingold@adacore.com>
[external/binutils.git] / ld / ChangeLog
1 2011-11-02  Tristan Gingold  <gingold@adacore.com>
2
3         * emultempl/aix.em (read_file_list): New function.
4         (_handle_option): Handle '-f'.
5         * NEWS: Mention this feature.
6
7 2011-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8
9         * configure.tgt (x86_64-*-solaris2*): Use $targ_extra_emuls for
10         targ_extra_libpath.
11
12 2011-11-01  DJ Delorie  <dj@redhat.com>
13
14         * Makefile.am (ALL_EMULATION_SOURCES): Add eelf32rl78.c.
15         (+eelf32rl78.c): New rule.
16         * Makefile.in: Regenerate.
17         * configure.tgt: Add rl78-*-* case.
18         * emulparams/elf32rl78.sh: New file.
19         * NEWS: Mention addition of Renesas RL78 support.
20
21 2011-10-28  Walter Lee  <walt@tilera.com>
22
23         * NEWS: Fix TILEPro capitalization.
24
25 2011-10-25  Joern Rennecke  <joern.rennecke@embecosm.com>
26
27         * NEWS: Mention addition of Adapteva Epiphany support.
28         * Makefile.am (ALL_EMULATION_SOURCES): Add eelf32epiphany.c .
29         (eelf32epiphany.c): New rule.
30         * configure.tgt: Handle epiphany-*-elf.
31         * emulparams/elf32epiphany.sh: New file.
32         * Makefile.in: Regenerate.
33         * po/ld.pot: Regenerate.
34
35 2011-10-24  Nick Clifton  <nickc@redhat.com>
36
37         * po/ja.po: Updated Japanese translation.
38
39 2011-10-20  Alan Modra  <amodra@gmail.com>
40
41         PR ld/13287
42         * plugin.c (plugin_should_reload): New function.
43         * plugin.h (plugin_should_reload): Declare.
44         * ldlang.c (open_input_bfds): Use above function.
45
46 2011-10-19  Alan Modra  <amodra@gmail.com>
47
48         PR ld/13254
49         * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add
50         -z text, -z notext, -z textoff options for all targets having
51         shared lib support.
52
53 2011-10-15  Alan Modra  <amodra@gmail.com>
54
55         * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Remove toc check.
56
57 2011-10-13  Dave Korn  <dave.korn.cygwin@gmail.com>
58
59         * pe-dll.c (generate_reloc): Don't emit a base reloc for an
60         underlying BFD reloc that will be discarded in eh_frame data.
61
62 2011-10-10  Nick Clifton  <nickc@redhat.com>
63
64         * po/bg.po: Updated Bulgarian translation.
65         * po/es.po: Updated Spanish translation.
66         * po/fi.po: Updated Finnish translation.
67         * po/fr.po: Updated French translation.
68
69 2011-10-10  Alan Modra  <amodra@gmail.com>
70
71         * ldmain.c (main): Move code twiddling various config and link_info
72         bits to..
73         * lexsup.c (parse_args): ..here.  Move plugin_load_plugins call
74         into main.
75         * plugin.c (set_tv_header): Test link_info.executable, not
76         link_info.shared.
77         (is_visible_from_outside): Likewise.  Delete redundant
78         is_ir_dummy_bfd check and "section" parameter.
79
80 2011-10-10  Alan Modra  <amodra@gmail.com>
81
82         * emultempl/ppc64elf.em (ppc_add_stub_section): Align to 32 bytes.
83
84 2011-10-09  Alan Modra  <amodra@gmail.com>
85
86         * emultempl/ppc64elf.em (ppc_create_output_section_statements): Add
87         missing colon to error message.
88         (ppc_before_allocation): Likewise.
89
90 2011-10-06  Alan Modra  <amodra@gmail.com>
91
92         PR ld/13229
93         * plugin.c (tv_header_tags): Add LDPT_GET_SYMBOLS_V2.
94         (set_tv_header): Handle it.  Adjust LDPT_GET_SYMBOLS.  Return void.
95         (get_symbols): Add def_ironly_exp param.  Return that value for
96         syms exported from shared libs.
97         (get_symbols_v1, get_symbols_v2): New wrapper functions.
98         * testplug.c: Update for above changes.
99
100 2011-09-27  Kai Tietz  <ktietz@redhat.com>
101
102         * scripttempl/pe.sc (.text): Add support for
103         .gnu.linkonce.t.* section.
104         (.debug_info): Only use .gnu.linkonce.wi.* for
105         relocating.
106         * scripttempl/pep.sc: Likewise.
107
108 2011-09-22  Tristan Gingold  <gingold@adacore.com>
109
110         * NEWS: Add marker for 2.22.
111
112 2011-09-20  Alan Modra  <amodra@gmail.com>
113
114         PR ld/13201
115         * ldlang.h (lang_input_statement_type): Add "reload" bitfield.
116         Clarify comments.
117         * ldlang.c (new_afile): Init new field.
118         (load_symbols): Don't call ldlang_add_file when reloading.
119         (open_input_bfds): Reload as-needed libs during plugin rescan.
120
121 2011-09-15  H.J. Lu  <hongjiu.lu@intel.com>
122
123         PR ld/12975
124         * ldlang.c (lang_elf_version_info): Removed.
125         (lang_register_vers_node): Replace lang_elf_version_info with
126         link_info.version_info.
127         (lang_add_vers_depend): Likewise.
128         * pe-dll.c (process_def_file_and_drectve): Likewise.
129         * emultempl/solaris2.em (elf_solaris2_before_allocation): Likewise.
130
131         * ldlang.h (lang_elf_version_info): Removed.
132
133         * plugin.c  (is_visible_from_outside): Check if symbol is hidden
134         by version script.
135
136         * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
137         Remove lang_elf_version_info.
138
139 2011-09-15  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
140
141         PR ld/13183
142         * ldmain.c (add_archive_element): Support thin archive member
143         for LTO.
144
145 2011-08-26  Nick Clifton  <nickc@redhat.com>
146
147         * po/es.po: Updated Spanish translation.
148
149 2011-08-26  Nick Clifton  <nickc@redhat.com>
150
151         * NEWS: Mention that --no-copy-dt-needed-entries is now the
152         default.
153
154 2011-08-22  Michael Matz  <matz@suse.de>
155
156         * ldmain.c (add_DT_NEEDED_for_dynamic): Default to FALSE.
157         * ld.texinfo (--copy-dt-needed-entries): Mention new default.
158
159 2011-08-17  Alan Modra  <amodra@gmail.com>
160
161         PR ld/12762
162         * ldlang.c (section_already_linked): Revert 2011-07-09 changes.
163         * plugin.c: Likewise.
164         (asymbol_from_plugin_symbol): Create linkonce section for syms
165         with comdat_key.
166
167 2011-08-09  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
168
169         * emultempl/armelf.em (fix_arm1176): New variable.
170         (arm_elf_create_output_section_statements): Pass
171         fix_arm1176 option to bfd backend.
172         (OPTION_FIX_ARM1176): New define.
173         (OPTION_NO_FIX_ARM1176): Likewise.
174         (PARSE_AND_LIST_LONGOPTS): Add new command line options.
175         (PARSE_AND_LIST_OPTIONS): Likewise.
176         (PARSE_AND_LIST_ARGS_CASES): Likewise.
177         * ld.texinfo: Document new command line options.
178
179 2011-08-09  Alan Modra  <amodra@gmail.com>
180
181         PR ld/13066
182         * plugin.c (add_symbols): Revert 2011-08-05.
183
184 2011-08-06  Kai Tietz  <ktietz@redhat.com>
185
186         * scripttempl/pep.sc: Add .debug_macro section.
187         * scripttempl/pe.sc: Likewise.
188
189 2011-08-05  Alan Modra  <amodra@gmail.com>
190
191         PR ld/12762
192         * plugin.c (add_symbols): Exclude comdat_key symbols from symbol
193         table if already seen.
194
195 2011-08-04  H.J. Lu  <hongjiu.lu@intel.com>
196
197         * ldmain.c (main): Replace remove_output with ld_cleanup in
198         comments.
199
200 2011-07-26  Alan Modra  <amodra@gmail.com>
201
202         * emulparams/elf32ppc.sh: Source plt_unwind.sh.
203         * emulparams/elf64ppc.sh: Likewise.
204         * emultempl/ppc32elf.em (OPTION_NO_TLS_OPT): Adjust.
205         (PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_LONGOPTS,
206         PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Append to
207         existing values.
208         * emultempl/ppc64elf.em (OPTION_STUBGROUP_SIZE): Adjust.
209         (PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_LONGOPTS,
210         PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Append to
211         existing values.
212
213 2011-07-22  H.J. Lu  <hongjiu.lu@intel.com>
214
215         * Makefile.am (ALL_64_EMULATIONS): Add eelf_k1om.o and
216         eelf_k1om_fbsd.o
217         (eelf_k1om.c): New.
218         (eelf_k1om_fbsd.c): Likewise.
219         * Makefile.in: Regenerated.
220
221         * configure.tgt (targ64_extra_emuls): Add elf_k1om if elf_x86_64
222         is supported.  Add elf_k1om_fbsd if elf_x86_64_fbsd is supported.
223         (targ_extra_emuls): Likewise.
224
225         * emulparams/elf_k1om.sh: New.
226         * emulparams/elf_k1om_fbsd.sh: Likewise.
227
228 2011-07-16  Roland McGrath  <roland@hack.frob.com>
229
230         * ld.h (args_type): New field print_output_format.
231         * lexsup.c (enum option_values, ld_options, parse_args):
232         Handle --print-output-format.
233         * ldmain.c (main): Implement --print-output-format.
234         * ld.texinfo (Options): Document it.
235
236         * ldlang.c (lang_get_output_target): Don't return current_target
237         when it's NULL.
238
239 2011-07-15  Alan Modra  <amodra@gmail.com>
240
241         * Makefile.am (e*.c): Sort.
242         * Makefile.in: Regenerate.
243
244 2011-07-14  Alan Modra  <amodra@gmail.com>
245
246         * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option,
247         gld${EMULATION_NAME}_list_options): Don't condition -z relro
248         and -z norelro on COMMONPAGESIZE being defined.
249
250 2011-07-14  Alan Modra  <amodra@gmail.com>
251
252         * emultempl/ppc64elf.em (plt_static_chain): New var.
253         (gld${EMULATION_NAME}_after_allocation): Pass to ppc64_elf_size_stubs.
254         (PARSE_AND_LIST_PROLOGUE, PARSE_AND_LIST_LONGOPTS,
255         PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Handle
256         --plt-static-chain and --no-plt-static-chain.
257
258 2011-07-14  Alan Modra  <amodra@gmail.com>
259
260         * emultempl/elf32.em (gld${EMULATION_NAME}_add_options,
261         gld${EMULATION_NAME}_handle_option, gld${EMULATION_NAME}_list_options):
262         Provide --build-id, -z defs, -z muldefs, -z max-page-size,
263         -z common-page-size, -z execstack, -z noexecstack for all targets.
264         Add help for --exclude-libs.
265         (OPTION_LD_GENERATED_UNWIND_INFO,
266         OPTION_NO_LD_GENERATED_UNWIND_INFO): Move this..
267         (gld${EMULATION_NAME}_handle_option): ..and code handling
268         --ld-generated-unwind-info and --no-ld-generated-unwind-info..
269         * emulparams/plt_unwind.sh: ..to here.  New file.  Add help.
270         * emulparams/elf32_x86_64.sh: Include plt_unwind.sh.
271         * emulparams/elf_i386.sh: Likewise.
272         * emulparams/elf_i386_chaos.sh: Likewise.
273         * emulparams/elf_i386_ldso.sh: Likewise.
274         * emulparams/elf_l1om.sh: Likewise.
275         * emulparams/elf_x86_64.sh: Likewise.
276
277 2011-07-11  Catherine Moore  <clm@codesourcery.com>
278
279         * ld.h (section_flag_list): Add field to struct wildcard_spec.
280         * ld.texinfo (INPUT_SECTION_FLAGS): Document.
281         * ldgram.y (flag_info_list, flag_info): Add to union.
282         (INPUT_SECTION_FLAGS): New token.
283         (wildcard_spec): Initialize section_flag_list to NULL for
284         each alternative.
285         (sect_flag_list, sect_flags): New rules.
286         (input_section_spec_no_keep): Add alternatives to recognize
287         sect_flags.
288         * ldlang.c (walk_wild_consider_section): Initialize
289         section_flag_info field of the section struct.
290         (lang_add_section): Check input section flags.
291         (lang_add_wild): Initialize section_flag_list field of
292         the statement struct.
293         * ldlang.h (lang_input_statement_struct): Add section_flag_list field.
294         (lang_wild_statement_struct): Likewise.
295         * ldlex.l (INPUT_SECTION_FLAGS): New token.
296         * mri.c (mri_draw_tree): Initialize section_flag_list to NULL.
297         * NEWS: Announce INPUT_SECTION_FLAGS enhancement.
298
299 2011-07-09  H.J. Lu  <hongjiu.lu@intel.com>
300
301         PR ld/12942
302         * ldlang.c (section_already_linked): Pass "struct already_linked *"
303         to bfd_section_already_linked.
304         (lang_process): Set link_info.loading_lto_outputs before
305         loading LTO outputs.
306         * plugin.c: Include "libbfd.h".
307         (add_symbols): Call bfd_section_already_linked with comdat_key.
308
309 2011-06-20  H.J. Lu  <hongjiu.lu@intel.com>
310
311         * configure.tgt: Revert x32 change.
312
313 2011-06-20  Jakub Jelinek  <jakub@redhat.com>
314
315         PR ld/12570
316         * emultempl/elf32.em (OPTION_LD_GENERATED_UNWIND_INFO,
317         OPTION_NO_LD_GENERATED_UNWIND_INFO): Define.
318         (gld${EMULATION_NAME}_handle_option): Handle
319         --ld-generated-unwind-info and --no-ld-generated-unwind-info.
320         * ld.texinfo (--ld-generated-unwind-info,
321         --no-ld-generated-unwind-info): Document.
322
323 2011-06-19  H.J. Lu  <hongjiu.lu@intel.com>
324
325         * configure.tgt: Support x32.
326
327 2011-06-15  Nick Clifton  <nickc@redhat.com>
328
329         * NEWS: Mention addition of TILEPRO and TIKE-Gx support.
330
331 2011-06-13  Walter Lee  <walt@tilera.com>
332
333         * Makefile.am (ALL_EMULATION_SOURCES): Add eelf32tilegx.c and
334         eelf32tilepro.c.
335         (ALL_64_EMULATION_SOURCES): Add eelf64tilegx.c.
336         (eelf32tilegx.c): New target.
337         (eelf32tilepro.c): Likewise.
338         (eelf64tilegx.c): Likewise.
339         * Makefile.in: Regenerate.
340         * configure.tgt: Handle tilegx-*-* and tilepro-*-*.
341         * emulparams/elf32tilegx.sh: New file.
342         * emulparams/elf64tilegx.sh: New file.
343         * emulparams/elf32tilepro.sh: New file.
344
345 2011-06-13  Alan Modra  <amodra@gmail.com>
346
347         * ldlang.c (sort_def_symbol, lang_one_common): Don't handle
348         warning symbols here.
349         * emultempl/pe.em (pr_sym): Remove redundant test.
350         * emultempl/pep.em (pr_sym): Likewise.
351
352 2011-06-09  Nick Clifton  <nickc@redhat.com>
353
354         PR ld/12845
355         * emultempl/mipself.em (mips_add_stub_section): Do not add stubs
356         for sections that have been removed by garbage collection.
357
358 2011-06-08  Alan Modra  <amodra@gmail.com>
359
360         * ldlang.c (lang_one_common): Handle warning symbols.
361
362 2011-06-07  Nick Clifton  <nickc@redhat.com>
363
364         * configure.tgt: Accept any V850 architecture.
365
366 2011-06-03  Nick Clifton  <nickc@redhat.com>
367
368         * Makefile.am (ALL_EMULATION_SOURCES): Add eelf32am33lin.c
369         Add rule to build eelf32am33lin.c
370         * Makefile.in: Regenerate.
371
372 2011-06-02  Nick Clifton  <nickc@redhat.com>
373
374         * lexsup.c: Fix spelling mistake in comment.
375         * scripttempl/epocpe.sc: Likewise.
376         * scripttempl/i386beos.sc: Likewise.
377         * scripttempl/mcorepe.sc: Likewise.
378         * scripttempl/pe.sc: Likewise.
379         * scripttempl/pep.sc: Likewise.
380         * po/ld.pot: Regenerate.
381
382 2011-05-27  Nick Clifton  <nickc@redhat.com>
383
384         * scripttempl/v850.sc (_heap_start): Provide.
385
386 2011-05-23  Alan Modra  <amodra@gmail.com>
387
388         * ldmisc.c (vfinfo): Add %H.
389         * ldmain.c (reloc_overflow): Use %H rather than %C.
390         (reloc_dangerous, unattached_reloc): Likewise.
391
392 2011-05-23  Alan Modra  <amodra@gmail.com>
393
394         PR 12763
395         * ldlang.c (lang_output_section_find_by_flags): Match orphan .sdata2
396         like sections to existing .sdata2, and similarly for orphan TLS
397         sections.
398         * emultempl/elf32.em (place_orphan): Exclude .tbss from orphan_bss.
399
400 2011-05-17  Tomohiro Kashiwada  <kikairoya@gmail.com>
401
402         PR ld/12759
403         * emultempl/rxelf.em (ignore_lma): New variable.
404         (rx_elf_create_output_section_statements): Pass the setiing of
405         ignore_lma to bfd_elf32_rx_set_target_flags.
406         (OPTION_IGNORE_LMA): Define.
407         (OPTION_NO_IGNORE_LMA): Define.
408         (PARSE_AND_LIST_LONGOPTS): Add ignore lma.
409         (PARSE_AND_LIST_OPTIONS): Add ignore lma.
410         (PARSE_AND_LIST_ARGS_CASES): Add ignore lma.
411
412 2011-05-17  Alan Modra  <amodra@gmail.com>
413
414         PR ld/12760
415         * ldmain.c (notice): Add "flags" and "string" param.
416         * plugin.c (plugin_notice): Likewise.  Handle indirect, warning
417         and constructor syms.
418
419 2010-05-16  Daniel Jacobowitz  <dan@codesourcery.com>
420
421         * ldlang.c (print_assignment): Use the symbol's section if we
422         use its value.
423         * ldexp.c (exp_fold_tree_1): Skip self-assignment.  Expand
424         comment on copying symbol type.
425
426 2011-05-16  H.J. Lu  <hongjiu.lu@intel.com>
427
428         PR ld/12760
429         * plugin.c (plugin_notice): Set u.undef.abfd for symbols made
430         undefweak.
431
432 2011-05-16  Alan Modra  <amodra@gmail.com>
433
434         * ldlang.c (lang_leave_output_section_statement): Don't copy
435         previous lma_region if given address.
436
437 2011-05-13  Bernd Schmidt  <bernds@codesourcery.com>
438
439         (eelf32_tic6x_linux_be.c, eelf32_tic6x_linux_le.c,
440         eelf32_tic6x_elf_be.c, eelf32_tic6x_elf_le.c): New rules.
441         * Makefile.am (ALL_EMULATIONS): Add these files.
442         (eelf32_tic6x_be.c, eelf32_tic6x_le.c): Depend on tic6xdsbt.em.
443         * Makefile.in: Regenerated.
444         * emultempl/tic6xdsbt.em (is_tic6x_target): Allow more tic6x target
445         vectors.
446         * emulparams/elf32_tic6x_elf_be.sh: New file.
447         * emulparams/elf32_tic6x_elf_le.sh: New file.
448         * emulparams/elf32_tic6x_linux_be.sh: New file.
449         * emulparams/elf32_tic6x_linux_le.sh: New file.
450         * configure.tgt (tic6x-*-elf, tic6x-*-uclinux): New.
451         (tic6x-*-*): Replaced by these.
452
453 2011-05-13  Jan Beulich  <jbeulich@novell.com>
454
455         * configure.tgt: Add targets x86_64-*-pe and x86_64-*-pep.
456
457 2011-05-09  Paul Brook  <paul@codesourcery.com>
458
459         * emultempl/tic6xdsbt.em (merge_exidx_entries): New.
460         (compare_output_sec_vma): New function.
461         (gld${EMULATION_NAME}_after_allocation): New function.
462         (OPTION_NO_MERGE_EXIDX_ENTRIES): Define.
463         (PARSE_AND_LIST_OPTIONS): Add --no-merge-exidx-entries.
464         (PARSE_AND_LIST_ARGS_CASES): Add OPTION_NO_MERGE_EXIDX_ENTRIES.
465         (LDEMUL_AFTER_ALLOCATION): Set.
466         * ld.texinfo: Document c6x --no-merge-exidx-entries.
467
468 2011-05-07  Dave Korn  <dave.korn.cygwin@gmail.com>
469
470         PR ld/12365
471         * scripttempl/pe.sc (__rt_psrelocs_start): New symbol definition.
472         (__rt_psrelocs_end): Likewise.
473         (__rt_psrelocs_size): Likewise difference between the above.
474         (__RUNTIME_PSEUDO_RELOC_LIST_END__): Move outside .rdata section
475         immediately after end of pseudo-reloc data.
476         (___RUNTIME_PSEUDO_RELOC_LIST_END___): Likewise.
477         (__RUNTIME_PSEUDO_RELOC_LIST__): Move outside .rdata section and
478         calculate backward from list end.
479         (___RUNTIME_PSEUDO_RELOC_LIST___): Likewise.
480         * scripttempl/pep.sc: Likewise.
481
482 2011-05-06  Tristan Gingold  <gingold@adacore.com>
483
484         * scripttempl/alphavms.sc (CODE): Add *$CODE*.
485
486 2011-05-04  Tristan Gingold  <gingold@adacore.com>
487
488         * emultempl/generic.em (ld_${EMULATION_NAME}_emulation): Add
489         LDEMUL_ADD_OPTIONS and LDEMUL_HANDLE_OPTION.
490         * emultempl/vms.em (OPTION_IDENTIFICATION): New macro.
491         (gld${EMULATION_NAME}_add_options): New function.
492         (gld${EMULATION_NAME}_list_options): Ditto.
493         (gld${EMULATION_NAME}_handle_option): Ditto.
494         (LDEMUL_ADD_OPTIONS, LDEMUL_HANDLE_OPTION)
495         (LDEMUL_LIST_OPTIONS): Define.
496
497 2011-05-04  Alan Modra  <amodra@gmail.com>
498
499         PR ld/12726
500         * ldexp.h (lang_phase_type): Add lang_assigning_phase_enum.
501         * ldexp.c (exp_fold_tree_1): Correct assign to dot comment.  Don't
502         assign to dot when lang_assigning_phase_enum.
503         * ldlang.h (lang_do_assignments): Update prototype.
504         * ldlang.c (lang_do_assignments): Add phase parameter.  Update all
505         callers.
506         * pe-dll.c (pe_dll_fill_sections, pe_exe_fill_sections): Update
507         lang_do_assignments calls.
508
509 2011-04-28  Daniel C. Klauer  <daniel.c.klauer@web.de>
510
511         PR ld/12614
512         * emultempl/pe.em (_after_open): Correctly check whether symbol is
513         in undef list.
514
515 2011-04-26  Kai Tietz  <ktietz@redhat.com>
516
517         * scripttempl/pe.sc: Handle .eh_frame($|.)* sections.
518         * scripttempl/pep.sc: Likewise.
519
520 2011-04-24  Alan Modra  <amodra@gmail.com>
521
522         PR ld/12365
523         PR ld/12696
524         * ldmain.c (notice): Delete "name" param, add "h".
525         * plugin.c (plugin_notice): Likewise.  Set non_ir_ref.  Handle
526         redefinitions of IR symbols in real BFDs.
527         (plugin_multiple_definition, plugin_multiple_common): Delete.
528         (non_ironly_hash, init_non_ironly_hash): Delete.
529         (is_visible_from_outside): Traverse entry_symbol chain.
530         (get_symbols): Use non_ir_ref flag rather than hash lookup.
531
532 2011-04-21  Tristan Gingold  <gingold@adacore.com>
533
534         * scripttempl/alphavms.sc: Add dwarf2 embedding marks.
535
536 2011-04-20  Tristan Gingold  <gingold@adacore.com>
537
538         * emultempl/aix.em (_add_options): Ignore -bbigtoc switch.
539
540 2011-04-20  Alan Modra  <amodra@gmail.com>
541
542         * ld.h (ld_config_type <hash_table_size>): Make it an unsigned long.
543
544 2011-04-20  Alan Modra  <amodra@gmail.com>
545
546         PR ld/12365
547         * ldfile.c (ldfile_try_open_bfd): Move code creating and switching
548         to plugin IR BFD..
549         * ldmain.c (add_archive_element): ..and similar code here..
550         * plugin.c (plugin_maybe_claim): ..to here.  New function.
551         (plugin_call_claim_file): Make static.
552         (asymbol_from_plugin_symbol): Set ELF st_shndx for common syms.
553         (plugin_multiple_common): New function.
554         (plugin_call_all_symbols_read): Hook in plugin_multiple_common.
555         * plugin.h (plugin_call_claim_file): Don't declare.
556         (plugin_maybe_claim): Declare.
557
558 2011-04-20  Alan Modra  <amodra@gmail.com>
559
560         PR ld/12365
561         * ldmain.c (multiple_definition): Take a bfd_link_hash_entry
562         pointer arg rather than "name", "obfd", "osec", "oval".  Add code
563         removed from linker.c.  Hack around xcofflink.c oddity in
564         passing NULL nbfd.
565         (multiple_common): Similarly.
566         * plugin.c (orig_allow_multiple_defs): Delete.
567         (plugin_call_all_symbols_read): Don't twiddle allow_multiple_definition.
568         (plugin_multiple_definition): Update.
569
570 2011-04-18  Kai Tietz  <ktietz@redhat.com>
571
572         * deffilep.y (def_aligncomm): Avoid duplets.
573
574         * deffilep.y (def_pool_str): New type.
575         (pool_strs): Local static.
576         (def_pool_alloc): Local function.
577         (def_pool_strdup): Likewise.
578         (def_pool_free): Likewise.
579         (opt_name): Replace xmalloc/xstrdup by
580         def_pool_alloc/def_pool_strdup.
581         (dot_name): Likewise.
582         (anylang_id): Likewise.
583         (def_lex): Likewise.
584         (def_file_parse): Call def_pool_free on
585         exit and cleanup directives elements.
586         (def_file_add_directive): Call def_pool_free.
587
588 2011-04-18  Paul Brook  <paul@codesourcery.com>
589
590         * emulparams/elf32_tic6x_le.sh: Define OTHER_READONLY_SECTIONS
591         for unwinding tables.
592
593 2011-04-18  Alan Modra  <amodra@gmail.com>
594
595         PR ld/12365
596         PR ld/12672
597         * ldfile.c (ldfile_try_open_bfd): Don't attempt any plugin action
598         when no_more_claiming.
599         * ldmain.c (add_archive_element): Likewise.
600         (multiple_definition): Remove plugin_multiple_definition call.
601         (notice): Remove plugin_notice call.
602         * ldlang.c (lang_list_insert_after, void lang_list_remove_tail): Move.
603         Delete prototype.
604         (plugin_insert): New static var.
605         (open_input_bfds): Only rescan libs after plugin insert point.
606         (lang_gc_sections): Omit plugin claimed files.
607         (lang_process): Set plugin_insert.  Only rescan when plugin adds
608         objects.
609         * plugin.h (no_more_claiming): Declare.
610         (plugin_notice, plugin_multiple_definition): Don't declare.
611         * plugin.c: Formatting.
612         (orig_notice_all, orig_allow_multiple_defs, orig_callbacks,
613         plugin_callbacks): New static vars.
614         (no_more_claiming): Make global.
615         (plugin_cached_allow_multiple_defs): Delete.
616         (plugin_get_ir_dummy_bfd): Set SEC_EXCLUDE on dummy .text section,
617         use newer bfd_make_section variant.  Make COMMON section too.
618         Error handling.  Correct setting of gp size.
619         (asymbol_from_plugin_symbol): Properly cast last arg of concat.
620         (message): Likewise for ACONCAT.
621         (asymbol_from_plugin_symbol): Use our COMMON section.
622         (get_symbols): When report_plugin_symbols, show visibility too.
623         (init_non_ironly_hash): Move.  Don't test non_ironly_hash.
624         (plugin_load_plugins): Save state of linker callbacks, set up to
625         call plugin_notice instead.  Call init_non_ironly_hash here.
626         (plugin_call_all_symbols_read): Set plugin_multiple_definition in
627         plugin callbacks.
628         (plugin_notice): Rewrite.
629         (plugin_multiple_definition): Make static, call original callback.
630
631 2011-04-15  Alan Modra  <amodra@gmail.com>
632
633         PR ld/12672
634         * ldlang.c (enum open_bfd_mode): New.
635         (open_input_bfds): Replace "force" param with "mode".  Reload
636         archives for rescan.  Update all callers.
637         (lang_process): Make another open_input_bfds pass for plugins.
638
639 2011-04-13  Kai Tietz  <ktietz@redhat.com>
640
641         PR binutils/12658
642         * deffile.h (def_file_add_export): Add is_dup argument.
643         (def_file_add_import): Likewise.
644         * deffilep.y (are_names_equal): New helper.
645         (cmp_export_elem): New helper.
646         (find_export_in_list): Add search routine for exports.
647         (def_file_add_export): Check for duplicates.
648         (cmp_import_elem): New helper.
649         (find_import_in_list): Add search routine for imports.
650         (def_file_add_import): Check for duplicates.
651         (def_exports): Handle duplicates.
652         (def_imports): Likewise.
653         * pe-dll.c (process_def_file_and_drectve): Likewise.
654         (pe_implied_import_dll): Likewise.
655
656 2011-04-11  Chris Quenelle  <chris.quenelle@oracle.com>
657
658         * scripttempl/elf.sc (.exception_ranges): Add new section.
659
660 2011-04-08  Hector Oron  <hector.oron@gmail.com>
661
662         PR ld/12643
663         * configure.tgt: Add support for arm-*-gnueabihf targets.
664
665 2011-04-07  Eric B. Weddington  <eric.weddington@atmel.com>
666
667         * Makefile.in: Regenerate. Remove stray eavrtiny10 rules.
668
669 2011-04-07  Joseph Myers  <joseph@codesourcery.com>
670
671         * configure.tgt: Remove stray ;;.
672
673 2011-04-06  Joseph Myers  <joseph@codesourcery.com>
674
675         * configure.tgt (thumb-*-linux-* | thumb-*-uclinux*,
676         strongarm-*-coff, strongarm-*-elf, strongarm-*-kaos*,
677         thumb-*-coff, thumb-*-elf, thumb-epoc-pe, thumb-*-pe,
678         xscale-*-coff, xscale-*-elf): Remove targets.
679
680 2011-03-31  H.J. Lu  <hongjiu.lu@intel.com>
681
682         * configure.tgt: Add elf_l1om to targ_extra_libpath for
683         x86_64-*-linux-*.
684
685         * emulparams/elf_l1om.sh: Remove duplicates.
686
687 2011-03-31  Bernd Schmidt  <bernds@codesourcery.com>
688
689         * emulparams/elf32_tic6x_le.sh (BIG_OUTPUT_FORMAT, EXTRA_EM_FILE,
690         GENERATE_SHLIB_SCRIPT): New defines.
691         (TEXT_START_ADDR): Define differently depending on target.
692         (.got): Redefine to include "*(.dsbt)".
693         (SDATA_START_SYMBOLS): Remove, replace with
694         (OTHER_GOT_SYMBOLS): New.
695         (OTHER_BSS_SECTIONS): Define only for ELF targets.
696         * emultempl/tic6xdsbt.em: New file.
697         * gen-doc.texi: Set C6X.
698         * ld.texinfo: Likewise.
699         (Options specific to C6X uClinux targets): New section.
700
701 2011-03-29  Alan Modra  <amodra@gmail.com>
702
703         PR ld/12613
704         * ldlex.l (lex_warn_invalid): Don't assume char is unsigned.
705
706 2011-03-26  John Marino  <binutils@marino.st>
707
708         * configure.host: Update *-*-dragonfly* host entry.
709         * configure.tgt: Update *-*-dragonfly* target entry.
710         * ldlex.l: Prevent redefinition of YY_NO_UNPUT.
711
712 2011-03-28  Joseph Myers  <joseph@codesourcery.com>
713
714         * configure.in: Check for windows.h, not Windows.h.
715         * configure: Regenerate.
716         * plugin.c: Include windows.h, not Windows.h.
717
718 2011-03-25  Eric B. Weddington  <eric.weddington@atmel.com>
719
720         * Makefile.in: Regenerate.
721
722 2011-03-23  Joseph Myers  <joseph@codesourcery.com>
723
724         * lexsup.c (parse_args): Only set report_plugin_symbols if plugins
725         are enabled.  Mark level as possibly unused.
726
727 2011-03-22  Eric B. Weddington  <eric.weddington@atmel.com>
728
729         * Makefile.am (ALL_EMULATION_SOURCES): Add AVR XMEGA architectures.
730         (eavrxmega?.c): Likewise.
731         * configure.tgt (targ_extra_emuls): Likewise.
732         * emulparams/avrxmega1.sh: New file.
733         * emulparams/avrxmega2.sh: Likewise.
734         * emulparams/avrxmega3.sh: Likewise.
735         * emulparams/avrxmega4.sh: Likewise.
736         * emulparams/avrxmega5.sh: Likewise.
737         * emulparams/avrxmega6.sh: Likewise.
738         * emulparams/avrxmega7.sh: Likewise.
739         * emultempl/avrelf.em (avr_elf_${EMULATION_NAME}_before_allocation):
740         Add avrxmega6, avrxmega7 to list of architectures for no stubs.
741
742 2011-03-21  Eric B. Weddington  <eric.weddington@atmel.com>
743
744         * scripttempl/avr.sc: Add fuse, lock, and signature memory regions.
745
746 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
747
748         * emultempl/armelf.em (gld${EMULATION_NAME}_finish): Check
749         eh->target_internal.
750
751 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
752
753         * emultempl/armelf.em (arm_elf_before_allocation): Check dynobj
754         instead of dynamic_sections_created.
755
756 2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>
757
758         * plugin.c (get_symbols): Use wrapped lookup for undefined symbols.
759
760 2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>
761
762         * ldlang.c (lang_check): Don't run checks on dummy IR BFDs.
763
764 2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>
765
766         * ldlang.h (lang_input_statement_type): Add new 'claim_archive' flag,
767         wrapping both it and 'claim' flag in #ifdef ENABLE_PLUGINS.
768         * ldmain.c (add_archive_element): Set it if the member is claimed.
769         * ldlang.c (new_afile): Initialise claim_archive and claimed members.
770         (find_replacements_insert_point): New helper function.
771         (lang_process): After adding and opening replacement files passed
772         from plugin, splice them into correct place in statement list and
773         file chains to preserve critical link order.
774         (lang_list_insert_after): New helper function.
775         (lang_list_remove_tail): Likewise.
776
777 2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>
778
779         * plugin.c (IRONLY_SUFFIX): Revise to nicely human-readable form.
780         (IRONLY_SUFFIX_LEN): Delete.
781         (plugin_get_ir_dummy_bfd): Don't append IRONLY_SUFFIX.
782         (is_ir_dummy_bfd): Don't look for suffix; check claimed flag of
783         enclosing lang input statement instead.
784
785 2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>
786
787         * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Preserve
788         alignment of input sections when creating orphan output sections
789         during relocatable link.
790         * emultempl/pep.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
791
792 2011-03-04  H.J. Lu  <hongjiu.lu@intel.com>
793
794         * ld.texinfo: Document --verbose[=NUMBER].
795
796         * lexsup.c (ld_options): Update --verbose.
797         (parse_args): Set report_plugin_symbols.
798
799         * plugin.c (report_plugin_symbols): New.
800         (get_symbols): Report plugin symbols if report_plugin_symbols
801         is TRUE.
802
803         * plugin.h (report_plugin_symbols): New.
804
805 2011-03-01  H.J. Lu  <hongjiu.lu@intel.com>
806
807         PR ld/12529
808         * testplug.c: Don't include "filenames.h".
809         (onclaim_file): Don't use filename_cmp.
810
811 2011-02-28  Kai Tietz  <kai.tietz@onevision.com>
812
813         * emultempl/beos.em (sort_by_file_name): Use filename_(n)cmp.
814         * emultempl/elf32.em (gld${EMULATION_NAME}_vercheck):
815         Likewise.
816         (gld${EMULATION_NAME}_stat_needed): Likewise.
817         (gld${EMULATION_NAME}_check_needed): Likewise.
818         * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Likewise.
819         (gld_${EMULATION_NAME}_unrecognized_file): Likewise.
820         * emultempl/pep.em (gld_${EMULATION_NAME}_after_open): Likewise.
821         (gld_${EMULATION_NAME}_unrecognized_file): Likewise.
822         * ldfile.c (ldfile_open_file): Likewise.
823         * ldlang.c (wild_sort): Likewise.
824         (lookup_name): Likewise.
825         (check_excluded_libs): Likewise.
826         * ldmisc.c (vfinfo): Likewise.
827         * pe-dll.c (libnamencmp): Likewise.
828         (auto_export): Likewise.
829         (pe_dll_generate_implib): Likewise.
830         * testplug.c (onclaim_file): Likewise.
831
832 2011-02-24  H.J. Lu  <hongjiu.lu@intel.com>
833
834         PR ld/12507
835         * plugin.c (get_symbols): Don't check entry symbol here.
836         (init_non_ironly_hash): Add entry_symbol chain into
837         non_ironly_hash.
838
839 2011-02-24  H.J. Lu  <hongjiu.lu@intel.com>
840
841         PR ld/12507
842         * plugin.c (get_symbols): Don't mark entry symbol IR only.
843
844 2011-02-18  John David Anglin  <dave.anglin@nrc-cnnrc.gc.ca>
845
846         PR ld/12376
847         emulparams/hppalinux.sh (DATA_ADDR): Define.
848         (SHLIB_DATA_ADDR): Likewise.
849
850 2011-02-16  H.J. Lu  <hongjiu.lu@intel.com>
851
852         * emulparams/elf32_x86_64.sh (LIBPATH_SUFFIX): Changed to
853         x32 for x32.
854
855 2011-02-15  Kai Tietz  <kai.tietz@onevision.com>
856
857         * pe-dll.c (process_def_file_and_drectve): Don't strip
858         leading underscore from symbol by calling bfd_find_version_for_sym.
859
860 2011-02-14  Mike Frysinger  <vapier@gentoo.org>
861
862         * ldlang.c (lang_vers_match): Declare a new c_sym, assign it to
863         the bfd_demangle of sym, change users of sym to c_sym when not
864         already demangling, and free when done.  Change callers of
865         cplus_demangle to bfd_demangle.
866
867 2011-02-14  Alan Modra  <amodra@gmail.com>
868
869         * plugin.c (plugin_get_ir_dummy_bfd): Set SEC_EXCLUDE on dummy
870         .text section, use newer bfd_make_section variant.  Error handling.
871         Correct setting of gp size.
872         (asymbol_from_plugin_symbol): Properly cast last arg of concat.
873         (message): Likewise for ACONCAT.
874         (get_symbols): Formatting.
875
876 2011-02-14  Alan Modra  <amodra@gmail.com>
877
878         * ldmain.c (remove_output): Rename to..
879         (ld_cleanup): ..this. Call bfd_cache_close_all and plugin_call_cleanup.
880         (main): Adjust.
881         * plugin.c (plugin_call_cleanup): Make global.
882         (plugin_load_plugins): Don't register plugin_call_cleanup with xatexit.
883         * plugin.h (plugin_call_cleanup): Declare.
884
885 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
886
887         * configure: Regenerate.
888
889 2011-02-10  Alan Modra  <amodra@gmail.com>
890
891         * scripttempl/armbpabi.sc: Revert 2010-11-02  H.J. Lu.
892         * scripttempl/avr.sc: Likewise.
893         * scripttempl/elf32cr16.sc: Likewise.
894         * scripttempl/elf32crx.sc: Likewise.
895         * scripttempl/elf32msp430.sc: Likewise.
896         * scripttempl/elf32msp430_3.sc: Likewise.
897         * scripttempl/elf32sh-symbian.sc: Likewise.
898         * scripttempl/elf64hppa.sc: Likewise.
899         * scripttempl/elf_chaos.sc: Likewise.
900         * scripttempl/elfd10v.sc: Likewise.
901         * scripttempl/elfd30v.sc: Likewise.
902         * scripttempl/elfi370.sc: Likewise.
903         * scripttempl/elfm68hc11.sc: Likewise.
904         * scripttempl/elfm68hc12.sc: Likewise.
905         * scripttempl/elfxtensa.sc: Likewise.
906         * scripttempl/ip2k.sc: Likewise.
907         * scripttempl/iq2000.sc: Likewise.
908         * scripttempl/mep.sc: Likewise.
909         * scripttempl/mmo.sc: Likewise.
910         * scripttempl/v850.sc: Likewise.
911         * scripttempl/xstormy16.sc: Likewise.
912         * scripttempl/elf.sc: Revert 2010-10-29  H.J. Lu.
913
914 2011-01-22  H.J. Lu  <hongjiu.lu@intel.com>
915
916         * Makefile.am (CXX): Removed.
917
918         * configure.in: Add AC_PROG_CXX.
919
920         * Makefile.in: Regenerated.
921         * configure: Likewise.
922
923 2011-01-22  Richard Sandiford  <rdsandiford@googlemail.com>
924
925         * plugin.c (plugin_get_ir_dummy_bfd): Copy across the bfd's
926         private data and GP size.
927
928 2011-01-21  Alan Modra  <amodra@gmail.com>
929
930         * ldexp.c (fold_binary): Set result section for arithmetic and
931         logical operations to NULL when both operands are in same section.
932         * ld.texinfo (Expression Section): Describe this.
933
934 2011-01-14  Alan Modra  <amodra@gmail.com>
935
936         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
937         attempt to put non-alloc orphans before debug sections, just place
938         them after .comment.
939
940 2011-01-14  J. Park  <grassman@gmail.com>
941
942         PR ld/12339
943         * ldlang.c (sort_def_symbol): Handle bfd_link_hash_warning symbols.
944
945 2011-01-14  Alan Modra  <amodra@gmail.com>
946
947         * Makefile.am: Sort emulation rules.
948         (eelf32am33lin.c): Delete.
949         (ALL_EMULATION_SOURCES): Sort, add missing entries.
950         (ALL_64_EMULATION_SOURCES): Likewise.
951         * Makefile.in: Regenerate.
952
953 2011-01-13  Alan Modra  <amodra@gmail.com>
954
955         PR ld/12356
956         * ld.texinfo (Miscellaneous Commands): Describe LD_FEATURE.
957         (Expression Section): Update.
958         * ld.h (ld_config_type): Add sane_expr.
959         * ldgram.y (ifile_p1): Add LD_FEATURE.
960         * ldlex.l (LD_FEATYRE): New.
961         * ldemul.c (after_parse_default): Delete code handling ld_compatibility.
962         * ldexp.h (struct ldexp_control): Delete uses_defined.
963         * ldexp.c: Remove all uses of uses_defined.
964         (fold_name): Test config.sane_expr rather than ld_compatibility.
965         (exp_fold_tree_1): Likewise.  Adjust handling of assignments
966         during first phase.
967         * ldlang.h (ld_compatibility): Delete.
968         (lang_ld_feature): Declare.
969         * ldlang.c (ld_compatibility): Delete.
970         (open_input_bfds): Only handle assignments for --defsym.
971         (lang_ld_feature): New function.
972
973         PR ld/12356
974         * ldexp.h (exp_assop): Delete.
975         (exp_assign, exp_defsym): Declare.
976         * ldexp.c (exp_assop): Make static, handle all assignment variations.
977         (exp_assign, exp_defsym): New functions.
978         (exp_provide): Use exp_assop.
979         * ldgram.y (defsym_expr): Use exp_defsym.
980         * ldctor.c, * ldgram.y, * ldlang.c, * mri.c, * emultempl/beos.em,
981         * emultempl/pe.em, * emultempl/pep.em, * emultempl/spuelf.em,
982         * emultempl/xtensaelf.em: Update exp_assop -> exp_assign.
983
984 2011-01-12  Alan Modra  <amodra@gmail.com>
985
986         PR ld/12380
987         * ldexp.h (enum phase_enum): Comment.  Add exp_dataseg_done.
988         * ldexp.c (fold_unary <DATA_SEGMENT_END>): Rearrange code.  Test
989         for exp_dataseg_done rather than expld.phase == lang_final_phase_enum
990         to detect when we've finished sizing sections.
991         (fold_binary <DATA_SEGMENT_ALIGN>): Likewise.
992         (fold_binary <DATA_SEGMENT_RELRO_END>): Likewise.  Also test
993         that we are not inside an output section statement.
994         * ldlang.c (lang_size_sections): Set exp_dataseg_done on exit if
995         not exp_dataseg_relro_adjust or exp_dataseg_adjust.  Don't set
996         lang_final_phase_enum here.
997         (lang_process): Set lang_final_phase_enum here.
998
999 2011-01-10  Nick Clifton  <nickc@redhat.com>
1000
1001         * po/da.po: Updated Danish translation.
1002
1003 2011-01-10  H.J. Lu  <hongjiu.lu@intel.com>
1004
1005         * ldlang.c (startup_file): Removed.
1006         (lang_startup): Updated.
1007
1008 2011-01-05  H.J. Lu  <hongjiu.lu@intel.com>
1009
1010         PR ld/12364
1011         * plugin.c (get_symbols): Check if owner_sec->owner is NULL
1012         before accessing its flags field.
1013
1014 2011-01-01  H.J. Lu  <hongjiu.lu@intel.com>
1015
1016         * ldver.c (ldversion): Update copyright to 2011.
1017
1018 For older changes see ChangeLog-2010
1019 \f
1020 Local Variables:
1021 mode: change-log
1022 left-margin: 8
1023 fill-column: 74
1024 version-control: never
1025 End: