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