1 2015-10-27 Alan Modra <amodra@gmail.com>
4 * ldlang.c (lang_insert_orphan): Evaluate __start_* and __stop_*
5 symbol PROVIDE expressions.
6 * ldexp.c (exp_fold_tree_1 <etree_provide>): Define undefweak
9 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
11 * configure.ac: Properly check
12 --enable-compressed-debug-sections={yes,all}.
13 * configure: Regenerated.
15 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
18 * configure.ac: Handle --enable-compressed-debug-sections=*,ld,*.
19 * configure: Regenerated.
21 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
23 * ld/ld.texinfo: Document "-z call-nop=PADDING" option.
24 * emulparams/call_nop.sh: New file.
25 * emulparams/elf_i386_be.sh: Source
26 ${srcdir}/emulparams/call_nop.sh.
27 * emulparams/elf_i386_chaos.sh: Likewise.
28 * emulparams/elf_i386_ldso.sh: Likewise.
29 * emulparams/elf_i386_vxworks.sh: Likewise.
30 * emulparams/elf_iamcu.sh: Likewise.
31 * emulparams/elf_k1om.sh: Likewise.
32 * emulparams/elf_l1om.sh: Likewise.
33 * emulparams/elf_x86_64.sh: Likewise.
34 * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set
35 link_info.call_nop_byte if $CALL_NOP_BYTE isn't empty.
37 2015-10-21 Nick Clifton <nickc@redhat.com>
40 * configure.ac: Add --enable-compressed-debug-sections with
41 options of all, none or ld.
42 * configure: Regenerate.
43 * config.in: Regenerate.
44 * ld.texinfo: Document how to determine the default action for
46 * ldmain.c (main): If DEFAULT_FLAG_COMPRESS_DEBUG is defined then
47 set the compress_debug field of the link_info structure to
49 * lexsup.c (elf_static_list_options): Output the default setting
50 for the --compress-debug-sections option.
51 * NEWS: Mention the new configure option.
53 2015-10-15 H.J. Lu <hongjiu.lu@intel.com>
55 * ld.texinfo: Fix a typo for "-z noextern-protected-data".
57 2015-10-15 Simon Dardis <Simon.Dardis@imgtec.com>
59 * ld/ldexp.c: (try_copy_symbol_flags): New. Factored out from...
60 (exp_fold_tree_1): Here. Cope with ternary operator in
61 assignments. Use new helper.
63 2015-10-14 Nick Clifton <nickc@redhat.com>
65 * po/zh_TW.po: Updated Chinese translation.
67 2015-10-13 Nick Clifton <nickc@redhat.com>
69 * po/zh_TW.po: Updated Chinese translation.
71 2015-10-07 Claudiu Zissulescu <claziss@synopsys.com>
72 Cupertino Miranda <cmiranda@synopsys.com>
74 * configure.tgt: Added target arc-*-elf* and arc*-*-linux-uclibc*.
75 * emulparams/arcebelf_prof.sh: New file
76 * emulparams/arcebelf.sh: Likewise.
77 * emulparams/arceblinux_prof.sh: Likewise.
78 * emulparams/arceblinux.sh: Likewise.
79 * emulparams/arcelf_prof.sh: Likewise.
80 * emulparams/arcelf.sh: Likewise.
81 * emulparams/arclinux_prof.sh: Likewise.
82 * emulparams/arclinux.sh: Likewise.
83 * emulparams/arcv2elfx.sh: Likewise.
84 * emulparams/arcv2elf.sh: Likewise.
85 * emultempl/arclinux.em: Likewise.
86 * scripttempl/arclinux.sc: Likewise.
87 * scripttempl/elfarc.sc: Likewise.
88 * scripttempl/elfarcv2.sc: Likewise
89 * Makefile.am: Add new ARC emulations.
90 * Makefile.in: Regenerate.
91 * NEWS: Mention the new feature.
93 2015-10-04 H.J. Lu <hongjiu.lu@intel.com>
95 * configure.tgt (targ_extra_emuls): Add elf_iamcu for Solaris2/x86.
97 2015-10-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
99 * configure.tgt (targ_extra_emuls): Remove shlelf and
100 shelf from sh*-*-linux cases.
102 2015-09-30 Rich Felker <dalias@libc.org>
104 * configure.tgt (targ_extra_emuls): Add fdpic and misc
105 emulations to sh*-*-linux* targets.
107 2015-09-29 Nick Clifton <nickc@redhat.com>
110 * ld.texinfo (Options): Fix spelling mistake.
112 2015-09-24 Alan Modra <amodra@gmail.com>
115 * ldmain.c (main): Always enable --sysroot.
116 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
117 prepend sysroot to relative rpath/runpath.
119 2015-09-23 Nick Clifton <nickc@redhat.com>
121 * emultempl/elf32.em (ehdr_start_empty): New static variable.
122 (before_allocation): Use it to initialise ehdr_start_save.
123 * emultempl/pe.em (write_build_id): Remove useless double
125 * emultempl/pep.em (write_build_id): Likewise.
127 2015-09-22 H.J. Lu <hongjiu.lu@intel.com>
129 * emultempl/alphaelf.em (alpha_after_parse): Call
130 gld${EMULATION_NAME}_after_parse instead of
132 * emultempl/cr16elf.em (cr16elf_after_parse): Likewise.
133 * emultempl/crxelf.em (crxelf_after_parse); Likewise.
134 * emultempl/hppaelf.em (hppaelf_after_parse): Likewise.
135 * emultempl/mipself.em (mips_after_parse): Likewise.
136 * emultempl/nds32elf.em (nds32_elf_after_parse): Likewise.
137 * emultempl/elf32.em: Don't include ldlex.h.
138 (gld${EMULATION_NAME}_after_parse): New function.
139 (gld${EMULATION_NAME}_handle_option) [GENERATE_PIE_SCRIPT]
140 <OPTION_PIE>: Removed.
141 (ld_${EMULATION_NAME}_emulation): Replace after_parse_default
142 with gld${EMULATION_NAME}_after_parse.
143 * emultempl/ia64elf.em (gld${EMULATION_NAME}_after_parse):
145 (ia64elf_after_parse): This. Call
146 gld${EMULATION_NAME}_after_parse instead of after_parse_default.
147 (LDEMUL_AFTER_PARSE): Replace gld${EMULATION_NAME}_after_parse
148 with ia64elf_after_parse.
150 2015-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
152 * emulparams/solaris2.sh (GENERATE_PIE_SCRIPT): Set to yes.
154 * emultempl/elf32.em: Include ldlex.h.
155 (gld${EMULATION_NAME}_handle_option) [GENERATE_PIE_SCRIPT]
156 <OPTION_PIE>: Set DF_1_PIE.
158 2015-09-22 Alan Modra <amodra@gmail.com>
160 * ld.texinfo: Put --dotsyms/--no-dotsyms on separate lines.
161 Ditto for --save-restore-funcs and --tls-get-addr-optimize.
163 2015-09-20 Rich Felker <dalias@libc.org>
165 * ld.texinfo (--no-dynamic-linker): Document.
166 * ldlex.h (enum option_values): Add OPTION_NO_DYNAMIC_LINKER.
167 * lexsup.c (ld_options, parse_args): Handle --no-dynamic-linker.
169 2015-09-18 Alan Modra <amodra@gmail.com>
171 * ld.texinfo: Document PowerPC64 --{no-,}save-restore-funcs.
173 2015-09-18 Alan Modra <amodra@gmail.com>
175 * emultempl/ppc64elf.em (params): Init tls_get_addr_opt field to -1.
176 (OPTION_TLS_GET_ADDR_OPT): Define.
177 (PARSE_AND_LIST_LONGOPTS): Handle --tls-get-addr-opt.
178 (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Likewise.
179 * ld.texinfo: Document --tls-get-addr-optimize and
180 --no-tls-get-addr-optimize.
182 2015-09-18 Alan Modra <amodra@gmail.com>
185 * ldexp.h (struct ldexp_control): Add rel_from_abs.
186 (ldexp_finalize_syms): Declare.
187 * ldexp.c (new_rel_from_abs): Keep absolute for expressions
188 outside of output section statements. Set rel_from_abs.
189 (make_abs, exp_fold_tree, exp_fold_tree_no_dot): Clear rel_from_abs.
190 (struct definedness_hash_entry): Add final_sec, and comment.
191 (update_definedness): Set final_sec.
192 (set_sym_sections, ldexp_finalize_syms): New functions.
193 * ldlang.c (lang_process): Call ldexp_finalize_syms.
195 2015-09-10 Nick Clifton <nickc@redhat.com>
197 * po/zh_CN.po: Updated simplified Chinese translation.
199 2015-09-09 James Bowman <james.bowman@ftdichip.com>
201 * scripttempl/ft32.sc: default linker script RAM and
204 2015-09-09 Nick Clifton <nickc@redhat.com>
206 * po/zh_CN.po: Updated simplified Chinese translation.
208 2015-09-08 Nick Clifton <nickc@redhat.com>
210 * ld.texinfo (Source Code Reference): Extend description to
211 include an example using arrays.
213 2015-07-28 Andrew Burgess <andrew.burgess@embecosm.com>
215 * ld.h (enum orphan_handling_enum): New.
216 (ld_config_type): Remove warn_orphan, add orphan_handling.
217 * ldemul.c (ldemul_place_orphan): Remove warning about orphan
219 * ldlang.c (ldlang_place_orphan): New function.
220 (lang_place_orphans): Call ldlang_place_orphan.
221 * ldlex.h (enum option_values): Remove OPTION_WARN_ORPHAN and
222 OPTION_NO_WARN_ORPHAN, add OPTION_ORPHAN_HANDLING.
223 * lexsup.c (ld_options): Remove 'warn-orphan' and
224 'no-warn-orphan', add 'orphan-handling'.
225 (parse_args): Remove handling for OPTION_WARN_ORPHAN and
226 OPTION_NO_WARN_ORPHAN, add handling for OPTION_ORPHAN_HANDLING.
227 * NEWS: Replace text about --warn-orphan with --orphan-handling.
228 * ld.texinfo (Options): Remove --warn-orphan entry and add
229 entry on --orphan-handling.
230 (Orphan Sections): Add reference to relevant command line options.
232 2015-09-03 Nick Clifton <nickc@redhat.com>
234 * ld.texinfo (--build-id): Fix typo. The COFF/PE build-id section
235 is called .buildid not .build-id.
237 2015-09-03 Nick Clifton <nickc@redhat.com>
239 (Source Code Reference): Fix off-by-one typo in example of how to
240 use linker script symbols in C source code.
242 2015-08-19 Alan Modra <amodra@gmail.com>
244 * emultempl/aix.em: Don't set link_info.pic.
245 * emultempl/pe.em: Likewise.
246 * emultempl/pep.em: Likewise.
247 * emultempl/sunos.em: Likewise.
248 * lexsup.c (parse_args): Likewise. Set type_pie for -pie.
249 * plugin.c (set_tv_header <LDPT_LINKER_OUTPUT>): Simplify.
251 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
253 * ld/ldctor.c: Replace shared, executable, relocatable and pie
254 fields with bfd_link_executable, bfd_link_dll,
255 bfd_link_relocatable, bfd_link_pic and bfd_link_pie.
256 * ld/ldemul.c: Likewise.
257 * ld/ldfile.c: Likewise.
258 * ld/ldlang.c: Likewise.
259 * ld/ldmain.c: Likewise.
260 * ld/ldwrite.c: Likewise.
261 * ld/lexsup.c: Likewise.
262 * ld/pe-dll.c: Likewise.
263 * ld/plugin.c: Likewise.
264 * ld/emultempl/aarch64elf.em: Likewise.
265 * ld/emultempl/aix.em: Likewise.
266 * ld/emultempl/alphaelf.em: Likewise.
267 * ld/emultempl/armcoff.em: Likewise.
268 * ld/emultempl/armelf.em: Likewise.
269 * ld/emultempl/avrelf.em: Likewise.
270 * ld/emultempl/beos.em: Likewise.
271 * ld/emultempl/cr16elf.em: Likewise.
272 * ld/emultempl/elf-generic.em: Likewise.
273 * ld/emultempl/elf32.em: Likewise.
274 * ld/emultempl/genelf.em: Likewise.
275 * ld/emultempl/generic.em: Likewise.
276 * ld/emultempl/gld960.em: Likewise.
277 * ld/emultempl/gld960c.em: Likewise.
278 * ld/emultempl/hppaelf.em: Likewise.
279 * ld/emultempl/irix.em: Likewise.
280 * ld/emultempl/linux.em: Likewise.
281 * ld/emultempl/lnk960.em: Likewise.
282 * ld/emultempl/m68hc1xelf.em: Likewise.
283 * ld/emultempl/m68kcoff.em: Likewise.
284 * ld/emultempl/m68kelf.em: Likewise.
285 * ld/emultempl/metagelf.em: Likewise.
286 * ld/emultempl/mipself.em: Likewise.
287 * ld/emultempl/mmo.em: Likewise.
288 * ld/emultempl/msp430.em: Likewise.
289 * ld/emultempl/nds32elf.em: Likewise.
290 * ld/emultempl/needrelax.em: Likewise.
291 * ld/emultempl/nios2elf.em: Likewise.
292 * ld/emultempl/pe.em: Likewise.
293 * ld/emultempl/pep.em: Likewise.
294 * ld/emultempl/ppc32elf.em: Likewise.
295 * ld/emultempl/ppc64elf.em: Likewise.
296 * ld/emultempl/sh64elf.em: Likewise.
297 * ld/emultempl/solaris2.em: Likewise.
298 * ld/emultempl/spuelf.em: Likewise.
299 * ld/emultempl/sunos.em: Likewise.
300 * ld/emultempl/tic6xdsbt.em: Likewise.
301 * ld/emultempl/ticoff.em: Likewise.
302 * ld/emultempl/v850elf.em: Likewise.
303 * ld/emultempl/vms.em: Likewise.
304 * ld/emultempl/vxworks.em: Likewise.
306 2015-08-18 Alan Modra <amodra@gmail.com>
308 * ldexp.c (exp_fold_tree_1): Clear linker_def on symbol assignment.
310 2015-08-06 Alan Modra <amodra@gmail.com>
312 * ldexp.c (align_dot_val): Delete.
313 (fold_unary <ALIGN_K, NEXT>): Revert 2015-07-10 change.
314 (is_align_conditional): Revert 2015-07-20 change.
315 (exp_fold_tree_1): Likewise, but keep expanded comment.
316 * scripttempl/elf.sc (.ldata, .bss): Revert 2015-07-20 change.
317 * ld.texinfo (<ALIGN>): Correct description.
319 2015-08-04 Andrew Burgess <andrew.burgess@embecosm.com>
321 * ld.texinfo (Options): Document --require-defined option.
322 * ldlang.c (struct require_defined_symbol): New structure.
323 (require_defined_symbol_list): New variable.
324 (ldlang_add_require_defined): New function.
325 (ldlang_check_require_defined_symbols): New function.
326 (lang_process): Check required symbols are defined.
327 * ldlang.h (ldlang_add_require_defined): Declare.
328 * ldlex.h (enum option_values): Add OPTION_REQUIRE_DEFINED_SYMBOL.
329 * lexsup.c (ld_options): Add '--require-defined' entry.
330 (parse_args): Handle '--requre-defined' entry.
331 * NEWS: Mention new '--require-defined' option.
333 2015-08-03 Andrew Burgess <andrew.burgess@embecosm.com>
335 * ld.texinfo (MEMORY): Explain that multiple MEMORY commands are
338 2015-07-29 H.J. Lu <hongjiu.lu@intel.com>
340 * lexsup.c (parse_args): Don't set link_info.executable to
341 TRUE for link_info.relocatable.
343 2015-07-27 H.J. Lu <hongjiu.lu@intel.com>
345 * configure: Regenerated.
347 2015-07-24 Nick Clifton <nickc@redhat.com>
349 * emulparams/elf32rl78.sh (OTHER_SECTIONS): Provide a value for
350 the _-rl78_abs__ symbol.
352 2015-07-20 Alan Modra <amodra@gmail.com>
354 * emulparams/criself.sh (INIT_ADDR, FINI_ADDR): Define.
355 (INIT_START, FINI_START): Don't ALIGN.
356 * scriptempl/elf.sc (.init, .fini): Apply INIT_ADDR/FINI_ADDR.
358 2015-07-20 Alan Modra <amodra@gmail.com>
360 * scripttempl/elf.sc (.ldata, .bss): Align absolute value of dot.
361 * ldexp.c (is_align_conditional): Handle binary ALIGN.
362 (exp_fold_tree_1): Move code setting SEC_KEEP for assignments to
363 dot inside output sections. Handle absolute expressions.
365 2015-07-14 H.J. Lu <hongjiu.lu@intel.com>
367 * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Make
368 --compress-debug-sections=zlib the same as
369 --compress-debug-sections=zlib-gabi.
370 * ld.texinfo: Change --compress-debug-sections=zlib to zlib-gabi.
372 2015-07-14 Nick Clifton <nickc@redhat.com>
374 * ld.texinfo (Options): Add missing period after @xref.
376 2015-07-10 Alan Modra <amodra@gmail.com>
378 * ldexp.c (align_dot_val): New function.
379 (fold_unary <ALIGN_K, NEXT>): Use it.
381 2015-07-03 Kai Tietz <ktietz@redhat.com>
384 * scripttempl/pep.sc: Mark .idata*, .CRT*, .tls*,
385 .rsrc*, .init, .ctor*, .dtor*, .fini, .jcr,
386 .eh_frame, .pdata. .xdata, and .gcc_except_table sections
388 * scripttempl/pe.sc: Likewise.
389 * ld.texinfo: Document that --gc-sections has experimental support
390 for COFF and PE targets.
391 * NEWS: Mention experimental support.
393 2015-07-03 Alan Modra <amodra@gmail.com>
395 * Makefile.am (eelf32or1k.c, eelf32or1k_linux.c): Depend on ELF_DEPS.
396 * Makefile.in: Regenerate.
398 2015-06-28 H.J. Lu <hongjiu.lu@intel.com>
400 * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option):
401 Replace COMPRESS_DEBUG_ZLIB with COMPRESS_DEBUG_GNU_ZLIB.
403 2015-06-26 H.J. Lu <hongjiu.lu@intel.com>
405 * emulparams/elf_iamcu.sh (COMPILE_IN): New.
407 2015-06-15 Nick Clifton <nickc@redhat.com>
410 * emultempl/pe.em (pe_find_data_imports): Generate an error if a
411 symbol name is too long to handle.
412 * emultempl/pep.em (pep_find_data_imports): Likewise.
414 2015-06-12 Tristan Gingold <gingold@adacore.com>
416 * NEWS: Mention new option.
417 * lexsup.c (parse_args): Handle --print-memory-usage.
418 (ld_options): Add --print-memory-usage.
419 * ldmain.c (main): Call lang_print_memory_usage.
420 * ldlex.h (enum option_values): Add OPTION_PRINT_MEMORY_USAGE.
421 * ldlang.h: Add prototype of lang_print_memory_usage.
422 * ldlang.c (lang_print_memory_size, lang_print_memory_usage): New
424 * ld.texinfo (Options): Document --print-memory-usage.
425 * ld.h (args_type): Add print_memory_usage field.
427 2015-06-08 Nick Clifton <nickc@redhat.com>
429 * po/fr.po: Updated French Translation.
431 2015-05-28 Catherine Moore <clm@codesourcery.com>
432 Paul Brook <paul@codesourcery.com>
434 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open):
435 Add Compact EH support.
436 * scripttempl/elf.sc: Handle .eh_frame_entry and .gnu_extab
439 2015-05-17 Chung-Lin Tang <cltang@codesourcery.com>
441 * configure.ac (AC_PROG_GREP): Check for grep program.
442 (elf_list_options,elf_shlib_list_options,elf_plt_unwind_list_options):
443 Enable ELF option printing for emulations containing
444 'TEMPLATE_NAME=elf32'.
445 * configure: Regenerate.
447 2015-05-14 Nick Clifton <nickc@redhat.com>
449 * ld.texinfo (ASSERT): Describe the interaction with PROVIDEd
452 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
454 * configure.tgt: Support i[3-7]86-*-elfiamcu target.
456 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
458 * Makefile.am (ALL_EMULATION_SOURCES): Add eelf_iamcu.c.
460 * configure.tgt (targ_extra_emuls): Add elf_iamcu if elf_i386 is
462 * Makefile.in: Regenerated.
463 * emulparams/elf_iamcu.sh: New file.
465 2015-05-05 Nick Clifton <nickc@redhat.com>
467 * emulparams/msp430elf.sh (TEMPLATE_NAME): Change to msp430.
468 * scripttempl/msp430.sc (.text): Add .lower.text and .either.text.
469 (.data): Add .lower.data and .either.data.
470 (.bss): Add .lower.bss and .either.bss.
471 (.rodata): Add .lower.rodata and .either.rodata.
472 * emultempl/msp430.em: New file. Implements a new orphan
473 placement algorithm that divides sections between lower and upper
475 * Makefile.am (emsp430elf.c): Depend upon msp430.em.
476 *emsp430X.c): Likewise.
477 * Makefine.in: Regenerate.
479 2015-04-28 Andreas Schwab <schwab@linux-m68k.org>
482 * ldlex.l (INPUTLIST): Increment lineno on newline.
484 2015-04-24 Alan Modra <amodra@gmail.com>
486 * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation):
487 Call gld${EMULATION_NAME}_map_segments regardless of need_laying_out.
489 2015-04-24 DJ Delorie <dj@redhat.com>
491 * Makefile.am (msp430): Rename primary emulation to msp430elf.
492 (emsp430.c): Rename to emsp430elf.c, update dependencies
493 (emsp430X.c): Update dependencies.
494 * Makefile.in: Likewise.
495 * configure.tgt (msp430-*-*): Rename primary emulation to msp430elf.
496 * emulparams/msp430.sh: Rename to msp430elf.sh.
497 * emulparams/msp430X.sh: Update.
499 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
502 * ldfile.c (ldfile_try_open_bfd): Set is_linker_input to 1.
504 2015-04-23 Alan Modra <amodra@gmail.com>
506 * emulparams/elf64ppc.sh (GOT): Align.
508 2015-04-22 Alan Modra <amodra@gmail.com>
510 * ldexp.h (struct ldexp_control): Delete dataseg.min_base. Add
511 data_seg.relro_offset.
512 * ldexp.c (fold_binary <DATA_SEGMENT_ALIGN>): Don't set min_base.
513 (fold_binary <DATA_SEGMENT_RELRO_END>): Do set relro_offset.
514 * ldlang.c (lang_size_sections): Rewrite code adjusting relro
515 segment base to line up last section on page boundary.
517 2015-04-15 H.J. Lu <hongjiu.lu@intel.com>
520 --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi].
522 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
524 * ld.texinfo: Document --compress-debug-sections=.
525 * ldmain.c (main): Set BFD_COMPRESS on output_bfd if
526 COMPRESS_DEBUG is set. Set BFD_COMPRESS_GABI on output_bfd
527 for COMPRESS_DEBUG_GABI_ZLIB.
528 * lexsup.c (elf_static_list_options): Add
529 --compress-debug-sections=.
530 * emultempl/elf32.em (OPTION_COMPRESS_DEBUG): New.
531 (xtra_long): Add "compress-debug-sections".
532 (gld${EMULATION_NAME}_handle_option): Handle
533 OPTION_COMPRESS_DEBUG.
535 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
538 * ld.texinfo: Document "-z noextern-protected-data".
539 * ldmain.c (main): Initialize link_info.extern_protected_data
541 * lexsup.c (elf_shlib_list_options): Add
542 "-z [no]extern-protected-data".
543 * emulparams/elf32_x86_64.sh: Source extern_protected_data.sh.
544 * emulparams/elf_i386.sh: Likewise.
545 * emulparams/elf_i386_be.sh: Likewise.
546 * emulparams/elf_i386_chaos.sh: Likewise.
547 * emulparams/elf_i386_ldso.sh: Likewise.
548 * emulparams/elf_i386_vxworks.sh: Likewise.
549 * emulparams/elf_k1om.sh: Likewise.
550 * emulparams/elf_l1om.sh: Likewise.
551 * emulparams/elf_x86_64.sh: Source extern_protected_data.sh.
552 (PARSE_AND_LIST_OPTIONS): Renamed to ...
553 (PARSE_AND_LIST_OPTIONS_BNDPLT): This.
554 (PARSE_AND_LIST_ARGS_CASE_Z): Renamed to ...
555 (PARSE_AND_LIST_ARGS_CASE_Z_BNDPLT): This.
556 (PARSE_AND_LIST_OPTIONS): Append $PARSE_AND_LIST_OPTIONS_BNDPLT.
557 (PARSE_AND_LIST_ARGS_CASE_Z): Append
558 $PARSE_AND_LIST_ARGS_CASE_Z_BNDPLT.
559 * emulparams/extern_protected_data.sh: New file.
561 2015-04-11 H.J. Lu <hongjiu.lu@intel.com>
563 * plugin.c (plugin_load_plugins): Removed an extra ';'.
565 2015-04-10 Nick Clifton <nickc@redhat.com>
568 * ld.texinfo (--be8): Add a note about the interaction of this
569 option with the assembler's -EB option.
571 2015-04-10 Alan Modra <amodra@gmail.com>
573 * configure.ac: Set elf_list_options etc. in proper case.
574 * configure: Regenerate.
576 2015-04-10 Alan Modra <amodra@gmail.com>
579 * ldlang.c (lang_process): Add _init and _fini to gc_sym_list.
581 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
583 * emulparams/elf_x86_64.sh (BNDPLT): Removed.
584 (PARSE_AND_LIST_OPTIONS): New.
585 (PARSE_AND_LIST_ARGS_CASE_Z): Likewise.
586 * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Remove
587 BNDPLT check. Handle PARSE_AND_LIST_ARGS_CASE_Z.
588 (gld${EMULATION_NAME}_list_options): Remove BNDPLT check.
590 2015-04-09 Nick Clifton <nickc@redhat.com>
592 * po/fr.po: Updated French translation.
594 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
596 * configure.ac (elf_list_options): Set to TRUE for
597 --enable-targets=all.
598 (elf_shlib_list_options): Likewise.
599 (elf_plt_unwind_list_options): Likewise.
600 * configure: Regenerated.
602 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
604 * emulparams/elf32bmipn32-defs.sh: Skip empty EMULATION_NAME.
606 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
608 * Makefile.am (ELF_CLFAGS): New.
609 (AM_CFLAGS): Add $(ELF_CLFAGS).
610 * configure.ac (elf_list_options): New. AC_SUBST.
611 (elf_shlib_list_options): Likewise.
612 (elf_plt_unwind_list_options): Likewise.
613 * lexsup.c (elf_shlib_list_options): New.
614 (elf_static_list_options): Likewise.
615 (elf_plt_unwind_list_options): Likewise.
616 (ld_list_options): Likewise.
617 (help): Call ld_list_options.
618 * Makefile.in: Regenerated.
619 * configure: Likewise.
620 * emulparams/plt_unwind.sh (PLT_UNWIND): New.
621 (PARSE_AND_LIST_OPTIONS): Removed.
622 * emultempl/elf32.em (gld_list_options): New.
623 (gld${EMULATION_NAME}_list_options): Define only if BNDPLT or
624 PARSE_AND_LIST_OPTIONS is defined.
625 (ld_${EMULATION_NAME}_emulation): Replace
626 gld${EMULATION_NAME}_list_options with ${gld_list_options.
628 2015-04-07 Alan Modra <amodra@gmail.com>
631 * ldlang.c (lang_size_sections): Cast shift expression.
633 2015-04-07 Alan Modra <amodra@gmail.com>
635 * emultempl/ppc32elf.em: Handle --no-pic-fixup.
636 (params): Init new field.
637 (ppc_before_allocation): Enable relaxation for pic_fixup.
639 2015-04-07 Nick Clifton <nickc@redhat.com>
641 * ld.h (struct ld_config_type): Add new field: warn_orphan.
642 * ldlex.h (enum option_values): Add OPTION_WARN_ORPHAN and
643 OPTION_NO_WARN_ORPHAN.
644 * lexsup.c (ld_options): Add --warn-orphan and --no-warn-orphan.
645 (parse_args): Handle the new options.
646 * ldemul.c (ldemul_place_orphan): If requested, generate a warning
647 message when an orphan section is placed in the output file.
648 * ld.texinfo: Document the new option.
649 * NEWS: Mention the new feature.
651 2015-04-02 Andrew Turner <andrew@freebsd.org>
653 * Makefile.am: Add FreeBSD aarch64 files.
654 * Makefile.in: Regenerate.
655 * configure.tgt: Add aarch64-*-freebsd* target triple.
656 * emulparams/aarch64fbsd.sh: New file.
657 * emulparams/aarch64fbsdb.sh: New file.
659 2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
661 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Work
662 around a GCC uninitialized warning bug fixed in GCC 4.6.
664 2015-04-01 Tejas Belagod <tejas.belagod@arm.com>
666 * emultempl/aarch64elf.em
667 (aarch64_elf_create_output_section_statements): Add parameter in
668 bfd_elf${ELFSIZE}_aarch64_set_options call.
669 (OPTION_FIX_ERRATUM_843419): Define.
670 (PARSE_AND_LIST_LONGOPTS): Add fix-cortex-a53-843419.
671 (PARSE_AND_LIST_ARGS_CASES): Add OPTION_FIX_ERRATUM_843419.
673 2015-04-01 Chen Gang <gang.chen.5i5j@gmail.com>
675 * emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for
676 relocating operation.
678 2015-04-01 Alan Modra <amodra@gmail.com>
681 * ldlang.c (lang_size_sections): When alignment of sections
682 results in relro base adjustment being too large, don't go lower
683 than the initial value.
684 * ldexp.c (fold_binary <DATA_SEGMENT_RELRO_END>): Comment.
685 * scripttempl/elf.sc (DATA_SEGMENT_ALIGN): Omit SEGMENT_SIZE
686 alignment when SEGMENT_SIZE is the same as MAXPAGESIZE.
688 2015-04-01 Alan Modra <amodra@gmail.com>
690 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Don't
691 init ehdr_start_save.
693 2015-04-01 Alan Modra <amodra@gmail.com>
695 * Makefile.am (eelf32ppcvxworks.c): Depend on ppc32elf.em and
697 (eelf32lppc.c, eelf32lppclinux.c, eelf32lppcnto.c, eelf32lppcsim.c,
698 eelf32ppc.c, eelf32ppc_fbsd.c, eelf32ppclinux.c, eelf32ppcnto.c,
699 eelf32ppcsim.c): Rearrange deps for consistency.
700 * Makefile.in: Regenerate.
702 2015-04-01 Ed Schouten <ed@nuxi.nl>
704 * emultempl/elf32.em (gld*_before_allocation): Zero-initialize
705 the ehdr_start_save variable.
707 2015-03-31 Ed Schouten <ed@nuxi.nl>
709 * Makefile.am (ALL_64_EMULATION_SOURCES): Add
710 eelf_x86_64_cloudabi.c.
711 (eelf_x86_64_cloudabi.c): New.
712 * configure.tgt (targ_emul): Set to elf_x86_64_cloudabi for
714 * Makefile.in: Regenerated.
715 * emulparams/elf_x86_64_cloudabi.sh: New file.
717 2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
719 * configure.ac (AM_ZLIB): Removed.
720 * Makefile.in: Regenerated.
721 * config.in: Likewise.
722 * configure: Likewise.
724 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
726 * emultempl/aarch64elf.em (_aarch64_add_stub_section): Set section
729 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
731 * emultempl/aarch64elf.em
732 (elf${ELFSIZE}_aarch64_add_stub_section): Adjust layout.
734 2015-03-18 Chen Gang <gang.chen.5i5j@gmail.com>
736 * ldmain.c (main): Use %F instead of %X for einfo.
738 2015-03-02 Alan Modra <amodra@gmail.com>
740 * ld.texinfo (Options <-z nocopyreloc>): Rewrite.
742 2015-02-27 Nick Clifton <nickc@redhat.com>
745 * ldlang.c (lang_set_flags): Allow exclamation mark to reverse the
746 sense of the following memory region attribute characters.
748 2015-02-27 Alan Modra <amodra@gmail.com>
750 * Makefile.am (ALL_EMULATION_SOURCES): Sort new h8300 entries.
751 (eh8300elf_linux.c, eh8300helf_linux.c, eh8300self_linux.c,
752 eh8300sxelf_linux.c): Do not invoke genscripts here.
753 * Makefile.in: Regenerate.
755 2015-02-24 Nick Clifton <nickc@redhat.com>
757 * Makefile.am (ev850.c): Add dependency upon
758 $(srcdir)/emultempl/v850elf.em.
759 (ev850_rh850.c): Likewise.
760 * Makefile.in: Regenerate.
761 * emultempl/v850elf.em: New file.
762 * emulparams/v850.sh (EXTRA_EM_FILE): Define.
763 * emulparams/v850_rh850.sh (EXTRA_EM_FILE): Define.
764 * scripttempl/v850.sc: Add .note.renesas section.
765 * scripttempl/v850_rh850.sc: Likewise.
767 2015-02-24 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
769 * scripttempl/avr.sc: Add new user_signatures region. Define and
770 use symbols for all region lengths.
771 * scripttempl/avrtiny.sc: Define and use symbols for all region
774 2015-01-21 Yoshinori Sato <ysato@users.sourceforge.jp>
776 * Makefile.am: (ALL_EMULATION_SOURCES): Add new emulations.
777 * Makefile.in: Regenerate.
778 * configure.tgt: Add h8300-*-linux
779 * emulparams/h8300elf_linux.sh: Add new emulation.
780 * emulparams/h8300helf_linux.sh: Likewise.
781 * emulparams/h8300self_linux.sh: Likewise.
782 * emulparams/h8300sxelf_linux.sh: Likewise.
784 2015-02-23 Nick Clifton <nickc@redhat.com>
786 * lexsup.c (parse_args): Produce a more reasonable error message
787 when -ixxx or -rxxx is the last option on the linker command line.
789 2015-02-14 H.J. Lu <hongjiu.lu@intel.com>
792 * testplug2.c (allsymbolsread_silent): New.
793 (set_register_hook): Handle allsymbolsreadsilent.
794 (onall_symbols_read): Skip a message if allsymbolsread_silent is
797 2015-02-14 Alan Modra <amodra@gmail.com>
800 * ldlang.h (struct lang_input_statement_flags): Add lto_output.
801 * ldlang.c (lang_process): Don't set loading_lto_outputs.
802 * ldfile.c (ldfile_try_open_bfd): Transfer entry flags.lto_output
804 * plugin.c (add_input_file, add_input_library): Set flags.lto_output.
806 2015-02-13 H.J. Lu <hongjiu.lu@intel.com>
808 * NEWS: Mention support for LLVM plugin.
810 2015-02-13 Alan Modra <amodra@gmail.com>
812 * ld.texinfo (Options <--defsym>): Correct cross reference.
814 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
816 * lexsup.c (ld_options): Add --[no-]map-whole-files for gold
817 option compatibility.
819 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
821 * plugin.c (message): Output "warning:" for LDPL_WARNING. Output
822 "error:" for LDPL_FATAL and LDPL_ERROR.
823 * testplug2.c (parse_option): Handle fatal, error and warning.
825 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
827 * testplug2.c (dump_tv_tag): Removed.
828 (onall_symbols_read): Return LDPS_ERR if the file descriptor isn't
830 * testplug3.c (dump_tv_tag): Removed.
831 (onclaim_file): Fix typo.
833 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
836 * Makefile.am (noinst_LTLIBRARIES): Add libldtestplug2.la and
838 (libldtestplug2_la_SOURCES): New.
839 (libldtestplug2_la_CFLAGS): Likewise.
840 (libldtestplug2_la_LDFLAGS): Likewise.
841 (libldtestplug3_la_SOURCES): New.
842 (libldtestplug3_la_CFLAGS): Likewise.
843 (libldtestplug3_la_LDFLAGS): Likewise.
844 * Makefile.in: Regenerated.
845 * testplug2.c: New file.
846 * testplug3.c: Likewise.
848 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
851 * plugin.c: Include ../bfd/plugin.h.
852 (plugin_get_ir_dummy_bfd): Call bfd_create with
853 link_info.output_bfd instead of srctemplate. Copy BFD info
854 from srctemplate only if it doesn't use BFD plugin target
856 (plugin_load_plugins): Call register_ld_plugin_object_p with
858 (plugin_maybe_claim): Renamed to ...
859 (plugin_object_p): This. Return dummy BFD target vector if
860 input is calimed by plugin library, otherwise return NULL.
861 Update plugin_format and plugin_dummy_bfd.
862 (plugin_maybe_claim): New. Use plugin_object_p.
864 2015-02-10 H.J. Lu <hongjiu.lu@intel.com>
866 * plugin.c (plugin_maybe_claim): Initialize use_mmap.
868 2015-02-10 H.J. Lu <hongjiu.lu@intel.com>
870 * plugin.c (plugin_input_file_t): Add use_mmap.
871 (plugin_pagesize): New.
872 (get_view): Use plugin_pagesize. Set use_mmap if mmap is used.
873 (plugin_load_plugins): Initialize plugin_pagesize.
874 (plugin_maybe_claim): Unmap the buffer if plugin didn't claim the
877 2015-02-10 H.J. Lu <hongjiu.lu@intel.com>
879 * plugin.c (get_view): Align offset passed to mmap.
881 2015-02-08 H.J. Lu <hongjiu.lu@intel.com>
883 * ldfile.c (ldfile_try_open_bfd): Don't call bfd_check_format
884 if plugin isn't active or there is no thing more to claim.
886 2015-02-08 H.J. Lu <hongjiu.lu@intel.com>
888 * plugin.c (plugin_maybe_claim): Check format against bfd_object
891 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
893 * plugin.c (plugin_maybe_claim): Replace entry->the_bfd with
896 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
898 * plugin.c: Include "libbfd.h".
899 (plugin_strdup): New.
900 (plugin_maybe_claim): Remove the argument of pointer to struct
901 ld_plugin_input_file. Open and handle input entry.
902 * plugin.h (plugin_maybe_claim): Updated.
903 * ldfile.c (ldfile_try_open_bfd): Call plugin_maybe_claim directly
904 without passing a pointer to struct ld_plugin_input_file.
905 * ldmain.c: Don't include "libbfd.h".
906 (add_archive_element): Call plugin_maybe_claim directly without
907 passing a pointer to struct ld_plugin_input_file.
909 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
911 * ld.texinfo: Document -z text, -z notext and -z textoff.
912 * emultempl/elf32.em (gld${EMULATION_NAME}_list_options): Add
913 -z text, -z notext and -z textoff.
915 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
917 * configure.ac: Add AC_FUNC_MMAP.
918 * config.in: Regenerated.
919 * configure: Likewise.
920 * plugin.c: Include <sys/mman.h>.
921 (MAP_FAILED): New. Defined if not defined.
922 (PROT_READ): Likewise.
923 (MAP_PRIVATE): Likewise.
924 (view_buffer_t): New.
925 (plugin_input_file_t): Add view_buffer.
926 (get_view): Try mmap and cache the view buffer.
927 (plugin_maybe_claim): Initialize view_buffer.
929 2015-02-05 H.J. Lu <hongjiu.lu@intel.com>
931 * plugin.c (release_input_file): Set fd to -1 after closing it.
932 (plugin_maybe_claim): Close fd only if fd != -1.
934 2015-02-05 H.J. Lu <hongjiu.lu@intel.com>
937 * plugin.c: Include <errno.h>.
938 (errno): New. Declare if needed.
939 (plugin_input_file_t): New.
940 (get_input_file): Implemented.
941 (get_view): Likewise.
942 (release_input_file): Likewise.
943 (add_symbols): Updated.
944 (get_symbols): Likewise.
945 (plugin_maybe_claim): Allocate a plugin_input_file_t. Close fd
946 only for a bfd_object input.
948 2015-02-02 Alan Modra <amodra@gmail.com>
950 * emultempl/ppc64elf.em (toc_section_name): New var.
951 (ppc_after_open): Set it.
952 (ppc_before_allocation): Use it.
953 (gld${EMULATION_NAME}_after_allocation): Here too.
955 2015-01-29 H.J. Lu <hongjiu.lu@intel.com>
957 * ldfile.c (ldfile_try_open_bfd): Replace plugin_active_plugins_p()
958 with link_info.lto_plugin_active.
959 * ldlang.c (lang_process): Likewise.
960 * ldmain.c (add_archive_element): Likewise.
961 * plugin.c (plugin_active_plugins_p): Removed.
962 * plugin.h (plugin_active_plugins_p): Likewise.
964 2015-01-28 H.J. Lu <hongjiu.lu@intel.com>
966 * plugin.h (plugin_get_ir_dummy_bfd): Removed. Move comments to
968 * plugin.c (plugin_get_ir_dummy_bfd): Here. Make it static.
970 2015-01-28 H.J. Lu <hongjiu.lu@intel.com>
973 * plugin.c (tv_header_tags(): Add LDPT_GET_VIEW.
974 (get_view): New function.
975 (set_tv_header): Handle LDPT_GET_VIEW.
976 * testplug.c (tag_names): Add LDPT_GET_VIEW.
978 (dump_tv_tag): Handle LDPT_GET_VIEW.
979 (parse_tv_tag): Likewise.
981 2015-01-28 Alan Modra <amodra@gmail.com>
983 * emulparams/elf64ppc.sh (INITIAL_READWRITE_SECTIONS): Define.
984 * emultempl/ppc64elf.em (params): Init new field.
985 (ppc_after_open): New function.
986 (LDEMUL_AFTER_OPEN): Define.
987 * ldlang.c (lang_final): Whitespace fix.
989 2015-01-28 James Bowman <james.bowman@ftdichip.com>
991 * Makefile.am: Add FT32 files.
992 * configure.tgt: Handle FT32 target.
993 * emulparams/elf32ft32.sh: New file.
994 * scripttempl/ft32.sc: New file.
995 * Makefile.in: Regenerate.
997 2015-01-28 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1000 * ldexp.c (fold_name): Fold LENGTH only after
1001 lang_first_phase_enum.
1002 * ldgram.y (memory_spec): Don't evaluate ORIGIN and LENGTH
1004 * ldlang.h (struct memory_region_struct): Add origin_exp and
1006 * ldlang.c (lang_do_memory_regions): New.
1007 (lang_memory_region_lookup): Initialize origin_exp and
1009 (lang_process): Call lang_do_memory_regions.
1011 2015-01-20 Andrew Burgess <andrew.burgess@embecosm.com>
1013 * ldlang.c (print_assignment): Only evaluate the expression for a
1014 PROVIDE'd assignment when the destination is being defined.
1015 Display a special message for PROVIDE'd symbols that are not being
1018 2015-01-20 Alan Modra <amodra@gmail.com>
1020 * emulparams/elf64ppc.sh (OTHER_SDATA_SECTIONS): Use in place of..
1021 (OTHER_BSS_SYMBOLS): ..this.
1022 (OTHER_PLT_RELOC_SECTIONS): Don't define.
1023 (OTHER_GOT_RELOC_SECTIONS): Add rela.toc1 and rela.tocbss.
1024 (OTHER_READWRITE_SECTIONS): Don't define. Move .toc1 to..
1025 (OTHER_RELRO_SECTIONS_2): ..here.
1026 * scripttempl/elf.sc: Move SBSS too when DATA_SDATA.
1028 2015-01-20 Alan Modra <amodra@gmail.com>
1030 * emulparams/elf64ppc.sh (BSS_PLT): Don't define.
1031 (OTHER_READWRITE_SECTIONS): Move .branch_lt to..
1032 (OTHER_RELRO_SECTIONS_2): ..here.
1033 (DATA_GOT, SEPARATE_GOTPLT, DATA_SDATA, DATA_PLT,
1034 PLT_BEFORE_GOT): Define.
1035 * scripttempl/elf.sc: Handle DATA_SDATA and DATA_GOT/DATA_PLT/
1036 PLT_BEFORE_GOT combination.
1037 (DATA_GOT, SDATA_GOT): Don't define if either is already defined.
1039 2015-01-20 Alan Modra <amodra@gmail.com>
1041 * emulparams/elf64ppc.sh (OTHER_READWRITE_SECTIONS): Move .opd to..
1042 (OTHER_RELRO_SECTIONS_2): ..here, new define.
1043 * scripttempl/elf.sc: Add OTHER_RELRO_SECTIONS_2.
1045 2015-01-19 Alan Modra <amodra@gmail.com>
1048 * ldlang.c (lang_process): Run lang_common before lang_gc_sections.
1050 2015-01-14 Jiong Wang <jiong.wang@arm.com>
1052 * ld-arm/elf32-reject.s: New testcase.
1053 * ld-arm/elf32-reject.d: Likewise.
1054 * ld-arm/elf32-reject-pie.s: Likewise.
1055 * ld-arm/elf32-reject-pie.d: Likewise.
1056 * ld-arm/arm-elf.exp: Run new testcases.
1057 * ld-arm/ifunc-7.s: Delete f2/f4 test items.
1058 * ld-arm/ifunc-7.rd: Likewise.
1059 * ld-arm/ifunc-7.gd: Likewise.
1060 * ld-arm/ifunc-7.dd: Likewise.
1061 * ld-arm/ifunc-8.s: Likewise.
1062 * ld-arm/ifunc-8.rd: Likewise.
1063 * ld-arm/ifunc-8.gd: Likewise.
1064 * ld-arm/ifunc-8.dd: Likewise.
1066 2015-01-01 Alan Modra <amodra@gmail.com>
1068 * ldver.c (ldversion): Just print current year.
1070 2015-01-01 Alan Modra <amodra@gmail.com>
1072 Update year range in copyright notice of all files.
1074 For older changes see ChangeLog-2014
1076 Copyright (C) 2015 Free Software Foundation, Inc.
1078 Copying and distribution of this file, with or without modification,
1079 are permitted in any medium without royalty provided the copyright
1080 notice and this notice are preserved.
1086 version-control: never