1 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
4 * ld.texinfo: Document "-z noextern-protected-data".
5 * ldmain.c (main): Initialize link_info.extern_protected_data
7 * lexsup.c (elf_shlib_list_options): Add
8 "-z [no]extern-protected-data".
9 * emulparams/elf32_x86_64.sh: Source extern_protected_data.sh.
10 * emulparams/elf_i386.sh: Likewise.
11 * emulparams/elf_i386_be.sh: Likewise.
12 * emulparams/elf_i386_chaos.sh: Likewise.
13 * emulparams/elf_i386_ldso.sh: Likewise.
14 * emulparams/elf_i386_vxworks.sh: Likewise.
15 * emulparams/elf_k1om.sh: Likewise.
16 * emulparams/elf_l1om.sh: Likewise.
17 * emulparams/elf_x86_64.sh: Source extern_protected_data.sh.
18 (PARSE_AND_LIST_OPTIONS): Renamed to ...
19 (PARSE_AND_LIST_OPTIONS_BNDPLT): This.
20 (PARSE_AND_LIST_ARGS_CASE_Z): Renamed to ...
21 (PARSE_AND_LIST_ARGS_CASE_Z_BNDPLT): This.
22 (PARSE_AND_LIST_OPTIONS): Append $PARSE_AND_LIST_OPTIONS_BNDPLT.
23 (PARSE_AND_LIST_ARGS_CASE_Z): Append
24 $PARSE_AND_LIST_ARGS_CASE_Z_BNDPLT.
25 * emulparams/extern_protected_data.sh: New file.
27 2015-04-11 H.J. Lu <hongjiu.lu@intel.com>
29 * plugin.c (plugin_load_plugins): Removed an extra ';'.
31 2015-04-10 Nick Clifton <nickc@redhat.com>
34 * ld.texinfo (--be8): Add a note about the interaction of this
35 option with the assembler's -EB option.
37 2015-04-10 Alan Modra <amodra@gmail.com>
39 * configure.ac: Set elf_list_options etc. in proper case.
40 * configure: Regenerate.
42 2015-04-10 Alan Modra <amodra@gmail.com>
45 * ldlang.c (lang_process): Add _init and _fini to gc_sym_list.
47 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
49 * emulparams/elf_x86_64.sh (BNDPLT): Removed.
50 (PARSE_AND_LIST_OPTIONS): New.
51 (PARSE_AND_LIST_ARGS_CASE_Z): Likewise.
52 * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Remove
53 BNDPLT check. Handle PARSE_AND_LIST_ARGS_CASE_Z.
54 (gld${EMULATION_NAME}_list_options): Remove BNDPLT check.
56 2015-04-09 Nick Clifton <nickc@redhat.com>
58 * po/fr.po: Updated French translation.
60 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
62 * configure.ac (elf_list_options): Set to TRUE for
64 (elf_shlib_list_options): Likewise.
65 (elf_plt_unwind_list_options): Likewise.
66 * configure: Regenerated.
68 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
70 * emulparams/elf32bmipn32-defs.sh: Skip empty EMULATION_NAME.
72 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
74 * Makefile.am (ELF_CLFAGS): New.
75 (AM_CFLAGS): Add $(ELF_CLFAGS).
76 * configure.ac (elf_list_options): New. AC_SUBST.
77 (elf_shlib_list_options): Likewise.
78 (elf_plt_unwind_list_options): Likewise.
79 * lexsup.c (elf_shlib_list_options): New.
80 (elf_static_list_options): Likewise.
81 (elf_plt_unwind_list_options): Likewise.
82 (ld_list_options): Likewise.
83 (help): Call ld_list_options.
84 * Makefile.in: Regenerated.
85 * configure: Likewise.
86 * emulparams/plt_unwind.sh (PLT_UNWIND): New.
87 (PARSE_AND_LIST_OPTIONS): Removed.
88 * emultempl/elf32.em (gld_list_options): New.
89 (gld${EMULATION_NAME}_list_options): Define only if BNDPLT or
90 PARSE_AND_LIST_OPTIONS is defined.
91 (ld_${EMULATION_NAME}_emulation): Replace
92 gld${EMULATION_NAME}_list_options with ${gld_list_options.
94 2015-04-07 Alan Modra <amodra@gmail.com>
97 * ldlang.c (lang_size_sections): Cast shift expression.
99 2015-04-07 Alan Modra <amodra@gmail.com>
101 * emultempl/ppc32elf.em: Handle --no-pic-fixup.
102 (params): Init new field.
103 (ppc_before_allocation): Enable relaxation for pic_fixup.
105 2015-04-07 Nick Clifton <nickc@redhat.com>
107 * ld.h (struct ld_config_type): Add new field: warn_orphan.
108 * ldlex.h (enum option_values): Add OPTION_WARN_ORPHAN and
109 OPTION_NO_WARN_ORPHAN.
110 * lexsup.c (ld_options): Add --warn-orphan and --no-warn-orphan.
111 (parse_args): Handle the new options.
112 * ldemul.c (ldemul_place_orphan): If requested, generate a warning
113 message when an orphan section is placed in the output file.
114 * ld.texinfo: Document the new option.
115 * NEWS: Mention the new feature.
117 2015-04-02 Andrew Turner <andrew@freebsd.org>
119 * Makefile.am: Add FreeBSD aarch64 files.
120 * Makefile.in: Regenerate.
121 * configure.tgt: Add aarch64-*-freebsd* target triple.
122 * emulparams/aarch64fbsd.sh: New file.
123 * emulparams/aarch64fbsdb.sh: New file.
125 2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
127 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Work
128 around a GCC uninitialized warning bug fixed in GCC 4.6.
130 2015-04-01 Tejas Belagod <tejas.belagod@arm.com>
132 * emultempl/aarch64elf.em
133 (aarch64_elf_create_output_section_statements): Add parameter in
134 bfd_elf${ELFSIZE}_aarch64_set_options call.
135 (OPTION_FIX_ERRATUM_843419): Define.
136 (PARSE_AND_LIST_LONGOPTS): Add fix-cortex-a53-843419.
137 (PARSE_AND_LIST_ARGS_CASES): Add OPTION_FIX_ERRATUM_843419.
139 2015-04-01 Chen Gang <gang.chen.5i5j@gmail.com>
141 * emulparams/elf32_tic6x_le.sh: Skip OTHER_BSS_SECTIONS for
142 relocating operation.
144 2015-04-01 Alan Modra <amodra@gmail.com>
147 * ldlang.c (lang_size_sections): When alignment of sections
148 results in relro base adjustment being too large, don't go lower
149 than the initial value.
150 * ldexp.c (fold_binary <DATA_SEGMENT_RELRO_END>): Comment.
151 * scripttempl/elf.sc (DATA_SEGMENT_ALIGN): Omit SEGMENT_SIZE
152 alignment when SEGMENT_SIZE is the same as MAXPAGESIZE.
154 2015-04-01 Alan Modra <amodra@gmail.com>
156 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Don't
157 init ehdr_start_save.
159 2015-04-01 Alan Modra <amodra@gmail.com>
161 * Makefile.am (eelf32ppcvxworks.c): Depend on ppc32elf.em and
163 (eelf32lppc.c, eelf32lppclinux.c, eelf32lppcnto.c, eelf32lppcsim.c,
164 eelf32ppc.c, eelf32ppc_fbsd.c, eelf32ppclinux.c, eelf32ppcnto.c,
165 eelf32ppcsim.c): Rearrange deps for consistency.
166 * Makefile.in: Regenerate.
168 2015-04-01 Ed Schouten <ed@nuxi.nl>
170 * emultempl/elf32.em (gld*_before_allocation): Zero-initialize
171 the ehdr_start_save variable.
173 2015-03-31 Ed Schouten <ed@nuxi.nl>
175 * Makefile.am (ALL_64_EMULATION_SOURCES): Add
176 eelf_x86_64_cloudabi.c.
177 (eelf_x86_64_cloudabi.c): New.
178 * configure.tgt (targ_emul): Set to elf_x86_64_cloudabi for
180 * Makefile.in: Regenerated.
181 * emulparams/elf_x86_64_cloudabi.sh: New file.
183 2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
185 * configure.ac (AM_ZLIB): Removed.
186 * Makefile.in: Regenerated.
187 * config.in: Likewise.
188 * configure: Likewise.
190 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
192 * emultempl/aarch64elf.em (_aarch64_add_stub_section): Set section
195 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
197 * emultempl/aarch64elf.em
198 (elf${ELFSIZE}_aarch64_add_stub_section): Adjust layout.
200 2015-03-18 Chen Gang <gang.chen.5i5j@gmail.com>
202 * ldmain.c (main): Use %F instead of %X for einfo.
204 2015-03-02 Alan Modra <amodra@gmail.com>
206 * ld.texinfo (Options <-z nocopyreloc>): Rewrite.
208 2015-02-27 Nick Clifton <nickc@redhat.com>
211 * ldlang.c (lang_set_flags): Allow exclamation mark to reverse the
212 sense of the following memory region attribute characters.
214 2015-02-27 Alan Modra <amodra@gmail.com>
216 * Makefile.am (ALL_EMULATION_SOURCES): Sort new h8300 entries.
217 (eh8300elf_linux.c, eh8300helf_linux.c, eh8300self_linux.c,
218 eh8300sxelf_linux.c): Do not invoke genscripts here.
219 * Makefile.in: Regenerate.
221 2015-02-24 Nick Clifton <nickc@redhat.com>
223 * Makefile.am (ev850.c): Add dependency upon
224 $(srcdir)/emultempl/v850elf.em.
225 (ev850_rh850.c): Likewise.
226 * Makefile.in: Regenerate.
227 * emultempl/v850elf.em: New file.
228 * emulparams/v850.sh (EXTRA_EM_FILE): Define.
229 * emulparams/v850_rh850.sh (EXTRA_EM_FILE): Define.
230 * scripttempl/v850.sc: Add .note.renesas section.
231 * scripttempl/v850_rh850.sc: Likewise.
233 2015-02-24 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
235 * scripttempl/avr.sc: Add new user_signatures region. Define and
236 use symbols for all region lengths.
237 * scripttempl/avrtiny.sc: Define and use symbols for all region
240 2015-01-21 Yoshinori Sato <ysato@users.sourceforge.jp>
242 * Makefile.am: (ALL_EMULATION_SOURCES): Add new emulations.
243 * Makefile.in: Regenerate.
244 * configure.tgt: Add h8300-*-linux
245 * emulparams/h8300elf_linux.sh: Add new emulation.
246 * emulparams/h8300helf_linux.sh: Likewise.
247 * emulparams/h8300self_linux.sh: Likewise.
248 * emulparams/h8300sxelf_linux.sh: Likewise.
250 2015-02-23 Nick Clifton <nickc@redhat.com>
252 * lexsup.c (parse_args): Produce a more reasonable error message
253 when -ixxx or -rxxx is the last option on the linker command line.
255 2015-02-14 H.J. Lu <hongjiu.lu@intel.com>
258 * testplug2.c (allsymbolsread_silent): New.
259 (set_register_hook): Handle allsymbolsreadsilent.
260 (onall_symbols_read): Skip a message if allsymbolsread_silent is
263 2015-02-14 Alan Modra <amodra@gmail.com>
266 * ldlang.h (struct lang_input_statement_flags): Add lto_output.
267 * ldlang.c (lang_process): Don't set loading_lto_outputs.
268 * ldfile.c (ldfile_try_open_bfd): Transfer entry flags.lto_output
270 * plugin.c (add_input_file, add_input_library): Set flags.lto_output.
272 2015-02-13 H.J. Lu <hongjiu.lu@intel.com>
274 * NEWS: Mention support for LLVM plugin.
276 2015-02-13 Alan Modra <amodra@gmail.com>
278 * ld.texinfo (Options <--defsym>): Correct cross reference.
280 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
282 * lexsup.c (ld_options): Add --[no-]map-whole-files for gold
283 option compatibility.
285 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
287 * plugin.c (message): Output "warning:" for LDPL_WARNING. Output
288 "error:" for LDPL_FATAL and LDPL_ERROR.
289 * testplug2.c (parse_option): Handle fatal, error and warning.
291 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
293 * testplug2.c (dump_tv_tag): Removed.
294 (onall_symbols_read): Return LDPS_ERR if the file descriptor isn't
296 * testplug3.c (dump_tv_tag): Removed.
297 (onclaim_file): Fix typo.
299 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
302 * Makefile.am (noinst_LTLIBRARIES): Add libldtestplug2.la and
304 (libldtestplug2_la_SOURCES): New.
305 (libldtestplug2_la_CFLAGS): Likewise.
306 (libldtestplug2_la_LDFLAGS): Likewise.
307 (libldtestplug3_la_SOURCES): New.
308 (libldtestplug3_la_CFLAGS): Likewise.
309 (libldtestplug3_la_LDFLAGS): Likewise.
310 * Makefile.in: Regenerated.
311 * testplug2.c: New file.
312 * testplug3.c: Likewise.
314 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
317 * plugin.c: Include ../bfd/plugin.h.
318 (plugin_get_ir_dummy_bfd): Call bfd_create with
319 link_info.output_bfd instead of srctemplate. Copy BFD info
320 from srctemplate only if it doesn't use BFD plugin target
322 (plugin_load_plugins): Call register_ld_plugin_object_p with
324 (plugin_maybe_claim): Renamed to ...
325 (plugin_object_p): This. Return dummy BFD target vector if
326 input is calimed by plugin library, otherwise return NULL.
327 Update plugin_format and plugin_dummy_bfd.
328 (plugin_maybe_claim): New. Use plugin_object_p.
330 2015-02-10 H.J. Lu <hongjiu.lu@intel.com>
332 * plugin.c (plugin_maybe_claim): Initialize use_mmap.
334 2015-02-10 H.J. Lu <hongjiu.lu@intel.com>
336 * plugin.c (plugin_input_file_t): Add use_mmap.
337 (plugin_pagesize): New.
338 (get_view): Use plugin_pagesize. Set use_mmap if mmap is used.
339 (plugin_load_plugins): Initialize plugin_pagesize.
340 (plugin_maybe_claim): Unmap the buffer if plugin didn't claim the
343 2015-02-10 H.J. Lu <hongjiu.lu@intel.com>
345 * plugin.c (get_view): Align offset passed to mmap.
347 2015-02-08 H.J. Lu <hongjiu.lu@intel.com>
349 * ldfile.c (ldfile_try_open_bfd): Don't call bfd_check_format
350 if plugin isn't active or there is no thing more to claim.
352 2015-02-08 H.J. Lu <hongjiu.lu@intel.com>
354 * plugin.c (plugin_maybe_claim): Check format against bfd_object
357 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
359 * plugin.c (plugin_maybe_claim): Replace entry->the_bfd with
362 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
364 * plugin.c: Include "libbfd.h".
365 (plugin_strdup): New.
366 (plugin_maybe_claim): Remove the argument of pointer to struct
367 ld_plugin_input_file. Open and handle input entry.
368 * plugin.h (plugin_maybe_claim): Updated.
369 * ldfile.c (ldfile_try_open_bfd): Call plugin_maybe_claim directly
370 without passing a pointer to struct ld_plugin_input_file.
371 * ldmain.c: Don't include "libbfd.h".
372 (add_archive_element): Call plugin_maybe_claim directly without
373 passing a pointer to struct ld_plugin_input_file.
375 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
377 * ld.texinfo: Document -z text, -z notext and -z textoff.
378 * emultempl/elf32.em (gld${EMULATION_NAME}_list_options): Add
379 -z text, -z notext and -z textoff.
381 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
383 * configure.ac: Add AC_FUNC_MMAP.
384 * config.in: Regenerated.
385 * configure: Likewise.
386 * plugin.c: Include <sys/mman.h>.
387 (MAP_FAILED): New. Defined if not defined.
388 (PROT_READ): Likewise.
389 (MAP_PRIVATE): Likewise.
390 (view_buffer_t): New.
391 (plugin_input_file_t): Add view_buffer.
392 (get_view): Try mmap and cache the view buffer.
393 (plugin_maybe_claim): Initialize view_buffer.
395 2015-02-05 H.J. Lu <hongjiu.lu@intel.com>
397 * plugin.c (release_input_file): Set fd to -1 after closing it.
398 (plugin_maybe_claim): Close fd only if fd != -1.
400 2015-02-05 H.J. Lu <hongjiu.lu@intel.com>
403 * plugin.c: Include <errno.h>.
404 (errno): New. Declare if needed.
405 (plugin_input_file_t): New.
406 (get_input_file): Implemented.
407 (get_view): Likewise.
408 (release_input_file): Likewise.
409 (add_symbols): Updated.
410 (get_symbols): Likewise.
411 (plugin_maybe_claim): Allocate a plugin_input_file_t. Close fd
412 only for a bfd_object input.
414 2015-02-02 Alan Modra <amodra@gmail.com>
416 * emultempl/ppc64elf.em (toc_section_name): New var.
417 (ppc_after_open): Set it.
418 (ppc_before_allocation): Use it.
419 (gld${EMULATION_NAME}_after_allocation): Here too.
421 2015-01-29 H.J. Lu <hongjiu.lu@intel.com>
423 * ldfile.c (ldfile_try_open_bfd): Replace plugin_active_plugins_p()
424 with link_info.lto_plugin_active.
425 * ldlang.c (lang_process): Likewise.
426 * ldmain.c (add_archive_element): Likewise.
427 * plugin.c (plugin_active_plugins_p): Removed.
428 * plugin.h (plugin_active_plugins_p): Likewise.
430 2015-01-28 H.J. Lu <hongjiu.lu@intel.com>
432 * plugin.h (plugin_get_ir_dummy_bfd): Removed. Move comments to
434 * plugin.c (plugin_get_ir_dummy_bfd): Here. Make it static.
436 2015-01-28 H.J. Lu <hongjiu.lu@intel.com>
439 * plugin.c (tv_header_tags(): Add LDPT_GET_VIEW.
440 (get_view): New function.
441 (set_tv_header): Handle LDPT_GET_VIEW.
442 * testplug.c (tag_names): Add LDPT_GET_VIEW.
444 (dump_tv_tag): Handle LDPT_GET_VIEW.
445 (parse_tv_tag): Likewise.
447 2015-01-28 Alan Modra <amodra@gmail.com>
449 * emulparams/elf64ppc.sh (INITIAL_READWRITE_SECTIONS): Define.
450 * emultempl/ppc64elf.em (params): Init new field.
451 (ppc_after_open): New function.
452 (LDEMUL_AFTER_OPEN): Define.
453 * ldlang.c (lang_final): Whitespace fix.
455 2015-01-28 James Bowman <james.bowman@ftdichip.com>
457 * Makefile.am: Add FT32 files.
458 * configure.tgt: Handle FT32 target.
459 * emulparams/elf32ft32.sh: New file.
460 * scripttempl/ft32.sc: New file.
461 * Makefile.in: Regenerate.
463 2015-01-28 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
466 * ldexp.c (fold_name): Fold LENGTH only after
467 lang_first_phase_enum.
468 * ldgram.y (memory_spec): Don't evaluate ORIGIN and LENGTH
470 * ldlang.h (struct memory_region_struct): Add origin_exp and
472 * ldlang.c (lang_do_memory_regions): New.
473 (lang_memory_region_lookup): Initialize origin_exp and
475 (lang_process): Call lang_do_memory_regions.
477 2015-01-20 Andrew Burgess <andrew.burgess@embecosm.com>
479 * ldlang.c (print_assignment): Only evaluate the expression for a
480 PROVIDE'd assignment when the destination is being defined.
481 Display a special message for PROVIDE'd symbols that are not being
484 2015-01-20 Alan Modra <amodra@gmail.com>
486 * emulparams/elf64ppc.sh (OTHER_SDATA_SECTIONS): Use in place of..
487 (OTHER_BSS_SYMBOLS): ..this.
488 (OTHER_PLT_RELOC_SECTIONS): Don't define.
489 (OTHER_GOT_RELOC_SECTIONS): Add rela.toc1 and rela.tocbss.
490 (OTHER_READWRITE_SECTIONS): Don't define. Move .toc1 to..
491 (OTHER_RELRO_SECTIONS_2): ..here.
492 * scripttempl/elf.sc: Move SBSS too when DATA_SDATA.
494 2015-01-20 Alan Modra <amodra@gmail.com>
496 * emulparams/elf64ppc.sh (BSS_PLT): Don't define.
497 (OTHER_READWRITE_SECTIONS): Move .branch_lt to..
498 (OTHER_RELRO_SECTIONS_2): ..here.
499 (DATA_GOT, SEPARATE_GOTPLT, DATA_SDATA, DATA_PLT,
500 PLT_BEFORE_GOT): Define.
501 * scripttempl/elf.sc: Handle DATA_SDATA and DATA_GOT/DATA_PLT/
502 PLT_BEFORE_GOT combination.
503 (DATA_GOT, SDATA_GOT): Don't define if either is already defined.
505 2015-01-20 Alan Modra <amodra@gmail.com>
507 * emulparams/elf64ppc.sh (OTHER_READWRITE_SECTIONS): Move .opd to..
508 (OTHER_RELRO_SECTIONS_2): ..here, new define.
509 * scripttempl/elf.sc: Add OTHER_RELRO_SECTIONS_2.
511 2015-01-19 Alan Modra <amodra@gmail.com>
514 * ldlang.c (lang_process): Run lang_common before lang_gc_sections.
516 2015-01-14 Jiong Wang <jiong.wang@arm.com>
518 * ld-arm/elf32-reject.s: New testcase.
519 * ld-arm/elf32-reject.d: Likewise.
520 * ld-arm/elf32-reject-pie.s: Likewise.
521 * ld-arm/elf32-reject-pie.d: Likewise.
522 * ld-arm/arm-elf.exp: Run new testcases.
523 * ld-arm/ifunc-7.s: Delete f2/f4 test items.
524 * ld-arm/ifunc-7.rd: Likewise.
525 * ld-arm/ifunc-7.gd: Likewise.
526 * ld-arm/ifunc-7.dd: Likewise.
527 * ld-arm/ifunc-8.s: Likewise.
528 * ld-arm/ifunc-8.rd: Likewise.
529 * ld-arm/ifunc-8.gd: Likewise.
530 * ld-arm/ifunc-8.dd: Likewise.
532 2015-01-01 Alan Modra <amodra@gmail.com>
534 * ldver.c (ldversion): Just print current year.
536 2015-01-01 Alan Modra <amodra@gmail.com>
538 Update year range in copyright notice of all files.
540 For older changes see ChangeLog-2014
542 Copyright (C) 2015 Free Software Foundation, Inc.
544 Copying and distribution of this file, with or without modification,
545 are permitted in any medium without royalty provided the copyright
546 notice and this notice are preserved.
552 version-control: never