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