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