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