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