1 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
3 * i386msdos.c (msdos_mkobject); New function.
4 (msdos_object_p): New function.
5 (i386_msdos_vec): Use msdos_object_p as the check_format
7 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
8 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
10 * peXXigen.c: Likewise.
11 * coff-ia64.c: Likewise.
13 2018-02-12 Nick Clifton <nickc@redhat.com>
15 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
17 * elf32-arc.c (elf_arc_relocate_section): Likewise.
19 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
22 (sparc_elf_append_rela): Assert that there is enough room in section.
23 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
24 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
25 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
26 For a symbol subject to a GOT relocation, reserve a slot in the
27 relocation section if the symbol isn't dynamic and we are in PIC mode.
28 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
29 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
30 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
31 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
32 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
33 resolved_to_zero. Do not generate a dynamic GOT relocation for an
34 undefined weak symbol with non-default visibility. Remove superfluous
35 'else' and fix formatting.
37 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
39 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
41 (i386_elf32_sol2_vec): Don't declare.
42 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
43 Don't set need_global_offset_table.
44 (elf_i386_solaris_arch_bed): New.
45 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
47 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
48 target_os != is_nacl instead of target_os == is_normal.
49 (x86_64_elf64_sol2_vec): Don't declare.
50 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
51 is_nacl instead of target_os == is_normal. Don't set
52 need_global_offset_table.
53 (elf_x86_64_solaris_arch_bed): New.
54 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
56 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
57 _GLOBAL_OFFSET_TABLE_ for Solaris.
58 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
59 need_global_offset_table.
60 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
61 (elf_x86_link_hash_table): Remove need_global_offset_table.
62 (elf_x86_init_table): Likewise.
64 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
66 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
68 (i386_elf32_sol2_vec): Declared.
69 (elf_i386_link_setup_gnu_properties): Set
70 need_global_offset_table with info->output_bfd->xvec.
71 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
73 (x86_64_elf64_sol2_vec): Declared.
74 (elf_x86_64_link_setup_gnu_properties): Set
75 need_global_offset_table with info->output_bfd->xvec.
77 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
79 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
81 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
83 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
85 (elf_x86_64_link_setup_gnu_properties): Set
86 need_global_offset_table for Solaris.
87 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
88 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
89 (_bfd_x86_elf_link_setup_gnu_properties): Copy
90 need_global_offset_table.
91 * elfxx-x86.h (elf_x86_link_hash_table): Add
92 need_global_offset_table.
93 (elf_x86_init_table): Likewise.
95 2018-02-08 Jim Wilson <jimw@sifive.com>
97 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
100 2018-02-08 Nick Clifton <nickc@redhat.com>
103 * elf.c (elf_parse_notes): Reject notes with excessuively large
106 2018-02-07 Alan Modra <amodra@gmail.com>
108 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
109 * elf32-ppc.c: Remove speculation barrier support.
110 * elf32-ppc.h: Likewise.
111 * elf64-ppc.c: Likewise.
112 * elf64-ppc.h: Likewise.
114 2018-02-06 Jim Wilson <jimw@sifive.com>
116 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
117 callback to report an error.
119 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
122 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
123 into call to !bfd_link_executable and tidy up.
124 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
125 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
126 !bfd_link_executable.
127 <R_SPARC_TLS_IE_HI22>: Likewise.
128 <GOT relocations>: Remove useless code, tidy and merge related blocks.
129 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
130 !bfd_link_executable.
131 <R_SPARC_WPLT30>: Tidy up.
132 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
133 !bfd_link_executable.
134 (allocate_dynrelocs): Likewise.
135 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
136 <R_SPARC_TLS_GD_HI22>: Merge into...
137 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
138 sparc_elf_tls_transition and remove redundant code.
139 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
140 !bfd_link_executable.
141 <R_SPARC_TLS_LDO_HIX22>: Likewise.
142 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
143 <R_SPARC_TLS_LDM_CALL>: Likewise.
144 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
145 <R_SPARC_TLS_GD_ADD>: Likewise.
146 <R_SPARC_TLS_LDM_ADD>: Likewise.
147 <R_SPARC_TLS_LDO_ADD>: Likewise.
148 <R_SPARC_TLS_IE_LD>: Likewise.
150 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
153 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
154 functions failed to find the function name, try the generic elf
155 find function instead.
157 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
159 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
160 'memcpy' instead of 'strncpy' when writing the magic number.
162 2018-02-06 Nick Clifton <nickc@redhat.com>
165 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
166 section before attempting to read it in.
167 (bfd_get_alt_debug_link_info): Likewise.
169 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
171 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
172 line information in addition to name, if they can be found.
174 2018-02-05 Renlin Li <renlin.li@arm.com>
177 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
178 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
179 check for writeable section as well.
181 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
184 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
185 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
186 undefined weak symbol to 0.
187 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
188 if _GLOBAL_OFFSET_TABLE_ is referenced.
189 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
190 got_referenced instead of ref_regular_nonweak. Remove the
191 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
192 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
194 2018-02-05 Maciej W. Rozycki <macro@mips.com>
196 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
197 initialize `hi_reloc'.
199 2018-02-05 Maciej W. Rozycki <macro@mips.com>
201 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
202 SHT_MIPS_REGINFO sections don't assert the correct size and
203 report an error instead.
205 2018-02-05 Maciej W. Rozycki <macro@mips.com>
207 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
208 status from `->elf_backend_section_processing'.
210 2018-02-02 Jim Wilson <jimw@sifive.com>
213 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
214 If link_info->wrap_hash, check for a duplicate symbol and ignore.
215 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
216 Pass new argument to riscv_relax_delete_bytes.
217 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
218 ATTRIBUTE_UNUSED from link_info parameter.
220 2018-02-02 Alan Modra <amodra@gmail.com>
222 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
223 emitted for toc sequence optimization. Set and use "howto" later.
225 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
227 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
228 arithmetic on NULL pointer.
229 * elflink.c (_bfd_elf_archive_symbol_lookup,
230 elf_link_add_archive_symbols): Likewise.
232 2018-01-31 Michael Matz <matz@suse.de>
234 * elflink.c (bfd_elf_define_start_stop): Fix check of
237 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
240 * elflink.c (bfd_elf_define_start_stop): Check if __start and
241 __stop symbols are referenced by shared objects.
243 2018-01-30 Alan Modra <amodra@gmail.com>
246 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
247 segment when demand paged with lma on the same page. Test this
248 before load/non-load, executable/non-executable,
249 writable/non-writable tests and simplify. Delete bogus relro
250 condition in writable/non-writable test. Delete outdated
253 2018-01-30 Alan Modra <amodra@gmail.com>
255 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
258 2018-01-29 Alan Modra <amodra@gmail.com>
261 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
262 range before converting to a symbol table pointer.
264 2018-01-27 Nick Clifton <nickc@redhat.com>
266 * po/ru.po: Updated Russian translation.
268 2018-01-26 Alan Modra <amodra@gmail.com>
270 * elflink.c (bfd_elf_define_start_stop): Override symbols when
271 they are defined dynamically.
273 2018-01-26 Alan Modra <amodra@gmail.com>
275 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
276 .branch_lt changes size.
278 2018-01-25 Alan Modra <amodra@gmail.com>
281 * elfcode.h (elf_object_p): Avoid integer overflow.
283 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
286 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
287 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
290 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
293 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
294 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
295 bfd_link_executable for TLS check.
296 (_bfd_sparc_elf_check_relocs): Likewise.
297 (allocate_dynrelocs): Likewise.
298 (_bfd_sparc_elf_relocate_section): Likewise.
300 2018-01-24 Renlin Li <renlin.li@arm.com>
302 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
303 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
304 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
305 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
306 BFD_RELOC_AARCH64_MOVW_PREL_G3.
307 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
308 (_bfd_aarch64_elf_resolve_relocation): Likewise.
310 2018-01-24 Renlin Li <renlin.li@arm.com>
312 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
313 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
314 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
315 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
316 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
317 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
318 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
319 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
320 BFD_RELOC_AARCH64_MOVW_PREL_G3.
321 * bfd-in2.h: Regenerate.
322 * libbfd.h: Regenerate.
324 2018-01-23 Maciej W. Rozycki <macro@mips.com>
326 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
327 `mips_elf32_section_processing' comment reference.
329 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
332 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
333 versioned __tls_get_addr symbol.
335 2018-01-19 Nick Clifton <nickc@redhat.com>
337 * po/fr.po: Updated French translation.
339 2018-01-18 Alan Modra <amodra@gmail.com>
341 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
342 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
343 (ppc64_elf_build_stubs): Likewise.
345 2018-01-17 Nick Clifton <nickc@redhat.com>
347 * po/ru.po: Updated Russian translation.
348 * po/uk/po: Updated Ukranian translation.
350 2018-01-17 Alan Modra <amodra@gmail.com>
352 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
354 2018-01-17 Alan Modra <amodra@gmail.com>
356 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
357 (CRSETEQ, BEQCTRM): Define.
358 (is_nonpic_glink_stub): Don't check bctr.
359 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
360 (ppc_elf_relax_section): Size speculation barrier.
361 (output_bctr): New function.
362 (write_glink_stub): Use output_bctr.
363 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
364 (ppc_elf_finish_dynamic_symbol): Likewise.
365 (ppc_elf_finish_dynamic_sections): Use output_bctr.
366 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
367 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
368 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
369 (size_global_entry_stubs): Handle speculation barrier sizing.
370 (plt_stub_size): Likewise.
371 (output_bctr): New function.
372 (build_plt_stub, build_tls_get_addr_stub): Output speculation
374 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
375 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
376 (build_global_entry_stubs): Output speculation barrier.
377 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
378 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
380 2018-01-17 Alan Modra <amodra@gmail.com>
382 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
383 __tls_get_addr_opt, and alignment sizing.
384 (TLS_GET_ADDR_GLINK_SIZE): Delete.
385 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
386 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
388 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
389 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
390 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
392 (write_glink_stub): Handle __tls_get_addr_opt stub.
393 Pad out to size given by GLINK_ENTRY_SIZE.
394 (ppc_elf_relocate_section): Adjust write_glink_stub call.
395 (ppc_elf_finish_dynamic_symbol): Likewise.
396 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
397 insn array since so many need rewriting.
398 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
399 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
400 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
401 nops. Adjust all uses.
402 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
403 in glink_vma calculation.
404 (struct ppc_link_hash_table): Add global_entry section pointer.
405 (create_linkage_sections): Create separate section for global
407 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
408 (size_global_entry_stubs): Handle sizing for aligned stubs.
409 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
410 and don't stash end of glink branch table in rawsize.
411 (ppc_build_one_stub): Rewrite stub size calculations.
412 (build_global_entry_stubs): Use new section.
413 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
414 Build lazy link stubs out to end of section. Build global entry
415 stubs in new section.
417 2018-01-15 Nick Clifton <nickc@redhat.com>
419 * po/uk.po: Updated Ukranian translation.
421 2018-01-13 Nick Clifton <nickc@redhat.com>
423 * po/bfd.pot: Regenerated.
425 2018-01-13 Nick Clifton <nickc@redhat.com>
427 * version.m4: Bump version to 2.30.51
428 * configure: Regenerate.
430 2018-01-13 Nick Clifton <nickc@redhat.com>
434 2018-01-12 Jens Widell <jl@opera.com>
436 * elf.c (setup_group): Optimize search for group by remembering
437 last found group and restarting search at that index.
438 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
440 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
442 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
443 bfd_link_common_skip_none in switch.
445 2018-01-12 Alan Modra <amodra@gmail.com>
448 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
449 references on forced local symbols.
451 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
453 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
454 .reginfo section has wrong size.
456 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
459 * elf.c (_bfd_elf_map_sections_to_segments): When generating
460 separate code and read-only data LOAD segments, create a new
461 LOAD segment if the previous section contains text and the
462 current section doesn't or vice versa. Don't put a writable
463 section in a read-only segment if there is a RELRO segment.
465 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
468 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
469 references on forced local symbols.
471 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
474 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
475 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
477 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
480 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
482 2018-01-03 John Baldwin <jhb@FreeBSD.org>
484 * elf.c (elfcore_grok_freebsd_note): Handle
485 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
486 NT_FREEBSD_PROCSTAT_VMMAP.
488 2018-01-03 Alan Modra <amodra@gmail.com>
490 Update year range in copyright notice of all files.
492 For older changes see ChangeLog-2017
494 Copyright (C) 2018 Free Software Foundation, Inc.
496 Copying and distribution of this file, with or without modification,
497 are permitted in any medium without royalty provided the copyright
498 notice and this notice are preserved.
504 version-control: never