PR 14072
[external/binutils.git] / ld / ChangeLog
1 2012-05-17  Daniel Richard G.  <skunk@iskunk.org>
2             Nick Clifton  <nickc@redhat.com>
3
4         PR 14072
5         * configure.in: Add check that sysdep.h has been included before
6         any system header files.
7         * configure: Regenerate.
8         * config.in: Regenerate.
9         * sysdep.h: Generate an error if included before config.h.
10
11 2012-05-16  Sergio Durigan Junior  <sergiodj@redhat.com>
12
13         * emultempl/m68hc1xelf.em (hook_in_stub): Pass proper `bfd'
14         as the first argument for `bfd_get_section_name'.
15
16 2012-05-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>
17
18         PR ld/14069
19         * emultempl/elf32.em: Include *-*-gnu* targets in ld.so.conf
20         support.
21
22 2012-05-15  James Murray <jsm@jsm-net.demon.co.uk>
23
24         * NEWS: Mention the support for S12X processors.
25
26 2012-05-14  James Lemke  <jwlemke@codesourcery.com>
27
28         * ldlang.c (walk_wild_consider_section): Don't copy section_flag_list.
29         Pass it to callback.
30         (walk_wild_section_general): Pass section_flag_list to callback.
31         (lang_add_section): Add sflag_list parm.
32         Move out logic to keep / omit a section & call bfd_lookup_section_flags.
33         (output_section_callback_fast): Add sflag_list parm.
34         Add new parm to lang_add_section calls.
35         (output_section_callback): Likewise.
36         (check_section_callback): Add sflag_list parm.
37         (lang_place_orphans): Add new parm to lang_add_section calls.
38         (gc_section_callback): Add sflag_list parm.
39         (find_relro_section_callback): Likewise.
40         * ldlang.h (callback_t): Add flag_info parm.
41         (lang_add_section): Add sflag_list parm.
42         * emultempl/armelf.em (elf32_arm_add_stub_section):
43         Add lang_add_section parm.
44         * emultempl/beos.em (gld*_place_orphan): Likewise.
45         * emultempl/elf32.em (gld*_place_orphan): Likewise.
46         * emultempl/hppaelf.em (hppaelf_add_stub_section): Likewise.
47         * emultempl/m68hc1xelf.em (m68hc11elf_add_stub_section): Likewise.
48         * emultempl/mipself.em (mips_add_stub_section): Likewise.
49         * emultempl/mmo.em (mmo_place_orphan): Likewise.
50         * emultempl/pe.em (gld_*_place_orphan): Likewise.
51         * emultempl/pep.em (gld_*_place_orphan): Likewise.
52         * emultempl/ppc64elf.em (ppc_add_stub_section): Likewise.
53         * emultempl/spuelf.em (spu_place_special_section): Likewise.
54         * emultempl/vms.em (vms_place_orphan): Likewise.
55
56 2012-05-14  Catherine Moore  <clm@codesourcery.com>
57
58         * NEWS:  Mention PowerPC VLE port.
59
60 2012-05-11  Daniel Richard G.  <skunk@iskunk.org>
61
62         PR binutils/14028
63         * configure.in: Invoke ACX_HEADER_STRING.
64         * configure: Regenerate.
65         * config.in: Regenerate.
66         * sysdep.h: If STRINGS_WITH_STRING is defined then include both
67         string.h and strings.h.
68
69 2012-05-08  Alan Modra  <amodra@gmail.com>
70
71         * Makefile.am (check_DEJAGNU): Export LC_ALL=C in place of other
72         LC and LANG environment vars.
73         * Makefile.in: Regenerate.
74
75 2012-05-07  Tristan Gingold  <gingold@adacore.com>
76
77         * pe-dll.c (udef_table): Make it static.
78
79 2012-05-05  Alan Modra  <amodra@gmail.com>
80
81         * pe-dll.c (process_def_file_and_drectve): Use bfd_und_section_ptr.
82         (generate_reloc): Use bfd_abs_section_ptr.
83
84 2012-05-04  H.J. Lu  <hongjiu.lu@intel.com>
85
86         * configure.tgt: Support x86_64-*-linux-gnux32.
87
88 2012-05-03  Sean Keys  <skeys@ipdatasys.com>
89
90         * Makefile.am (ALL_EMULATIONS): Added new emulation for XGATE
91         and XGATE (elf).
92         * Makefile.in: Rebuild.
93         * configure.tgt: Recognize XGATE.
94         * scripttempl/elfxgate.sc: New file, mostly cloned from m68hc12.
95         * emulparams/xgateelf: New emulation, mostly cloned from m68hc12.
96         * NEWS: Mention new support.
97
98 2012-04-26  Hans-Peter Nilsson  <hp@axis.com>
99
100         Make bfd asserts cause linker errors.
101         * ldmain.c (default_bfd_assert_handler): New variable.
102         (ld_bfd_assert_handler): New function.
103         (main): Call bfd_set_assert_handler.
104
105 2012-04-24  Alan Modra  <amodra@gmail.com>
106
107         * ldlang.c (size_input_section): Use sec_info_type rather than
108         usrdata->flags.just_syms.
109         * ldwrite.c (build_link_order): Likewise.
110         * emultempl/hppaelf.em (build_section_lists): Likewise.
111         * emultempl/ppc64elf.em (build_toc_list): Likewise.
112         * emultempl/armelf.em (build_section_lists): Likewise.
113         (after_allocation): Update for renamed sec_info_type value.
114         * emultempl/tic6xdsbt.em: Likewise.
115
116 2012-04-12  Roland McGrath  <mcgrathr@google.com>
117
118         * configure.tgt (arm*-*-nacl*, arm*b-*-nacl*): Handle them.
119         * emulparams/armelf_nacl.sh: New file.
120         * emulparams/armelfb_nacl.sh: New file.
121         * Makefile.am (ALL_EMULATION_SOURCES): Add earmelf_nacl.c
122         and earmelfb_nacl.c here.
123         (earmelf_nacl.c, earmelfb_nacl.c): New targets.
124         * Makefile.in: Regenerated.
125
126 2012-04-11  Tristan Gingold  <gingold@adacore.com>
127
128         * scripttempl/ia64vms.sc: New file.
129         * emultempl/vms.em (_before_parse): Support for ia64.
130         (elf64-ia64-vms): New fragment for ia64.
131         * emulparams/elf64_ia64_vms.sh: New file.
132         * configure.tgt (ia64-*-*vms*): Add.
133         * Makefile.am (ALL_64_EMULATION_SOURCES): Add eelf64_ia64_vms.c
134         (eelf64_ia64_vms.c): New rule.
135         * Makefile.in: Regenerate.
136
137 2012-04-06  Roland McGrath  <mcgrathr@google.com>
138
139         * configure.in (AC_CHECK_HEADERS): Add locale.h.
140         * config.in: Regenerate.
141         * configure: Regenerate.
142
143 2012-04-05  Nick Clifton  <nickc@redhat.com>
144
145         * configure.in (AC_CHECK_FUNCS): Add setlocale.
146         (AM_LC_MESSAGES): Add.
147         * aclocal.m4: Regenerate.
148         * config.in: Regenerate.
149         * configure: Regenerate.
150
151 2012-04-03  Roland McGrath  <mcgrathr@google.com>
152
153         * configure.tgt (i[3-7]86-*-nacl*, x86_64-*-nacl*): Handle them.
154         * emulparams/elf_nacl.sh: New file.
155         * emulparams/elf_i386_nacl.sh: New file.
156         * emulparams/elf32_x86_64_nacl.sh: New file.
157         * emulparams/elf_x86_64_nacl.sh: New file.
158         * Makefile.am (ALL_EMULATION_SOURCES): Add eelf_i386_nacl.c here.
159         (ALL_64_EMULATION_SOURCES): Add eelf32_x86_64_nacl.c and
160         eelf_x86_64_nacl.c here.
161         (eelf_i386_nacl.c, eelf32_x86_64_nacl.c, eelf_x86_64_nacl.c):
162         New targets.
163         * Makefile.in: Regenerated.
164
165         * scripttempl/elf.sc: Handle SEPARATE_CODE cases.
166
167 2012-04-02  Mike Frysinger  <vapier@gentoo.org>
168
169         * ldmisc.c (vfinfo): Assign new local str to fmt.  Delete
170         putc call.  If str and fmt are different, call fwrite on
171         the difference.
172
173 2012-03-30  Nick Clifton  <nickc@redhat.com>
174
175         * po/vi.po: Updated Vietnamese translation.
176
177 2012-03-27  Roland McGrath  <mcgrathr@google.com>
178
179         * configure.in: Set want64 on a 64-bit host regardless of
180         --enable-targets=all.
181         * configure: Regenerated.
182
183 2012-03-26  Tristan Gingold  <gingold@adacore.com>
184
185         * lexsup.c (parse_args): Add a missing '\n'.
186
187 2012-03-25  Alan Modra  <amodra@gmail.com>
188
189         * ldemul.c (before_allocation_default): Revert last change.
190         * ldlang.c (lang_add_section): Likewise.
191         (strip_excluded_output_sections): Don't strip output sections with
192         user input sections when emitrelocations, unless all are SEC_EXCLUDE.
193
194 2012-03-23  Alan Modra  <amodra@gmail.com>
195
196         * ldemul.c (before_allocation_default): When emitrelocations,
197         don't strip sections..
198         * ldlang.c (lang_add_section): ..and don't set up map_head, map_tail.
199
200 2012-03-14  Kai Tietz  <ktietz@redhat.com>
201             Pascal Obry  <pascal@obry.net>
202
203         * pe-dll.c (found_sym): New static variable.
204         (undef_count): Likewise.
205         (key_value): New structure.
206         (undef_sort_cmp): Compare routine for qsort/bsearch.
207         (pe_find_cdecl_alias_match): Add new argument.
208         (pe_undef_alias_cdecl_match): Removed.
209         (pe_undef_count): New helper routine.
210         (pe_create_undef_table): Likewise.
211         (pe_process_import_defs): Use pe_create_undef_table and
212         new pe_undef_alias_cdecl_match function.
213
214 2012-03-14  Alan Modra  <amodra@gmail.com>
215
216         PR ld/13839
217         * ldexp.c (fold_name): Ignore undefined symbols when assigning to
218         dot in mark phase.
219         (exp_fold_tree_1): Evaluate assignment to dot expressions even when
220         discarding result, for side effects.  Fix typo in error message.
221
222 2012-03-08  Tristan Gingold  <gingold@adacore.com>
223
224         * ldexp.c (exp_print_tree): Special case for SEGMENT_START.
225         (exp_print_token): Constify.
226
227 2012-03-08  Alan Modra  <amodra@gmail.com>
228
229         PR ld/10340
230         * ldfile.c (is_sysrooted_pathname): Remove notsame param.
231         (ldfile_add_library_path): Don't set sysrooted flag.
232         (ldfile_open_file_search): Likewise, and don't copy them.
233         (try_open): Delete exten and code handling such.  Add sysrooted
234         param and return whether path is in sysroot.
235         (ldfile_find_command_file): Delete extend param.  Add sysrooted
236         param.  Rename local var.  Update try_open calls.
237         (ldfile_open_command_file_1): Pass sysrooted to lex_push_file.
238         * ldfile.h (search_dirs_type): Remove sysrooted field.
239         * ldlang.c (new_afile): Always set sysrooted from input_flags.
240         (load_symbols): Don't set input_flags.sysrooted.
241         * ldlang.h (struct lang_input_statement_flags): Revise sysrooted
242         comment.
243         * ldlex.h (lex_push_file): Update prototype.
244         * ldlex.l (sysrooted_stack): New array.
245         (EOF): Pop input_flags.sysrooted.
246         (lex_push_file): Add sysrooted param.  Save and set
247         input_flags.sysrooted.
248
249 2012-03-06  Alan Modra  <amodra@gmail.com>
250
251         * ldlang.h (struct lang_input_statement_flags): New, extract from..
252         (lang_input_statement_type): ..here.  New field "flags".
253         (input_flags): Declare.
254         (missing_file): Delete.
255         * ldmain.h (whole_archive): Delete.
256         (add_DT_NEEDED_for_regular, add_DT_NEEDED_for_dynamic): Delete.
257         * ld.h (ld_config_type <dynamic_link>): Delete.
258         * ldmain.c (whole_archive): Delete.
259         (add_DT_NEEDED_for_regular, add_DT_NEEDED_for_dynamic): Delete.
260         * ldlang.c (missing_file, ldlang_sysrooted_script): Delete.
261         (input_flags): New variable.  Replace all uses of config.dynamic_link,
262         missing_file, ldlang_sysrooted_script, whole_archive,
263         add_DT_NEEDED_for_regular and add_DT_NEEDED_for_dynamic with fields
264         from here.
265         * ldfile.c: Likewise.
266         * ldgram.y: Likewise.
267         * ldmain.c: Likewise.
268         * ldwrite.c: Likewise.
269         * lexsup.c: Likewise.
270         * plugin.c: Likewise.
271         * emultempl/aix.em: Likewise.
272         * emultempl/armelf.em: Likewise.
273         * emultempl/elf32.em: Likewise.
274         * emultempl/hppaelf.em: Likewise.
275         * emultempl/linux.em: Likewise.
276         * emultempl/pe.em: Likewise.
277         * emultempl/pep.em: Likewise.
278         * emultempl/ppc64elf.em: Likewise.
279         * emultempl/scoreelf.em: Likewise.
280         * emultempl/spuelf.em: Likewise.
281         * emultempl/sunos.em: Likewise.
282         * emultempl/vms.em: Likewise.
283         * ldlang.c (new_afile): Use memset to init zero fields.
284         (load_symbols): Simplify save and restore of flags around command
285         file processing.
286         * ldfile.c (is_sysrooted_pathname): Tidy.
287
288 2012-03-05  Hans-Peter Nilsson  <hp@axis.com>
289
290         * configure.tgt (mips64*el-*-freebsd*, mips64*-*-freebsd*)
291         (mips*el-*-freebsd*, mips*-*-freebsd*): Correct triplets by
292         replacing trailing "-*" with "*".
293
294 2012-02-25  Walter Lee  <walt@tilera.com>
295
296         * Makefile.am (ALL_EMULATION_SOURCES): Add eelf32tilegx_be.c.
297         (ALL_64_EMULATION_SOURCES): Add eelf64tilegx_be.c.
298         (eelf32tilegx_be.c): Add rule to build this file.
299         (eelf64tilegx_be.c): Ditto.
300         * Makefile.in: Regenerate.
301         * configure.tgt (tilegx-*-*): Support big endian.
302         (tilegxbe-*-*): New.
303         * emulparams/elf32tilegx.sh (OUTPUT_FORMAT): Rename.
304         (BIG_OUTPUT_FORMAT): Define.
305         (LITTLE_OUTPUT_FORMAT): Define.
306         * emulparams/elf32tilegx_be.sh: New.
307         * emulparams/elf64tilegx.sh (OUTPUT_FORMAT): Rename.
308         (BIG_OUTPUT_FORMAT): Define.
309         (LITTLE_OUTPUT_FORMAT): Define.
310         * emulparams/elf64tilegx_be.sh: New.
311
312 2012-02-24  Kai Tietz  <ktietz@redhat.com>
313
314         PR binutils/13710
315         * deffilep.y (keyword_as_name): Disable LIBRARY
316         keyword.
317
318 2012-02-22  Alan Modra  <amodra@gmail.com>
319
320         PR ld/13683
321         * ldlang.c (lang_process): Rerun lang_do_assignments before
322         starting garbage collection.
323         * ldexp.c (fold_name): Generate a reloc for defined symbols
324         found without an associated output section during the mark phase.
325         (exp_fold_tree_1): Continue processing an expression, even if we
326         are unable to fold it, if we are in the first two evaluation
327         phases.
328         * ldexp.h (enum lang_phase_type): Add descriptions of the phases.
329
330 2012-02-19  Kai Tietz  <ktietz@redhat.com>
331
332         * deffilep.y (cmp_import_elem): Sort first by module name.
333         * pe-dll.c (process_def_file_and_drectve): Free strings
334         from removed export-element.
335         (add_bfd_to_link): Optimize loop on import-elements and lower
336         allocated memory.
337         (pe_implied_import_dll): Pass NULL instead of 0 for pointer
338         argument.
339
340 2012-02-18  Hans-Peter Nilsson  <hp@axis.com>
341
342         * ldmisc.c (vfinfo <%S>): Use same type and avoid cast for
343         temporary variable node used for NULL argument.
344
345 2012-02-18  Alan Modra  <amodra@gmail.com>
346
347         PR ld/13343
348         * ld.h (parsing_defsym): Delete.
349         * ldexp.c (exp_intop, exp_bigintop, exp_relop): Set type.filename.
350         (fold_binary, fold_name, exp_fold_tree_1, exp_get_vma, exp_get_fill,
351         exp_get_abs_int): Add tree arg for %S in error messages.  Don't
352         fudge lineno.
353         (exp_binop, exp_unop, exp_nameop, exp_assop, exp_assert): Copy
354         type.filename from sub-tree.
355         (exp_trinop): Likewise, and use "cond" rather than "lhs".
356         * ldexp.h (node_type): Add filename field to struct.
357         * ldfile.c (ldfile_input_filename): Delete.  Remove all refs.
358         * ldfile.h (ldfile_input_filename): Delete.
359         * ldgram.y (phdr_type, phdr_qualifiers, yyerror): Add NULL arg for
360         %S in error messages.
361         * ldemul.c (syslib_default, hll_default): Likewise.
362         * ldlang.c (lang_memory_region_lookup, lang_memory_region_alias,
363         lang_get_regions, lang_new_phdr): Likewise.
364         (lang_size_sections_1): Pass addr_tree for %S.
365         * ldlex.h (lex_redirect): Update prototype.
366         (ldlex_filename): Declare.
367         * ldlex.l (<EOF>): Don't set ldfile_input_filename.
368         (lex_redirect): Add fake_filename and count params.  Push
369         fake_filename to file_name_stack and init lineno from count.
370         (ldlex_filename): New function.
371         (lex_warn_invalid): Use above.
372         * ldmain.c (main): Update lex_redirect call.
373         * ldmisc.c (vfinfo <%S>): Take file name and line number from
374         etree_type arg, or use current if arg is NULL.
375         * lexsup.c (parsing_defsym): Delete.
376         (parse_args <OPTION_DEFSYM>): Update lex_redirect call.
377
378 2012-02-13  Kai Tietz  <ktietz@redhat.com>
379
380         * deffilep.y (find_export_in_list): Set is_indent for
381         first or last element, if identical.
382         (find_import_in_list): Likewise.
383
384 2012-02-11  Kai Tietz  <ktietz@redhat.com>
385
386         * deffilep.y (%union): New type id_const.
387         (opt_name2): New rule.
388         (keyword_as_name): New rule.
389         (dot_name): Replaced by opt_name2 rule.
390         (opt_name): Adjust rule.
391         (opt_equal_name): Likewise.
392
393 2012-02-11  Pascal Obry  <pascal@obry.net>
394
395         * pe-dll.c (auto_export): Use bsearch to speed up scan of exports
396         table.
397         (process_def_file_and_drectve): Maintain sorting of exports table
398         after stripping leading @ signs.
399
400 2012-02-09  Alan Modra  <amodra@gmail.com>
401
402         * ldgram.y (input_section_spec_no_keep): Don't ignore sect_flags.
403
404 2012-01-31  H.J. Lu  <hongjiu.lu@intel.com>
405
406         PR ld/13616
407         * emulparams/elf32_x86_64.sh: Remove NOP.
408         * emulparams/elf_i386.sh: Likewise.
409         * emulparams/elf_i386_be.sh: Likewise.
410         * emulparams/elf_i386_ldso.sh: Likewise.
411         * emulparams/elf_i386_vxworks.sh: Likewise.
412         * emulparams/elf_k1om.sh: Likewise.
413         * emulparams/elf_l1om.sh: Likewise.
414         * emulparams/elf_x86_64.sh: Likewise.
415
416         * ldlang.c (zero_fill): Initialized to 0.
417
418         * ldwrite.c (build_link_order): Set data size to linker odrder
419         size when they are the same.
420
421         * scripttempl/elf.sc: Don't specify fill if NOP is undefined.
422
423 2012-01-17  Alan Modra  <amodra@gmail.com>
424
425         * ldver.c (ldversion): Update copyright message year.
426
427 2012-01-15  Alan Modra  <amodra@gmail.com>
428
429         PR ld/12758
430         * ldlang.c (lang_process): Don't reopen all files, just those
431         newly added by plugin.
432
433 2012-01-11  Alan Modra  <amodra@gmail.com>
434
435         * emultempl/ppc64elf.em (PARSE_AND_LIST_PROLOGUE,
436         PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS,
437         PARSE_AND_LIST_ARGS_CASES): Handle --{no-,}plt-thread-safe and
438         --{no-,}plt-align.
439         (plt_thread_safe, plt_stub_align): New vars.
440         (gld${EMULATION_NAME}_after_allocation): Pass them to
441         ppc64_elf_size_stubs.  Align stub sections according to plt_stub_align.
442         * ld.texinfo: Document new command line options, and an old
443         undocumented option.
444
445 2012-01-09  Roland McGrath  <mcgrathr@google.com>
446
447         * configure.in: Use AM_ZLIB.
448         * configure: Regenerated.
449
450 For older changes see ChangeLog-2011
451 \f
452 Local Variables:
453 mode: change-log
454 left-margin: 8
455 fill-column: 74
456 version-control: never
457 End: