PR ld/12614
[external/binutils.git] / ld / ChangeLog
1 2011-04-28  Daniel C. Klauer  <daniel.c.klauer@web.de>
2
3         PR ld/12614
4         * emultempl/pe.em (_after_open): Correctly check whether symbol is
5         in undef list.
6
7 2011-04-26  Kai Tietz  <ktietz@redhat.com>
8
9         * scripttempl/pe.sc: Handle .eh_frame($|.)* sections.
10         * scripttempl/pep.sc: Likewise.
11
12 2011-04-24  Alan Modra  <amodra@gmail.com>
13
14         PR ld/12365
15         PR ld/12696
16         * ldmain.c (notice): Delete "name" param, add "h".
17         * plugin.c (plugin_notice): Likewise.  Set non_ir_ref.  Handle
18         redefinitions of IR symbols in real BFDs.
19         (plugin_multiple_definition, plugin_multiple_common): Delete.
20         (non_ironly_hash, init_non_ironly_hash): Delete.
21         (is_visible_from_outside): Traverse entry_symbol chain.
22         (get_symbols): Use non_ir_ref flag rather than hash lookup.
23
24 2011-04-21  Tristan Gingold  <gingold@adacore.com>
25
26         * scripttempl/alphavms.sc: Add dwarf2 embedding marks.
27
28 2011-04-20  Tristan Gingold  <gingold@adacore.com>
29
30         * emultempl/aix.em (_add_options): Ignore -bbigtoc switch.
31
32 2011-04-20  Alan Modra  <amodra@gmail.com>
33
34         * ld.h (ld_config_type <hash_table_size>): Make it an unsigned long.
35
36 2011-04-20  Alan Modra  <amodra@gmail.com>
37
38         PR ld/12365
39         * ldfile.c (ldfile_try_open_bfd): Move code creating and switching
40         to plugin IR BFD..
41         * ldmain.c (add_archive_element): ..and similar code here..
42         * plugin.c (plugin_maybe_claim): ..to here.  New function.
43         (plugin_call_claim_file): Make static.
44         (asymbol_from_plugin_symbol): Set ELF st_shndx for common syms.
45         (plugin_multiple_common): New function.
46         (plugin_call_all_symbols_read): Hook in plugin_multiple_common.
47         * plugin.h (plugin_call_claim_file): Don't declare.
48         (plugin_maybe_claim): Declare.
49
50 2011-04-20  Alan Modra  <amodra@gmail.com>
51
52         PR ld/12365
53         * ldmain.c (multiple_definition): Take a bfd_link_hash_entry
54         pointer arg rather than "name", "obfd", "osec", "oval".  Add code
55         removed from linker.c.  Hack around xcofflink.c oddity in
56         passing NULL nbfd.
57         (multiple_common): Similarly.
58         * plugin.c (orig_allow_multiple_defs): Delete.
59         (plugin_call_all_symbols_read): Don't twiddle allow_multiple_definition.
60         (plugin_multiple_definition): Update.
61
62 2011-04-18  Kai Tietz  <ktietz@redhat.com>
63
64         * deffilep.y (def_aligncomm): Avoid duplets.
65
66         * deffilep.y (def_pool_str): New type.
67         (pool_strs): Local static.
68         (def_pool_alloc): Local function.
69         (def_pool_strdup): Likewise.
70         (def_pool_free): Likewise.
71         (opt_name): Replace xmalloc/xstrdup by
72         def_pool_alloc/def_pool_strdup.
73         (dot_name): Likewise.
74         (anylang_id): Likewise.
75         (def_lex): Likewise.
76         (def_file_parse): Call def_pool_free on
77         exit and cleanup directives elements.
78         (def_file_add_directive): Call def_pool_free.
79
80 2011-04-18  Paul Brook  <paul@codesourcery.com>
81
82         * emulparams/elf32_tic6x_le.sh: Define OTHER_READONLY_SECTIONS
83         for unwinding tables.
84
85 2011-04-18  Alan Modra  <amodra@gmail.com>
86
87         PR ld/12365
88         PR ld/12672
89         * ldfile.c (ldfile_try_open_bfd): Don't attempt any plugin action
90         when no_more_claiming.
91         * ldmain.c (add_archive_element): Likewise.
92         (multiple_definition): Remove plugin_multiple_definition call.
93         (notice): Remove plugin_notice call.
94         * ldlang.c (lang_list_insert_after, void lang_list_remove_tail): Move.
95         Delete prototype.
96         (plugin_insert): New static var.
97         (open_input_bfds): Only rescan libs after plugin insert point.
98         (lang_gc_sections): Omit plugin claimed files.
99         (lang_process): Set plugin_insert.  Only rescan when plugin adds
100         objects.
101         * plugin.h (no_more_claiming): Declare.
102         (plugin_notice, plugin_multiple_definition): Don't declare.
103         * plugin.c: Formatting.
104         (orig_notice_all, orig_allow_multiple_defs, orig_callbacks,
105         plugin_callbacks): New static vars.
106         (no_more_claiming): Make global.
107         (plugin_cached_allow_multiple_defs): Delete.
108         (plugin_get_ir_dummy_bfd): Set SEC_EXCLUDE on dummy .text section,
109         use newer bfd_make_section variant.  Make COMMON section too.
110         Error handling.  Correct setting of gp size.
111         (asymbol_from_plugin_symbol): Properly cast last arg of concat.
112         (message): Likewise for ACONCAT.
113         (asymbol_from_plugin_symbol): Use our COMMON section.
114         (get_symbols): When report_plugin_symbols, show visibility too.
115         (init_non_ironly_hash): Move.  Don't test non_ironly_hash.
116         (plugin_load_plugins): Save state of linker callbacks, set up to
117         call plugin_notice instead.  Call init_non_ironly_hash here.
118         (plugin_call_all_symbols_read): Set plugin_multiple_definition in
119         plugin callbacks.
120         (plugin_notice): Rewrite.
121         (plugin_multiple_definition): Make static, call original callback.
122
123 2011-04-15  Alan Modra  <amodra@gmail.com>
124
125         PR ld/12672
126         * ldlang.c (enum open_bfd_mode): New.
127         (open_input_bfds): Replace "force" param with "mode".  Reload
128         archives for rescan.  Update all callers.
129         (lang_process): Make another open_input_bfds pass for plugins.
130
131 2011-04-13  Kai Tietz  <ktietz@redhat.com>
132
133         PR binutils/12658
134         * deffile.h (def_file_add_export): Add is_dup argument.
135         (def_file_add_import): Likewise.
136         * deffilep.y (are_names_equal): New helper.
137         (cmp_export_elem): New helper.
138         (find_export_in_list): Add search routine for exports.
139         (def_file_add_export): Check for duplicates.
140         (cmp_import_elem): New helper.
141         (find_import_in_list): Add search routine for imports.
142         (def_file_add_import): Check for duplicates.
143         (def_exports): Handle duplicates.
144         (def_imports): Likewise.
145         * pe-dll.c (process_def_file_and_drectve): Likewise.
146         (pe_implied_import_dll): Likewise.
147
148 2011-04-11  Chris Quenelle  <chris.quenelle@oracle.com>
149
150         * scripttempl/elf.sc (.exception_ranges): Add new section.
151
152 2011-04-08  Hector Oron  <hector.oron@gmail.com>
153
154         PR ld/12643
155         * configure.tgt: Add support for arm-*-gnueabihf targets.
156
157 2011-04-07  Eric B. Weddington  <eric.weddington@atmel.com>
158
159         * Makefile.in: Regenerate. Remove stray eavrtiny10 rules.
160
161 2011-04-07  Joseph Myers  <joseph@codesourcery.com>
162
163         * configure.tgt: Remove stray ;;.
164
165 2011-04-06  Joseph Myers  <joseph@codesourcery.com>
166
167         * configure.tgt (thumb-*-linux-* | thumb-*-uclinux*,
168         strongarm-*-coff, strongarm-*-elf, strongarm-*-kaos*,
169         thumb-*-coff, thumb-*-elf, thumb-epoc-pe, thumb-*-pe,
170         xscale-*-coff, xscale-*-elf): Remove targets.
171
172 2011-03-31  H.J. Lu  <hongjiu.lu@intel.com>
173
174         * configure.tgt: Add elf_l1om to targ_extra_libpath for
175          x86_64-*-linux-*.
176
177         * emulparams/elf_l1om.sh: Remove duplicates.
178
179 2011-03-31  Bernd Schmidt  <bernds@codesourcery.com>
180
181         * emulparams/elf32_tic6x_le.sh (BIG_OUTPUT_FORMAT, EXTRA_EM_FILE,
182         GENERATE_SHLIB_SCRIPT): New defines.
183         (TEXT_START_ADDR): Define differently depending on target.
184         (.got): Redefine to include "*(.dsbt)".
185         (SDATA_START_SYMBOLS): Remove, replace with
186         (OTHER_GOT_SYMBOLS): New.
187         (OTHER_BSS_SECTIONS): Define only for ELF targets.
188         * emultempl/tic6xdsbt.em: New file.
189         * gen-doc.texi: Set C6X.
190         * ld.texinfo: Likewise.
191         (Options specific to C6X uClinux targets): New section.
192
193 2011-03-29  Alan Modra  <amodra@gmail.com>
194
195         PR ld/12613
196         * ldlex.l (lex_warn_invalid): Don't assume char is unsigned.
197
198 2011-03-26  John Marino  <binutils@marino.st>
199
200         * configure.host: Update *-*-dragonfly* host entry.
201         * configure.tgt: Update *-*-dragonfly* target entry.
202         * ldlex.l: Prevent redefinition of YY_NO_UNPUT.
203
204 2011-03-28  Joseph Myers  <joseph@codesourcery.com>
205
206         * configure.in: Check for windows.h, not Windows.h.
207         * configure: Regenerate.
208         * plugin.c: Include windows.h, not Windows.h.
209
210 2011-03-25  Eric B. Weddington  <eric.weddington@atmel.com>
211
212         * Makefile.in: Regenerate.
213
214 2011-03-23  Joseph Myers  <joseph@codesourcery.com>
215
216         * lexsup.c (parse_args): Only set report_plugin_symbols if plugins
217         are enabled.  Mark level as possibly unused.
218
219 2011-03-22  Eric B. Weddington  <eric.weddington@atmel.com>
220
221         * Makefile.am (ALL_EMULATION_SOURCES): Add AVR XMEGA architectures.
222         (eavrxmega?.c): Likewise.
223         * configure.tgt (targ_extra_emuls): Likewise.
224         * emulparams/avrxmega1.sh: New file.
225         * emulparams/avrxmega2.sh: Likewise.
226         * emulparams/avrxmega3.sh: Likewise.
227         * emulparams/avrxmega4.sh: Likewise.
228         * emulparams/avrxmega5.sh: Likewise.
229         * emulparams/avrxmega6.sh: Likewise.
230         * emulparams/avrxmega7.sh: Likewise.
231         * emultempl/avrelf.em (avr_elf_${EMULATION_NAME}_before_allocation):
232         Add avrxmega6, avrxmega7 to list of architectures for no stubs.
233
234 2011-03-21  Eric B. Weddington  <eric.weddington@atmel.com>
235
236         * scripttempl/avr.sc: Add fuse, lock, and signature memory regions.
237
238 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
239
240         * emultempl/armelf.em (gld${EMULATION_NAME}_finish): Check
241         eh->target_internal.
242
243 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
244
245         * emultempl/armelf.em (arm_elf_before_allocation): Check dynobj
246         instead of dynamic_sections_created.
247
248 2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>
249
250         * plugin.c (get_symbols): Use wrapped lookup for undefined symbols.
251
252 2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>
253
254         * ldlang.c (lang_check): Don't run checks on dummy IR BFDs.
255
256 2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>
257
258         * ldlang.h (lang_input_statement_type): Add new 'claim_archive' flag,
259         wrapping both it and 'claim' flag in #ifdef ENABLE_PLUGINS.
260         * ldmain.c (add_archive_element): Set it if the member is claimed.
261         * ldlang.c (new_afile): Initialise claim_archive and claimed members.
262         (find_replacements_insert_point): New helper function.
263         (lang_process): After adding and opening replacement files passed
264         from plugin, splice them into correct place in statement list and
265         file chains to preserve critical link order.
266         (lang_list_insert_after): New helper function.
267         (lang_list_remove_tail): Likewise.
268
269 2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>
270
271         * plugin.c (IRONLY_SUFFIX): Revise to nicely human-readable form.
272         (IRONLY_SUFFIX_LEN): Delete.
273         (plugin_get_ir_dummy_bfd): Don't append IRONLY_SUFFIX.
274         (is_ir_dummy_bfd): Don't look for suffix; check claimed flag of
275         enclosing lang input statement instead.
276
277 2011-03-10  Dave Korn  <dave.korn.cygwin@gmail.com>
278
279         * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Preserve
280         alignment of input sections when creating orphan output sections
281         during relocatable link.
282         * emultempl/pep.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
283
284 2011-03-04  H.J. Lu  <hongjiu.lu@intel.com>
285
286         * ld.texinfo: Document --verbose[=NUMBER].
287
288         * lexsup.c (ld_options): Update --verbose.
289         (parse_args): Set report_plugin_symbols.
290
291         * plugin.c (report_plugin_symbols): New.
292         (get_symbols): Report plugin symbols if report_plugin_symbols
293         is TRUE.
294
295         * plugin.h (report_plugin_symbols): New.
296
297 2011-03-01  H.J. Lu  <hongjiu.lu@intel.com>
298
299         PR ld/12529
300         * testplug.c: Don't include "filenames.h".
301         (onclaim_file): Don't use filename_cmp.
302
303 2011-02-28  Kai Tietz  <kai.tietz@onevision.com>
304
305         * emultempl/beos.em (sort_by_file_name): Use filename_(n)cmp.
306         * emultempl/elf32.em (gld${EMULATION_NAME}_vercheck):
307         Likewise.
308         (gld${EMULATION_NAME}_stat_needed): Likewise.
309         (gld${EMULATION_NAME}_check_needed): Likewise.
310         * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Likewise.
311         (gld_${EMULATION_NAME}_unrecognized_file): Likewise.
312         * emultempl/pep.em (gld_${EMULATION_NAME}_after_open): Likewise.
313         (gld_${EMULATION_NAME}_unrecognized_file): Likewise.
314         * ldfile.c (ldfile_open_file): Likewise.
315         * ldlang.c (wild_sort): Likewise.
316         (lookup_name): Likewise.
317         (check_excluded_libs): Likewise.
318         * ldmisc.c (vfinfo): Likewise.
319         * pe-dll.c (libnamencmp): Likewise.
320         (auto_export): Likewise.
321         (pe_dll_generate_implib): Likewise.
322         * testplug.c (onclaim_file): Likewise.
323
324 2011-02-24  H.J. Lu  <hongjiu.lu@intel.com>
325
326         PR ld/12507
327         * plugin.c (get_symbols): Don't check entry symbol here.
328         (init_non_ironly_hash): Add entry_symbol chain into
329         non_ironly_hash.
330
331 2011-02-24  H.J. Lu  <hongjiu.lu@intel.com>
332
333         PR ld/12507
334         * plugin.c (get_symbols): Don't mark entry symbol IR only.
335
336 2011-02-18  John David Anglin  <dave.anglin@nrc-cnnrc.gc.ca>
337
338         PR ld/12376
339         emulparams/hppalinux.sh (DATA_ADDR): Define.
340         (SHLIB_DATA_ADDR): Likewise.
341
342 2011-02-16  H.J. Lu  <hongjiu.lu@intel.com>
343
344         * emulparams/elf32_x86_64.sh (LIBPATH_SUFFIX): Changed to
345         x32 for x32.
346
347 2011-02-15  Kai Tietz  <kai.tietz@onevision.com>
348
349         * pe-dll.c (process_def_file_and_drectve): Don't strip
350         leading underscore from symbol by calling bfd_find_version_for_sym.
351
352 2011-02-14  Mike Frysinger  <vapier@gentoo.org>
353
354         * ldlang.c (lang_vers_match): Declare a new c_sym, assign it to
355         the bfd_demangle of sym, change users of sym to c_sym when not
356         already demangling, and free when done.  Change callers of
357         cplus_demangle to bfd_demangle.
358
359 2011-02-14  Alan Modra  <amodra@gmail.com>
360
361         * plugin.c (plugin_get_ir_dummy_bfd): Set SEC_EXCLUDE on dummy
362         .text section, use newer bfd_make_section variant.  Error handling.
363         Correct setting of gp size.
364         (asymbol_from_plugin_symbol): Properly cast last arg of concat.
365         (message): Likewise for ACONCAT.
366         (get_symbols): Formatting.
367
368 2011-02-14  Alan Modra  <amodra@gmail.com>
369
370         * ldmain.c (remove_output): Rename to..
371         (ld_cleanup): ..this. Call bfd_cache_close_all and plugin_call_cleanup.
372         (main): Adjust.
373         * plugin.c (plugin_call_cleanup): Make global.
374         (plugin_load_plugins): Don't register plugin_call_cleanup with xatexit.
375         * plugin.h (plugin_call_cleanup): Declare.
376
377 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
378
379         * configure: Regenerate.
380
381 2011-02-10  Alan Modra  <amodra@gmail.com>
382
383         * scripttempl/armbpabi.sc: Revert 2010-11-02  H.J. Lu.
384         * scripttempl/avr.sc: Likewise.
385         * scripttempl/elf32cr16.sc: Likewise.
386         * scripttempl/elf32crx.sc: Likewise.
387         * scripttempl/elf32msp430.sc: Likewise.
388         * scripttempl/elf32msp430_3.sc: Likewise.
389         * scripttempl/elf32sh-symbian.sc: Likewise.
390         * scripttempl/elf64hppa.sc: Likewise.
391         * scripttempl/elf_chaos.sc: Likewise.
392         * scripttempl/elfd10v.sc: Likewise.
393         * scripttempl/elfd30v.sc: Likewise.
394         * scripttempl/elfi370.sc: Likewise.
395         * scripttempl/elfm68hc11.sc: Likewise.
396         * scripttempl/elfm68hc12.sc: Likewise.
397         * scripttempl/elfxtensa.sc: Likewise.
398         * scripttempl/ip2k.sc: Likewise.
399         * scripttempl/iq2000.sc: Likewise.
400         * scripttempl/mep.sc: Likewise.
401         * scripttempl/mmo.sc: Likewise.
402         * scripttempl/v850.sc: Likewise.
403         * scripttempl/xstormy16.sc: Likewise.
404         * scripttempl/elf.sc: Revert 2010-10-29  H.J. Lu.
405
406 2011-01-22  H.J. Lu  <hongjiu.lu@intel.com>
407
408         * Makefile.am (CXX): Removed.
409
410         * configure.in: Add AC_PROG_CXX.
411
412         * Makefile.in: Regenerated.
413         * configure: Likewise.
414
415 2011-01-22  Richard Sandiford  <rdsandiford@googlemail.com>
416
417         * plugin.c (plugin_get_ir_dummy_bfd): Copy across the bfd's
418         private data and GP size.
419
420 2011-01-21  Alan Modra  <amodra@gmail.com>
421
422         * ldexp.c (fold_binary): Set result section for arithmetic and
423         logical operations to NULL when both operands are in same section.
424         * ld.texinfo (Expression Section): Describe this.
425
426 2011-01-14  Alan Modra  <amodra@gmail.com>
427
428         * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
429         attempt to put non-alloc orphans before debug sections, just place
430         them after .comment.
431
432 2011-01-14  J. Park  <grassman@gmail.com>
433
434         PR ld/12339
435         * ldlang.c (sort_def_symbol): Handle bfd_link_hash_warning symbols.
436
437 2011-01-14  Alan Modra  <amodra@gmail.com>
438
439         * Makefile.am: Sort emulation rules.
440         (eelf32am33lin.c): Delete.
441         (ALL_EMULATION_SOURCES): Sort, add missing entries.
442         (ALL_64_EMULATION_SOURCES): Likewise.
443         * Makefile.in: Regenerate.
444
445 2011-01-13  Alan Modra  <amodra@gmail.com>
446
447         PR ld/12356
448         * ld.texinfo (Miscellaneous Commands): Describe LD_FEATURE.
449         (Expression Section): Update.
450         * ld.h (ld_config_type): Add sane_expr.
451         * ldgram.y (ifile_p1): Add LD_FEATURE.
452         * ldlex.l (LD_FEATYRE): New.
453         * ldemul.c (after_parse_default): Delete code handling ld_compatibility.
454         * ldexp.h (struct ldexp_control): Delete uses_defined.
455         * ldexp.c: Remove all uses of uses_defined.
456         (fold_name): Test config.sane_expr rather than ld_compatibility.
457         (exp_fold_tree_1): Likewise.  Adjust handling of assignments
458         during first phase.
459         * ldlang.h (ld_compatibility): Delete.
460         (lang_ld_feature): Declare.
461         * ldlang.c (ld_compatibility): Delete.
462         (open_input_bfds): Only handle assignments for --defsym.
463         (lang_ld_feature): New function.
464
465         PR ld/12356
466         * ldexp.h (exp_assop): Delete.
467         (exp_assign, exp_defsym): Declare.
468         * ldexp.c (exp_assop): Make static, handle all assignment variations.
469         (exp_assign, exp_defsym): New functions.
470         (exp_provide): Use exp_assop.
471         * ldgram.y (defsym_expr): Use exp_defsym.
472         * ldctor.c, * ldgram.y, * ldlang.c, * mri.c, * emultempl/beos.em,
473         * emultempl/pe.em, * emultempl/pep.em, * emultempl/spuelf.em,
474         * emultempl/xtensaelf.em: Update exp_assop -> exp_assign.
475
476 2011-01-12  Alan Modra  <amodra@gmail.com>
477
478         PR ld/12380
479         * ldexp.h (enum phase_enum): Comment.  Add exp_dataseg_done.
480         * ldexp.c (fold_unary <DATA_SEGMENT_END>): Rearrange code.  Test
481         for exp_dataseg_done rather than expld.phase == lang_final_phase_enum
482         to detect when we've finished sizing sections.
483         (fold_binary <DATA_SEGMENT_ALIGN>): Likewise.
484         (fold_binary <DATA_SEGMENT_RELRO_END>): Likewise.  Also test
485         that we are not inside an output section statement.
486         * ldlang.c (lang_size_sections): Set exp_dataseg_done on exit if
487         not exp_dataseg_relro_adjust or exp_dataseg_adjust.  Don't set
488         lang_final_phase_enum here.
489         (lang_process): Set lang_final_phase_enum here.
490
491 2011-01-10  Nick Clifton  <nickc@redhat.com>
492
493         * po/da.po: Updated Danish translation.
494
495 2011-01-10  H.J. Lu  <hongjiu.lu@intel.com>
496
497         * ldlang.c (startup_file): Removed.
498         (lang_startup): Updated.
499
500 2011-01-05  H.J. Lu  <hongjiu.lu@intel.com>
501
502         PR ld/12364
503         * plugin.c (get_symbols): Check if owner_sec->owner is NULL
504         before accessing its flags field.
505
506 2011-01-01  H.J. Lu  <hongjiu.lu@intel.com>
507
508         * ldver.c (ldversion): Update copyright to 2011.
509
510 For older changes see ChangeLog-2010
511 \f
512 Local Variables:
513 mode: change-log
514 left-margin: 8
515 fill-column: 74
516 version-control: never
517 End: