1 2018-02-07 Alan Modra <amodra@gmail.com>
3 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
4 * elf32-ppc.c: Remove speculation barrier support.
5 * elf32-ppc.h: Likewise.
6 * elf64-ppc.c: Likewise.
7 * elf64-ppc.h: Likewise.
9 2018-02-06 Jim Wilson <jimw@sifive.com>
11 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
12 callback to report an error.
14 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
17 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
18 into call to !bfd_link_executable and tidy up.
19 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
20 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
22 <R_SPARC_TLS_IE_HI22>: Likewise.
23 <GOT relocations>: Remove useless code, tidy and merge related blocks.
24 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
26 <R_SPARC_WPLT30>: Tidy up.
27 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
29 (allocate_dynrelocs): Likewise.
30 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
31 <R_SPARC_TLS_GD_HI22>: Merge into...
32 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
33 sparc_elf_tls_transition and remove redundant code.
34 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
36 <R_SPARC_TLS_LDO_HIX22>: Likewise.
37 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
38 <R_SPARC_TLS_LDM_CALL>: Likewise.
39 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
40 <R_SPARC_TLS_GD_ADD>: Likewise.
41 <R_SPARC_TLS_LDM_ADD>: Likewise.
42 <R_SPARC_TLS_LDO_ADD>: Likewise.
43 <R_SPARC_TLS_IE_LD>: Likewise.
45 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
48 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
49 functions failed to find the function name, try the generic elf
50 find function instead.
52 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
54 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
55 'memcpy' instead of 'strncpy' when writing the magic number.
57 2018-02-06 Nick Clifton <nickc@redhat.com>
60 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
61 section before attempting to read it in.
62 (bfd_get_alt_debug_link_info): Likewise.
64 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
66 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
67 line information in addition to name, if they can be found.
69 2018-02-05 Renlin Li <renlin.li@arm.com>
72 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
73 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
74 check for writeable section as well.
76 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
79 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
80 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
81 undefined weak symbol to 0.
82 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
83 if _GLOBAL_OFFSET_TABLE_ is referenced.
84 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
85 got_referenced instead of ref_regular_nonweak. Remove the
86 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
87 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
89 2018-02-05 Maciej W. Rozycki <macro@mips.com>
91 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
92 initialize `hi_reloc'.
94 2018-02-05 Maciej W. Rozycki <macro@mips.com>
96 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
97 SHT_MIPS_REGINFO sections don't assert the correct size and
98 report an error instead.
100 2018-02-05 Maciej W. Rozycki <macro@mips.com>
102 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
103 status from `->elf_backend_section_processing'.
105 2018-02-02 Jim Wilson <jimw@sifive.com>
108 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
109 If link_info->wrap_hash, check for a duplicate symbol and ignore.
110 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
111 Pass new argument to riscv_relax_delete_bytes.
112 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
113 ATTRIBUTE_UNUSED from link_info parameter.
115 2018-02-02 Alan Modra <amodra@gmail.com>
117 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
118 emitted for toc sequence optimization. Set and use "howto" later.
120 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
122 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
123 arithmetic on NULL pointer.
124 * elflink.c (_bfd_elf_archive_symbol_lookup,
125 elf_link_add_archive_symbols): Likewise.
127 2018-01-31 Michael Matz <matz@suse.de>
129 * elflink.c (bfd_elf_define_start_stop): Fix check of
132 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
135 * elflink.c (bfd_elf_define_start_stop): Check if __start and
136 __stop symbols are referenced by shared objects.
138 2018-01-30 Alan Modra <amodra@gmail.com>
141 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
142 segment when demand paged with lma on the same page. Test this
143 before load/non-load, executable/non-executable,
144 writable/non-writable tests and simplify. Delete bogus relro
145 condition in writable/non-writable test. Delete outdated
148 2018-01-30 Alan Modra <amodra@gmail.com>
150 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
153 2018-01-29 Alan Modra <amodra@gmail.com>
156 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
157 range before converting to a symbol table pointer.
159 2018-01-27 Nick Clifton <nickc@redhat.com>
161 * po/ru.po: Updated Russian translation.
163 2018-01-26 Alan Modra <amodra@gmail.com>
165 * elflink.c (bfd_elf_define_start_stop): Override symbols when
166 they are defined dynamically.
168 2018-01-26 Alan Modra <amodra@gmail.com>
170 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
171 .branch_lt changes size.
173 2018-01-25 Alan Modra <amodra@gmail.com>
176 * elfcode.h (elf_object_p): Avoid integer overflow.
178 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
181 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
182 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
185 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
188 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
189 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
190 bfd_link_executable for TLS check.
191 (_bfd_sparc_elf_check_relocs): Likewise.
192 (allocate_dynrelocs): Likewise.
193 (_bfd_sparc_elf_relocate_section): Likewise.
195 2018-01-24 Renlin Li <renlin.li@arm.com>
197 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
198 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
199 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
200 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
201 BFD_RELOC_AARCH64_MOVW_PREL_G3.
202 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
203 (_bfd_aarch64_elf_resolve_relocation): Likewise.
205 2018-01-24 Renlin Li <renlin.li@arm.com>
207 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
208 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
209 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
210 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
211 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
212 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
213 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
214 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
215 BFD_RELOC_AARCH64_MOVW_PREL_G3.
216 * bfd-in2.h: Regenerate.
217 * libbfd.h: Regenerate.
219 2018-01-23 Maciej W. Rozycki <macro@mips.com>
221 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
222 `mips_elf32_section_processing' comment reference.
224 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
227 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
228 versioned __tls_get_addr symbol.
230 2018-01-19 Nick Clifton <nickc@redhat.com>
232 * po/fr.po: Updated French translation.
234 2018-01-18 Alan Modra <amodra@gmail.com>
236 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
237 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
238 (ppc64_elf_build_stubs): Likewise.
240 2018-01-17 Nick Clifton <nickc@redhat.com>
242 * po/ru.po: Updated Russian translation.
243 * po/uk/po: Updated Ukranian translation.
245 2018-01-17 Alan Modra <amodra@gmail.com>
247 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
249 2018-01-17 Alan Modra <amodra@gmail.com>
251 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
252 (CRSETEQ, BEQCTRM): Define.
253 (is_nonpic_glink_stub): Don't check bctr.
254 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
255 (ppc_elf_relax_section): Size speculation barrier.
256 (output_bctr): New function.
257 (write_glink_stub): Use output_bctr.
258 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
259 (ppc_elf_finish_dynamic_symbol): Likewise.
260 (ppc_elf_finish_dynamic_sections): Use output_bctr.
261 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
262 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
263 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
264 (size_global_entry_stubs): Handle speculation barrier sizing.
265 (plt_stub_size): Likewise.
266 (output_bctr): New function.
267 (build_plt_stub, build_tls_get_addr_stub): Output speculation
269 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
270 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
271 (build_global_entry_stubs): Output speculation barrier.
272 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
273 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
275 2018-01-17 Alan Modra <amodra@gmail.com>
277 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
278 __tls_get_addr_opt, and alignment sizing.
279 (TLS_GET_ADDR_GLINK_SIZE): Delete.
280 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
281 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
283 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
284 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
285 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
287 (write_glink_stub): Handle __tls_get_addr_opt stub.
288 Pad out to size given by GLINK_ENTRY_SIZE.
289 (ppc_elf_relocate_section): Adjust write_glink_stub call.
290 (ppc_elf_finish_dynamic_symbol): Likewise.
291 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
292 insn array since so many need rewriting.
293 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
294 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
295 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
296 nops. Adjust all uses.
297 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
298 in glink_vma calculation.
299 (struct ppc_link_hash_table): Add global_entry section pointer.
300 (create_linkage_sections): Create separate section for global
302 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
303 (size_global_entry_stubs): Handle sizing for aligned stubs.
304 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
305 and don't stash end of glink branch table in rawsize.
306 (ppc_build_one_stub): Rewrite stub size calculations.
307 (build_global_entry_stubs): Use new section.
308 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
309 Build lazy link stubs out to end of section. Build global entry
310 stubs in new section.
312 2018-01-15 Nick Clifton <nickc@redhat.com>
314 * po/uk.po: Updated Ukranian translation.
316 2018-01-13 Nick Clifton <nickc@redhat.com>
318 * po/bfd.pot: Regenerated.
320 2018-01-13 Nick Clifton <nickc@redhat.com>
322 * version.m4: Bump version to 2.30.51
323 * configure: Regenerate.
325 2018-01-13 Nick Clifton <nickc@redhat.com>
329 2018-01-12 Jens Widell <jl@opera.com>
331 * elf.c (setup_group): Optimize search for group by remembering
332 last found group and restarting search at that index.
333 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
335 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
337 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
338 bfd_link_common_skip_none in switch.
340 2018-01-12 Alan Modra <amodra@gmail.com>
343 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
344 references on forced local symbols.
346 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
348 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
349 .reginfo section has wrong size.
351 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
354 * elf.c (_bfd_elf_map_sections_to_segments): When generating
355 separate code and read-only data LOAD segments, create a new
356 LOAD segment if the previous section contains text and the
357 current section doesn't or vice versa. Don't put a writable
358 section in a read-only segment if there is a RELRO segment.
360 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
363 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
364 references on forced local symbols.
366 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
369 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
370 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
372 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
375 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
377 2018-01-03 John Baldwin <jhb@FreeBSD.org>
379 * elf.c (elfcore_grok_freebsd_note): Handle
380 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
381 NT_FREEBSD_PROCSTAT_VMMAP.
383 2018-01-03 Alan Modra <amodra@gmail.com>
385 Update year range in copyright notice of all files.
387 For older changes see ChangeLog-2017
389 Copyright (C) 2018 Free Software Foundation, Inc.
391 Copying and distribution of this file, with or without modification,
392 are permitted in any medium without royalty provided the copyright
393 notice and this notice are preserved.
399 version-control: never