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