* configure.tgt (powerpc-*-elf, et al): Define targ_extra_libpath.
[external/binutils.git] / ld / ChangeLog
1 2012-09-10  Iain Sandoe  <iain@codesourcery.com>
2             Alan Modra  <amodra@gmail.com>
3
4         * configure.tgt (powerpc-*-elf, et al): Define targ_extra_libpath.
5         Correct whitespace.
6         (powerpcle-*-elf, et al): Likewise.  Correct targ_extra_emuls.
7
8 2012-09-10  Iain Sandoe  <iain@codesourcery.com>
9
10         * configure.tgt (powerpc-*-elf, et al): Define targ64_extra_emuls
11         and targ64_extra_libpath.
12         (powerpcle-*-elf, et al): Likewise.
13
14 2012-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
15
16         * emultempl/mmo.em (mmo_place_orphan): Rewrite to also attach
17         orphan sections to .data and .bss output sections, not just .text.
18         When giving up on finding a suitable output section, attach to any
19         output section other than .MMIX.reg_contents, if it exists.
20         * scripttempl/mmo.sc: Move output debug sections to just before
21         .MMIX.reg_contents.  Add .gnu.attributes.  Add new . = . NOP
22         assignments and move end-of-section provide-symbols after them
23         to force the end-of-section symbols to the address after orphan
24         placement.  Add SORT_NONE to .init and .fini sections.
25
26 2012-08-30  H.J. Lu  <hongjiu.lu@intel.com>
27
28         PR ld/14525
29         * scripttempl/elf.sc: Also provide __executable_start for PIE.
30
31 2012-08-17  Kai Tietz  <ktietz@redhat.com>
32
33         PR ld/14326
34         * scripttempl/pe.sc: Add _etext symbol.
35
36 2012-08-14  Nick Clifton  <nickc@redhat.com>
37
38         * configure.in (ALL_LINGUGAS): Add uk.
39         * configure: Regenerate.
40         * po/uk.po: New Ukranian translation.
41
42 2012-08-13  Ian Bolton  <ian.bolton@arm.com>
43             Laurent Desnogues  <laurent.desnogues@arm.com>
44             Jim MacArthur  <jim.macarthur@arm.com>
45             Marcus Shawcroft  <marcus.shawcroft@arm.com>
46             Nigel Stephens  <nigel.stephens@arm.com>
47             Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
48             Richard Earnshaw  <rearnsha@arm.com>
49             Sofiane Naci  <sofiane.naci@arm.com>
50             Tejas Belagod  <tejas.belagod@arm.com>
51             Yufeng Zhang  <yufeng.zhang@arm.com>
52
53         * Makefile.am: Add AArch64.
54         * Makefile.in: Regenerate.
55         * configure.tgt: Add AArch64.
56         * emulparams/aarch64elf.sh: New file.
57         * emulparams/aarch64elfb.sh: New file.
58         * emulparams/aarch64linux.sh: New file.
59         * emulparams/aarch64linuxb.sh: New file.
60         * emultempl/aarch64elf.em: New file.
61         * NEWS: Mention the new feature.
62
63 2012-08-09  Nick Clifton  <nickc@redhat.com>
64
65         * po/vi.po: Updated Vietnamese translation.
66
67 2012-08-07  Daniel Green  <venix1@gmail.com>
68
69         * scripttempl/pe.sc (R_TLS): Add .tls$AAA and .tls$ZZZ.
70         * scripttempl/pep.sc (R_TLS): Add .tls$AAA and .tls$ZZZ.
71
72 2012-08-07  Nick Clifton  <nickc@redhat.com>
73
74         * po/ja.po: Updated Japanese translation.
75
76 2012-08-06  Maciej W. Rozycki  <macro@codesourcery.com>
77
78         * emulparams/elf32bmip.sh: Make _gp hidden.
79         * emulparams/elf32bmipn32-defs.sh: Likewise.
80         * emulparams/elf32mipswindiss.sh: Likewise.
81         * scripttempl/mips.sc: Likewise.
82
83 2012-08-06  Maciej W. Rozycki  <macro@codesourcery.com>
84
85         * ldexp.h (etree_union): Add defsym member to the assign member
86         structure.
87         (exp_assign): Add hidden argument to prototype.
88         * ldexp.c (exp_fold_tree_1): Use the defsym member to handle
89         --defsym symbols.
90         (exp_assop): Add defsym argument, initialize the defsym member
91         of the assign structure.
92         (exp_assign): Handle hidden symbols.
93         (exp_defsym): Update to use the defsym argument to exp_assop.
94         (exp_provide): Update to handle the defsym argument to exp_assop.
95         * ldlex.l (HIDDEN): New token.
96         * ldgram.y (HIDDEN): Likewise.
97         (assignment, section): Update calls to exp_assign.
98         * ldctor.c (ldctor_build_sets): Likewise.
99         * mri.c (mri_format): Likewise.
100         * ldlang.c (lang_insert_orphan, lang_leave_overlay): Likewise.
101         (open_input_bfds): Remove --defsym symbols special case.
102         * emultempl/beos.em (gld_${EMULATION_NAME}_set_symbols): Update
103         call to exp_assign.
104         * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Likewise.
105         * emultempl/pep.em (gld_${EMULATION_NAME}_set_symbols): Likewise.
106         * emultempl/spuelf.em (spu_place_special_section): Likewise.
107         * emultempl/xtensaelf.em (ld_xtensa_insert_page_offsets):
108         Likewise.
109         * ld.texinfo (Assigning Values to Symbols): Add HIDDEN.
110         (HIDDEN): New subsection.
111
112 2012-07-31  H.J. Lu  <hongjiu.lu@intel.com>
113
114         PR ld/14156
115         * ldlang.c (wild_sort): Properly handle by_none.
116
117         * scripttempl/elf.sc: Add SORT_NONE to .init and .fini sections.
118         * scripttempl/elf32msp430.sc: Likewise.
119         * scripttempl/elf32msp430_3.sc: Likewise.
120         * scripttempl/elfd10v.sc: Likewise.
121         * scripttempl/elfd30v.sc: Likewise.
122         * scripttempl/elfxtensa.sc: Likewise.
123
124 2012-07-30  Nick Clifton  <nickc@redhat.com>
125
126         * po/ld.pot: Updated template.
127         * po/bg.po: Updated Bulgarian translation.
128         * po/es.po: Updated Spanish translation.
129         * po/fi.po: Updated Finnish translation.
130
131 2012-07-27  Mike Frysinger  <vapier@gentoo.org>
132
133         * configure.in (BFD_VERSION): Run bfd/configure --version and
134         parse the output of that.
135         * configure: Regenerate.
136
137 2012-07-27  Tristan Gingold  <gingold@adacore.com>
138
139         * NEWS: Add marker for 2.23.
140
141 2012-07-24  Jan Waclawek <konfera@efton.sk>
142
143         PR ld/14058
144         * emultempl/avrelf.em (avr_elf_after_allocation): Call
145         elf32_avr_size_stubs with is_prealloc_run as TRUE.
146
147 2012-07-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
148
149         * emulparams/elf_s390.sh (IREL_IN_PLT): Define.
150         * emulparams/elf64_s390.sh (IREL_IN_PLT): Define.
151
152 2012-07-13  Nick Clifton  <nickc@redhat.com>
153
154         PR ld/14357
155         * ldmain.c (trace_file_tries): Rename to 'verbose'.
156         * ldfile.c: Likewise.
157         * ldlang.c: Likewise.
158         * ldmain.h: Likewise.
159         * lexsup.c: Likewise.
160         * emultempl/elf32.em: Likewise.
161         * emultemp/spuelf.em: Likewise.
162         * pe-dll.c (pe_dll_generate_implib): Only print creation message
163         in verbose mode.
164
165 2012-07-10  H.J. Lu  <hongjiu.lu@intel.com>
166
167         PR ld/14156
168         * NEWS: Mention SORT_NONE.
169
170         * ld.h (sort_type): Add by_none.
171
172         * ld.texinfo: Document SORT_NONE.
173
174         * ldgram.y: Handle SORT_NONE.
175
176         * ldlang.c (update_wild_statements): Handle by_none.  Don't
177         sort .init/.fini sections.
178
179         * ldlex.l: Add SORT_NONE.
180
181 2012-07-02  H.J. Lu  <hongjiu.lu@intel.com>
182
183         * ld.texinfo: Replace __end_SECNAME with __stop_SECNAME.
184
185 2012-06-29  Nick Clifton  <nickc@redhat.com>
186
187         * scripttempl/alphavms.sc: Add .debug_macro section.
188         * scripttempl/elf.sc: Likewise.
189         * scripttempl/elf64hppa.sc: Likewise.
190         * scripttempl/elf_chaos.sc: Likewise.
191         * scripttempl/elfxtensa.sc: Likewise.
192         * scripttempl/ia64vms.sc: Likewise.
193
194         * scripttempl/armbpabi.sc: Add .debug_pubtypes, .debug_ranges and
195         .debug_macro sections.
196         * scripttempl/avr.sc: Likewise.
197         * scripttempl/elf32cr16.sc: Likewise.
198         * scripttempl/elf32crx.sc: Likewise.
199         * scripttempl/elf32msp430.sc: Likewise.
200         * scripttempl/elf32msp430_3.sc: Likewise.
201         * scripttempl/elf32sh-symbian.sc: Likewise.
202         * scripttempl/elfd30v.sc: Likewise.
203         * scripttempl/elfi370.sc: Likewise.
204         * scripttempl/elfm68hc11.sc: Likewise.
205         * scripttempl/elfm68hc12.sc: Likewise.
206         * scripttempl/elfxgate.sc: Likewise.
207         * scripttempl/i386beos.sc: Likewise.
208         * scripttempl/i386go32.sc: Likewise.
209         * scripttempl/ip2k.sc: Likewise.
210         * scripttempl/iq2000.sc: Likewise.
211         * scripttempl/mep.sc: Likewise.
212         * scripttempl/mmo.sc: Likewise.
213         * scripttempl/v850.sc: Likewise.
214         * scripttempl/xstormy16.sc: Likewise.
215
216 2012-06-28  H.J. Lu  <hongjiu.lu@intel.com>
217
218         * ldlang.c (update_wild_statements): Remove redundant statement.
219
220 2012-06-25  Alan Modra  <amodra@gmail.com>
221
222         * ldlang.c (load_symbols): Close file and set flags.loaded
223         after parsing script file.
224         (open_input_bfds): Don't segv on closed script.
225
226 2012-06-24  H.J. Lu  <hongjiu.lu@intel.com>
227
228         * configure.tgt: Enable elf_k1om for x86_64-*-linux-gnux32.
229         Remove x32 in tdir_i386linux and tdir_elf_i386.
230
231 2012-06-22  Roland McGrath  <mcgrathr@google.com>
232
233         * NEWS: Mention __ehdr_start.
234
235 2012-06-21  Alan Modra  <amodra@gmail.com>
236
237         * ldlang.c (lang_insert_orphan): Don't make __start_<sec> symbol
238         absolute, and remove unnecessary alignment.
239
240 2012-06-16  Alan Modra  <amodra@gmail.com>
241
242         * ldlang.h (lang_output_section_statement_type): Add after_end field.
243         (lang_abs_symbol_at_beginning_of, lang_abs_symbol_at_end_of): Delete.
244         (section_for_dot): Declare.
245         * ldlang.c (lang_size_sections_1): Correct comment.
246         (current_section): Move earlier.
247         (current_assign, prefer_next_section): New static vars.
248         (lang_do_assignments_1): Add found_end param.  Detect _end
249         assignment to set found_end.  Set os->after_end.  Set above statics.
250         (lang_do_assignments): Adjust lang_do_assignments_1 call.  Init
251         vars.
252         (section_for_dot): New function.
253         (lang_set_startof): Don't make an absolute symbol.
254         (lang_abs_symbol_at_beginning_of, lang_abs_symbol_at_end_of): Delete.
255         * ldexp.c (new_rel_from_abs): Use section_for_dot.
256         * emultempl/lnk960.em (symbol_at_beginning_of): New function.
257         (symbol_at_end_of): Likewise.
258         (lnk960_after_allocation): Use them.
259         * scripttempl/elf.sc: Precede OTHER_GOT_SYMBOLS with . = .; and
260         likewise before __bss_start.
261
262 2012-06-14  H.J. Lu  <hongjiu.lu@intel.com>
263
264         * plugin.c (set_tv_header): Handle link_info.pie.
265
266 2012-06-11  Alan Modra  <amodra@gmail.com>
267
268         PR ld/14215
269         * ldexp.c (fold_name <SIZEOF, ALIGNOF>): Allow forward section
270         references.
271         * emulparams/elf32_x86_64.sh (SEPARATE_GOTPLT): Depend on size of
272         .got.plt.
273         * emulparams/elf32mb_linux.sh (SEPARATE_GOTPLT): Likewise.
274         * emulparams/elf32tilegx.sh (SEPARATE_GOTPLT): Likewise.
275         * emulparams/elf32tilepro.sh (SEPARATE_GOTPLT): Likewise.
276         * emulparams/elf64tilegx.sh (SEPARATE_GOTPLT): Likewise.
277         * emulparams/elf_i386.sh (SEPARATE_GOTPLT): Likewise.
278         * emulparams/elf_k1om.sh (SEPARATE_GOTPLT): Likewise.
279         * emulparams/elf_l1om.sh (SEPARATE_GOTPLT): Likewise.
280         * emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Likewise.
281
282 2012-06-07  Georg-Johann Lay  <avr@gjlay.de>
283
284         PR 13697
285         * scripttempl/avr.sc (.data): Keep it.
286
287 2012-06-02  Andreas Schwab  <schwab@linux-m68k.org>
288
289         * Makefile.am (TEXINFO_TEX): Remove $(top_srcdir) prefix.
290         * Makefile.in: Regenerate.
291
292 2012-05-30  Alan Modra  <amodra@gmail.com>
293
294         * ldlang.h (lang_output_section_statement_type): Rename
295         "section_relative_symbol" field to "update_dot".
296         * ldlang.c: Update all uses.
297         (strip_excluded_output_sections): Don't test update_dot_tree here..
298         (lang_leave_overlay): ..set update_dot here.
299
300 2012-05-26  Alan Modra  <amodra@gmail.com>
301
302         * ldlex.h (enum option_values): Move from..
303         * lexsup.c: ..here.
304         * emultempl/ppc32elf.em: Include ldlex.h.
305         (PARSE_AND_LIST_ARGS_CASES): Disable optimisations when
306         --traditional-format.
307         * emultempl/ppc64elf.em: Likewise.
308
309 2012-05-25  Alan Modra  <amodra@gmail.com>
310
311         PR ld/13909
312         * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Handle
313         multiple .eh_frame sections attached to bfd.
314
315 2012-05-23  Cary Coutant  <ccoutant@google.com>
316
317         * scripttempl/armbpabi.sc: Match .data.rel.ro.* sections more
318         carefully.  Fix typo where .rela.data.rel.ro matches
319         .rel.data.rel.ro.
320         * scripttempl/mep.sc: Likewise.
321         * scripttempl/elf.sc: Match .data.rel.ro.* sections more carefully.
322         * scripttempl/elf64hppa.sc: Likewise.
323         * scripttempl/elfxtensa.sc: Likewise.
324
325 2012-05-17  Daniel Richard G.  <skunk@iskunk.org>
326             Nick Clifton  <nickc@redhat.com>
327
328         PR 14072
329         * configure.in: Add check that sysdep.h has been included before
330         any system header files.
331         * configure: Regenerate.
332         * config.in: Regenerate.
333         * sysdep.h: Generate an error if included before config.h.
334
335 2012-05-16  Sergio Durigan Junior  <sergiodj@redhat.com>
336
337         * emultempl/m68hc1xelf.em (hook_in_stub): Pass proper `bfd'
338         as the first argument for `bfd_get_section_name'.
339
340 2012-05-16  Samuel Thibault  <samuel.thibault@ens-lyon.org>
341
342         PR ld/14069
343         * emultempl/elf32.em: Include *-*-gnu* targets in ld.so.conf
344         support.
345
346 2012-05-15  James Murray <jsm@jsm-net.demon.co.uk>
347
348         * NEWS: Mention the support for S12X processors.
349
350 2012-05-14  James Lemke  <jwlemke@codesourcery.com>
351
352         * ldlang.c (walk_wild_consider_section): Don't copy section_flag_list.
353         Pass it to callback.
354         (walk_wild_section_general): Pass section_flag_list to callback.
355         (lang_add_section): Add sflag_list parm.
356         Move out logic to keep / omit a section & call bfd_lookup_section_flags.
357         (output_section_callback_fast): Add sflag_list parm.
358         Add new parm to lang_add_section calls.
359         (output_section_callback): Likewise.
360         (check_section_callback): Add sflag_list parm.
361         (lang_place_orphans): Add new parm to lang_add_section calls.
362         (gc_section_callback): Add sflag_list parm.
363         (find_relro_section_callback): Likewise.
364         * ldlang.h (callback_t): Add flag_info parm.
365         (lang_add_section): Add sflag_list parm.
366         * emultempl/armelf.em (elf32_arm_add_stub_section):
367         Add lang_add_section parm.
368         * emultempl/beos.em (gld*_place_orphan): Likewise.
369         * emultempl/elf32.em (gld*_place_orphan): Likewise.
370         * emultempl/hppaelf.em (hppaelf_add_stub_section): Likewise.
371         * emultempl/m68hc1xelf.em (m68hc11elf_add_stub_section): Likewise.
372         * emultempl/mipself.em (mips_add_stub_section): Likewise.
373         * emultempl/mmo.em (mmo_place_orphan): Likewise.
374         * emultempl/pe.em (gld_*_place_orphan): Likewise.
375         * emultempl/pep.em (gld_*_place_orphan): Likewise.
376         * emultempl/ppc64elf.em (ppc_add_stub_section): Likewise.
377         * emultempl/spuelf.em (spu_place_special_section): Likewise.
378         * emultempl/vms.em (vms_place_orphan): Likewise.
379
380 2012-05-14  Catherine Moore  <clm@codesourcery.com>
381
382         * NEWS:  Mention PowerPC VLE port.
383
384 2012-05-11  Daniel Richard G.  <skunk@iskunk.org>
385
386         PR binutils/14028
387         * configure.in: Invoke ACX_HEADER_STRING.
388         * configure: Regenerate.
389         * config.in: Regenerate.
390         * sysdep.h: If STRINGS_WITH_STRING is defined then include both
391         string.h and strings.h.
392
393 2012-05-08  Alan Modra  <amodra@gmail.com>
394
395         * Makefile.am (check_DEJAGNU): Export LC_ALL=C in place of other
396         LC and LANG environment vars.
397         * Makefile.in: Regenerate.
398
399 2012-05-07  Tristan Gingold  <gingold@adacore.com>
400
401         * pe-dll.c (udef_table): Make it static.
402
403 2012-05-05  Alan Modra  <amodra@gmail.com>
404
405         * pe-dll.c (process_def_file_and_drectve): Use bfd_und_section_ptr.
406         (generate_reloc): Use bfd_abs_section_ptr.
407
408 2012-05-04  H.J. Lu  <hongjiu.lu@intel.com>
409
410         * configure.tgt: Support x86_64-*-linux-gnux32.
411
412 2012-05-03  Sean Keys  <skeys@ipdatasys.com>
413
414         * Makefile.am (ALL_EMULATIONS): Added new emulation for XGATE
415         and XGATE (elf).
416         * Makefile.in: Rebuild.
417         * configure.tgt: Recognize XGATE.
418         * scripttempl/elfxgate.sc: New file, mostly cloned from m68hc12.
419         * emulparams/xgateelf: New emulation, mostly cloned from m68hc12.
420         * NEWS: Mention new support.
421
422 2012-04-26  Hans-Peter Nilsson  <hp@axis.com>
423
424         Make bfd asserts cause linker errors.
425         * ldmain.c (default_bfd_assert_handler): New variable.
426         (ld_bfd_assert_handler): New function.
427         (main): Call bfd_set_assert_handler.
428
429 2012-04-24  Alan Modra  <amodra@gmail.com>
430
431         * ldlang.c (size_input_section): Use sec_info_type rather than
432         usrdata->flags.just_syms.
433         * ldwrite.c (build_link_order): Likewise.
434         * emultempl/hppaelf.em (build_section_lists): Likewise.
435         * emultempl/ppc64elf.em (build_toc_list): Likewise.
436         * emultempl/armelf.em (build_section_lists): Likewise.
437         (after_allocation): Update for renamed sec_info_type value.
438         * emultempl/tic6xdsbt.em: Likewise.
439
440 2012-04-12  Roland McGrath  <mcgrathr@google.com>
441
442         * configure.tgt (arm*-*-nacl*, arm*b-*-nacl*): Handle them.
443         * emulparams/armelf_nacl.sh: New file.
444         * emulparams/armelfb_nacl.sh: New file.
445         * Makefile.am (ALL_EMULATION_SOURCES): Add earmelf_nacl.c
446         and earmelfb_nacl.c here.
447         (earmelf_nacl.c, earmelfb_nacl.c): New targets.
448         * Makefile.in: Regenerated.
449
450 2012-04-11  Tristan Gingold  <gingold@adacore.com>
451
452         * scripttempl/ia64vms.sc: New file.
453         * emultempl/vms.em (_before_parse): Support for ia64.
454         (elf64-ia64-vms): New fragment for ia64.
455         * emulparams/elf64_ia64_vms.sh: New file.
456         * configure.tgt (ia64-*-*vms*): Add.
457         * Makefile.am (ALL_64_EMULATION_SOURCES): Add eelf64_ia64_vms.c
458         (eelf64_ia64_vms.c): New rule.
459         * Makefile.in: Regenerate.
460
461 2012-04-06  Roland McGrath  <mcgrathr@google.com>
462
463         * configure.in (AC_CHECK_HEADERS): Add locale.h.
464         * config.in: Regenerate.
465         * configure: Regenerate.
466
467 2012-04-05  Nick Clifton  <nickc@redhat.com>
468
469         * configure.in (AC_CHECK_FUNCS): Add setlocale.
470         (AM_LC_MESSAGES): Add.
471         * aclocal.m4: Regenerate.
472         * config.in: Regenerate.
473         * configure: Regenerate.
474
475 2012-04-03  Roland McGrath  <mcgrathr@google.com>
476
477         * configure.tgt (i[3-7]86-*-nacl*, x86_64-*-nacl*): Handle them.
478         * emulparams/elf_nacl.sh: New file.
479         * emulparams/elf_i386_nacl.sh: New file.
480         * emulparams/elf32_x86_64_nacl.sh: New file.
481         * emulparams/elf_x86_64_nacl.sh: New file.
482         * Makefile.am (ALL_EMULATION_SOURCES): Add eelf_i386_nacl.c here.
483         (ALL_64_EMULATION_SOURCES): Add eelf32_x86_64_nacl.c and
484         eelf_x86_64_nacl.c here.
485         (eelf_i386_nacl.c, eelf32_x86_64_nacl.c, eelf_x86_64_nacl.c):
486         New targets.
487         * Makefile.in: Regenerated.
488
489         * scripttempl/elf.sc: Handle SEPARATE_CODE cases.
490
491 2012-04-02  Mike Frysinger  <vapier@gentoo.org>
492
493         * ldmisc.c (vfinfo): Assign new local str to fmt.  Delete
494         putc call.  If str and fmt are different, call fwrite on
495         the difference.
496
497 2012-03-30  Nick Clifton  <nickc@redhat.com>
498
499         * po/vi.po: Updated Vietnamese translation.
500
501 2012-03-27  Roland McGrath  <mcgrathr@google.com>
502
503         * configure.in: Set want64 on a 64-bit host regardless of
504         --enable-targets=all.
505         * configure: Regenerated.
506
507 2012-03-26  Tristan Gingold  <gingold@adacore.com>
508
509         * lexsup.c (parse_args): Add a missing '\n'.
510
511 2012-03-25  Alan Modra  <amodra@gmail.com>
512
513         * ldemul.c (before_allocation_default): Revert last change.
514         * ldlang.c (lang_add_section): Likewise.
515         (strip_excluded_output_sections): Don't strip output sections with
516         user input sections when emitrelocations, unless all are SEC_EXCLUDE.
517
518 2012-03-23  Alan Modra  <amodra@gmail.com>
519
520         * ldemul.c (before_allocation_default): When emitrelocations,
521         don't strip sections..
522         * ldlang.c (lang_add_section): ..and don't set up map_head, map_tail.
523
524 2012-03-14  Kai Tietz  <ktietz@redhat.com>
525             Pascal Obry  <pascal@obry.net>
526
527         * pe-dll.c (found_sym): New static variable.
528         (undef_count): Likewise.
529         (key_value): New structure.
530         (undef_sort_cmp): Compare routine for qsort/bsearch.
531         (pe_find_cdecl_alias_match): Add new argument.
532         (pe_undef_alias_cdecl_match): Removed.
533         (pe_undef_count): New helper routine.
534         (pe_create_undef_table): Likewise.
535         (pe_process_import_defs): Use pe_create_undef_table and
536         new pe_undef_alias_cdecl_match function.
537
538 2012-03-14  Alan Modra  <amodra@gmail.com>
539
540         PR ld/13839
541         * ldexp.c (fold_name): Ignore undefined symbols when assigning to
542         dot in mark phase.
543         (exp_fold_tree_1): Evaluate assignment to dot expressions even when
544         discarding result, for side effects.  Fix typo in error message.
545
546 2012-03-08  Tristan Gingold  <gingold@adacore.com>
547
548         * ldexp.c (exp_print_tree): Special case for SEGMENT_START.
549         (exp_print_token): Constify.
550
551 2012-03-08  Alan Modra  <amodra@gmail.com>
552
553         PR ld/10340
554         * ldfile.c (is_sysrooted_pathname): Remove notsame param.
555         (ldfile_add_library_path): Don't set sysrooted flag.
556         (ldfile_open_file_search): Likewise, and don't copy them.
557         (try_open): Delete exten and code handling such.  Add sysrooted
558         param and return whether path is in sysroot.
559         (ldfile_find_command_file): Delete extend param.  Add sysrooted
560         param.  Rename local var.  Update try_open calls.
561         (ldfile_open_command_file_1): Pass sysrooted to lex_push_file.
562         * ldfile.h (search_dirs_type): Remove sysrooted field.
563         * ldlang.c (new_afile): Always set sysrooted from input_flags.
564         (load_symbols): Don't set input_flags.sysrooted.
565         * ldlang.h (struct lang_input_statement_flags): Revise sysrooted
566         comment.
567         * ldlex.h (lex_push_file): Update prototype.
568         * ldlex.l (sysrooted_stack): New array.
569         (EOF): Pop input_flags.sysrooted.
570         (lex_push_file): Add sysrooted param.  Save and set
571         input_flags.sysrooted.
572
573 2012-03-06  Alan Modra  <amodra@gmail.com>
574
575         * ldlang.h (struct lang_input_statement_flags): New, extract from..
576         (lang_input_statement_type): ..here.  New field "flags".
577         (input_flags): Declare.
578         (missing_file): Delete.
579         * ldmain.h (whole_archive): Delete.
580         (add_DT_NEEDED_for_regular, add_DT_NEEDED_for_dynamic): Delete.
581         * ld.h (ld_config_type <dynamic_link>): Delete.
582         * ldmain.c (whole_archive): Delete.
583         (add_DT_NEEDED_for_regular, add_DT_NEEDED_for_dynamic): Delete.
584         * ldlang.c (missing_file, ldlang_sysrooted_script): Delete.
585         (input_flags): New variable.  Replace all uses of config.dynamic_link,
586         missing_file, ldlang_sysrooted_script, whole_archive,
587         add_DT_NEEDED_for_regular and add_DT_NEEDED_for_dynamic with fields
588         from here.
589         * ldfile.c: Likewise.
590         * ldgram.y: Likewise.
591         * ldmain.c: Likewise.
592         * ldwrite.c: Likewise.
593         * lexsup.c: Likewise.
594         * plugin.c: Likewise.
595         * emultempl/aix.em: Likewise.
596         * emultempl/armelf.em: Likewise.
597         * emultempl/elf32.em: Likewise.
598         * emultempl/hppaelf.em: Likewise.
599         * emultempl/linux.em: Likewise.
600         * emultempl/pe.em: Likewise.
601         * emultempl/pep.em: Likewise.
602         * emultempl/ppc64elf.em: Likewise.
603         * emultempl/scoreelf.em: Likewise.
604         * emultempl/spuelf.em: Likewise.
605         * emultempl/sunos.em: Likewise.
606         * emultempl/vms.em: Likewise.
607         * ldlang.c (new_afile): Use memset to init zero fields.
608         (load_symbols): Simplify save and restore of flags around command
609         file processing.
610         * ldfile.c (is_sysrooted_pathname): Tidy.
611
612 2012-03-05  Hans-Peter Nilsson  <hp@axis.com>
613
614         * configure.tgt (mips64*el-*-freebsd*, mips64*-*-freebsd*)
615         (mips*el-*-freebsd*, mips*-*-freebsd*): Correct triplets by
616         replacing trailing "-*" with "*".
617
618 2012-02-25  Walter Lee  <walt@tilera.com>
619
620         * Makefile.am (ALL_EMULATION_SOURCES): Add eelf32tilegx_be.c.
621         (ALL_64_EMULATION_SOURCES): Add eelf64tilegx_be.c.
622         (eelf32tilegx_be.c): Add rule to build this file.
623         (eelf64tilegx_be.c): Ditto.
624         * Makefile.in: Regenerate.
625         * configure.tgt (tilegx-*-*): Support big endian.
626         (tilegxbe-*-*): New.
627         * emulparams/elf32tilegx.sh (OUTPUT_FORMAT): Rename.
628         (BIG_OUTPUT_FORMAT): Define.
629         (LITTLE_OUTPUT_FORMAT): Define.
630         * emulparams/elf32tilegx_be.sh: New.
631         * emulparams/elf64tilegx.sh (OUTPUT_FORMAT): Rename.
632         (BIG_OUTPUT_FORMAT): Define.
633         (LITTLE_OUTPUT_FORMAT): Define.
634         * emulparams/elf64tilegx_be.sh: New.
635
636 2012-02-24  Kai Tietz  <ktietz@redhat.com>
637
638         PR binutils/13710
639         * deffilep.y (keyword_as_name): Disable LIBRARY
640         keyword.
641
642 2012-02-22  Alan Modra  <amodra@gmail.com>
643
644         PR ld/13683
645         * ldlang.c (lang_process): Rerun lang_do_assignments before
646         starting garbage collection.
647         * ldexp.c (fold_name): Generate a reloc for defined symbols
648         found without an associated output section during the mark phase.
649         (exp_fold_tree_1): Continue processing an expression, even if we
650         are unable to fold it, if we are in the first two evaluation
651         phases.
652         * ldexp.h (enum lang_phase_type): Add descriptions of the phases.
653
654 2012-02-19  Kai Tietz  <ktietz@redhat.com>
655
656         * deffilep.y (cmp_import_elem): Sort first by module name.
657         * pe-dll.c (process_def_file_and_drectve): Free strings
658         from removed export-element.
659         (add_bfd_to_link): Optimize loop on import-elements and lower
660         allocated memory.
661         (pe_implied_import_dll): Pass NULL instead of 0 for pointer
662         argument.
663
664 2012-02-18  Hans-Peter Nilsson  <hp@axis.com>
665
666         * ldmisc.c (vfinfo <%S>): Use same type and avoid cast for
667         temporary variable node used for NULL argument.
668
669 2012-02-18  Alan Modra  <amodra@gmail.com>
670
671         PR ld/13343
672         * ld.h (parsing_defsym): Delete.
673         * ldexp.c (exp_intop, exp_bigintop, exp_relop): Set type.filename.
674         (fold_binary, fold_name, exp_fold_tree_1, exp_get_vma, exp_get_fill,
675         exp_get_abs_int): Add tree arg for %S in error messages.  Don't
676         fudge lineno.
677         (exp_binop, exp_unop, exp_nameop, exp_assop, exp_assert): Copy
678         type.filename from sub-tree.
679         (exp_trinop): Likewise, and use "cond" rather than "lhs".
680         * ldexp.h (node_type): Add filename field to struct.
681         * ldfile.c (ldfile_input_filename): Delete.  Remove all refs.
682         * ldfile.h (ldfile_input_filename): Delete.
683         * ldgram.y (phdr_type, phdr_qualifiers, yyerror): Add NULL arg for
684         %S in error messages.
685         * ldemul.c (syslib_default, hll_default): Likewise.
686         * ldlang.c (lang_memory_region_lookup, lang_memory_region_alias,
687         lang_get_regions, lang_new_phdr): Likewise.
688         (lang_size_sections_1): Pass addr_tree for %S.
689         * ldlex.h (lex_redirect): Update prototype.
690         (ldlex_filename): Declare.
691         * ldlex.l (<EOF>): Don't set ldfile_input_filename.
692         (lex_redirect): Add fake_filename and count params.  Push
693         fake_filename to file_name_stack and init lineno from count.
694         (ldlex_filename): New function.
695         (lex_warn_invalid): Use above.
696         * ldmain.c (main): Update lex_redirect call.
697         * ldmisc.c (vfinfo <%S>): Take file name and line number from
698         etree_type arg, or use current if arg is NULL.
699         * lexsup.c (parsing_defsym): Delete.
700         (parse_args <OPTION_DEFSYM>): Update lex_redirect call.
701
702 2012-02-13  Kai Tietz  <ktietz@redhat.com>
703
704         * deffilep.y (find_export_in_list): Set is_indent for
705         first or last element, if identical.
706         (find_import_in_list): Likewise.
707
708 2012-02-11  Kai Tietz  <ktietz@redhat.com>
709
710         * deffilep.y (%union): New type id_const.
711         (opt_name2): New rule.
712         (keyword_as_name): New rule.
713         (dot_name): Replaced by opt_name2 rule.
714         (opt_name): Adjust rule.
715         (opt_equal_name): Likewise.
716
717 2012-02-11  Pascal Obry  <pascal@obry.net>
718
719         * pe-dll.c (auto_export): Use bsearch to speed up scan of exports
720         table.
721         (process_def_file_and_drectve): Maintain sorting of exports table
722         after stripping leading @ signs.
723
724 2012-02-09  Alan Modra  <amodra@gmail.com>
725
726         * ldgram.y (input_section_spec_no_keep): Don't ignore sect_flags.
727
728 2012-01-31  H.J. Lu  <hongjiu.lu@intel.com>
729
730         PR ld/13616
731         * emulparams/elf32_x86_64.sh: Remove NOP.
732         * emulparams/elf_i386.sh: Likewise.
733         * emulparams/elf_i386_be.sh: Likewise.
734         * emulparams/elf_i386_ldso.sh: Likewise.
735         * emulparams/elf_i386_vxworks.sh: Likewise.
736         * emulparams/elf_k1om.sh: Likewise.
737         * emulparams/elf_l1om.sh: Likewise.
738         * emulparams/elf_x86_64.sh: Likewise.
739
740         * ldlang.c (zero_fill): Initialized to 0.
741
742         * ldwrite.c (build_link_order): Set data size to linker odrder
743         size when they are the same.
744
745         * scripttempl/elf.sc: Don't specify fill if NOP is undefined.
746
747 2012-01-17  Alan Modra  <amodra@gmail.com>
748
749         * ldver.c (ldversion): Update copyright message year.
750
751 2012-01-15  Alan Modra  <amodra@gmail.com>
752
753         PR ld/12758
754         * ldlang.c (lang_process): Don't reopen all files, just those
755         newly added by plugin.
756
757 2012-01-11  Alan Modra  <amodra@gmail.com>
758
759         * emultempl/ppc64elf.em (PARSE_AND_LIST_PROLOGUE,
760         PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS,
761         PARSE_AND_LIST_ARGS_CASES): Handle --{no-,}plt-thread-safe and
762         --{no-,}plt-align.
763         (plt_thread_safe, plt_stub_align): New vars.
764         (gld${EMULATION_NAME}_after_allocation): Pass them to
765         ppc64_elf_size_stubs.  Align stub sections according to plt_stub_align.
766         * ld.texinfo: Document new command line options, and an old
767         undocumented option.
768
769 2012-01-09  Roland McGrath  <mcgrathr@google.com>
770
771         * configure.in: Use AM_ZLIB.
772         * configure: Regenerated.
773
774 For older changes see ChangeLog-2011
775 \f
776 Local Variables:
777 mode: change-log
778 left-margin: 8
779 fill-column: 74
780 version-control: never
781 End: