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