1 2015-09-30 Rich Felker <dalias@libc.org>
3 * configure.tgt (targ_extra_emuls): Add fdpic and misc
4 emulations to sh*-*-linux* targets.
6 2015-09-29 Nick Clifton <nickc@redhat.com>
9 * ld.texinfo (Options): Fix spelling mistake.
11 2015-09-24 Alan Modra <amodra@gmail.com>
14 * ldmain.c (main): Always enable --sysroot.
15 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
16 prepend sysroot to relative rpath/runpath.
18 2015-09-23 Nick Clifton <nickc@redhat.com>
20 * emultempl/elf32.em (ehdr_start_empty): New static variable.
21 (before_allocation): Use it to initialise ehdr_start_save.
22 * emultempl/pe.em (write_build_id): Remove useless double
24 * emultempl/pep.em (write_build_id): Likewise.
26 2015-09-22 H.J. Lu <hongjiu.lu@intel.com>
28 * emultempl/alphaelf.em (alpha_after_parse): Call
29 gld${EMULATION_NAME}_after_parse instead of
31 * emultempl/cr16elf.em (cr16elf_after_parse): Likewise.
32 * emultempl/crxelf.em (crxelf_after_parse); Likewise.
33 * emultempl/hppaelf.em (hppaelf_after_parse): Likewise.
34 * emultempl/mipself.em (mips_after_parse): Likewise.
35 * emultempl/nds32elf.em (nds32_elf_after_parse): Likewise.
36 * emultempl/elf32.em: Don't include ldlex.h.
37 (gld${EMULATION_NAME}_after_parse): New function.
38 (gld${EMULATION_NAME}_handle_option) [GENERATE_PIE_SCRIPT]
39 <OPTION_PIE>: Removed.
40 (ld_${EMULATION_NAME}_emulation): Replace after_parse_default
41 with gld${EMULATION_NAME}_after_parse.
42 * emultempl/ia64elf.em (gld${EMULATION_NAME}_after_parse):
44 (ia64elf_after_parse): This. Call
45 gld${EMULATION_NAME}_after_parse instead of after_parse_default.
46 (LDEMUL_AFTER_PARSE): Replace gld${EMULATION_NAME}_after_parse
47 with ia64elf_after_parse.
49 2015-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
51 * emulparams/solaris2.sh (GENERATE_PIE_SCRIPT): Set to yes.
53 * emultempl/elf32.em: Include ldlex.h.
54 (gld${EMULATION_NAME}_handle_option) [GENERATE_PIE_SCRIPT]
55 <OPTION_PIE>: Set DF_1_PIE.
57 2015-09-22 Alan Modra <amodra@gmail.com>
59 * ld.texinfo: Put --dotsyms/--no-dotsyms on separate lines.
60 Ditto for --save-restore-funcs and --tls-get-addr-optimize.
62 2015-09-20 Rich Felker <dalias@libc.org>
64 * ld.texinfo (--no-dynamic-linker): Document.
65 * ldlex.h (enum option_values): Add OPTION_NO_DYNAMIC_LINKER.
66 * lexsup.c (ld_options, parse_args): Handle --no-dynamic-linker.
68 2015-09-18 Alan Modra <amodra@gmail.com>
70 * ld.texinfo: Document PowerPC64 --{no-,}save-restore-funcs.
72 2015-09-18 Alan Modra <amodra@gmail.com>
74 * emultempl/ppc64elf.em (params): Init tls_get_addr_opt field to -1.
75 (OPTION_TLS_GET_ADDR_OPT): Define.
76 (PARSE_AND_LIST_LONGOPTS): Handle --tls-get-addr-opt.
77 (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Likewise.
78 * ld.texinfo: Document --tls-get-addr-optimize and
79 --no-tls-get-addr-optimize.
81 2015-09-18 Alan Modra <amodra@gmail.com>
84 * ldexp.h (struct ldexp_control): Add rel_from_abs.
85 (ldexp_finalize_syms): Declare.
86 * ldexp.c (new_rel_from_abs): Keep absolute for expressions
87 outside of output section statements. Set rel_from_abs.
88 (make_abs, exp_fold_tree, exp_fold_tree_no_dot): Clear rel_from_abs.
89 (struct definedness_hash_entry): Add final_sec, and comment.
90 (update_definedness): Set final_sec.
91 (set_sym_sections, ldexp_finalize_syms): New functions.
92 * ldlang.c (lang_process): Call ldexp_finalize_syms.
94 2015-09-10 Nick Clifton <nickc@redhat.com>
96 * po/zh_CN.po: Updated simplified Chinese translation.
98 2015-09-09 James Bowman <james.bowman@ftdichip.com>
100 * scripttempl/ft32.sc: default linker script RAM and
103 2015-09-09 Nick Clifton <nickc@redhat.com>
105 * po/zh_CN.po: Updated simplified Chinese translation.
107 2015-09-08 Nick Clifton <nickc@redhat.com>
109 * ld.texinfo (Source Code Reference): Extend description to
110 include an example using arrays.
112 2015-07-28 Andrew Burgess <andrew.burgess@embecosm.com>
114 * ld.h (enum orphan_handling_enum): New.
115 (ld_config_type): Remove warn_orphan, add orphan_handling.
116 * ldemul.c (ldemul_place_orphan): Remove warning about orphan
118 * ldlang.c (ldlang_place_orphan): New function.
119 (lang_place_orphans): Call ldlang_place_orphan.
120 * ldlex.h (enum option_values): Remove OPTION_WARN_ORPHAN and
121 OPTION_NO_WARN_ORPHAN, add OPTION_ORPHAN_HANDLING.
122 * lexsup.c (ld_options): Remove 'warn-orphan' and
123 'no-warn-orphan', add 'orphan-handling'.
124 (parse_args): Remove handling for OPTION_WARN_ORPHAN and
125 OPTION_NO_WARN_ORPHAN, add handling for OPTION_ORPHAN_HANDLING.
126 * NEWS: Replace text about --warn-orphan with --orphan-handling.
127 * ld.texinfo (Options): Remove --warn-orphan entry and add
128 entry on --orphan-handling.
129 (Orphan Sections): Add reference to relevant command line options.
131 2015-09-03 Nick Clifton <nickc@redhat.com>
133 * ld.texinfo (--build-id): Fix typo. The COFF/PE build-id section
134 is called .buildid not .build-id.
136 2015-09-03 Nick Clifton <nickc@redhat.com>
138 (Source Code Reference): Fix off-by-one typo in example of how to
139 use linker script symbols in C source code.
141 2015-08-19 Alan Modra <amodra@gmail.com>
143 * emultempl/aix.em: Don't set link_info.pic.
144 * emultempl/pe.em: Likewise.
145 * emultempl/pep.em: Likewise.
146 * emultempl/sunos.em: Likewise.
147 * lexsup.c (parse_args): Likewise. Set type_pie for -pie.
148 * plugin.c (set_tv_header <LDPT_LINKER_OUTPUT>): Simplify.
150 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
152 * ld/ldctor.c: Replace shared, executable, relocatable and pie
153 fields with bfd_link_executable, bfd_link_dll,
154 bfd_link_relocatable, bfd_link_pic and bfd_link_pie.
155 * ld/ldemul.c: Likewise.
156 * ld/ldfile.c: Likewise.
157 * ld/ldlang.c: Likewise.
158 * ld/ldmain.c: Likewise.
159 * ld/ldwrite.c: Likewise.
160 * ld/lexsup.c: Likewise.
161 * ld/pe-dll.c: Likewise.
162 * ld/plugin.c: Likewise.
163 * ld/emultempl/aarch64elf.em: Likewise.
164 * ld/emultempl/aix.em: Likewise.
165 * ld/emultempl/alphaelf.em: Likewise.
166 * ld/emultempl/armcoff.em: Likewise.
167 * ld/emultempl/armelf.em: Likewise.
168 * ld/emultempl/avrelf.em: Likewise.
169 * ld/emultempl/beos.em: Likewise.
170 * ld/emultempl/cr16elf.em: Likewise.
171 * ld/emultempl/elf-generic.em: Likewise.
172 * ld/emultempl/elf32.em: Likewise.
173 * ld/emultempl/genelf.em: Likewise.
174 * ld/emultempl/generic.em: Likewise.
175 * ld/emultempl/gld960.em: Likewise.
176 * ld/emultempl/gld960c.em: Likewise.
177 * ld/emultempl/hppaelf.em: Likewise.
178 * ld/emultempl/irix.em: Likewise.
179 * ld/emultempl/linux.em: Likewise.
180 * ld/emultempl/lnk960.em: Likewise.
181 * ld/emultempl/m68hc1xelf.em: Likewise.
182 * ld/emultempl/m68kcoff.em: Likewise.
183 * ld/emultempl/m68kelf.em: Likewise.
184 * ld/emultempl/metagelf.em: Likewise.
185 * ld/emultempl/mipself.em: Likewise.
186 * ld/emultempl/mmo.em: Likewise.
187 * ld/emultempl/msp430.em: Likewise.
188 * ld/emultempl/nds32elf.em: Likewise.
189 * ld/emultempl/needrelax.em: Likewise.
190 * ld/emultempl/nios2elf.em: Likewise.
191 * ld/emultempl/pe.em: Likewise.
192 * ld/emultempl/pep.em: Likewise.
193 * ld/emultempl/ppc32elf.em: Likewise.
194 * ld/emultempl/ppc64elf.em: Likewise.
195 * ld/emultempl/sh64elf.em: Likewise.
196 * ld/emultempl/solaris2.em: Likewise.
197 * ld/emultempl/spuelf.em: Likewise.
198 * ld/emultempl/sunos.em: Likewise.
199 * ld/emultempl/tic6xdsbt.em: Likewise.
200 * ld/emultempl/ticoff.em: Likewise.
201 * ld/emultempl/v850elf.em: Likewise.
202 * ld/emultempl/vms.em: Likewise.
203 * ld/emultempl/vxworks.em: Likewise.
205 2015-08-18 Alan Modra <amodra@gmail.com>
207 * ldexp.c (exp_fold_tree_1): Clear linker_def on symbol assignment.
209 2015-08-06 Alan Modra <amodra@gmail.com>
211 * ldexp.c (align_dot_val): Delete.
212 (fold_unary <ALIGN_K, NEXT>): Revert 2015-07-10 change.
213 (is_align_conditional): Revert 2015-07-20 change.
214 (exp_fold_tree_1): Likewise, but keep expanded comment.
215 * scripttempl/elf.sc (.ldata, .bss): Revert 2015-07-20 change.
216 * ld.texinfo (<ALIGN>): Correct description.
218 2015-08-04 Andrew Burgess <andrew.burgess@embecosm.com>
220 * ld.texinfo (Options): Document --require-defined option.
221 * ldlang.c (struct require_defined_symbol): New structure.
222 (require_defined_symbol_list): New variable.
223 (ldlang_add_require_defined): New function.
224 (ldlang_check_require_defined_symbols): New function.
225 (lang_process): Check required symbols are defined.
226 * ldlang.h (ldlang_add_require_defined): Declare.
227 * ldlex.h (enum option_values): Add OPTION_REQUIRE_DEFINED_SYMBOL.
228 * lexsup.c (ld_options): Add '--require-defined' entry.
229 (parse_args): Handle '--requre-defined' entry.
230 * NEWS: Mention new '--require-defined' option.
232 2015-08-03 Andrew Burgess <andrew.burgess@embecosm.com>
234 * ld.texinfo (MEMORY): Explain that multiple MEMORY commands are
237 2015-07-29 H.J. Lu <hongjiu.lu@intel.com>
239 * lexsup.c (parse_args): Don't set link_info.executable to
240 TRUE for link_info.relocatable.
242 2015-07-27 H.J. Lu <hongjiu.lu@intel.com>
244 * configure: Regenerated.
246 2015-07-24 Nick Clifton <nickc@redhat.com>
248 * emulparams/elf32rl78.sh (OTHER_SECTIONS): Provide a value for
249 the _-rl78_abs__ symbol.
251 2015-07-20 Alan Modra <amodra@gmail.com>
253 * emulparams/criself.sh (INIT_ADDR, FINI_ADDR): Define.
254 (INIT_START, FINI_START): Don't ALIGN.
255 * scriptempl/elf.sc (.init, .fini): Apply INIT_ADDR/FINI_ADDR.
257 2015-07-20 Alan Modra <amodra@gmail.com>
259 * scripttempl/elf.sc (.ldata, .bss): Align absolute value of dot.
260 * ldexp.c (is_align_conditional): Handle binary ALIGN.
261 (exp_fold_tree_1): Move code setting SEC_KEEP for assignments to
262 dot inside output sections. Handle absolute expressions.
264 2015-07-14 H.J. Lu <hongjiu.lu@intel.com>
266 * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Make
267 --compress-debug-sections=zlib the same as
268 --compress-debug-sections=zlib-gabi.
269 * ld.texinfo: Change --compress-debug-sections=zlib to zlib-gabi.
271 2015-07-14 Nick Clifton <nickc@redhat.com>
273 * ld.texinfo (Options): Add missing period after @xref.
275 2015-07-10 Alan Modra <amodra@gmail.com>
277 * ldexp.c (align_dot_val): New function.
278 (fold_unary <ALIGN_K, NEXT>): Use it.
280 2015-07-03 Kai Tietz <ktietz@redhat.com>
283 * scripttempl/pep.sc: Mark .idata*, .CRT*, .tls*,
284 .rsrc*, .init, .ctor*, .dtor*, .fini, .jcr,
285 .eh_frame, .pdata. .xdata, and .gcc_except_table sections
287 * scripttempl/pe.sc: Likewise.
288 * ld.texinfo: Document that --gc-sections has experimental support
289 for COFF and PE targets.
290 * NEWS: Mention experimental support.
292 2015-07-03 Alan Modra <amodra@gmail.com>
294 * Makefile.am (eelf32or1k.c, eelf32or1k_linux.c): Depend on ELF_DEPS.
295 * Makefile.in: Regenerate.
297 2015-06-28 H.J. Lu <hongjiu.lu@intel.com>
299 * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option):
300 Replace COMPRESS_DEBUG_ZLIB with COMPRESS_DEBUG_GNU_ZLIB.
302 2015-06-26 H.J. Lu <hongjiu.lu@intel.com>
304 * emulparams/elf_iamcu.sh (COMPILE_IN): New.
306 2015-06-15 Nick Clifton <nickc@redhat.com>
309 * emultempl/pe.em (pe_find_data_imports): Generate an error if a
310 symbol name is too long to handle.
311 * emultempl/pep.em (pep_find_data_imports): Likewise.
313 2015-06-12 Tristan Gingold <gingold@adacore.com>
315 * NEWS: Mention new option.
316 * lexsup.c (parse_args): Handle --print-memory-usage.
317 (ld_options): Add --print-memory-usage.
318 * ldmain.c (main): Call lang_print_memory_usage.
319 * ldlex.h (enum option_values): Add OPTION_PRINT_MEMORY_USAGE.
320 * ldlang.h: Add prototype of lang_print_memory_usage.
321 * ldlang.c (lang_print_memory_size, lang_print_memory_usage): New
323 * ld.texinfo (Options): Document --print-memory-usage.
324 * ld.h (args_type): Add print_memory_usage field.
326 2015-06-08 Nick Clifton <nickc@redhat.com>
328 * po/fr.po: Updated French Translation.
330 2015-05-28 Catherine Moore <clm@codesourcery.com>
331 Paul Brook <paul@codesourcery.com>
333 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open):
334 Add Compact EH support.
335 * scripttempl/elf.sc: Handle .eh_frame_entry and .gnu_extab
338 2015-05-17 Chung-Lin Tang <cltang@codesourcery.com>
340 * configure.ac (AC_PROG_GREP): Check for grep program.
341 (elf_list_options,elf_shlib_list_options,elf_plt_unwind_list_options):
342 Enable ELF option printing for emulations containing
343 'TEMPLATE_NAME=elf32'.
344 * configure: Regenerate.
346 2015-05-14 Nick Clifton <nickc@redhat.com>
348 * ld.texinfo (ASSERT): Describe the interaction with PROVIDEd
351 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
353 * configure.tgt: Support i[3-7]86-*-elfiamcu target.
355 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
357 * Makefile.am (ALL_EMULATION_SOURCES): Add eelf_iamcu.c.
359 * configure.tgt (targ_extra_emuls): Add elf_iamcu if elf_i386 is
361 * Makefile.in: Regenerated.
362 * emulparams/elf_iamcu.sh: New file.
364 2015-05-05 Nick Clifton <nickc@redhat.com>
366 * emulparams/msp430elf.sh (TEMPLATE_NAME): Change to msp430.
367 * scripttempl/msp430.sc (.text): Add .lower.text and .either.text.
368 (.data): Add .lower.data and .either.data.
369 (.bss): Add .lower.bss and .either.bss.
370 (.rodata): Add .lower.rodata and .either.rodata.
371 * emultempl/msp430.em: New file. Implements a new orphan
372 placement algorithm that divides sections between lower and upper
374 * Makefile.am (emsp430elf.c): Depend upon msp430.em.
375 *emsp430X.c): Likewise.
376 * Makefine.in: Regenerate.
378 2015-04-28 Andreas Schwab <schwab@linux-m68k.org>
381 * ldlex.l (INPUTLIST): Increment lineno on newline.
383 2015-04-24 Alan Modra <amodra@gmail.com>
385 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation):
386 Call gld${EMULATION_NAME}_map_segments regardless of need_laying_out.
388 2015-04-24 DJ Delorie <dj@redhat.com>
390 * Makefile.am (msp430): Rename primary emulation to msp430elf.
391 (emsp430.c): Rename to emsp430elf.c, update dependencies
392 (emsp430X.c): Update dependencies.
393 * Makefile.in: Likewise.
394 * configure.tgt (msp430-*-*): Rename primary emulation to msp430elf.
395 * emulparams/msp430.sh: Rename to msp430elf.sh.
396 * emulparams/msp430X.sh: Update.
398 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
401 * ldfile.c (ldfile_try_open_bfd): Set is_linker_input to 1.
403 2015-04-23 Alan Modra <amodra@gmail.com>
405 * emulparams/elf64ppc.sh (GOT): Align.
407 2015-04-22 Alan Modra <amodra@gmail.com>
409 * ldexp.h (struct ldexp_control): Delete dataseg.min_base. Add
410 data_seg.relro_offset.
411 * ldexp.c (fold_binary <DATA_SEGMENT_ALIGN>): Don't set min_base.
412 (fold_binary <DATA_SEGMENT_RELRO_END>): Do set relro_offset.
413 * ldlang.c (lang_size_sections): Rewrite code adjusting relro
414 segment base to line up last section on page boundary.
416 2015-04-15 H.J. Lu <hongjiu.lu@intel.com>
419 --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi].
421 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
423 * ld.texinfo: Document --compress-debug-sections=.
424 * ldmain.c (main): Set BFD_COMPRESS on output_bfd if
425 COMPRESS_DEBUG is set. Set BFD_COMPRESS_GABI on output_bfd
426 for COMPRESS_DEBUG_GABI_ZLIB.
427 * lexsup.c (elf_static_list_options): Add
428 --compress-debug-sections=.
429 * emultempl/elf32.em (OPTION_COMPRESS_DEBUG): New.
430 (xtra_long): Add "compress-debug-sections".
431 (gld${EMULATION_NAME}_handle_option): Handle
432 OPTION_COMPRESS_DEBUG.
434 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
437 * ld.texinfo: Document "-z noextern-protected-data".
438 * ldmain.c (main): Initialize link_info.extern_protected_data
440 * lexsup.c (elf_shlib_list_options): Add
441 "-z [no]extern-protected-data".
442 * emulparams/elf32_x86_64.sh: Source extern_protected_data.sh.
443 * emulparams/elf_i386.sh: Likewise.
444 * emulparams/elf_i386_be.sh: Likewise.
445 * emulparams/elf_i386_chaos.sh: Likewise.
446 * emulparams/elf_i386_ldso.sh: Likewise.
447 * emulparams/elf_i386_vxworks.sh: Likewise.
448 * emulparams/elf_k1om.sh: Likewise.
449 * emulparams/elf_l1om.sh: Likewise.
450 * emulparams/elf_x86_64.sh: Source extern_protected_data.sh.
451 (PARSE_AND_LIST_OPTIONS): Renamed to ...
452 (PARSE_AND_LIST_OPTIONS_BNDPLT): This.
453 (PARSE_AND_LIST_ARGS_CASE_Z): Renamed to ...
454 (PARSE_AND_LIST_ARGS_CASE_Z_BNDPLT): This.
455 (PARSE_AND_LIST_OPTIONS): Append $PARSE_AND_LIST_OPTIONS_BNDPLT.
456 (PARSE_AND_LIST_ARGS_CASE_Z): Append
457 $PARSE_AND_LIST_ARGS_CASE_Z_BNDPLT.
458 * emulparams/extern_protected_data.sh: New file.
460 2015-04-11 H.J. Lu <hongjiu.lu@intel.com>
462 * plugin.c (plugin_load_plugins): Removed an extra ';'.
464 2015-04-10 Nick Clifton <nickc@redhat.com>
467 * ld.texinfo (--be8): Add a note about the interaction of this
468 option with the assembler's -EB option.
470 2015-04-10 Alan Modra <amodra@gmail.com>
472 * configure.ac: Set elf_list_options etc. in proper case.
473 * configure: Regenerate.
475 2015-04-10 Alan Modra <amodra@gmail.com>
478 * ldlang.c (lang_process): Add _init and _fini to gc_sym_list.
480 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
482 * emulparams/elf_x86_64.sh (BNDPLT): Removed.
483 (PARSE_AND_LIST_OPTIONS): New.
484 (PARSE_AND_LIST_ARGS_CASE_Z): Likewise.
485 * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Remove
486 BNDPLT check. Handle PARSE_AND_LIST_ARGS_CASE_Z.
487 (gld${EMULATION_NAME}_list_options): Remove BNDPLT check.
489 2015-04-09 Nick Clifton <nickc@redhat.com>
491 * po/fr.po: Updated French translation.
493 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
495 * configure.ac (elf_list_options): Set to TRUE for
496 --enable-targets=all.
497 (elf_shlib_list_options): Likewise.
498 (elf_plt_unwind_list_options): Likewise.
499 * configure: Regenerated.
501 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
503 * emulparams/elf32bmipn32-defs.sh: Skip empty EMULATION_NAME.
505 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
507 * Makefile.am (ELF_CLFAGS): New.
508 (AM_CFLAGS): Add $(ELF_CLFAGS).
509 * configure.ac (elf_list_options): New. AC_SUBST.
510 (elf_shlib_list_options): Likewise.
511 (elf_plt_unwind_list_options): Likewise.
512 * lexsup.c (elf_shlib_list_options): New.
513 (elf_static_list_options): Likewise.
514 (elf_plt_unwind_list_options): Likewise.
515 (ld_list_options): Likewise.
516 (help): Call ld_list_options.
517 * Makefile.in: Regenerated.
518 * configure: Likewise.
519 * emulparams/plt_unwind.sh (PLT_UNWIND): New.
520 (PARSE_AND_LIST_OPTIONS): Removed.
521 * emultempl/elf32.em (gld_list_options): New.
522 (gld${EMULATION_NAME}_list_options): Define only if BNDPLT or
523 PARSE_AND_LIST_OPTIONS is defined.
524 (ld_${EMULATION_NAME}_emulation): Replace
525 gld${EMULATION_NAME}_list_options with ${gld_list_options.
527 2015-04-07 Alan Modra <amodra@gmail.com>
530 * ldlang.c (lang_size_sections): Cast shift expression.
532 2015-04-07 Alan Modra <amodra@gmail.com>
534 * emultempl/ppc32elf.em: Handle --no-pic-fixup.
535 (params): Init new field.
536 (ppc_before_allocation): Enable relaxation for pic_fixup.
538 2015-04-07 Nick Clifton <nickc@redhat.com>
540 * ld.h (struct ld_config_type): Add new field: warn_orphan.
541 * ldlex.h (enum option_values): Add OPTION_WARN_ORPHAN and
542 OPTION_NO_WARN_ORPHAN.
543 * lexsup.c (ld_options): Add --warn-orphan and --no-warn-orphan.
544 (parse_args): Handle the new options.
545 * ldemul.c (ldemul_place_orphan): If requested, generate a warning
546 message when an orphan section is placed in the output file.
547 * ld.texinfo: Document the new option.
548 * NEWS: Mention the new feature.
550 2015-04-02 Andrew Turner <andrew@freebsd.org>
552 * Makefile.am: Add FreeBSD aarch64 files.
553 * Makefile.in: Regenerate.
554 * configure.tgt: Add aarch64-*-freebsd* target triple.
555 * emulparams/aarch64fbsd.sh: New file.
556 * emulparams/aarch64fbsdb.sh: New file.
558 2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
560 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Work
561 around a GCC uninitialized warning bug fixed in GCC 4.6.
563 2015-04-01 Tejas Belagod <tejas.belagod@arm.com>
565 * emultempl/aarch64elf.em
566 (aarch64_elf_create_output_section_statements): Add parameter in
567 bfd_elf${ELFSIZE}_aarch64_set_options call.
568 (OPTION_FIX_ERRATUM_843419): Define.
569 (PARSE_AND_LIST_LONGOPTS): Add fix-cortex-a53-843419.
570 (PARSE_AND_LIST_ARGS_CASES): Add OPTION_FIX_ERRATUM_843419.
572 2015-04-01 Chen Gang <gang.chen.5i5j@gmail.com>
574 * emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for
575 relocating operation.
577 2015-04-01 Alan Modra <amodra@gmail.com>
580 * ldlang.c (lang_size_sections): When alignment of sections
581 results in relro base adjustment being too large, don't go lower
582 than the initial value.
583 * ldexp.c (fold_binary <DATA_SEGMENT_RELRO_END>): Comment.
584 * scripttempl/elf.sc (DATA_SEGMENT_ALIGN): Omit SEGMENT_SIZE
585 alignment when SEGMENT_SIZE is the same as MAXPAGESIZE.
587 2015-04-01 Alan Modra <amodra@gmail.com>
589 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Don't
590 init ehdr_start_save.
592 2015-04-01 Alan Modra <amodra@gmail.com>
594 * Makefile.am (eelf32ppcvxworks.c): Depend on ppc32elf.em and
596 (eelf32lppc.c, eelf32lppclinux.c, eelf32lppcnto.c, eelf32lppcsim.c,
597 eelf32ppc.c, eelf32ppc_fbsd.c, eelf32ppclinux.c, eelf32ppcnto.c,
598 eelf32ppcsim.c): Rearrange deps for consistency.
599 * Makefile.in: Regenerate.
601 2015-04-01 Ed Schouten <ed@nuxi.nl>
603 * emultempl/elf32.em (gld*_before_allocation): Zero-initialize
604 the ehdr_start_save variable.
606 2015-03-31 Ed Schouten <ed@nuxi.nl>
608 * Makefile.am (ALL_64_EMULATION_SOURCES): Add
609 eelf_x86_64_cloudabi.c.
610 (eelf_x86_64_cloudabi.c): New.
611 * configure.tgt (targ_emul): Set to elf_x86_64_cloudabi for
613 * Makefile.in: Regenerated.
614 * emulparams/elf_x86_64_cloudabi.sh: New file.
616 2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
618 * configure.ac (AM_ZLIB): Removed.
619 * Makefile.in: Regenerated.
620 * config.in: Likewise.
621 * configure: Likewise.
623 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
625 * emultempl/aarch64elf.em (_aarch64_add_stub_section): Set section
628 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
630 * emultempl/aarch64elf.em
631 (elf${ELFSIZE}_aarch64_add_stub_section): Adjust layout.
633 2015-03-18 Chen Gang <gang.chen.5i5j@gmail.com>
635 * ldmain.c (main): Use %F instead of %X for einfo.
637 2015-03-02 Alan Modra <amodra@gmail.com>
639 * ld.texinfo (Options <-z nocopyreloc>): Rewrite.
641 2015-02-27 Nick Clifton <nickc@redhat.com>
644 * ldlang.c (lang_set_flags): Allow exclamation mark to reverse the
645 sense of the following memory region attribute characters.
647 2015-02-27 Alan Modra <amodra@gmail.com>
649 * Makefile.am (ALL_EMULATION_SOURCES): Sort new h8300 entries.
650 (eh8300elf_linux.c, eh8300helf_linux.c, eh8300self_linux.c,
651 eh8300sxelf_linux.c): Do not invoke genscripts here.
652 * Makefile.in: Regenerate.
654 2015-02-24 Nick Clifton <nickc@redhat.com>
656 * Makefile.am (ev850.c): Add dependency upon
657 $(srcdir)/emultempl/v850elf.em.
658 (ev850_rh850.c): Likewise.
659 * Makefile.in: Regenerate.
660 * emultempl/v850elf.em: New file.
661 * emulparams/v850.sh (EXTRA_EM_FILE): Define.
662 * emulparams/v850_rh850.sh (EXTRA_EM_FILE): Define.
663 * scripttempl/v850.sc: Add .note.renesas section.
664 * scripttempl/v850_rh850.sc: Likewise.
666 2015-02-24 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
668 * scripttempl/avr.sc: Add new user_signatures region. Define and
669 use symbols for all region lengths.
670 * scripttempl/avrtiny.sc: Define and use symbols for all region
673 2015-01-21 Yoshinori Sato <ysato@users.sourceforge.jp>
675 * Makefile.am: (ALL_EMULATION_SOURCES): Add new emulations.
676 * Makefile.in: Regenerate.
677 * configure.tgt: Add h8300-*-linux
678 * emulparams/h8300elf_linux.sh: Add new emulation.
679 * emulparams/h8300helf_linux.sh: Likewise.
680 * emulparams/h8300self_linux.sh: Likewise.
681 * emulparams/h8300sxelf_linux.sh: Likewise.
683 2015-02-23 Nick Clifton <nickc@redhat.com>
685 * lexsup.c (parse_args): Produce a more reasonable error message
686 when -ixxx or -rxxx is the last option on the linker command line.
688 2015-02-14 H.J. Lu <hongjiu.lu@intel.com>
691 * testplug2.c (allsymbolsread_silent): New.
692 (set_register_hook): Handle allsymbolsreadsilent.
693 (onall_symbols_read): Skip a message if allsymbolsread_silent is
696 2015-02-14 Alan Modra <amodra@gmail.com>
699 * ldlang.h (struct lang_input_statement_flags): Add lto_output.
700 * ldlang.c (lang_process): Don't set loading_lto_outputs.
701 * ldfile.c (ldfile_try_open_bfd): Transfer entry flags.lto_output
703 * plugin.c (add_input_file, add_input_library): Set flags.lto_output.
705 2015-02-13 H.J. Lu <hongjiu.lu@intel.com>
707 * NEWS: Mention support for LLVM plugin.
709 2015-02-13 Alan Modra <amodra@gmail.com>
711 * ld.texinfo (Options <--defsym>): Correct cross reference.
713 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
715 * lexsup.c (ld_options): Add --[no-]map-whole-files for gold
716 option compatibility.
718 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
720 * plugin.c (message): Output "warning:" for LDPL_WARNING. Output
721 "error:" for LDPL_FATAL and LDPL_ERROR.
722 * testplug2.c (parse_option): Handle fatal, error and warning.
724 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
726 * testplug2.c (dump_tv_tag): Removed.
727 (onall_symbols_read): Return LDPS_ERR if the file descriptor isn't
729 * testplug3.c (dump_tv_tag): Removed.
730 (onclaim_file): Fix typo.
732 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
735 * Makefile.am (noinst_LTLIBRARIES): Add libldtestplug2.la and
737 (libldtestplug2_la_SOURCES): New.
738 (libldtestplug2_la_CFLAGS): Likewise.
739 (libldtestplug2_la_LDFLAGS): Likewise.
740 (libldtestplug3_la_SOURCES): New.
741 (libldtestplug3_la_CFLAGS): Likewise.
742 (libldtestplug3_la_LDFLAGS): Likewise.
743 * Makefile.in: Regenerated.
744 * testplug2.c: New file.
745 * testplug3.c: Likewise.
747 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
750 * plugin.c: Include ../bfd/plugin.h.
751 (plugin_get_ir_dummy_bfd): Call bfd_create with
752 link_info.output_bfd instead of srctemplate. Copy BFD info
753 from srctemplate only if it doesn't use BFD plugin target
755 (plugin_load_plugins): Call register_ld_plugin_object_p with
757 (plugin_maybe_claim): Renamed to ...
758 (plugin_object_p): This. Return dummy BFD target vector if
759 input is calimed by plugin library, otherwise return NULL.
760 Update plugin_format and plugin_dummy_bfd.
761 (plugin_maybe_claim): New. Use plugin_object_p.
763 2015-02-10 H.J. Lu <hongjiu.lu@intel.com>
765 * plugin.c (plugin_maybe_claim): Initialize use_mmap.
767 2015-02-10 H.J. Lu <hongjiu.lu@intel.com>
769 * plugin.c (plugin_input_file_t): Add use_mmap.
770 (plugin_pagesize): New.
771 (get_view): Use plugin_pagesize. Set use_mmap if mmap is used.
772 (plugin_load_plugins): Initialize plugin_pagesize.
773 (plugin_maybe_claim): Unmap the buffer if plugin didn't claim the
776 2015-02-10 H.J. Lu <hongjiu.lu@intel.com>
778 * plugin.c (get_view): Align offset passed to mmap.
780 2015-02-08 H.J. Lu <hongjiu.lu@intel.com>
782 * ldfile.c (ldfile_try_open_bfd): Don't call bfd_check_format
783 if plugin isn't active or there is no thing more to claim.
785 2015-02-08 H.J. Lu <hongjiu.lu@intel.com>
787 * plugin.c (plugin_maybe_claim): Check format against bfd_object
790 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
792 * plugin.c (plugin_maybe_claim): Replace entry->the_bfd with
795 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
797 * plugin.c: Include "libbfd.h".
798 (plugin_strdup): New.
799 (plugin_maybe_claim): Remove the argument of pointer to struct
800 ld_plugin_input_file. Open and handle input entry.
801 * plugin.h (plugin_maybe_claim): Updated.
802 * ldfile.c (ldfile_try_open_bfd): Call plugin_maybe_claim directly
803 without passing a pointer to struct ld_plugin_input_file.
804 * ldmain.c: Don't include "libbfd.h".
805 (add_archive_element): Call plugin_maybe_claim directly without
806 passing a pointer to struct ld_plugin_input_file.
808 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
810 * ld.texinfo: Document -z text, -z notext and -z textoff.
811 * emultempl/elf32.em (gld${EMULATION_NAME}_list_options): Add
812 -z text, -z notext and -z textoff.
814 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
816 * configure.ac: Add AC_FUNC_MMAP.
817 * config.in: Regenerated.
818 * configure: Likewise.
819 * plugin.c: Include <sys/mman.h>.
820 (MAP_FAILED): New. Defined if not defined.
821 (PROT_READ): Likewise.
822 (MAP_PRIVATE): Likewise.
823 (view_buffer_t): New.
824 (plugin_input_file_t): Add view_buffer.
825 (get_view): Try mmap and cache the view buffer.
826 (plugin_maybe_claim): Initialize view_buffer.
828 2015-02-05 H.J. Lu <hongjiu.lu@intel.com>
830 * plugin.c (release_input_file): Set fd to -1 after closing it.
831 (plugin_maybe_claim): Close fd only if fd != -1.
833 2015-02-05 H.J. Lu <hongjiu.lu@intel.com>
836 * plugin.c: Include <errno.h>.
837 (errno): New. Declare if needed.
838 (plugin_input_file_t): New.
839 (get_input_file): Implemented.
840 (get_view): Likewise.
841 (release_input_file): Likewise.
842 (add_symbols): Updated.
843 (get_symbols): Likewise.
844 (plugin_maybe_claim): Allocate a plugin_input_file_t. Close fd
845 only for a bfd_object input.
847 2015-02-02 Alan Modra <amodra@gmail.com>
849 * emultempl/ppc64elf.em (toc_section_name): New var.
850 (ppc_after_open): Set it.
851 (ppc_before_allocation): Use it.
852 (gld${EMULATION_NAME}_after_allocation): Here too.
854 2015-01-29 H.J. Lu <hongjiu.lu@intel.com>
856 * ldfile.c (ldfile_try_open_bfd): Replace plugin_active_plugins_p()
857 with link_info.lto_plugin_active.
858 * ldlang.c (lang_process): Likewise.
859 * ldmain.c (add_archive_element): Likewise.
860 * plugin.c (plugin_active_plugins_p): Removed.
861 * plugin.h (plugin_active_plugins_p): Likewise.
863 2015-01-28 H.J. Lu <hongjiu.lu@intel.com>
865 * plugin.h (plugin_get_ir_dummy_bfd): Removed. Move comments to
867 * plugin.c (plugin_get_ir_dummy_bfd): Here. Make it static.
869 2015-01-28 H.J. Lu <hongjiu.lu@intel.com>
872 * plugin.c (tv_header_tags(): Add LDPT_GET_VIEW.
873 (get_view): New function.
874 (set_tv_header): Handle LDPT_GET_VIEW.
875 * testplug.c (tag_names): Add LDPT_GET_VIEW.
877 (dump_tv_tag): Handle LDPT_GET_VIEW.
878 (parse_tv_tag): Likewise.
880 2015-01-28 Alan Modra <amodra@gmail.com>
882 * emulparams/elf64ppc.sh (INITIAL_READWRITE_SECTIONS): Define.
883 * emultempl/ppc64elf.em (params): Init new field.
884 (ppc_after_open): New function.
885 (LDEMUL_AFTER_OPEN): Define.
886 * ldlang.c (lang_final): Whitespace fix.
888 2015-01-28 James Bowman <james.bowman@ftdichip.com>
890 * Makefile.am: Add FT32 files.
891 * configure.tgt: Handle FT32 target.
892 * emulparams/elf32ft32.sh: New file.
893 * scripttempl/ft32.sc: New file.
894 * Makefile.in: Regenerate.
896 2015-01-28 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
899 * ldexp.c (fold_name): Fold LENGTH only after
900 lang_first_phase_enum.
901 * ldgram.y (memory_spec): Don't evaluate ORIGIN and LENGTH
903 * ldlang.h (struct memory_region_struct): Add origin_exp and
905 * ldlang.c (lang_do_memory_regions): New.
906 (lang_memory_region_lookup): Initialize origin_exp and
908 (lang_process): Call lang_do_memory_regions.
910 2015-01-20 Andrew Burgess <andrew.burgess@embecosm.com>
912 * ldlang.c (print_assignment): Only evaluate the expression for a
913 PROVIDE'd assignment when the destination is being defined.
914 Display a special message for PROVIDE'd symbols that are not being
917 2015-01-20 Alan Modra <amodra@gmail.com>
919 * emulparams/elf64ppc.sh (OTHER_SDATA_SECTIONS): Use in place of..
920 (OTHER_BSS_SYMBOLS): ..this.
921 (OTHER_PLT_RELOC_SECTIONS): Don't define.
922 (OTHER_GOT_RELOC_SECTIONS): Add rela.toc1 and rela.tocbss.
923 (OTHER_READWRITE_SECTIONS): Don't define. Move .toc1 to..
924 (OTHER_RELRO_SECTIONS_2): ..here.
925 * scripttempl/elf.sc: Move SBSS too when DATA_SDATA.
927 2015-01-20 Alan Modra <amodra@gmail.com>
929 * emulparams/elf64ppc.sh (BSS_PLT): Don't define.
930 (OTHER_READWRITE_SECTIONS): Move .branch_lt to..
931 (OTHER_RELRO_SECTIONS_2): ..here.
932 (DATA_GOT, SEPARATE_GOTPLT, DATA_SDATA, DATA_PLT,
933 PLT_BEFORE_GOT): Define.
934 * scripttempl/elf.sc: Handle DATA_SDATA and DATA_GOT/DATA_PLT/
935 PLT_BEFORE_GOT combination.
936 (DATA_GOT, SDATA_GOT): Don't define if either is already defined.
938 2015-01-20 Alan Modra <amodra@gmail.com>
940 * emulparams/elf64ppc.sh (OTHER_READWRITE_SECTIONS): Move .opd to..
941 (OTHER_RELRO_SECTIONS_2): ..here, new define.
942 * scripttempl/elf.sc: Add OTHER_RELRO_SECTIONS_2.
944 2015-01-19 Alan Modra <amodra@gmail.com>
947 * ldlang.c (lang_process): Run lang_common before lang_gc_sections.
949 2015-01-14 Jiong Wang <jiong.wang@arm.com>
951 * ld-arm/elf32-reject.s: New testcase.
952 * ld-arm/elf32-reject.d: Likewise.
953 * ld-arm/elf32-reject-pie.s: Likewise.
954 * ld-arm/elf32-reject-pie.d: Likewise.
955 * ld-arm/arm-elf.exp: Run new testcases.
956 * ld-arm/ifunc-7.s: Delete f2/f4 test items.
957 * ld-arm/ifunc-7.rd: Likewise.
958 * ld-arm/ifunc-7.gd: Likewise.
959 * ld-arm/ifunc-7.dd: Likewise.
960 * ld-arm/ifunc-8.s: Likewise.
961 * ld-arm/ifunc-8.rd: Likewise.
962 * ld-arm/ifunc-8.gd: Likewise.
963 * ld-arm/ifunc-8.dd: Likewise.
965 2015-01-01 Alan Modra <amodra@gmail.com>
967 * ldver.c (ldversion): Just print current year.
969 2015-01-01 Alan Modra <amodra@gmail.com>
971 Update year range in copyright notice of all files.
973 For older changes see ChangeLog-2014
975 Copyright (C) 2015 Free Software Foundation, Inc.
977 Copying and distribution of this file, with or without modification,
978 are permitted in any medium without royalty provided the copyright
979 notice and this notice are preserved.
985 version-control: never