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