1 2017-10-30 Alan Modra <amodra@gmail.com>
3 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
5 (bfd_elf_gc_sections): Likewise.
7 2017-10-30 Alan Modra <amodra@gmail.com>
10 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
11 ensure non_got_ref is not set due to debug references.
12 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
13 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
15 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
16 dynamic relocs when pic. Remove bogus code attempting to handle
18 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
20 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
21 and SYMBOL_REFERENCES_LOCAL in GOT handling.
23 2017-10-28 Alan Modra <amodra@gmail.com>
26 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
27 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
28 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
29 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
31 2017-10-25 Alan Modra <amodra@gmail.com>
33 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
34 optionally prefixed with "_".
35 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
37 2017-10-24 Andrew Waterman <andrew@sifive.com>
39 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
42 2017-10-24 Renlin Li <renlin.li@arm.com>
45 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
47 2017-10-23 Nick Clifton <nickc@redhat.com>
50 * elflink.c (elf_link_output_extsym): Keep global undefined
51 symbols if they have been marked as needed.
53 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
55 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
57 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
58 `_bfd_mips_elf_mkobject'.
60 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
63 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
65 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
67 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
68 (riscv_pcgp_lo_reloc): Likewise.
69 (riscv_pcgp_relocs): Likewise.
70 (riscv_init_pcgp_relocs): New function.
71 (riscv_free_pcgp_relocs): Likewise.
72 (riscv_record_pcgp_hi_reloc): Likewise.
73 (riscv_record_pcgp_lo_reloc): Likewise.
74 (riscv_delete_pcgp_hi_reloc): Likewise.
75 (riscv_use_pcgp_hi_reloc): Likewise.
76 (riscv_record_pcgp_lo_reloc): Likewise.
77 (riscv_find_pcgp_lo_reloc): Likewise.
78 (riscv_delete_pcgp_lo_reloc): Likewise.
79 (_bfd_riscv_relax_pc): Likewise.
80 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
81 via the new functions above.
83 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
85 * elfnn-riscv.c (R_RISCV_DELETE): New define.
86 (_bfd_riscv_relax_delete): New function.
87 (perform_relocation): Handle R_RISCV_DELETE.
88 (_bfd_riscv_relax_section): Likewise.
90 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
93 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
94 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
95 bfd_link_executable for TLS check.
96 (tilegx_elf_check_relocs): Likewise.
97 (allocate_dynrelocs): Likewise.
98 (tilegx_elf_relocate_section): Likewise.
100 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
103 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
104 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
105 bfd_link_executable for TLS check.
106 (tilepro_elf_check_relocs): Likewise.
107 (allocate_dynrelocs): Likewise.
108 (tilepro_elf_relocate_section): Likewise.
110 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
113 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
114 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
115 bfd_link_executable for TLS check.
116 (_bfd_sparc_elf_check_relocs): Likewise.
117 (allocate_dynrelocs): Likewise.
118 (_bfd_sparc_elf_relocate_section): Likewise.
120 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
122 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
123 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
124 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
126 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
128 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
129 indirect and warning symbols.
131 2017-10-17 Alan Modra <amodra@gmail.com>
134 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
135 against size left rather than comparing pointers. Reorganise loop.
137 2017-10-17 Alan Modra <amodra@gmail.com>
140 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
141 and error for any other size that doesn't cover the header word.
143 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
145 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
146 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
147 (elf_backend_gc_sweep_hook): Likewise.
148 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
149 (bfinfdpic_gc_sweep_hook): Likewise.
150 (elf_backend_gc_sweep_hook): Likewise.
151 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
152 (elf_backend_gc_sweep_hook): Likewise.
153 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
154 (elf_backend_gc_sweep_hook): Likewise.
155 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
156 (elf_backend_gc_sweep_hook): Likewise.
157 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
158 (elf_backend_gc_sweep_hook): Likewise.
159 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
160 (elf_backend_gc_sweep_hook): Likewise.
161 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
163 (elf_m68k_remove_got_entry_type): Removed.
164 (elf_m68k_find_got_entry_ptr): Likewise.
165 (elf_m68k_remove_got_entry): Likewise.
166 (elf_m68k_gc_sweep_hook): Likewise.
167 (elf_backend_gc_sweep_hook): Likewise.
168 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
169 (elf_backend_gc_sweep_hook): Likewise.
170 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
171 (elf_backend_gc_sweep_hook): Likewise.
172 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
173 (elf_backend_gc_sweep_hook): Likewise.
174 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
175 (elf_backend_gc_sweep_hook): Likewise.
176 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
177 (elf_backend_gc_sweep_hook): Likewise.
178 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
179 (elf_backend_gc_sweep_hook): Likewise.
180 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
181 (elf_backend_gc_sweep_hook): Likewise.
182 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
183 (elf_backend_gc_sweep_hook): Likewise.
184 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
185 (elf_backend_gc_sweep_hook): Likewise.
186 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
187 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
188 (elf_backend_gc_sweep_hook): Likewise.
189 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
190 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
191 (elf_backend_gc_sweep_hook): Likewise.
192 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
193 (elf_backend_gc_sweep_hook): Likewise.
194 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
195 (elf_backend_gc_sweep_hook): Likewise.
196 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
197 (elf_backend_gc_sweep_hook): Likewise.
198 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
199 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
200 (elf_backend_gc_sweep_hook): Likewise.
201 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
202 (ppc64_elf_gc_sweep_hook): Likewise.
203 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
204 (elf_backend_gc_sweep_hook): Likewise.
205 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
206 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
207 * elflink.c (elf_link_add_object_symbols): Don't call
208 _bfd_elf_link_check_relocs here.
209 (gc_sweep_hook_fn): Removed.
210 (elf_gc_sweep): Remove gc_sweep_hook.
211 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
212 (elf_backend_gc_sweep_hook): Likewise.
213 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
214 (elf_backend_gc_sweep_hook): Likewise.
215 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
216 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
217 (elf_backend_gc_sweep_hook): Likewise.
218 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
219 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
220 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
221 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
222 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
223 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
225 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
227 * elf32-i386.c (elf_i386_backend_data): Removed.
228 (get_elf_i386_backend_data): Likewise.
229 (elf_i386_arch_bed): Replace elf_i386_backend_data with
230 elf_x86_backend_data.
231 (elf_i386_get_synthetic_symtab): Likewise.
232 (elf_i386_nacl_arch_bed): Likewise.
233 (elf_i386_vxworks_arch_bed): Likewise.
234 (elf_i386_relocate_section): Check target_os instead of
236 (elf_i386_finish_dynamic_symbol): Likewise.
237 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
238 Check target_os instead of is_vxworks.
239 (elf_i386_link_setup_gnu_properties): Remove normal_target and
240 is_vxworks. Initialize plt0_pad_byte.
241 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
242 (get_elf_x86_64_arch_data): Likewise.
243 (get_elf_x86_64_backend_data): Likewise.
244 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
245 elf_x86_backend_data.
246 (elf_x86_64_get_synthetic_symtab): Likewise.
247 (elf_x86_64_nacl_arch_bed): Likewise.
248 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
249 normal_target. Initialize plt0_pad_byte.
250 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
251 instead of is_vxworks.
252 (_bfd_x86_elf_size_dynamic_sections): Likewise.
253 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
254 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
255 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
256 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
257 Update normal_target. Set up plt0_pad_byte. Check target_os
258 instead of is_vxworks.
259 * elfxx-x86.h (elf_x86_target_os): New.
260 (elf_x86_backend_data): Likewise.
261 (get_elf_x86_backend_data): Likewise.
262 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
264 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
267 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
269 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
270 _bfd_x86_elf_finish_dynamic_sections.
271 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
272 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
274 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
277 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
280 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
281 hide symbol which was forced to be dynamic.
283 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
286 * elf32-cris.c (cris_elf_relocate_section): Don't generate
287 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
288 (cris_elf_check_relocs): Don't allocate dynamic relocation
289 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
291 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
294 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
295 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
296 (sh_elf_relocate_section): Don't generate dynamic relocation if
297 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
299 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
302 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
303 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
304 (elf_s390_relocate_section): Don't generate dynamic relocation
305 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
306 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
307 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
308 (elf_s390_relocate_section): Don't generate dynamic relocation
309 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
311 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
314 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
315 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
316 (allocate_dynrelocs): Discard dynamic relocations if
317 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
319 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
322 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
323 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
325 (allocate_dynrelocs): Discard dynamic relocations if
326 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
328 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
331 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
332 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
333 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
334 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
335 (elf_m68k_relocate_section): Don't generate dynamic relocation
336 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
338 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
341 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
342 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
343 (allocate_dynrelocs): Discard dynamic relocations if
344 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
345 (elf32_hppa_relocate_section): Don't generate dynamic
346 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
348 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
351 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
352 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
353 (allocate_fptr): Don't allocate function pointer if
354 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
355 (allocate_dynrel_entries): Don't allocate dynamic relocation
356 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
357 (set_got_entry): Don't set GOT entry if
358 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
359 (set_pltoff_entry): Don't set PLTOFF entry if
360 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
361 (elfNN_ia64_relocate_section): Don't install dynamic relocation
362 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
364 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
367 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
368 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
369 (allocate_dynrelocs): Don't allocate dynamic relocations if
370 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
372 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
375 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
376 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
377 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
378 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
380 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
383 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
384 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
385 (tilepro_elf_relocate_section): Don't generate dynamic
386 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
387 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
388 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
389 (tilegx_elf_relocate_section): Don't generate dynamic
390 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
392 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
395 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
396 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
398 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
399 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
401 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
403 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
404 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
405 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
407 2017-10-12 James Bowman <james.bowman@ftdichip.com>
409 * bfd-in2.h: Regenerate.
410 * libbfd.h: Regenerate.
411 * elf32-ft32.c: Add HOWTO R_FT32_15.
412 * reloc.c: Add BFD_RELOC_FT32_15.
414 2017-10-12 Nick Clifton <nickc@redhat.com>
416 * reloc.c (enum bfd_reloc_status): Start values at 2.
417 * bfd-in2.h: Regenerate.
418 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
419 that a TRUE return indicates success. Compare the result of
420 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
421 (build_one_stub): Change sense of tests against aarch64_relocate
423 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
424 than FALSE, when an error is detected.
425 (elfNN_aarch64_final_link_relocate): Likewise.
427 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
429 * elf32-i386.c (elf_backend_hide_symbol): New.
430 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
431 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
432 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
434 2017-10-12 Alan Modra <amodra@gmail.com>
436 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
437 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
438 (bfd_elf_define_start_stop): Likewise.
440 2017-10-12 Alan Modra <amodra@gmail.com>
442 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
443 when executable rather than non-PIC.
444 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
445 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
447 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
449 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
451 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
452 (elf_external_linux_prpsinfo64_ugid32): ... this.
453 (swap_linux_prpsinfo32_out): Rename to...
454 (swap_linux_prpsinfo32_ugid32_out): ... this.
455 (elf_external_linux_prpsinfo64_ugid16): New structure.
456 (swap_linux_prpsinfo64_ugid16_out): New function.
457 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
458 (elf_backend_linux_prpsinfo64_ugid16): Define.
459 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
460 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
461 of the 64-bit Linux core PRPSINFO note.
462 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
464 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
466 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
468 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
469 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
470 (elf_external_ppc_linux_prpsinfo32)
471 (swap_ppc_linux_prpsinfo32_out): Move to...
472 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
473 (swap_linux_prpsinfo32_ugid32_out): ... these.
474 (elf_external_linux_prpsinfo32): Rename to...
475 (elf_external_linux_prpsinfo32_ugid16): ... this.
476 (swap_linux_prpsinfo32_out): Rename to...
477 (swap_linux_prpsinfo32_ugid16_out): ... this.
478 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
479 (elf_backend_linux_prpsinfo32_ugid16): Define.
480 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
481 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
482 of the 32-bit Linux core PRPSINFO note.
483 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
484 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
485 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
486 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
487 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
488 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
489 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
490 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
491 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
492 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
494 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
496 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
497 `gap' member ahead of `pr_flag'.
499 2017-10-11 Pedro Alves <palves@redhat.com>
501 * bfd.c (_doprnt): Rename to ...
502 (_bfd_doprnt): ... this.
503 (error_handler_internal): Adjust.
505 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
507 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
508 instead of incrementing it.
509 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
511 2017-10-10 Renlin Li <renlin.li@arm.com>
514 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
515 symbols into dynamic.
517 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
520 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
521 (riscv_elf_link_hash_table_create): Initialize max_alignment to
523 (_bfd_riscv_relax_section): Cache the max alignment of output
524 sections if possible.
526 2017-10-10 Alan Modra <amodra@gmail.com>
528 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
529 .opd whenever .opd is present and non-zero size. Move code
530 setting abiversion to/from output file earlier. Only set
531 u.opd.func_sec when --gc-sections. Read relocs and set up
532 u.opd.func_sec values here..
533 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
535 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
537 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
539 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
542 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
544 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
545 .interp section with "ld --no-dynamic-linker".
547 2017-10-09 Alan Modra <amodra@gmail.com>
550 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
551 funcinfo_hash_table and varinfo_hash_table.
553 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
555 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
556 in read-only section with minfo.
557 (sh_elf_size_dynamic_sections): Likewise.
559 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
561 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
564 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
566 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
567 this_hdr.sh_entsize only if section size > 0.
569 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
571 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
573 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
575 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
576 in read-only section with minfo.
577 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
579 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
581 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
584 2017-10-06 John Baldwin <jhb@FreeBSD.org>
586 * elf-bfd.h (struct elf_backend_data): Add
587 `elf_backend_grok_freebsd_prstatus'.
588 * elf.c (elfcore_grok_freebsd_note): Call
589 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
591 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
593 (elf_backend_grok_freebsd_prstatus): Define.
594 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
595 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
597 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
599 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
600 and has_non_got_reloc with zero_undefweak.
601 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
602 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
604 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
605 has_non_got_reloc with zero_undefweak.
606 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
607 has_got_reloc and has_non_got_reloc with zero_undefweak.
608 (elf_x86_link_hash_entry): Likewise.
610 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
612 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
613 (VERIFY_COPY_RELOC): Likewise.
615 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
617 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
618 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
619 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
621 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
623 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
624 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
625 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
627 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
629 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
630 * elf32-i386.c (elf_i386_relocate_section): Use it.
631 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
633 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
635 * elf32-i386.c (X86_SIZE_TYPE_P): New.
636 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
637 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
638 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
639 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
641 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
643 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
644 (PLT_LOCAL_IFUNC_P): Likewise.
645 * elf32-i386.c (elf_i386_relocate_section): Use them.
646 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
648 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
650 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
651 * elf32-i386.c (elf_i386_relocate_section): Use it.
652 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
654 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
656 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
657 * elf32-i386.c (elf_i386_relocate_section): Use it.
658 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
660 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
662 * elf32-i386.c (X86_PCREL_TYPE_P): New.
663 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
664 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
665 (X86_PCREL_TYPE_P): This.
666 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
667 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
668 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
670 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
672 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
674 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
675 * elf32-i386.c (elf_i386_tls_transition): Use it.
676 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
678 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
680 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
681 Dump dynamic relocation in read-only section with minfo if
683 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
684 (maybe_set_textrel): Likewise.
685 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
686 read-only section with minfo.
688 2017-10-05 John Baldwin <jhb@FreeBSD.org>
690 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
692 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
694 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
695 in read-only section with minfo.
696 (tilepro_elf_size_dynamic_sections): Likewise.
697 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
698 (tilegx_elf_size_dynamic_sections): Likewise.
700 2017-10-05 Pedro Alves <palves@redhat.com>
703 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
704 ellipsis parameter. Split out bfd_error_on_input code to..
705 (bfd_set_input_error): .. New function.
706 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
707 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
708 * bfd-in2.h: Regenerate.
710 2017-10-05 Alan Modra <amodra@gmail.com>
712 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
713 fini_array error value.
715 2017-10-05 Alan Modra <amodra@gmail.com>
718 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
720 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
722 (elf_fake_sections): Adjust calls. Exit immediately on failure.
723 (bfd_elf_set_group_contents): Add associated reloc section indices
726 2017-10-04 Alan Modra <amodra@gmail.com>
728 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
729 classify symbols for ELFv2.
731 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
734 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
735 undergoes default promotion.
736 * bfd-in2.h: Regenerate.
738 2017-10-02 Alan Modra <amodra@gmail.com>
740 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
741 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
743 2017-10-01 Alan Modra <amodra@gmail.com>
746 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
747 (add_line_info): Always put end_sequence last.
749 2017-10-01 Alan Modra <amodra@gmail.com>
752 * dwarf2.c (read_section): Allocate buffer with extra byte for
753 bfd_simple_get_relocated_section_contents rather than copying
756 2017-09-29 Alan Modra <amodra@gmail.com>
758 * merge.c (merge_strings): Return FALSE on malloc failure.
759 (_bfd_merge_sections): Return failures from record_section and
762 2017-09-28 Alan Modra <amodra@gmail.com>
765 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
766 a case where plugin_notice isn't called.
768 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
770 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
773 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
776 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
777 output_bfd to info->callbacks->minfo.
779 2017-09-26 Nick Clifton <nickc@redhat.com>
782 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
783 assertion failure if elf_x86_64_rtype_to_howto has already issued
786 2017-09-26 Alan Modra <amodra@gmail.com>
789 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
792 2017-09-26 Nick Clifton <nickc@redhat.com>
795 * dwarf2.c (read_formatted_entries): Fail early if we know that
796 the loop parsing data entries will overflow the end of the
799 2017-09-26 Alan Modra <amodra@gmail.com>
802 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
803 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
804 to stash->info_ptr_memory, and check die_ref is within that memory.
805 Set info_ptr_end correctly when another CU is refd. Check die_ref
806 for DW_FORM_ref4 etc. is within CU.
808 2017-09-26 Alan Modra <amodra@gmail.com>
811 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
812 (read_formatted_entries): Init "fe".
813 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
815 2017-09-26 Alan Modra <amodra@gmail.com>
818 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
819 bounds in inner loop.
821 2017-09-25 Alan Modra <amodra@gmail.com>
824 * dwarf1.c (parse_die): Sanity check pointer against section limit
825 before dereferencing.
826 (parse_line_table): Likewise.
828 2017-09-25 Alan Modra <amodra@gmail.com>
831 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
833 (parse_comp_unit): Likewise.
835 2017-09-25 Alan Modra <amodra@gmail.com>
838 * dwarf2.c (read_formatted_entries): Error on format_count zero.
840 2017-09-24 Alan Modra <amodra@gmail.com>
843 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
844 within section bounds.
846 2017-09-24 Alan Modra <amodra@gmail.com>
849 * dwarf2.c (decode_line_info): Properly free line sequences on error.
851 2017-09-24 Alan Modra <amodra@gmail.com>
854 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
855 pname param. Return status. Make name const. Don't abort,
856 return an error. Formatting. Exit if current info_ptr matches
857 orig_info_ptr. Update callers.
858 (scan_unit_for_symbols): Start at nesting_level of zero. Make
859 nested_funcs an array of structs for extensibility. Formatting.
861 2017-09-24 Alan Modra <amodra@gmail.com>
864 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
865 rather than dividing by zero.
867 2017-09-24 Alan Modra <amodra@gmail.com>
870 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
872 2017-09-24 Alan Modra <amodra@gmail.com>
875 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
877 2017-09-24 Alan Modra <amodra@gmail.com>
880 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
881 SHT_GNU_verneed section for sanity. Don't zalloc memory for
884 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
887 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
890 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
893 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
894 -1 if bfd_canonicalize_dynamic_reloc returns 0.
896 2017-09-22 Pedro Alves <palves@redhat.com>
897 Alan Modra <amodra@gmail.com>
899 * version.h: Add comment.
901 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
903 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
904 NT_S390_GS_BC, correct the previously swapped invocations of
905 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
907 2017-09-19 Alan Modra <amodra@gmail.com>
910 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
913 2017-09-19 Alan Modra <amodra@gmail.com>
916 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
917 symbols before calculating verrefs. Don't renumber dynsyms
918 after gc. Exclude .gnu.version when zero or one dynsym.
919 Localize some vars and reindent.
921 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
924 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
925 return from bfd_canonicalize_dynamic_reloc.
927 2017-09-15 Alan Modra <amodra@gmail.com>
930 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
931 overflows bfd_size_type.
933 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
936 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
937 to indicate if conversion is performed.
938 (elf_i386_check_relocs): Cache section contents and relocations
939 if conversion is performed.
940 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
941 contents and relocations if conversion is performed.
943 2017-09-14 Nick Clifton <nickc@redhat.com>
946 * peXXigen.c (pe_print_idata): Extend check for HintName vector
949 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
951 * elfxx-x86.h: Fix a typo in comments.
953 2017-09-09 Kamil Rytarowski <n54@gmx.com>
955 * elf32-nds32.c: Rename __BIT() to N32_BIT().
957 2017-09-09 Alan Modra <amodra@gmail.com>
959 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
962 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
964 * elf32-i386.c (elf_i386_relocate_section): Update usage of
965 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
966 (elf_i386_finish_dynamic_symbol): Likewise.
967 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
968 (elf_x86_64_finish_dynamic_symbol): Likewise.
969 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
970 (_bfd_x86_elf_fixup_symbol): Likewise.
972 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
974 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
975 check has_non_got_reloc.
977 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
980 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
981 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
982 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
983 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
984 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
985 and linker_def on __ehdr_start if it is referenced and not
987 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
988 and return TRUE when building executable, if a symbol has
989 non-GOT/non-PLT relocations in text section or there is no
991 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
993 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
995 * elfxx-x86.h: Update comments.
997 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
999 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1000 elf_x86_plt_layout_table with elf_x86_init_table.
1001 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1003 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1005 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1006 (elf_x86_init_table): This.
1007 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1008 elf_x86_plt_layout_table with elf_x86_init_table.
1010 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1012 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1013 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1014 * configure: Regenerated.
1015 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1016 and r_sym fields of plt_layout.
1017 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1019 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1020 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1021 r_info nor r_sym fields.
1022 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1024 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1026 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1028 * (_bfd_riscv_relax_align): Call bfd_set_error and
1029 print an error message when unable to relax a .align directive.
1031 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1033 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1034 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1035 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1036 R_RISCV_PCREL_HI20 relocs, and pass the result to
1037 riscv_record_pcrel_hi_reloc.
1039 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1041 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1042 r_type_p. Remove the converted argument. Replace
1043 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1044 the new relocation type via r_type_p.
1045 (elf_i386_relocate_section): Likewise.
1046 (elf_i386_finish_dynamic_symbol): Likewise.
1047 (need_convert_load): Removed.
1048 (check_relocs_failed): Updated.
1049 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1050 instead of setting need_convert_load.
1051 (_bfd_i386_elf_convert_load): Removed.
1052 * elf64-x86-64.c (need_convert_load): Removed.
1053 (check_relocs_failed): Updated.
1054 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1055 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1056 Return the new relocation type via r_type_p.
1057 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1058 instead of setting need_convert_load.
1059 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1061 (_bfd_x86_64_elf_convert_load): Removed.
1062 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1063 with SYMBOL_REFERENCES_LOCAL_P.
1064 (elf_x86_64_finish_dynamic_symbol): Likewise.
1065 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1067 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1068 (_bfd_x86_elf_link_symbol_references_local): New function.
1069 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1070 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1071 SYMBOL_REFERENCES_LOCAL_P.
1072 (elf_x86_link_hash_entry): Add local_ref.
1073 (elf_x86_link_hash_table): Remove convert_load.
1074 (_bfd_i386_elf_convert_load): Removed.
1075 (_bfd_x86_64_elf_convert_load): Likewise.
1076 (_bfd_x86_elf_link_symbol_references_local): New.
1078 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1080 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1081 (elf_x86_64_info_to_howto): Get the real relocation type by
1082 masking out R_X86_64_converted_reloc_bit.
1083 (elf_x86_64_check_tls_transition): Get the real relocation type
1084 by masking out R_X86_64_converted_reloc_bit.
1085 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1086 instead of setting converted_reloc.
1087 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1088 instead of converted_reloc. Get the real relocation type by
1089 masking out R_X86_64_converted_reloc_bit.
1090 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1091 R_X86_64_converted_reloc_bit is valid.
1092 * elfxx-x86.h (converted_reloc): Removed.
1094 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1096 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1097 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1098 to get the relocation type again.
1099 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1100 r_type when calling elf_x86_64_tls_transition. Don't use
1101 ELF32_R_TYPE to get the relocation type again.
1103 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1105 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1108 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1110 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1111 argument. Don't check relocation overflow. Avoid relocation
1112 overflow if --no-relax is used. Set converted_reloc on symbol
1113 if a GOTPCREL relocation is converted.
1114 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1115 --no-relax if GOTPCREL relocation conversion leads to relocation
1117 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1119 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1120 Edmar Wienskoski <edmar.wienskoski@nxp.com
1122 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1123 (ppc_elf_check_relocs): Handle it.
1124 (ppc_elf_vle_split20): New function.
1125 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1127 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1130 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1131 for x86-64 if GOT_TLS_GDESC_P is true.
1133 2017-09-03 Alan Modra <amodra@gmail.com>
1136 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1138 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1140 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1141 tls_get_addr for x86-64 in one place.
1143 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1145 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1146 with elfxx-x86.lo for 64-bit BFD.
1147 * configure: Regenerated.
1149 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1151 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1152 (_bfd_i386_elf_convert_load): This. Remove static.
1153 (elf_i386_size_dynamic_sections): Removed.
1154 (elf_backend_size_dynamic_sections): Likewise.
1155 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1156 (_bfd_x86_64_elf_convert_load): This. Remove static.
1157 (elf_x86_64_size_dynamic_sections): Removed.
1158 (elf_backend_size_dynamic_sections): Likewise.
1159 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1160 (elf_x86_allocate_dynrelocs): This. Make it static.
1161 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1162 (elf_x86_allocate_local_dynreloc): This. Make it static.
1163 (elf_i386_is_reloc_section): New function.
1164 (elf_x86_64_is_reloc_section): Likewise.
1165 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1166 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1167 Rearrange got_entry_size initialization.
1168 (_bfd_x86_elf_size_dynamic_sections): New function.
1169 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1170 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1171 (_bfd_i386_elf_convert_load): New.
1172 (_bfd_x86_64_elf_convert_load): Likewise.
1173 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1174 (elf_backend_size_dynamic_sections): Likewise.
1175 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1176 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1178 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1180 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1183 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1185 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1186 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1188 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1190 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1191 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1192 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1193 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1194 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1195 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1197 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1199 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1200 (elf_i386_allocate_local_dynrelocs): Likewise.
1201 (elf_i386_size_dynamic_sections): Replace
1202 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1203 with _bfd_x86_elf_allocate_dynrelocs and
1204 _bfd_x86_elf_allocate_local_dynrelocs.
1205 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1206 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1207 (elf_x86_64_size_dynamic_sections): Replace
1208 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1209 with _bfd_x86_elf_allocate_dynrelocs and
1210 _bfd_x86_elf_allocate_local_dynrelocs.
1211 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1212 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1213 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1214 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1216 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1218 * elf32-i386.c (is_i386_elf): Removed.
1219 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1220 (elf_i386_size_dynamic_sections): Likewise.
1221 (elf_i386_relocate_section): Likewise.
1222 * elf64-x86-64.c (is_x86_64_elf): Removed.
1223 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1225 (elf_x86_64_size_dynamic_sections): Likewise.
1226 (elf_x86_64_relocate_section): Likewise.
1227 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1229 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1232 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1234 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1235 (elf_i386_allocate_dynrelocs): Replace
1236 elf_i386_compute_jump_table_size with
1237 elf_x86_compute_jump_table_size.
1238 (elf_i386_size_dynamic_sections): Likewise.
1239 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1240 (elf_x86_64_allocate_dynrelocs): Replace
1241 elf_x86_64_compute_jump_table_size with
1242 elf_x86_compute_jump_table_size.
1243 (elf_x86_64_size_dynamic_sections): Likewise.
1244 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1246 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1247 (elf_x86_compute_jump_table_size): New.
1249 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1251 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1253 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1254 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1256 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1258 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1259 with htab->is_vxworks.
1260 (elf_i386_size_dynamic_sections): Likewise.
1261 (elf_i386_relocate_section): Likewise.
1262 (elf_i386_finish_dynamic_symbol): Likewise.
1263 (elf_i386_finish_dynamic_sections): Likewise.
1265 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1267 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1268 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1269 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1270 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1271 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1272 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1273 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1274 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1276 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1279 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1280 ELF_COMMON_DEF_P for common symbols.
1282 2017-09-02 Alan Modra <amodra@gmail.com>
1284 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1285 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1286 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1288 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1290 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1291 (elf_backend_gc_mark_hook): Likewise.
1292 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1293 (elf_backend_gc_mark_hook): Likewise.
1294 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1295 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1296 (elf_backend_gc_mark_hook): Likewise.
1298 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1300 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1301 (elf_backend_adjust_dynamic_symbol): Likewise.
1302 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1303 (elf_backend_adjust_dynamic_symbol): Likewise.
1304 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1305 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1306 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1307 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1308 (elf_backend_adjust_dynamic_symbol): Likewise.
1310 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1312 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1315 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1317 * elf32-i386.c (elf_i386_mkobject): Removed.
1318 (bfd_elf32_mkobject): Likewise.
1319 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1320 (bfd_elf64_mkobject): Likewise.
1321 (bfd_elf32_mkobject): Likewise.
1322 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1323 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1324 (bfd_elf64_mkobject): Likewise.
1325 (bfd_elf32_mkobject): Likewise.
1327 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1329 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1330 Call _bfd_x86_elf_link_setup_gnu_properties.
1331 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1332 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1334 (elf_x86_64_non_lazy_plt): Likewise.
1335 (elf_x86_64_lazy_bnd_plt): Likewise.
1336 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1337 (elf_x86_64_lazy_ibt_plt): Likewise.
1338 (elf_x32_lazy_ibt_plt): Likewise.
1339 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1340 (elf_x32_non_lazy_ibt_plt): Likewise.
1341 (elf_x86_64_nacl_plt): Likewise.
1342 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1343 _bfd_x86_elf_link_setup_gnu_properties.
1344 * elfxx-x86.c: Include elf-vxworks.h".
1345 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1346 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1347 comments for pic_plt0_entry and pic_plt_entry.
1348 (elf_x86_non_lazy_plt_layout): Likewise.
1349 (elf_x86_plt_layout_table): New.
1350 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1352 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1355 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1356 .eh_frame section for the second PLT.
1357 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1358 alignment of .eh_frame section for the second PLT.
1360 2017-09-01 Nick Clifton <nickc@redhat.com>
1363 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1366 2017-09-01 Nick Clifton <nickc@redhat.com>
1369 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1370 attribute buffer is NUL terminated.
1372 2017-08-31 Nick Clifton <nickc@redhat.com>
1375 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1376 to dwarf string sections.
1378 2017-08-31 Alan Modra <amodra@gmail.com>
1380 * po/SRC-POTFILES.in: Regenerate.
1382 2017-08-31 Alan Modra <amodra@gmail.com>
1384 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1385 for a section containing just a terminator. Allow multiple
1386 terminators at end of section.
1387 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1388 sections when not adding alignment. Assert on terminator in
1391 2017-08-31 Alan Modra <amodra@gmail.com>
1395 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1398 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1400 * configure.ac (bfd_backends): Add elf64.lo together with
1401 elfxx-x86.lo for 64-bit BFD.
1402 * configure: Regenerated.
1404 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1406 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1409 2017-08-31 Alan Modra <amodra@gmail.com>
1412 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1413 before _close_and_cleanup. Call iovec->bclose after.
1414 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1416 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1418 * elf32-i386.c (elf_i386_plt_type): Removed.
1419 (elf_i386_plt): Likewise.
1420 (elf_i386_get_synthetic_symtab): Updated. Call
1421 _bfd_x86_elf_get_synthetic_symtab.
1422 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1423 (elf_x86_64_plt): Likewise.
1424 (elf_x86_64_get_synthetic_symtab): Updated. Call
1425 _bfd_x86_elf_get_synthetic_symtab.
1426 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1427 (elf_x86_64_get_plt_got_vma): Likewise.
1428 (elf_i386_valid_plt_reloc_p): Likewise.
1429 (elf_x86_64_valid_plt_reloc_p): Likewise.
1430 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1431 * elfxx-x86.h (elf_x86_plt_type): New.
1432 (elf_x86_plt): Likewise.
1433 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1435 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1437 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1438 target_id instead of elf_machine_code.
1440 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1442 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1443 (elf_i386_lazy_plt_layout): Likewise.
1444 (elf_i386_non_lazy_plt_layout): Likewise.
1445 (elf_i386_plt_layout): Likewise.
1446 (elf_i386_link_hash_table): Likewise.
1447 (elf_i386_next_tls_desc_index): Likewise.
1448 (elf_i386_srelplt2): Likewise.
1449 (elf_i386_plt): Likewise.
1450 (elf_i386_lazy_plt): Likewise.
1451 (elf_i386_non_lazy_plt): Likewise.
1452 (elf_i386_link_hash_table_create): Likewise.
1453 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1454 (elf_i386_lazy_plt): Updated.
1455 (elf_i386_non_lazy_plt): Likewise.
1456 (elf_i386_lazy_ibt_plt): Likewise.
1457 (elf_i386_non_lazy_ibt_plt): Likewise.
1458 (elf_i386_allocate_dynrelocs): Likewise.
1459 (elf_i386_size_dynamic_sections): Likewise.
1460 (elf_i386_relocate_section): Likewise.
1461 (elf_i386_finish_dynamic_symbol): Likewise.
1462 (elf_i386_finish_dynamic_sections): Likewise.
1463 (elf_i386_get_synthetic_symtab): Likewise.
1464 (elf_i386_link_setup_gnu_properties): Likewise.
1465 (elf_i386_nacl_plt): Likewise.
1466 * elf64-x86-64.c (ABI_64_P): Removed.
1467 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1468 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1469 (elf_x86_64_lazy_plt_layout): Likewise.
1470 (elf_x86_64_non_lazy_plt_layout): Likewise.
1471 (elf_x86_64_plt_layout): Likewise.
1472 (elf_x86_64_link_hash_table): Likewise.
1473 (elf_x86_64_plt): Likewise.
1474 (elf_x86_64_lazy_plt): Likewise.
1475 (elf_x86_64_non_lazy_plt): Likewise.
1476 (elf_x86_64_link_hash_table_create): Likewise.
1477 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1478 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1479 (elf_x86_64_lazy_plt): Updated.
1480 (elf_x86_64_non_lazy_plt): Likewise.
1481 (elf_x86_64_lazy_bnd_plt): Likewise.
1482 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1483 (elf_x86_64_lazy_ibt_plt): Likewise.
1484 (elf_x32_lazy_ibt_plt): Likewise.
1485 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1486 (elf_x32_non_lazy_ibt_plt): Likewise.
1487 (elf_x86_64_allocate_dynrelocs): Likewise.
1488 (elf_x86_64_size_dynamic_sections): Likewise.
1489 (elf_x86_64_relocate_section): Likewise.
1490 (elf_x86_64_finish_dynamic_symbol): Likewise.
1491 (elf_x86_64_finish_dynamic_sections): Likewise.
1492 (elf_x86_64_get_synthetic_symtab): Likewise.
1493 (elf_x86_64_link_setup_gnu_properties): Likewise.
1494 (elf_x86_64_nacl_plt): Likewise.
1495 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1497 (ELF32_DYNAMIC_INTERPRETER): New.
1498 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1499 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1500 (_bfd_x86_elf_link_hash_table_create): Likewise.
1501 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1502 (elf_x86_link_hash_table_free): This. Make it static.
1503 * elfxx-x86.h: Don't include "objalloc.h".
1505 (elf_x86_lazy_plt_layout): Likewise.
1506 (elf_x86_non_lazy_plt_layout): Likewise.
1507 (elf_x86_plt_layout): Likewise.
1508 (_bfd_x86_elf_link_hash_table_create): Likewise.
1509 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1510 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1511 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1512 srelplt2 and next_tls_desc_index.
1513 (_bfd_x86_elf_link_hash_table_free): Removed.
1515 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1517 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1518 branch offset interpretation.
1520 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1523 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1525 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1527 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1528 (elf_x86_64_srelplt2): Likewise.
1530 2017-08-30 Alan Modra <amodra@gmail.com>
1532 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1533 (ppc64_elf_tls_optimize): Set it.
1534 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1535 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1536 addis would add zero.
1537 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1538 (ppc_elf_tls_optimize): Set it.
1539 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1540 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1542 2017-08-30 Alan Modra <amodra@gmail.com>
1544 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1545 __tls_get_addr call sequences to LE, don't move the addi down
1546 to the nop. Replace the bl with addi and leave the nop alone.
1548 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1550 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1552 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1554 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1556 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1558 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1559 (BFD64_BACKENDS): Likewise.
1560 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1561 (BFD64_BACKENDS_CFILES): Likewise.
1562 * Makefile.in: Regenerated.
1563 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1564 elf32-i386.lo and elf64-x86-64.lo.
1565 * configure: Regenerated.
1566 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1567 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1568 "objalloc.h" and "hashtab.h".
1569 (ELIMINATE_COPY_RELOCS): Removed.
1570 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1571 (SYMBOL_NO_COPYRELOC): Likewise.
1572 (elf_i386_link_hash_entry): Likewise.
1573 (GOT_UNKNOWN): Likewise.
1574 (GOT_NORMAL): Likewise.
1575 (GOT_TLS_GD): Likewise.
1576 (elf_i386_hash_entry): Likewise.
1577 (elf_i386_obj_tdata): Likewise.
1578 (elf_i386_tdata): Likewise.
1579 (elf_i386_local_got_tls_type): Likewise.
1580 (elf_i386_local_tlsdesc_gotent): Likewise.
1581 (elf_i386_hash_table): Likewise.
1582 (elf_i386_link_hash_newfunc): Likewise.
1583 (elf_i386_local_htab_hash): Likewise.
1584 (elf_i386_local_htab_eq): Likewise.
1585 (elf_i386_get_local_sym_hash): Likewise.
1586 (elf_i386_link_hash_table_free): Likewise.
1587 (elf_i386_copy_indirect_symbol): Likewise.
1588 (elf_i386_fixup_symbol): Likewise.
1589 (elf_i386_readonly_dynrelocs): Likewise.
1590 (elf_i386_always_size_sections): Likewise.
1591 (elf_i386_set_tls_module_base): Likewise.
1592 (elf_i386_dtpoff_base): Likewise.
1593 (compare_relocs): Likewise.
1594 (elf_i386_hash_symbol): Likewise.
1595 (elf_i386_parse_gnu_properties): Likewise.
1596 (elf_i386_merge_gnu_properties): Likewise.
1597 (elf_i386_link_check_relocs): Likewise.
1598 (elf_i386_merge_symbol_attribute): Likewise.
1599 (bfd_elf32_bfd_link_check_relocs): Likewise.
1600 (elf_backend_copy_indirect_symbol): Likewise.
1601 (elf_backend_always_size_sections): Likewise.
1602 (elf_backend_omit_section_dynsym): Likewise.
1603 (elf_backend_hash_symbol): Likewise.
1604 (elf_backend_fixup_symbol): Likewise.
1605 (elf_backend_parse_gnu_properties): Likewise.
1606 (elf_backend_merge_gnu_properties): Likewise.
1607 (elf_backend_merge_symbol_attribute): Likewise.
1608 (elf_i386_mkobject): Updated.
1609 (elf_i386_link_hash_table_create): Likewise.
1610 (elf_i386_check_tls_transition): Likewise.
1611 (elf_i386_tls_transition): Likewise.
1612 (elf_i386_convert_load_reloc): Likewise.
1613 (elf_i386_check_relocs): Likewise.
1614 (elf_i386_adjust_dynamic_symbol): Likewise.
1615 (elf_i386_allocate_dynrelocs): Likewise.
1616 (elf_i386_convert_load): Likewise.
1617 (elf_i386_size_dynamic_sections): Likewise.
1618 (elf_i386_relocate_section): Likewise.
1619 (elf_i386_finish_dynamic_symbol ): Likewise.
1620 (elf_i386_finish_dynamic_sections): Likewise.
1621 (elf_i386_output_arch_local_syms): Likewise.
1622 (elf_i386_get_synthetic_symtab): Likewise.
1623 (elf_i386_link_setup_gnu_properties): Likewise.
1624 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1625 of elf_link_hash_table, as base.
1626 (elf_i386_next_tls_desc_index): New.
1627 (elf_i386_srelplt2): Likewise.
1628 (elf_i386_plt): Likewise.
1629 (elf_i386_lazy_plt): Likewise.
1630 (elf_i386_non_lazy_plt): Likewise.
1631 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1632 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1633 "objalloc.h" and "hashtab.h".
1634 (ELIMINATE_COPY_RELOCS): Removed.
1635 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1636 (SYMBOL_NO_COPYRELOC): Likewise.
1637 (elf_x86_64_link_hash_entry): Likewise.
1638 (GOT_UNKNOWN): Likewise.
1639 (GOT_NORMAL): Likewise.
1640 (GOT_TLS_GD): Likewise.
1641 (elf_x86_64_hash_entry): Likewise.
1642 (elf_x86_64_obj_tdata): Likewise.
1643 (elf_x86_64_tdata): Likewise.
1644 (elf_x86_64_local_got_tls_type): Likewise.
1645 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1646 (elf_x86_64_hash_table): Likewise.
1647 (elf_x86_64_link_hash_newfunc): Likewise.
1648 (elf_x86_64_local_htab_hash): Likewise.
1649 (elf_x86_64_local_htab_eq): Likewise.
1650 (elf_x86_64_get_local_sym_hash): Likewise.
1651 (elf_x86_64_link_hash_table_free): Likewise.
1652 (elf_x86_64_copy_indirect_symbol): Likewise.
1653 (elf_x86_64_fixup_symbol): Likewise.
1654 (elf_x86_64_readonly_dynrelocs): Likewise.
1655 (elf_x86_64_always_size_sections): Likewise.
1656 (elf_x86_64_set_tls_module_base): Likewise.
1657 (elf_x86_64_dtpoff_base): Likewise.
1658 (compare_relocs): Likewise.
1659 (elf_x86_64_merge_symbol_attribute): Likewise.
1660 (elf_x86_64_hash_symbol): Likewise.
1661 (elf_x86_64_parse_gnu_properties): Likewise.
1662 (elf_x86_64_merge_gnu_properties): Likewise.
1663 (elf_x86_64_link_check_relocs): Likewise.
1664 (elf_backend_copy_indirect_symbol): Likewise.
1665 (elf_backend_always_size_sections): Likewise.
1666 (bfd_elf64_bfd_link_check_relocs): Likewise.
1667 (elf_backend_merge_symbol_attribute): Likewise.
1668 (elf_backend_hash_symbol): Likewise.
1669 (elf_backend_omit_section_dynsym): Likewise.
1670 (elf_backend_fixup_symbol): Likewise.
1671 (elf_backend_parse_gnu_properties): Likewise.
1672 (elf_backend_merge_gnu_properties): Likewise.
1673 (bfd_elf32_bfd_link_check_relocs): Likewise.
1674 (elf_x86_64_mkobject): Updated.
1675 (elf_x86_64_link_hash_table_create): Likewise.
1676 (elf_x86_64_check_tls_transition): Likewise.
1677 (elf_x86_64_tls_transition): Likewise.
1678 (elf_x86_64_convert_load_reloc): Likewise.
1679 (elf_x86_64_check_relocs): Likewise.
1680 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1681 (elf_x86_64_allocate_dynrelocs): Likewise.
1682 (elf_x86_64_convert_load): Likewise.
1683 (elf_x86_64_size_dynamic_sections): Likewise.
1684 (elf_x86_64_relocate_section): Likewise.
1685 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1686 (elf_x86_64_finish_dynamic_sections): Likewise.
1687 (elf_x86_64_output_arch_local_syms): Likewise.
1688 (elf_x86_64_get_synthetic_symtab): Likewise.
1689 (elf_x86_64_link_setup_gnu_properties): Likewise.
1690 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1691 instead of elf_link_hash_table, as base.
1692 (elf_x86_64_next_tls_desc_index): New.
1693 (elf_x86_64_srelplt2): Likewise.
1694 (elf_x86_64_plt): Likewise.
1695 (elf_x86_64_lazy_plt): Likewise.
1696 (elf_x86_64_non_lazy_plt): Likewise.
1697 * elfxx-x86.c: New file.
1698 * elfxx-x86.h: Likewise.
1700 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1702 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1704 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1706 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1708 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1709 sections before checking dynamic relocations and free invalid
1710 PLT section contents.
1711 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1713 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1715 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1716 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1718 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1721 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1723 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1725 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1727 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1729 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1731 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1734 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1735 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1736 Add a has_no_copy_on_protected bitfield.
1737 (elf_has_no_copy_on_protected): New.
1738 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1739 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1740 (elf_merge_gnu_property_list): Likewise.
1741 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1742 to FALSE for elf_has_no_copy_on_protected.
1743 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1744 (elf_i386_link_hash_entry): Add def_protected.
1745 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1746 when checking info->nocopyreloc.
1747 (elf_i386_link_setup_gnu_properties): Don't set
1748 extern_protected_data here.
1749 (elf_i386_merge_symbol_attribute): New function.
1750 (elf_backend_merge_symbol_attribute): New.
1751 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1752 (elf_x86_64_link_hash_entry): Add def_protected.
1753 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1754 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1755 when checking info->nocopyreloc.
1756 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1757 relocation run-time overflow and unresolvable R_X86_64_32S
1758 relocation against protected data symbol defined in shared object
1759 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1760 (elf_x86_64_link_setup_gnu_properties): Don't set
1761 extern_protected_data here.
1762 (elf_x86_64_merge_symbol_attribute): New function.
1763 (elf_backend_merge_symbol_attribute): New.
1765 2017-08-26 Alan Modra <amodra@gmail.com>
1767 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1768 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1769 (ppc_elf_relocate_section): Comment fix.
1770 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1771 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1772 Support dynamic relocs for TPREL16 when non-pic too.
1773 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1774 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1777 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1779 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1780 "symbol" in comments.
1781 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1783 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1786 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1787 R_X86_64_PC32 relocation run-time overflow and unresolvable
1788 R_X86_64_32S relocation with -z nocopyreloc.
1790 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1792 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1793 Undefined symbols may not have a type.
1794 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1796 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1798 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1799 bfd_link_info. Report shared, PIE or PDE object based on
1801 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1802 (elf_x86_64_relocate_section): Likewise.
1804 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1806 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1807 for function symbols.
1808 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1810 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1812 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1813 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1814 is set on any input relocatable file.
1815 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1817 2017-08-23 Alan Modra <amodra@gmail.com>
1820 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1821 ensure_undefweak_dynamic. Handle undefined too.
1822 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1823 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1824 (allocate_dynrelocs): Discard undefined non-default visibility
1825 relocs first. Make undefined syms dynamic. Tidy goto.
1827 2017-08-21 Alan Modra <amodra@gmail.com>
1828 H.J. Lu <hongjiu.lu@intel.com>
1831 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1832 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1834 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1837 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1838 undefined weak symbols.
1840 2017-08-18 Nick Clifton <nickc@redhat.com>
1843 * tekhex.c (getsym): Fix check for source pointer walking off the
1844 end of the input buffer.
1846 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1849 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1850 relocations in debug sections, change abort to _bfd_error_handler.
1852 2017-08-14 Nick Clifton <nickc@redhat.com>
1855 * elf.c (setup_group): Check for an empty or very small group
1857 * po/bfd.pot: Regenerate.
1859 2017-08-14 Alan Modra <amodra@gmail.com>
1862 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1863 alignment padding here.
1864 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1865 in a reverse pass over sections.
1867 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1870 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1871 for @plt suffixes first.
1872 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1874 2017-08-08 Nick Clifton <nickc@redhat.com>
1877 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1878 small section lengths.
1879 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1881 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1882 there is enough data present in the note.
1884 2017-08-08 Alan Modra <amodra@gmail.com>
1887 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1888 got.refcount for GOTOFF relocs, just create .got section.
1890 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1892 * elflink.c (elf_link_add_object_symbols): Move common symbol
1893 check after bed->common_definition.
1895 2017-08-07 Alan Modra <amodra@gmail.com>
1898 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1899 needed to define various dynamic tags have been discarded.
1901 2017-08-07 Nick Clifton <nickc@redhat.com>
1904 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1905 has not been set then use the bfd returned by
1906 _bfd_elf_link_setup_gnu_properties. If that is null then search
1907 through all the input bfds selecting the first normal, ELF format
1909 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1911 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1913 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1915 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1916 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1917 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1918 (elf_i386_link_check_relocs): New function.
1919 (bfd_elf32_bfd_link_check_relocs): New.
1920 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1922 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1923 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1924 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1925 (elf_x86_64_link_check_relocs): New function.
1926 (bfd_elf64_bfd_link_check_relocs): New.
1927 (bfd_elf32_bfd_link_check_relocs): Likewise.
1929 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1932 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1933 as undefined for --no-define-common.
1935 2017-08-05 Alan Modra <amodra@gmail.com>
1937 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1938 hppa_link_hash_table.
1940 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1942 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1943 entries for sysregs with negative indices.
1945 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1947 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1948 isn't the S/390 specific elf data.
1949 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1951 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1953 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1954 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1955 [R_RISCV_ADD16]: Likewise.
1956 [R_RISCV_ADD32]: Likewise.
1957 [R_RISCV_ADD64]: Likewise.
1958 [R_RISCV_SUB6]: Likewise.
1959 [R_RISCV_SUB8]: Likewise.
1960 [R_RISCV_SUB16]: Likewise.
1961 [R_RISCV_SUB32]: Likewise.
1962 [R_RISCV_SUB64]: Likewise.
1964 2017-07-31 Alan Modra <amodra@gmail.com>
1966 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1967 without ld.so checks.
1969 2017-07-29 Alan Modra <amodra@gmail.com>
1972 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1973 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1974 (is_elfv2_localentry0): Test non_zero_localentry.
1975 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1977 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1979 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1980 pointer check for htab->elf.irelplt.
1981 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1983 2017-07-27 Nick Clifton <nickc@redhat.com>
1986 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1988 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1990 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1992 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1994 (evax_bfd_print_emh): Check for invalid string lengths.
1996 2017-07-25 Nick Clifton <nickc@redhat.com>
1998 * po/fr.po: Updated French translation.
2000 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2003 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2004 16-bit absolute branches into 10-bit pc-relative branches on the
2005 MSP430 as well as the MSP430X.
2007 2017-07-25 Alan Modra <amodra@gmail.com>
2009 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2010 (stub_eh_frame_size): New function.
2011 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2012 (group_sections): Init group tls_get_addr_opt_bctrl.
2013 (ppc64_elf_size_stubs): Update sizing and initialization of
2014 .eh_frame. Iteration over stubs via group list.
2015 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2016 (ppc64_elf_finish_dynamic_sections): Update finalization of
2019 2017-07-24 Nick Clifton <nickc@redhat.com>
2022 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2023 of the relocs to the canonicalize_one_reloc routine.
2024 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2025 for the _bfd_mach_o_canonicalize_one_reloc field.
2026 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2027 res_base parameter. Use to check for corrupt pair relocs.
2028 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2030 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2032 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2035 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2036 enough data in the record before attempting to parse it.
2037 (_bfd_vms_slurp_eeom): Likewise.
2039 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2040 (image_set_ptr): Likewise.
2041 (alpha_vms_slurp_relocs): Likewise.
2043 (alpha_vms_object_p): Check for a truncated record.
2045 2017-07-24 Nick Clifton <nickc@redhat.com>
2048 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2049 an unrecognized reloc and sets the bfd_error value.
2050 * libbfd.h: Regenerate.
2051 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2053 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2054 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2055 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2056 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2057 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2059 2017-07-23 Alan Modra <amodra@gmail.com>
2061 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2064 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2067 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2068 reloc_class_ifunc for ifunc symbols.
2070 2017-07-19 Nick Clifton <nickc@redhat.com>
2073 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2074 correct magic bytes at the start, set the error to wrong format
2075 and clear the format selector before returning NULL.
2077 2017-07-19 Nick Clifton <nickc@redhat.com>
2080 * coff-rs6000.c (_bfd_strntol): New function.
2081 (_bfd_strntoll): New function.
2082 (GET_VALUE_IN_FIELD): New macro.
2083 (EQ_VALUE_IN_FIELD): new macro.
2084 (_bfd_xcoff_slurp_armap): Use new macros.
2085 (_bfd_xcoff_archive_p): Likewise.
2086 (_bfd_xcoff_read_ar_hdr): Likewise.
2087 (_bfd_xcoff_openr_next_archived_file): Likewise.
2088 (_bfd_xcoff_stat_arch_elt): Likewise.
2089 * coff64-rs6000.c (_bfd_strntol): New function.
2090 (_bfd_strntoll): New function.
2091 (GET_VALUE_IN_FIELD): New macro.
2092 (xcoff64_slurp_armap): Use new macros.
2094 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2095 John Eric Martin <John.Martin@emmicro-us.com>
2097 * bfd-in2.h: Regenerate.
2098 * libbfd.h: Regenerate.
2099 * elf32-arc.c (JLI): Define.
2100 * reloc.c: Add JLI relocations.
2102 2017-07-18 Nick Clifton <nickc@redhat.com>
2105 * coff-sh.c: Fix spelling typos.
2106 * compress.c: Likewise.
2107 * cpu-pdp11.c: Likewise.
2108 * ecofflink.c: Likewise.
2109 * elf-m10300.c: Likewise.
2111 * elf32-arm.c: Likewise.
2112 * elf32-m68k.c: Likewise.
2113 * elf32-nds32.c: Likewise.
2114 * elf32-ppc.c: Likewise.
2115 * elf32-sh.c: Likewise.
2116 * elf32-v850.c: Likewise.
2117 * elf64-ppc.c: Likewise.
2118 * elf64-x86-64.c: Likewise.
2119 * elflink.c: Likewise.
2120 * elfnn-aarch64.c: Likewise.
2121 * elfxx-mips.c: Likewise.
2123 * sunos.c: Likewise.
2124 * vms-alpha.c: Likewise.
2125 * xcofflink.c: Likewise.
2127 2017-07-18 Nick Clifton <nickc@redhat.com>
2130 * coffcode.h (handle_COMDAT): Replace abort with an error message
2133 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2136 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2139 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2141 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2143 2017-07-16 Alan Modra <amodra@gmail.com>
2145 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2146 __tls_index GOT entries when using __tls_get_addr_opt stub.
2147 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2149 2017-07-12 Alan Modra <amodra@gmail.com>
2151 * po/es.po: Update from translationproject.org/latest/bfd/.
2152 * po/fi.po: Likewise.
2153 * po/fr.po: Likewise.
2154 * po/id.po: Likewise.
2155 * po/ja.po: Likewise.
2156 * po/ro.po: Likewise.
2157 * po/ru.po: Likewise.
2158 * po/sr.po: Likewise.
2159 * po/sv.po: Likewise.
2160 * po/tr.po: Likewise.
2161 * po/uk.po: Likewise.
2162 * po/vi.po: Likewise.
2163 * po/zh_CN.po: Likewise.
2164 * po/hr.po: New file from translationproject.org.
2165 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2166 * configure: Regenerate.
2168 2017-07-12 Nick Clifton <nickc@redhat.com>
2170 Fix compile time warnings using gcc 7.1.1.
2171 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2173 (elf_xtensa_get_gotplt_section): Increase length of got_name
2175 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2176 default return of FALSE.
2177 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2178 default return of FALSE.
2180 2017-07-12 Alan Modra <amodra@gmail.com>
2182 * binary.c (binary_set_section_contents): Don't print filepos in
2184 (coff_write_object_contents): Cast size_t for error message.
2185 (coff_slurp_line_table): Don't use bfd_vma symndx.
2186 (coff_slurp_reloc_table): Remove unneeded cast.
2187 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2189 (find_abstract_instance_name): Likewise.
2190 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2191 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2192 (elf32_arm_check_relocs): Make r_symndx an int.
2193 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2195 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2197 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2199 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2200 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2201 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2202 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2203 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2204 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2205 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2206 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2207 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2208 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2209 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2210 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2211 and use %lu for error message.
2212 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2213 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2216 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2218 (elf32_arm_final_link_relocate): Likewise.
2219 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2220 * coffcode.h (styp_to_sec_flags): Likewise.
2221 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2222 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2223 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2224 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2225 (elf32_bfin_merge_private_bfd_data): Likewise.
2226 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2227 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2228 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2229 (i370_elf_relocate_section): Likewise.
2230 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2231 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2232 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2233 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2234 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2235 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2236 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2237 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2238 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2239 * ieee.c (ieee_write_id, read_id): Likewise.
2240 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2241 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2242 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2243 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2244 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2245 * stabs.c (_bfd_link_section_stabs): Likewise.
2247 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2249 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2250 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2251 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2252 * coff-sh.c (sh_relax_section): Likewise.
2253 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2254 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2255 * coffcode.h (coff_slurp_reloc_table): Likewise.
2256 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2257 (_bfd_coff_read_string_table): Likewise.
2258 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2259 * compress.c (bfd_get_full_section_contents): Likewise.
2260 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2261 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2262 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2263 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2264 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2265 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2266 (elf32_arm_write_section): Likewise.
2267 * elf32-bfin.c (bfin_relocate_section): Likewise.
2268 (bfinfdpic_relocate_section): Likewise.
2269 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2270 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2271 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2272 (elf_i386_relocate_section): Likewise.
2273 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2274 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2275 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2276 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2277 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2278 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2279 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2280 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2281 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2282 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2283 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2284 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2285 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2286 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2287 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2288 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2289 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2290 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2291 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2292 * elf32-sh.c (sh_elf_relax_section): Likewise.
2293 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2294 (sh_elf_relocate_section): Likewise.
2295 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2296 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2297 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2298 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2299 * elf32-v850.c (v850_elf_relax_section): Likewise.
2300 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2301 (elf_vax_relocate_section): Likewise.
2302 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2303 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2304 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2305 (do_fix_for_relocatable_link): Likewise.
2306 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2307 (elf64_alpha_relax_with_lituse): Likewise.
2308 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2309 (elf_hppa_final_link_relocate): Likewise.
2310 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2311 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2312 (elf64_vms_link_add_object_symbols): Likewise.
2313 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2314 (mmix_final_link_relocate): Likewise.
2315 * elf64-s390.c (invalid_tls_insn): Likewise.
2316 (elf_s390_relocate_section): Likewise.
2317 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2318 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2319 (elf_x86_64_relocate_section): Likewise.
2320 * elfcode.h (elf_slurp_symbol_table): Likewise.
2321 * elfcore.h (elf_core_file_p): Likewise.
2322 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2323 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2324 (elfNN_aarch64_relocate_section): Likewise.
2325 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2326 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2327 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2328 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2329 (_bfd_mips_elf_relocate_section): Likewise.
2330 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2331 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2332 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2333 * ieee.c (ieee_slurp_external_symbols): Likewise.
2334 * ihex.c (ihex_write_object_content): Likewise.
2335 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2336 * merge.c (_bfd_merged_section_offset): Likewise.
2337 * mmo.c (mmo_write_loc_chunk): Likewise.
2338 (mmo_write_object_contents): Likewise.
2339 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2340 * stabs.c (_bfd_link_section_stabs): Likewise.
2341 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2343 2017-07-11 Alan Modra <amodra@gmail.com>
2345 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2347 2017-07-11 Alan Modra <amodra@gmail.com>
2349 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2350 instruction" error using _bfd_error_handler, not einfo.
2352 2017-07-10 Nick Clifton <nickc@redhat.com>
2354 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2355 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2357 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2359 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2361 2017-07-07 Alan Modra <amodra@gmail.com>
2363 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2365 2017-07-07 Alan Modra <amodra@gmail.com>
2367 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2368 as long long. Move code replacing "ll" with "I64", and simplify.
2370 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2372 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2375 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2377 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2379 (line_info_add_file_name): Likewise.
2380 (decode_line_info): Likewise.
2382 2017-07-04 Tristan Gingold <gingold@adacore.com>
2384 * version.m4: Bump version to 2.29.51
2385 * configure: Regenerate.
2387 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2389 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2390 sanity check at the head of this function.
2392 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2394 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2395 dwarf_line_str_size.
2396 (struct attr_abbrev): Add field implicit_const.
2397 (dwarf_debug_sections): Add .debug_line_str.
2398 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2399 (dwarf_debug_section_assert): Add static assertion.
2400 (read_indirect_line_string): New.
2401 (read_abbrevs): Support DW_FORM_implicit_const.
2402 (is_str_attr): Support DW_FORM_line_strp.
2403 (read_attribute_value): Support DW_FORM_line_strp and
2404 DW_FORM_implicit_const.
2405 (read_attribute): Support DW_FORM_implicit_const.
2406 (line_info_add_include_dir, line_info_add_include_dir_stub):
2407 (line_info_add_file_name, read_formatted_entries): New.
2408 (decode_line_info, parse_comp_unit): Support DWARF 5.
2409 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2411 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2413 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2414 abort statement that was put for symbols that are not dynamic.
2416 2017-07-03 Tristan Gingold <gingold@adacore.com>
2418 * po/bfd.pot: Regenerate
2420 2017-07-03 Alan Modra <amodra@gmail.com>
2422 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2423 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2424 * elf.c (setup_group): Use "Lx" to print sh_size.
2425 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2426 unknown section type in hex.
2427 (copy_special_section_fields): Style fix.
2428 (bfd_section_from_shdr): Correct format for sh_link. Use a
2429 common error message for all the variants of unrecognized
2431 (assign_file_positions_for_load_sections): Use "Lx" for lma
2432 adjust error message.
2433 (assign_file_positions_for_non_load_sections): Formatting.
2434 (rewrite_elf_program_header): Formatting. Use "Lx" for
2435 bfd_vma values in error messages.
2436 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2437 ELF_R_SYM value to type expected by format.
2438 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2440 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2441 (elf_link_input_bfd): Use "Lx" for r_info.
2442 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2444 2017-07-03 Alan Modra <amodra@gmail.com>
2446 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2447 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2448 Microsoft C library variant of long long format specifier.
2449 (PRINT20): Cast value to bfd_uint64_t not long long.
2450 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2451 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2452 long long. Don't cast to bfd_vma.
2453 * elf32-score.c (score3_bfd_getl48): Likewise.
2454 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2456 2017-07-03 Alan Modra <amodra@gmail.com>
2458 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2460 (bfd_elf_print_symbol): Don't cast symbol->flags.
2461 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2462 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2463 _bfd_error_handler argument order.
2464 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2466 2017-07-03 Alan Modra <amodra@gmail.com>
2468 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2469 AC_TYPE_LONG_DOUBLE.
2470 * configure: Regenerate.
2471 * config.in: Regenerate.
2473 2017-06-29 Andrew Waterman <andrew@sifive.com>
2475 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2478 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2480 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2481 unless it is undefined weak.
2482 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2483 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2485 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2486 is not dynamic in PIC, abort.
2488 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2491 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2492 undefined weak symbols into dynamic.
2493 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2494 relocation for non-dynamic symbols.
2495 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2497 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2499 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2500 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2501 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2502 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2503 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2506 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2508 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2509 (elfcore_write_s390_gs_bc): Likewise.
2510 * elf.c (elfcore_grok_s390_gs_cb): New function.
2511 (elfcore_grok_s390_gs_bc): New function.
2512 (elfcore_grok_note): Call them.
2513 (elfcore_write_s390_gs_cb): New function.
2514 (elfcore_write_s390_gs_bc): New function.
2515 (elfcore_write_register_note): Call them.
2517 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2519 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2520 bfd_get_file_size. Check archive element size.
2521 (_bfd_generic_get_section_contents_in_window): Likewise.
2523 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2525 * bfd-in2.h: Regenerated.
2526 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2527 (bfd_get_file_size): Likewise.
2529 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2530 Matthew Fortune <matthew.fortune@imgtec.com>
2532 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2533 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2534 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2535 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2537 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2538 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2539 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2540 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2541 `bfd_mach_mips_interaptiv_mr2' entries.
2542 * bfd-in2.h: Regenerate.
2544 2017-06-27 Nick Clifton <nickc@redhat.com>
2546 * tekhex.c (pass_over): Revert accidental conversion of a local
2547 array to a static array.
2549 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2552 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2553 reloc addend if necessary. Adjust diff only if
2554 shrinked_insn_address < end_address.
2556 2017-06-27 Alan Modra <amodra@gmail.com>
2559 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2560 (_bfd_generic_get_section_contents_in_window): Likewise.
2562 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2564 * elfnn-riscv.c (perform_relocation): Support the new
2565 R_RISCV_32_PCREL relocation.
2566 (riscv_elf_relocate_section): Likewise.
2567 * elfxx-riscv.c (howto_table): Likewise.
2568 (riscv_reloc_map): Likewise.
2569 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2570 * libbfd.h: Regenerate.
2572 2017-06-27 Alan Modra <amodra@gmail.com>
2575 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2576 Use unsigned file pointer type, and remove cast.
2577 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2578 Add "count", not "sz".
2580 2017-06-26 Pedro Alves <palves@redhat.com>
2583 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2586 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2589 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2592 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2594 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2595 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2596 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2597 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2598 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2600 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2603 * compress.c (bfd_get_full_section_contents): Don't check the
2605 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2606 reject a section whose size + offset is greater than the size
2608 (_bfd_generic_get_section_contents_in_window): Likewise.
2610 2017-06-26 Nick Clifton <nickc@redhat.com>
2613 * tekhex.c (getvalue): Check for the source pointer exceeding the
2614 end pointer before the first byte is read.
2616 2017-06-26 Nick Clifton <nickc@redhat.com>
2619 * opncls.c (get_build_id): Check that the section is big enough
2620 to contain the whole note.
2621 * compress.c (bfd_get_full_section_contents): Check for and reject
2622 a section whose size is greater than the size of the entire file.
2623 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2624 contain a notes section.
2626 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2628 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2630 (elf_s390_modify_segment_map): Likewise.
2631 (bfd_elf_s390_set_options): Lisewise.
2633 2017-06-26 Alan Modra <amodra@gmail.com>
2635 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2637 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2638 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2639 .preinit_array on --just-syms bfds.
2640 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2641 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2642 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2644 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2646 * elf.c (find_link): Bounds check "hint".
2648 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2650 * elf32-arm.c (using_thumb_only): Update list of architectures in
2651 BFD_ASSERT for which the logic is valid.
2652 (using_thumb2_bl): Likewise.
2653 (using_thumb2): Likewise and return true for ARMv8-R.
2654 (arch_has_arm_nop): Likewise.
2655 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2656 merging logic. Update commentis for value 15 of v8m_baseline,
2657 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2658 merging of value 15 of Tag_CPU_arch.
2660 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2662 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2663 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2664 * bfd-in2.h: Regenerate.
2666 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2668 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2669 the error_alignment label forward. Properly align program
2670 property note section.
2672 2017-06-22 Eric Christopher <echristo@gmail.com>
2674 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2675 abs to fix a truncation warning.
2677 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2679 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2680 local undefined weak symbol to 0.
2681 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2683 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2685 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2686 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2687 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2688 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2689 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2690 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2691 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2692 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2694 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2696 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2697 (elf_i386_lazy_ibt_plt_entry): Likewise.
2698 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2699 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2700 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2701 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2702 (elf_i386_lazy_plt_layout): Likewise.
2703 (elf_i386_non_lazy_plt_layout): Likewise.
2704 (elf_i386_link_hash_entry): Add plt_second.
2705 (elf_i386_link_hash_table): Add plt_second and
2706 plt_second_eh_frame.
2707 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2708 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2709 the second PLT. Check the second PLT.
2710 (elf_i386_relocate_section): Use the second PLT to resolve
2711 PLT reference if needed.
2712 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2714 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2715 second PLT. Generate unwind info for the second PLT.
2716 (elf_i386_plt_type): Add plt_second.
2717 (elf_i386_get_synthetic_symtab): Support the second PLT.
2718 (elf_i386_parse_gnu_properties): Support
2719 GNU_PROPERTY_X86_FEATURE_1_AND.
2720 (elf_i386_merge_gnu_properties): Support
2721 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2722 on GNU_PROPERTY_X86_FEATURE_1_IBT
2723 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2724 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2725 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2726 is set on all relocatable inputs.
2727 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2728 (elf_x32_lazy_ibt_plt_entry): Likewise.
2729 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2730 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2731 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2732 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2733 (elf_x86_64_lazy_ibt_plt): Likewise.
2734 (elf_x32_lazy_ibt_plt): Likewise.
2735 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2736 (elf_x32_non_lazy_ibt_plt): Likewise.
2737 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2738 (elf_x86_64_parse_gnu_properties): Support
2739 GNU_PROPERTY_X86_FEATURE_1_AND.
2740 (elf_x86_64_merge_gnu_properties): Support
2741 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2742 on GNU_PROPERTY_X86_FEATURE_1_IBT
2743 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2744 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2745 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2746 is set on all relocatable inputs.
2748 2017-06-22 Nick Clifton <nickc@redhat.com>
2751 * som.c (setup_sections): NUL terminate the space_strings buffer.
2752 Check that the space.name field does not index beyond the end of
2753 the space_strings buffer.
2755 2017-06-21 Nick Clifton <nickc@redhat.com>
2758 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2760 2017-06-21 Nick Clifton <nickc@redhat.com>
2763 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2764 type of the size parameter.
2765 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2766 length of the counted string.
2767 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2768 (_bfd_vms_save_counted_string): Likewise.
2769 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2770 _bfd_vms_save_counted_string.
2771 (_bfd_vms_slurp_ehdr): Likewise.
2772 (_bfd_vms_slurp_egsd): Likewise.
2773 (Parse_module): Likewise.
2775 2017-06-21 Alan Modra <amodra@gmail.com>
2777 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2778 calls before tocsave calls.
2779 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2782 2017-06-21 Nick Clifton <nickc@redhat.com>
2785 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2786 bfd_get_full_section_contents returns no contents.
2788 2017-06-21 Nick Clifton <nickc@redhat.com>
2791 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2794 2017-06-21 Nick Clifton <nickc@redhat.com>
2797 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2799 (image_set_ptr): Likewise.
2800 (alpha_vms_fix_sec_rel): Likewise.
2801 (alpha_vms_slurp_relocs): Likewise.
2803 2017-06-21 Nick Clifton <nickc@redhat.com>
2806 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2808 (ieee_archive_p): Likewise.
2809 (ieee_object_p): Likewise.
2811 2017-06-21 Nick Clifton <nickc@redhat.com>
2814 * elf.c (setup_group): Zero the group section pointer list after
2815 allocation so that loops can be caught. Check for NULL pointers
2816 when processing a group list.
2818 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2820 * elf-s390.h: New file.
2821 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2823 (elf_s390_additional_program_headers): New function.
2824 (elf_s390_modify_segment_map): New function.
2825 (bfd_elf_s390_set_options): New function.
2826 (elf_backend_additional_program_headers)
2827 (elf_backend_modify_segment_map): Add macro definitions.
2829 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2832 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2833 the DYNAMIC bit instead of bfd_count_sections.
2835 2017-06-19 Nick Clifton <nickc@redhat.com>
2838 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2840 (evax_bfd_print_eeom): Likewise.
2841 (evax_bfd_print_egsd): Check for an overlarge record length.
2842 (evax_bfd_print_etir): Likewise.
2844 2017-06-19 Nick Clifton <nickc@redhat.com>
2847 * libieee.h (struct common_header_type): Add end_p field.
2848 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2850 (read_id): Check for a length that exceeds the remaining bytes in
2852 (ieee_seek): Initialise end_p.
2853 (ieee_archive_p): Likewise.
2854 (ieee_object_p): Likewise.
2856 2017-06-19 Nick Clifton <nickc@redhat.com>
2859 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2860 before reading the EIHS structure entries.
2862 2017-06-19 Nick Clifton <nickc@redhat.com>
2865 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2866 gsd_size. Check that there are enough bytes remaining to read the
2867 type and size of the next egsd. Check that the size of the egsd
2868 does not exceed the size of the record.
2870 2017-06-19 Alan Modra <amodra@gmail.com>
2872 * config.bfd: Correct targ_underscore for cris.
2874 2017-06-18 Alan Modra <amodra@gmail.com>
2876 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2877 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2879 2017-06-16 Nick Clifton <nickc@redhat.com>
2881 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2882 bucketlist is empty because there are no symbols to add to the
2885 2017-06-16 Alan Modra <amodra@gmail.com>
2891 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2892 (BFD_JUMP_TABLE_LINK): Likewise.
2893 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2894 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2895 (bfd_elf_define_start_stop): New function.
2896 * linker.c (bfd_generic_define_start_stop): New function.
2897 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2899 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2900 * aout-target.h (MY_bfd_define_start_stop): Define.
2901 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2902 * binary.c (binary_bfd_define_start_stop): Define.
2903 * bout.c (b_out_bfd_define_start_stop): Define.
2904 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2905 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2906 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2907 * coffcode.h (coff_bfd_define_start_stop): Define.
2908 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2909 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2910 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2911 * ieee.c (ieee_bfd_define_start_stop): Define.
2912 * ihex.c (ihex_bfd_define_start_stop): Define.
2913 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2914 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2915 * mmo.c (mmo_bfd_define_start_stop): Define.
2916 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2917 * oasys.c (oasys_bfd_define_start_stop): Define.
2918 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2919 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2920 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2921 * som.c (som_bfd_define_start_stop): Define.
2922 * srec.c (srec_bfd_define_start_stop): Define.
2923 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2924 * versados.c (versados_bfd_define_start_stop): Define.
2925 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2926 (alpha_vms_bfd_define_start_stop): Define.
2927 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2928 * bfd-in2.h: Regenerate.
2929 * libbfd.h: Regenerate.
2931 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2933 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2934 SYMBOL_REFERENCES_LOCAL.
2936 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2939 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2940 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2941 runtime for if there needs copy relocation elimination.
2942 (need_copy_relocation_p): New function. Return true for symbol with
2943 pc-relative references and if it's against read-only sections.
2944 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2945 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2946 that are related with accessing external objects.
2947 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2948 in elfNN_aarch64_check_relocs.
2950 2017-06-15 Nick Clifton <nickc@redhat.com>
2953 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2956 (ieee_archive_p): Likewise.
2958 2017-06-15 Nick Clifton <nickc@redhat.com>
2961 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2963 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2965 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2966 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2967 keep both windowed and call0 ABI PLT definitions.
2968 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2969 elf_xtensa_*_plt_entry endex.
2970 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2972 2017-06-14 Nick Clifton <nickc@redhat.com>
2975 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2978 2017-06-14 Nick Clifton <nickc@redhat.com>
2981 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2982 maximum value for the ascic pointer. Check that name processing
2983 does not read beyond this value.
2984 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2987 2017-06-14 Nick Clifton <nickc@redhat.com>
2990 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2991 (process_otr): Check for an invalid offset in the otr structure.
2993 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2995 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2997 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3003 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3004 vtable field to a union.
3005 (_bfd_elf_is_start_stop): Removed.
3006 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3007 __start_SECNAME and __stop_SECNAME symbols.
3008 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3009 * elflink.c (_bfd_elf_is_start_stop): Removed.
3010 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3011 _bfd_elf_is_start_stop.
3012 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3013 __stop_SECNAME symbols. Updated.
3014 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3015 (bfd_elf_gc_record_vtinherit): Likewise.
3016 (bfd_elf_gc_record_vtentry): Likewise.
3018 2017-06-13 Nick Clifton <nickc@redhat.com>
3021 * elflink.c (elf_link_adjust_relocs): Generate an error when
3022 encountering a reloc against a symbol removed by garbage
3025 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3027 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3028 to merge_gnu_properties.
3029 * elf-properties.c (elf_merge_gnu_properties): Add struct
3030 bfd_link_info * and pass it to merge_gnu_properties.
3031 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3032 and pass it to elf_merge_gnu_properties.
3033 (_bfd_elf_link_setup_gnu_properties): Pass info to
3034 elf_merge_gnu_property_list.
3035 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3037 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3039 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3042 * binary.c (binary_set_section_contents): Scale lma by octets
3043 per byte to set filepos.
3045 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3047 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3050 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3052 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3055 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3057 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3058 patched section contents for TLS IE reloc.
3059 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3061 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3063 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3064 RELOC_FOR_GLOBAL_SYMBOL macro.
3066 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3068 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3071 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3073 * config/tc-arc.c (md_undefined_symbol): Changed.
3074 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3076 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3078 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3081 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3083 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3084 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3086 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3088 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3091 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3093 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3094 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3095 is non-zero. Add clarifying comments.
3097 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3099 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3100 name. Use local IFUNC symbol name string to report unsupported
3101 non-PIC call to IFUNC function.
3102 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3103 when generating R_386_IRELATIVE relocation.
3104 (elf_i386_finish_dynamic_symbol): Likewise.
3105 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3107 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3108 when generating R_X86_64_IRELATIVE relocation.
3109 (elf_x86_64_finish_dynamic_symbol): Likewise.
3111 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3113 * elf.c (setup_group): Make sure BFD sections are created for all
3114 group sections in the input file when processing SHF_GROUP
3116 (bfd_section_from_shdr): Avoid duplicating logic already
3117 implemented in `setup_group'.
3119 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3122 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3123 if the hint address is zero.
3125 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3128 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3129 ELF_COMMON_DEF_P for common symbols.
3131 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3133 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3134 SEC_GROUP sections as SEC_EXCLUDE.
3135 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3136 (assign_section_numbers): Use resolve_section_groups flag instead
3137 of relocatable link type.
3138 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3139 flag instead of checking the final_link flag for part of the
3140 checks in here. Fix white space as a result.
3141 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3142 instead of relocatable link type.
3143 (bfd_elf_final_link): Likewise.
3145 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3147 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3149 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3150 (s3_bfd_score_elf_check_relocs): Likewise.
3151 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3152 (score_elf_final_link_relocate): Likewise.
3153 (s7_bfd_score_elf_check_relocs): Likewise.
3155 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3157 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3160 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3162 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3163 from `reloc_count' rather than decrementing it.
3164 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3165 `reloc_count' by `int_rels_per_ext_rel'.
3166 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3167 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3168 entry determination.
3169 (s3_bfd_score_elf_check_relocs): Likewise.
3170 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3171 (s7_bfd_score_elf_relocate_section): Likewise.
3172 (s7_bfd_score_elf_check_relocs): Likewise.
3173 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3174 prototype and function.
3175 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3176 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3177 triple rather than once the sum of REL and RELA relocation entry
3179 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3180 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3181 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3182 storage allocation size determination.
3183 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3184 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3185 by `int_rels_per_ext_rel' for last relocation entry
3187 (bfd_elf_final_link): Do not multiply `reloc_count' by
3188 `int_rels_per_ext_rel' for internal relocation storage
3189 allocation size determination.
3190 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3191 `int_rels_per_ext_rel' for last relocation entry determination.
3192 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3193 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3194 (_bfd_mips_elf_relocate_section): Likewise.
3196 2017-06-05 Alan Modra <amodra@gmail.com>
3199 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3201 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3203 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3204 determine structure sizes.
3205 (elfcore_grok_freebsd_prstatus): Likewise.
3207 2017-06-01 Alan Modra <amodra@gmail.com>
3209 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3210 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3212 (is_elfv2_localentry0): New function.
3213 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3214 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3215 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3216 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3217 optimized localentry:0 stubs.
3218 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3219 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3221 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3223 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3225 2017-05-30 Casey Smith <clegg89@gmail.com>
3228 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3229 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3231 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3233 * cpu-arc.c (arc_compatible): New function.
3235 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3237 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3239 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3242 * bfdio.c (bfd_get_file_size): New function.
3243 * bfd-in2.h: Regenerated.
3245 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3247 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3250 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3252 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3253 dynobj instead of htab->elf.dynobj.
3255 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3257 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3259 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3260 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3261 actual number of internal relocations retrieved. Adjust
3262 function description.
3263 (bfd_elf64_canonicalize_reloc): Remove macro.
3264 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3266 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3268 * archures.c (bfd_mach_sparc_v9m8): Define.
3269 (bfd_mach_sparc_v8plusm8): Likewise.
3270 (bfd_mach_sparc_v9_p): Adjust to M8.
3271 (bfd_mach_sparc_64bit_p): Likewise.
3272 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3273 bfd_mach_sparc_v8plusm8.
3274 * bfd-in2.h: Regenerated.
3275 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3277 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3278 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3279 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3281 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3282 bfd_mach_sparc_v8plusm8.
3284 2017-05-19 Alan Modra <amodra@gmail.com>
3286 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3287 debug and special sections when no non-note alloc sections in an
3290 2017-05-18 Alan Modra <amodra@gmail.com>
3292 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3293 * elf-m10300.c: Likewise.
3295 * elf32-arc.c: Likewise.
3296 * elf32-bfin.c: Likewise.
3297 * elf32-m68k.c: Likewise.
3298 * elf32-nds32.c: Likewise.
3299 * elf32-tilepro.c: Likewise.
3300 * elflink.c: Likewise.
3301 * elfnn-aarch64.c: Likewise.
3302 * elfnn-riscv.c: Likewise.
3303 * elfxx-tilegx.c: Likewise.
3304 * mach-o.c: Likewise.
3305 * peXXigen.c: Likewise.
3306 * vms-alpha.c: Likewise.
3307 * vms-lib.c: Likewise.
3309 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3312 * elflink.c (elf_gc_mark_debug_section): New function.
3313 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3314 referenced by kept debug sections.
3316 2017-05-16 Alan Modra <amodra@gmail.com>
3318 * elf-m10300.c: Rename occurrences of non_ir_ref.
3319 * elf32-arm.c: Likewise.
3320 * elf32-bfin.c: Likewise.
3321 * elf32-cr16.c: Likewise.
3322 * elf32-cris.c: Likewise.
3323 * elf32-d10v.c: Likewise.
3324 * elf32-dlx.c: Likewise.
3325 * elf32-fr30.c: Likewise.
3326 * elf32-frv.c: Likewise.
3327 * elf32-hppa.c: Likewise.
3328 * elf32-i370.c: Likewise.
3329 * elf32-i386.c: Likewise.
3330 * elf32-iq2000.c: Likewise.
3331 * elf32-lm32.c: Likewise.
3332 * elf32-m32c.c: Likewise.
3333 * elf32-m32r.c: Likewise.
3334 * elf32-m68hc1x.c: Likewise.
3335 * elf32-m68k.c: Likewise.
3336 * elf32-mcore.c: Likewise.
3337 * elf32-metag.c: Likewise.
3338 * elf32-microblaze.c: Likewise.
3339 * elf32-moxie.c: Likewise.
3340 * elf32-msp430.c: Likewise.
3341 * elf32-mt.c: Likewise.
3342 * elf32-nios2.c: Likewise.
3343 * elf32-or1k.c: Likewise.
3344 * elf32-ppc.c: Likewise.
3345 * elf32-rl78.c: Likewise.
3346 * elf32-s390.c: Likewise.
3347 * elf32-score.c: Likewise.
3348 * elf32-score7.c: Likewise.
3349 * elf32-sh.c: Likewise.
3350 * elf32-tic6x.c: Likewise.
3351 * elf32-tilepro.c: Likewise.
3352 * elf32-v850.c: Likewise.
3353 * elf32-vax.c: Likewise.
3354 * elf32-xstormy16.c: Likewise.
3355 * elf32-xtensa.c: Likewise.
3356 * elf64-alpha.c: Likewise.
3357 * elf64-hppa.c: Likewise.
3358 * elf64-ia64-vms.c: Likewise.
3359 * elf64-mmix.c: Likewise.
3360 * elf64-ppc.c: Likewise.
3361 * elf64-s390.c: Likewise.
3362 * elf64-sh64.c: Likewise.
3363 * elf64-x86-64.c: Likewise.
3364 * elflink.c: Likewise.
3365 * elfnn-aarch64.c: Likewise.
3366 * elfnn-ia64.c: Likewise.
3367 * elfnn-riscv.c: Likewise.
3368 * elfxx-mips.c: Likewise.
3369 * elfxx-sparc.c: Likewise.
3370 * elfxx-tilegx.c: Likewise.
3371 * linker.c: Likewise.
3373 2017-05-16 Alan Modra <amodra@gmail.com>
3375 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3376 * elflink.c (elf_link_add_object_symbols): Update to use
3378 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3380 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3382 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3384 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3386 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3388 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3389 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3391 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3393 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3395 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3397 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3398 to plt_second/plt_second_eh_frame.
3399 (elf_x86_64_link_hash_newfunc): Updated.
3400 (elf_x86_64_allocate_dynrelocs): Likewise.
3401 (elf_x86_64_size_dynamic_sections): Likewise.
3402 (elf_x86_64_relocate_section): Likewise.
3403 (elf_x86_64_finish_dynamic_symbol): Likewise.
3404 (elf_x86_64_finish_dynamic_sections): Likewise.
3405 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3406 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3408 (elf_backend_setup_gnu_properties): Updated. Create the
3409 .plt.sec section instead of the .plt.sec section.
3411 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3413 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3414 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3415 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3417 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3419 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3420 (bfd_elf64_set_reloc): Define.
3421 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3423 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3425 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3426 (struct bfd_target): New field _bfd_set_reloc.
3427 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3428 * reloc.c (_bfd_generic_set_reloc): New function.
3429 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3430 * nlm-target.h (nlm_set_reloc): Likewise.
3431 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3432 * aout-tic30.c (MY_set_reloc): Likewise.
3433 * aout-target.h (MY_set_reloc): Likewise.
3434 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3435 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3436 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3437 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3438 * aout-adobe.c (aout_32_set_reloc): Likewise.
3439 * bout.c (b_out_set_reloc): Likewise.
3440 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3441 * i386os9k.c (aout_32_set_reloc): Likewise.
3442 * ieee.c (ieee_set_reloc): Likewise.
3443 * oasys.c (oasys_set_reloc): Likewise.
3444 * som.c (som_set_reloc): Likewise.
3445 * versados.c (versados_set_reloc): Likewise.
3446 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3447 _bfd_generic_set_reloc.
3448 (rs6000_xcoff64_aix_vec): LIkewise.
3449 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3450 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3451 * i386msdos.c (msdos_set_reloc): Define to
3452 _bfd_norelocs_set_reloc.
3453 * elfcode.h (elf_set_reloc): Define.
3454 * bfd-in2.h: Regenerated.
3456 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3459 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3460 for IFUNC function address.
3462 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3464 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3465 (CONFLICT_LIST): Likewise.
3466 (opcode/arc-attrs.h): Include.
3467 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3468 (arc_extract_features): New file.
3469 (arc_stralloc): Likewise.
3470 (arc_elf_merge_attributes): Likewise.
3471 (arc_elf_merge_private_bfd_data): Use object attributes.
3472 (bfd_arc_get_mach_from_attributes): New function.
3473 (arc_elf_object_p): Use object attributes.
3474 (arc_elf_final_write_processing): Likewise.
3475 (elf32_arc_obj_attrs_arg_type): New function.
3476 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3477 (elf32_arc_section_from_shdr): Likewise.
3478 (elf_backend_obj_attrs_vendor): Define.
3479 (elf_backend_obj_attrs_section): Likewise.
3480 (elf_backend_obj_attrs_arg_type): Likewise.
3481 (elf_backend_obj_attrs_section_type): Likewise.
3482 (elf_backend_obj_attrs_handle_unknown): Likewise.
3483 (elf_backend_section_from_shdr): Likewise.
3485 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3488 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3489 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3490 and the destination is a Thumb symbol.
3492 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3494 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3495 initializer to silence GCC 4.2.
3496 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3498 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3500 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3501 (LAZY_PLT_ENTRY_SIZE): This.
3502 (NON_LAZY_PLT_ENTRY_SIZE): New.
3503 (elf_x86_64_plt0_entry): Renamed to ...
3504 (elf_x86_64_lazy_plt0_entry): This.
3505 (elf_x86_64_plt_entry): Renamed to ...
3506 (elf_x86_64_lazy_plt_entry): This.
3507 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3508 (elf_x86_64_lazy_bnd_plt0_entry): This.
3509 (elf_x86_64_legacy_plt_entry): Removed.
3510 (elf_x86_64_bnd_plt_entry): Renamed to ...
3511 (elf_x86_64_lazy_bnd_plt_entry): This.
3512 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3513 (elf_x86_64_non_lazy_plt_entry): This.
3514 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3515 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3516 (elf_x86_64_eh_frame_plt): Renamed to ...
3517 (elf_x86_64_eh_frame_lazy_plt): This.
3518 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3519 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3520 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3521 (elf_x86_64_eh_frame_non_lazy_plt): This.
3522 (elf_x86_64_lazy_plt_layout): New.
3523 (elf_x86_64_non_lazy_plt_layout): Likewise.
3524 (elf_x86_64_plt_layout): Likewise.
3525 (elf_x86_64_backend_data): Remove PLT layout information. Add
3526 os for target system.
3527 (GET_PLT_ENTRY_SIZE): Removed.
3528 (elf_x86_64_lazy_plt): New.
3529 (elf_x86_64_non_lazy_plt): Likewise.
3530 (elf_x86_64_lazy_bnd_plt): Likewise.
3531 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3532 (elf_x86-64_arch_bed): Updated.
3533 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3534 (elf_x86_64_create_dynamic_sections): Removed.
3535 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3536 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3537 (elf_x86-64_adjust_dynamic_symbol): Updated.
3538 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3539 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3540 size for PLT0 if there is no PLT0. Get plt_entry_size from
3541 non_lazy_plt for non-lazy PLT entries.
3542 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3543 from non_lazy_plt for non-lazy PLT entries.
3544 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3545 if there is no PLT0.
3546 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3547 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3548 entries with non-lazy PLT layout. Don't fill the second and third
3549 slots in the PLT entry if there is no PLT0.
3550 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3551 if there is no PLT0. Set sh_entsize on the .plt.got section.
3552 (compare_relocs): New.
3553 (elf_x86_64_plt_type): Likewise.
3554 (elf_x86_64_plt): Likewise.
3555 (elf_x86_64_nacl_plt): New. Forward declaration.
3556 (elf_x86_64_get_plt_sym_val): Removed.
3557 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3558 against all dynamic relocations.
3559 (elf_x86_64_link_setup_gnu_properties): New function.
3560 (elf_backend_create_dynamic_sections): Updated.
3561 (elf_backend_setup_gnu_properties): New.
3562 (elf_x86_64_nacl_plt): New.
3563 (elf_x86_64_nacl_arch_bed): Updated.
3565 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3567 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3568 (LAZY_PLT_ENTRY_SIZE): This.
3569 (NON_LAZY_PLT_ENTRY_SIZE): New.
3570 (elf_i386_plt0_entry): Renamed to ...
3571 (elf_i386_lazy_plt0_entry): This.
3572 (elf_i386_plt_entry): Renamed to ...
3573 (elf_i386_lazy_plt_entry): This.
3574 (elf_i386_pic_plt0_entry): Renamed to ...
3575 (elf_i386_pic_lazy_plt0_entry): This.
3576 (elf_i386_pic_plt_entry): Renamed to ...
3577 (elf_i386_pic_lazy_plt_entry): This.
3578 (elf_i386_got_plt_entry): Renamed to ...
3579 (elf_i386_non_lazy_plt_entry): This.
3580 (elf_i386_pic_got_plt_entry): Renamed to ...
3581 (elf_i386_pic_non_lazy_plt_entry): This.
3582 (elf_i386_eh_frame_plt): Renamed to ...
3583 (elf_i386_eh_frame_lazy_plt): This.
3584 (elf_i386_eh_frame_plt_got): Renamed to ...
3585 (elf_i386_eh_frame_non_lazy_plt): This.
3586 (elf_i386_plt_layout): Renamed to ...
3587 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3588 eh_frame_plt_got_size.
3589 (elf_i386_non_lazy_plt_layout): New.
3590 (elf_i386_plt_layout): Likewise.
3591 (elf_i386_non_lazy_plt): Likewise.
3592 (GET_PLT_ENTRY_SIZE): Removed.
3593 (elf_i386_plt): Renamed to ...
3594 (elf_i386_lazy_plt): This.
3595 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3596 (elf_i386_arch_bed): Updated.
3597 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3598 (elf_i386_create_dynamic_sections): Removed.
3599 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3600 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3601 (elf_i386_adjust_dynamic_symbol): Updated.
3602 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3603 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3604 size for PLT0 if there is no PLT0.
3605 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3606 output section is discarded only if GOT isn't empty.
3607 (elf_i386_relocate_section): Updated. Properly get PLT index
3608 if there is no PLT0.
3609 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3610 second and third slots in the PLT entry if there is no PLT0.
3611 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3612 if there is no PLT0. Set sh_entsize on the .plt.got section.
3613 (elf_i386_nacl_plt): Forward declaration.
3614 (elf_i386_get_plt_sym_val): Removed.
3615 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3616 against all dynamic relocations.
3617 (elf_i386_link_setup_gnu_properties): New function.
3618 (elf_backend_create_dynamic_sections): Updated.
3619 (elf_backend_setup_gnu_properties): New.
3620 (elf_i386_nacl_plt): Updated.
3621 (elf_i386_nacl_arch_bed): Likewise.
3622 (elf_i386_vxworks_arch_bed): Likewise.
3624 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3626 * elflink.c (elf_output_implib): Remove executable flag from import
3628 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3629 library is a relocatable object file.
3631 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3634 * elf32-avr.c (avr_should_move_sym): New function.
3635 (avr_should_reduce_sym_size): Likewise.
3636 (avr_should_increase_sym_size): Likewise.
3637 (elf32_avr_relax_delete_bytes): Adjust symbol values
3638 and sizes by calling new functions.
3640 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3642 * config.bfd (riscv32-*): Enable rv64.
3644 2017-05-02 Alan Modra <amodra@gmail.com>
3647 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3648 rather than h->root.type == bfd_link_hash_new.
3649 (bfd_elf_record_link_assignment): Similarly, call
3650 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3652 2017-04-29 Alan Modra <amodra@gmail.com>
3655 * reloc.c (reloc_offset_in_range): New function.
3656 (bfd_perform_relocation, bfd_install_relocation): Use it.
3657 (_bfd_final_link_relocate): Likewise.
3659 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3661 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3662 before using .plt.got.
3663 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3665 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3667 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3668 instead of "+=" to update 0.
3670 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3672 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3673 .plt.got section here.
3674 (elf_i386_check_relocs): Don't create the .plt.got section.
3675 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3676 the .plt.got and .plt.bnd sections here.
3677 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3680 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3682 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3684 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3685 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3686 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3687 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3690 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3692 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3694 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3695 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3696 the first relocatable ELF input with GNU properties.
3698 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3700 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3701 VxWorks for non-PIC.
3703 2017-04-27 Alan Modra <amodra@gmail.com>
3705 * elf-bfd.h (struct elf_backend_data): Make asection param of
3706 elf_backend_eh_frame_address_size const.
3707 (_bfd_elf_eh_frame_address_size): Likewise.
3708 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3709 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3710 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3711 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3712 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3713 (next_cie_fde_offset): Constify params.
3714 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3716 2017-04-27 Alan Modra <amodra@gmail.com>
3718 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3719 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3720 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3722 (offset_adjust): New function.
3723 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3724 (adjust_eh_frame_local_symbols): Likewise.
3725 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3726 after changing anything. Return true if anything changed.
3727 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3728 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3730 2017-04-27 Alan Modra <amodra@gmail.com>
3732 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3735 2017-04-27 Alan Modra <amodra@gmail.com>
3737 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3738 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3739 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3740 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3741 for undef and undefweak dyn_relocs.
3742 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3743 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3744 (allocate_got, allocate_dynrelocs): Likewise.
3745 (ppc64_elf_relocate_section): Likewise.
3747 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3749 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3750 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3751 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3752 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3754 2017-04-26 Nick Clifton <nickc@redhat.com>
3757 * reloc.c (bfd_perform_relocation): Check for a negative address
3760 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3763 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3765 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3766 (elf_backend_always_renumber_dynsyms): Define.
3767 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3768 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3769 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3770 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3772 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3774 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3776 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3777 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3778 sections have been created.
3780 2017-04-26 Nick Clifton <nickc@redhat.com>
3783 * compress.c (bfd_init_section_compress_status): Check the return
3784 value from bfd_malloc.
3786 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3788 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3789 no_finish_dynamic_symbol.
3790 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3792 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3793 weak symbol, don't make it dynamic.
3794 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3795 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3796 relocation for GOT reference.
3797 (elf_x86_64_finish_dynamic_symbol): Abort if
3798 no_finish_dynamic_symbol isn't 0.
3800 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3803 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3804 undefined weak symbol, don't make it dynamic.
3805 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3806 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3807 relocation for R_386_GOT32.
3809 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3812 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3814 2017-04-23 Alan Modra <amodra@gmail.com>
3817 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3818 * elf.c (lcomm_sym): New.
3819 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3820 * bfd-in2.h: Regenerate.
3822 2017-04-23 Alan Modra <amodra@gmail.com>
3825 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3826 parameters and comment.
3827 (_bfd_elf_get_reloc_section): Delete.
3828 (_bfd_elf_plt_get_reloc_section): Declare.
3829 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3830 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3832 (_bfd_elf_get_reloc_section): ..here. Delete.
3833 (assign_section_numbers): Call elf_get_reloc_section.
3834 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3835 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3837 2017-04-23 Alan Modra <amodra@gmail.com>
3840 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3843 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3846 * elf32-i386.c (elf_i386_link_hash_entry): Add
3847 no_finish_dynamic_symbol.
3848 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3849 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3850 symbol, don't make it dynamic in PIE.
3851 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3852 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3853 relocation for R_386_GOT32
3854 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3857 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3861 * elflink.c (elf_link_add_object_symbols): Require
3862 --no-dynamic-linker with -E/--dynamic-list when creating
3865 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3867 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3870 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3872 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3873 dynamic symbol sorting.
3875 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3878 * elflink.c (elf_link_add_object_symbols): Preserve
3879 dynamic_ref_after_ir_def when restoring the symbol table for
3880 unneeded dynamic object.
3882 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3885 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3886 on on undefined IFUNC symbol in the second PLT.
3888 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3890 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3892 2017-04-19 Alan Modra <amodra@gmail.com>
3894 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3895 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3896 * elf32-ppc.c:Formatting.
3897 (ensure_undefweak_dynamic): Don't make dynamic when
3898 info->dynamic_undefined_weak is zero.
3899 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3900 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3901 not default visibility. Discard undef and undefweak
3903 (ppc_elf_relocate_section): Adjust to suit.
3904 * elf64-ppc.c: Formatting.
3905 (ensure_undefweak_dynamic): Don't make dynamic when
3906 info->dynamic_undefined_weak is zero.
3907 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3908 info->dynamic_undefined_weak. Discard them earlier.
3910 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3913 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3914 before generating the version definition section.
3916 2017-04-17 Alan Modra <amodra@gmail.com>
3918 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3919 state when a regular object file defines a symbol with
3920 incompatible type to that defined by an earlier shared lib.
3922 2017-04-13 Alan Modra <amodra@gmail.com>
3924 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3926 * elf32-arm.c: Likewise.
3927 * elf32-i386.c: Likewise.
3928 * elf32-mep.c: Likewise.
3929 * elf64-ia64-vms.c: Likewise.
3930 * elf64-x86-64.c: Likewise.
3931 * elflink.c: Likewise.
3932 * elfnn-ia64.c: Likewise.
3933 * elfxx-mips.c: Likewise.
3935 2017-04-13 Alan Modra <amodra@gmail.com>
3937 * aoutx.h: Use %B and %A in error messages throughout file.
3938 * aout-cris.c: Likewise.
3939 * archive.c: Likewise.
3940 * binary.c: Likewise.
3941 * coff-rs6000.c: Likewise.
3942 * coff-tic4x.c: Likewise.
3943 * coffcode.h: Likewise.
3944 * coffgen.c: Likewise.
3945 * cofflink.c: Likewise.
3946 * coffswap.h: Likewise.
3947 * cpu-arm.c: Likewise.
3948 * elf-eh-frame.c: Likewise.
3949 * elf-m10300.c: Likewise.
3951 * elf32-arc.c: Likewise.
3952 * elf32-arm.c: Likewise.
3953 * elf32-bfin.c: Likewise.
3954 * elf32-frv.c: Likewise.
3955 * elf32-iq2000.c: Likewise.
3956 * elf32-m32c.c: Likewise.
3957 * elf32-microblaze.c: Likewise.
3958 * elf32-nds32.c: Likewise.
3959 * elf32-rl78.c: Likewise.
3960 * elf32-rx.c: Likewise.
3961 * elf32-score.c: Likewise.
3962 * elf32-score7.c: Likewise.
3963 * elf32-sh64.c: Likewise.
3964 * elf32-v850.c: Likewise.
3965 * elf32-vax.c: Likewise.
3966 * elf32-visium.c: Likewise.
3967 * elf64-ia64-vms.c: Likewise.
3968 * elf64-mmix.c: Likewise.
3969 * elf64-sh64.c: Likewise.
3970 * elfcode.h: Likewise.
3971 * elfnn-aarch64.c: Likewise.
3972 * elfnn-ia64.c: Likewise.
3973 * elfxx-mips.c: Likewise.
3974 * hpux-core.c: Likewise.
3977 * linker.c: Likewise.
3978 * merge.c: Likewise.
3980 * oasys.c: Likewise.
3981 * pdp11.c: Likewise.
3982 * peXXigen.c: Likewise.
3983 * rs6000-core.c: Likewise.
3984 * vms-alpha.c: Likewise.
3985 * xcofflink.c: Likewise.
3987 2017-04-13 Alan Modra <amodra@gmail.com>
3989 * bfd.c (PRINT_TYPE): Define.
3990 (_doprnt): New function.
3991 (error_handler_internal): Use _doprnt.
3992 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3993 calls in their natural order, throughout file.
3994 * coff-mcore.c: Likewise.
3995 * coff-ppc.c: Likewise.
3996 * coff-tic80.c: Likewise.
3997 * cofflink.c: Likewise.
3998 * elf-s390-common.c: Likewise.
4000 * elf32-arm.c: Likewise.
4001 * elf32-i386.c: Likewise.
4002 * elf32-m32r.c: Likewise.
4003 * elf32-msp430.c: Likewise.
4004 * elf32-spu.c: Likewise.
4005 * elf64-ia64-vms.c: Likewise.
4006 * elf64-sparc.c: Likewise.
4007 * elf64-x86-64.c: Likewise.
4008 * elflink.c: Likewise.
4009 * elfnn-aarch64.c: Likewise.
4010 * elfnn-ia64.c: Likewise.
4011 * elfxx-mips.c: Likewise.
4013 2017-04-13 Alan Modra <amodra@gmail.com>
4015 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4016 branch veneers" error. Fix double space and format message.
4017 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4018 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4020 2017-04-13 Alan Modra <amodra@gmail.com>
4022 * bfd-in2.h: Regenerate.
4024 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4026 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4027 extra `\n' in warning/error messages.
4028 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4029 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4031 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4033 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4034 processor-specific properties with generic ELF target vector.
4036 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4038 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4039 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4040 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4041 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4043 (link_hash_newfunc): Initialize has_got_reloc and
4045 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4047 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4049 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4051 (_bfd_sparc_elf_fixup_symbol): New function.
4052 (allocate_dynrelocs): Don't allocate space for dynamic
4053 relocations and discard relocations against resolved undefined
4054 weak symbols in executable. Don't make resolved undefined weak
4055 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4056 relocation against undefined weak symbols in PIE.
4057 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4058 relocations against resolved undefined weak symbols in PIE
4059 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4060 without ynamic PLT/GOT relocations for resolved undefined weak
4062 Don't generate dynamic relocation against resolved undefined
4063 weak symbol in executable.
4064 (pie_finish_undefweak_symbol): New function.
4065 (_bfd_sparc_elf_finish_dynamic_sections): Call
4066 pie_finish_undefweak_symbol on all symbols in PIE.
4067 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4068 (_bfd_sparc_elf_fixup_symbol): New function.
4070 2017-04-10 Nick Clifton <nickc@redhat.com>
4072 * config.bfd: Remove ns32k from obsolete list.
4074 2017-04-10 Alan Modra <amodra@gmail.com>
4077 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4078 (special_sections_i): Likewise for .init_array.
4079 (special_sections_p): Likewise for .preinit_array.
4081 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4085 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4086 ELF_COMMON_DEF_P for common symbols.
4087 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4088 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4089 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4090 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4091 07492f668d2173da7a2bda3707ff0985e0f460b6.
4093 2017-04-07 Pedro Alves <palves@redhat.com>
4095 * opncls.c (bfd_get_debug_link_info): Rename to...
4096 (bfd_get_debug_link_info_1): ... this. Change type of second
4097 parameter to void pointer. Adjust.
4098 (bfd_get_debug_link_info): Reimplement on top of
4099 bfd_get_debug_link_info_1.
4100 (separate_debug_file_exists, separate_alt_debug_file_exists):
4101 Change type of second parameter to void pointer. Adjust.
4102 (get_func_type, check_func_type): Change type of second parameter
4104 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4105 the callback functions instead of passing the address of a local.
4106 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4107 find_separate_debug_file.
4108 (get_alt_debug_link_info_shim): Change type of second parameter to
4109 void pointer. Adjust.
4110 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4111 find_separate_debug_file.
4112 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4113 of second parameter to void pointer. Adjust.
4114 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4115 pointer local to find_separate_debug_file.
4117 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4119 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4120 external symbols with a definition.
4121 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4123 2017-04-07 Alan Modra <amodra@gmail.com>
4125 * po/SRC-POTFILES.in: Regenerate.
4127 2017-04-05 Alan Modra <amodra@gmail.com>
4129 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4132 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4134 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4135 numbers for DataDirectory entry indicies passed to
4138 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4140 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4141 each GNU_MBIND section and align GNU_MBIND section to page size.
4142 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4143 segment for each GNU_MBIND section.
4144 (_bfd_elf_init_private_section_data): Copy sh_info from input
4145 for GNU_MBIND section.
4147 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4149 * elfnn-riscv.c (GP_NAME): Delete.
4150 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4151 (_bfd_riscv_relax_lui): Likewise.
4153 2017-04-04 Nick Clifton <nickc@redhat.com>
4156 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4158 (bfd_elf_final_link): Only initialize the extended symbol index
4159 section if there are extended symbol tables to list.
4161 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4163 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4164 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4165 * configure.ac (elf): Add elf-properties.lo.
4166 * Makefile.in: Regenerated.
4167 * configure: Likewise.
4168 * elf-bfd.h (elf_property_kind): New.
4169 (elf_property): Likewise.
4170 (elf_property_list): Likewise.
4171 (elf_properties): Likewise.
4172 (_bfd_elf_parse_gnu_properties): Likewise.
4173 (_bfd_elf_get_property): Likewise.
4174 (_bfd_elf_link_setup_gnu_properties): Likewise.
4175 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4176 and setup_gnu_properties.
4177 (elf_obj_tdata): Add properties.
4178 * elf-properties.c: New file.
4179 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4180 (elf_i386_merge_gnu_properties): Likewise.
4181 (elf_backend_parse_gnu_properties): Likewise.
4182 (elf_backend_merge_gnu_properties): Likewise.
4183 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4184 (elf_x86_64_merge_gnu_properties): Likewise.
4185 (elf_backend_parse_gnu_properties): Likewise.
4186 (elf_backend_merge_gnu_properties): Likewise.
4187 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4188 (elf_backend_parse_gnu_properties): Likewise.
4189 (elf_backend_setup_gnu_properties): Likewise.
4190 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4191 elf_backend_merge_gnu_properties and
4192 elf_backend_setup_gnu_properties.
4194 2017-03-30 Pip Cet <pipcet@gmail.com>
4196 * elf32-wasm32.c: Add relocation code, two relocs.
4197 * reloc.c: Add wasm32 relocations.
4198 * libbfd.h: Regenerate.
4199 * bfd-in2.h: Regenerate.
4200 * bfd/po/bfd.pot: Regenerate.
4202 2017-03-29 Nick Clifton <nickc@redhat.com>
4205 * coff-bfd.h (struct coff_section_data): Add new fields:
4206 saved_bias and bias.
4207 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4208 computed for PE binaries.
4209 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4212 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4215 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4216 to handle a local symbol with a hash-symbol-entry; without PLT.
4217 Add BFD_ASSERT for an incidental case with GOT entry present.
4218 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4219 isn't forced-or-set local.
4221 2017-03-27 Pip Cet <pipcet@gmail.com>
4223 * wasm-module.c: New file to support WebAssembly modules.
4224 * wasm-module.h: New file to support WebAssembly modules.
4225 * doc/webassembly.texi: Start documenting wasm-module.c.
4226 * config.bfd: Add wasm_vec.
4227 * targets.c: Likewise.
4228 * configure.ac: Likewise.
4229 * Makefile.am: Add entries for wasm-module.c.
4230 * Makefile.in: Regenerate.
4231 * configure: Regenerate.
4232 * po/SRC-POTFILES.in: Regenerate.
4234 2017-03-27 Pip Cet <pipcet@gmail.com>
4236 * cpu-wasm32.c: New file to support wasm32 architecture.
4237 * elf32-wasm32.c: New file to support wasm32 architecture.
4238 * Makefile.am: Add wasm32 architecture.
4239 * archures.c: Likewise.
4240 * config.bfd: Likewise.
4241 * configure.ac: Likewise.
4242 * targets.c: Likewise.
4243 * Makefile.in: Regenerate.
4244 * bfd-in2.h: Regenerate.
4245 * configure: Regenerate.
4246 * po/SRC-POTFILES.in: Regenerate.
4248 2017-03-20 Alan Modra <amodra@gmail.com>
4251 * elf64-ppc.c (compare_symbols): Stabilize sort.
4253 2017-03-18 Alan Modra <amodra@gmail.com>
4255 * elf64-ppc.c (struct ppc_link_hash_table): Add
4256 local_ifunc_resolver and maybe_local_ifunc_resolver.
4257 (ppc_build_one_stub): Set flags on emitting dynamic
4258 relocation to ifunc.
4259 (ppc64_elf_relocate_section): Likewise.
4260 (ppc64_elf_finish_dynamic_symbol): Likewise.
4261 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4262 local dynamic relocs to ifuncs.
4263 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4264 local_ifunc_resolver and maybe_local_ifunc_resolver.
4265 (ppc_elf_relocate_section): Set flag on emitting dynamic
4266 relocation to ifuncs.
4267 (ppc_elf_finish_dynamic_symbol): Likewise.
4268 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4269 dynamic relocs to ifuncs.
4271 2017-03-13 Nick Clifton <nickc@redhat.com>
4274 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4275 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4276 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4277 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4278 * bfd-in2.h: Regenerate.
4279 * libbfd.h: Regenerate.
4280 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4282 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4283 (elfNN_aarch64_howto_table): Likewise.
4284 (aarch64_tls_transition_without_check): Likewise.
4285 (aarch64_reloc_got_type): Likewise.
4286 (elfNN_aarch64_final_link_relocate): Likewise.
4287 (elfNN_aarch64_tls_relax): Likewise.
4288 (elfNN_aarch64_relocate_section): Likewise.
4289 (elfNN_aarch64_gc_sweep_hook): Likewise.
4290 (elfNN_aarch64_check_relocs): Likewise.
4291 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4292 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4294 2017-03-11 Alan Modra <amodra@gmail.com>
4296 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4297 parameter is in fact used. Whitespace fixes.
4298 * elf64-ppc.c: Likewise.
4300 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4302 * rs6000-core.c (CORE_NEW): Simplify macro when
4303 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4305 2017-03-07 Alan Modra <amodra@gmail.com>
4309 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4312 2017-03-05 Alan Modra <amodra@gmail.com>
4314 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4315 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4316 (next_cie_fde_offset): New function.
4317 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4318 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4319 four bytes. Align CIEs to four or eight bytes depending on
4320 per_encoding_aligned8. Align FDEs according to their encoding.
4321 Pad last FDE to output section alignment.
4322 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4324 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4325 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4326 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4328 2017-03-02 Martin Bickel <binutils@ineranves.de>
4331 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4332 empty segments which have a zero filesz, but a non-zero memsz.
4334 2017-03-02 Alan Modra <amodra@gmail.com>
4336 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4338 2017-02-28 Alan Modra <amodra@gmail.com>
4340 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4341 (ppc64_elf_relocate_section): Likewise.
4343 2017-02-28 Alan Modra <amodra@gmail.com>
4346 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4347 rather than elf32_nios2_hash_table or elf_hash_table.
4348 (create_got_section): Likewise.
4349 (nios2_elf32_finish_dynamic_symbol): Likewise.
4350 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4351 (nios2_elf32_size_dynamic_sections): Likewise.
4352 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4353 vars. Use htab equivalents directly instead. Don't create
4354 all dynamic sections on needing just the GOT. Use a goto
4355 rather than a fall-through with reloc test. Ensure
4356 htab->dynobj is set when making dynamic sreloc section.
4357 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4358 equivalent directly instead. Don't segfault on looking for
4359 .dynamic when dynamic sections have not been created. Don't
4360 segfault on .got.plt being discarded.
4361 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4362 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4363 fixme and another not so relevant comment.
4364 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4365 already set, set hash table dynobj on creating .sbss.
4367 2017-02-28 Alan Modra <amodra@gmail.com>
4369 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4370 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4371 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4372 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4373 (ppc64_elf_relocate_section): Likewise.
4374 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4375 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4376 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4377 * libbfd.h: Regenerate.
4378 * bfd-in2.h: Regenerate.
4380 2017-02-28 Alan Modra <amodra@gmail.com>
4382 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4383 dynamic .data.rel.ro read-only.
4384 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4385 rather than section flags when deciding where copy reloc goes.
4386 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4387 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4388 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4389 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4390 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4391 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4392 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4393 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4394 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4395 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4396 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4397 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4398 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4399 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4400 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4401 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4402 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4403 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4404 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4406 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4408 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4409 `jalr $0, $25' instruction encoding.
4411 2017-02-27 Nick Clifton <nickc@redhat.com>
4414 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4415 generating a seg-fault when encountering a symbol that has been
4416 deleted by garbage collection.
4418 2017-02-25 Alan Modra <amodra@gmail.com>
4420 * elf32-arc.c (struct dynamic_sections): Delete.
4421 (enum dyn_section_types): Delete.
4422 (dyn_section_names): Delete.
4423 (arc_create_dynamic_sections): Delete.
4424 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4425 segfault on discarded .rela.plt section.
4426 (elf_arc_size_dynamic_sections): Formatting. Don't call
4427 arc_create_dynamic_sections. Don't allocate memory for sections
4428 handled by the generic linker. Correct code finding relocs in
4429 read-only sections. Set SEC_EXCLUDE on zero size .got,
4430 .got.plt, and .dynbss sections. Do set .interp for pies.
4432 2017-02-24 Andrew Waterman <andrew@sifive.com>
4434 * elfnn-riscv.c (GP_NAME): New macro.
4435 (riscv_global_pointer_value): Use it.
4436 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4437 output section, consider only that section's alignment.
4439 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4441 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4442 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4443 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4444 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4446 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4448 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4449 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4452 2017-02-23 Alan Modra <amodra@gmail.com>
4455 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4457 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4458 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4461 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4464 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4465 processing ahead of the call to `elf_gc_sweep_symbol'.
4467 2017-02-22 Nick Clifton <nickc@redhat.com>
4470 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4471 created section 4-byte alignment.
4473 2017-02-22 Alan Modra <amodra@gmail.com>
4475 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4476 on .got or .plt output section being discarded by script.
4477 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4480 2017-02-21 Alan Modra <amodra@gmail.com>
4482 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4483 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4485 2017-02-20 Alan Modra <amodra@gmail.com>
4488 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4489 if DT_RELSZ/DT_RELASZ is zero.
4491 2017-02-17 Nick Clifton <nickc@redhat.com>
4493 * compress.c (bfd_get_full_section_contents): Remember to reduce
4494 compressed size by the sizeof the compression header when
4495 decompressing the contents.
4497 2017-02-17 Pedro Alves <palves@redhat.com>
4499 * srec.c (Chunk): Rename to ...
4500 (_bfd_srec_len): ... this.
4501 (S3Forced): Rename to ...
4502 (_bfd_srec_forceS3): ... this.
4503 * objcopy.c: Adjust all references.
4505 2017-02-17 Pedro Alves <palves@redhat.com>
4507 * archive.c (bsd_write_armap): Rename to ...
4508 (_bfd_bsd_write_armap): ... this.
4509 (coff_write_armap): Rename to ...
4510 (_bfd_coff_write_armap): ... this.
4511 * libbfd-in.h (bsd_write_armap): Rename to ...
4512 (_bfd_bsd_write_armap): ... this.
4513 (coff_write_armap): Rename to ...
4514 (_bfd_coff_write_armap): ... this.
4515 * aout-target.h, aout-tic30.c: Adjust all users.
4516 * libbfd.h: Regenerate.
4518 2017-02-17 Pedro Alves <palves@redhat.com>
4520 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4521 (warn_deprecated): Rename to ...
4522 (_bfd_warn_deprecated): ... this.
4523 * libbfd.c (warn_deprecated): Rename to ...
4524 (_bfd_warn_deprecated): ... this.
4525 * bfd-in2.h: Regenerate.
4527 2017-02-17 Pedro Alves <palves@redhat.com>
4529 * bfdio.c (real_ftell): Rename to ...
4530 (_bfd_real_ftell): ... this.
4531 (real_fseek): Rename to ...
4532 (_bfd_real_fseek): ... this.
4533 (real_fopen): Rename to ...
4534 (_bfd_real_fopen): ... this.
4535 * libbfd-in.h (real_ftell): Rename to ...
4536 (_bfd_real_ftell): ... this.
4537 (real_fseek): Rename to ...
4538 (_bfd_real_fseek): ... this.
4539 (real_fopen): Rename to ...
4540 (_bfd_real_fopen): ... this.
4541 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4542 * libbfd.h: Regenerate.
4544 2017-02-17 Pedro Alves <palves@redhat.com>
4546 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4547 * libbfd.c (read_unsigned_leb128): Rename to ...
4548 (_bfd_read_unsigned_leb128): ... this.
4549 (read_signed_leb128): Rename to ...
4550 (_bfd_read_signed_leb128): ... this.
4551 (safe_read_leb128): Rename to ...
4552 (_bfd_safe_read_leb128): ... this.
4553 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4554 (_bfd_read_unsigned_leb128): ... this.
4555 (read_signed_leb128): Rename to ...
4556 (_bfd_read_signed_leb128): ... this.
4557 (safe_read_leb128): Rename to ...
4558 (_bfd_safe_read_leb128): ... this.
4559 * libbfd.h: Renegerate.
4561 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4563 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4564 before trying to fine matching file and line information.
4566 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4568 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4569 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4570 not match current bfd, then reload debug information. Record bfd
4571 we're loading debug info for in the stash. If we have debug
4572 informatin in the cache then perform section placement before
4575 2017-02-16 Alan Modra <amodra@gmail.com>
4578 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4579 * elfxx-target.h (elf_backend_no_page_alias): Define.
4580 (elfNN_bed): Init new field.
4581 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4582 ensure PT_LOAD segment starts on a new page.
4583 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4585 2017-02-16 Alan Modra <amodra@gmail.com>
4588 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4591 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4593 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4594 * bfd-in2.h: Regenerated.
4596 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4599 * elf32-i386.c (elf_i386_relocate_section): Allow
4600 "lea foo@GOT, %reg" in PIC.
4602 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4605 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4606 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4607 error against local IFUNC symbol without a base register for
4610 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4612 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4613 `%P: %H:' with `info->callbacks->einfo'.
4614 (ppc_elf_relocate_section): Likewise.
4615 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4616 (ppc64_elf_edit_toc): Likewise.
4617 (ppc64_elf_relocate_section): Likewise.
4619 2017-02-14 Alan Modra <amodra@gmail.com>
4621 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4622 --gc-keep-exported, and test versioned field of sym rather than
4623 looking for @ in name.
4625 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4627 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4630 2017-02-13 Nick Clifton <nickc@redhat.com>
4633 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4636 2017-02-07 Andrew Waterman <andrew@sifive.com>
4638 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4639 entry size if PLT header is written.
4641 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4643 Fix sparc64 dynamic relocation processing to use the dynamic
4645 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4646 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4649 2017-02-03 Nick Clifton <nickc@redhat.com>
4652 * coffcode.h (coff_write_object_contents): Enlarge size of
4653 s_name_buf in order to avoid compile time warning about possible
4655 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4656 32-bits of insn value before printing into buffer.
4658 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4660 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4661 `max_local_dynindx'.
4662 (mips_elf_sort_hash_table): Handle it.
4663 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4664 symbols bump up `max_local_dynindx' rather than
4665 `max_non_got_dynindx'.
4667 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4669 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4670 `min_got_dynindx', `max_unref_got_dynindx' and
4671 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4672 (mips_elf_sort_hash_table): Adjust accordingly.
4674 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4676 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4677 to access the hash table.
4679 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4681 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4682 non-NULL `htab' to the beginning.
4684 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4686 * elflink.c (elf_gc_sweep): Wrap overlong line.
4688 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4690 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4691 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4692 * elfxx-mips.c (mips_elf_link_hash_table): Add
4693 `ignore_branch_isa' member.
4694 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4695 in branch relocation calculation as an error if
4696 `ignore_branch_isa' has been set.
4697 (_bfd_mips_elf_insn32): Rename to...
4698 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4699 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4700 Handle the new parameter.
4702 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4704 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4705 local variable dynobj.
4708 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4709 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4710 executable from read-only sections into sdynrelro.
4711 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4712 dynamic relocs in sdynrelro.
4713 (elf_backend_want_dynrelro): Define.
4715 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4717 * config.bfd (*-*-rtemsaout*): Mark as removed.
4719 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4721 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4722 (arm-*-rtems*): Move to (arm*-*-eabi*).
4723 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4724 (m68-*-rtems*): Move to (m68*-*-elf*).
4726 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4728 * config.bfd (*-*-rtemscoff*): Mark as removed.
4730 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4733 * elflink.c (bfd_elf_record_link_assignment): Revert last
4734 change and don't ever clear `forced_local'. Set `mark'
4736 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4738 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4739 (bfd_elf_size_dynamic_sections): ... here.
4740 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4741 and set `mark' instead in `__tls_get_addr_opt' processing.
4742 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4744 2017-01-24 Alan Modra <amodra@gmail.com>
4746 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4747 where dynamic relocs are preferable. Allow ifunc too.
4748 (ensure_undefweak_dynamic): New function.
4749 (allocate_dynrelocs): Use it here. Move plt handling last and
4750 don't make symbols dynamic, simplifying loop. Only make undef
4751 weak symbols with GOT entries dynamic. Correct condition
4752 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4753 comments. Remove goto.
4754 (ppc_elf_relocate_section): Correct test for using dynamic
4755 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4756 to suit. Set up explicit tls_index entries and implicit GOT
4757 tls_index entries resolvable at link time for
4758 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4759 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4760 (ensure_undefweak_dynamic): New function.
4761 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4762 with GOT entries dynamic. Remove unnecessary test of
4763 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4764 (ppc64_elf_relocate_section): Correct test for using dynamic
4765 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4766 to suit. Set up explicit tls_index entries and implicit GOT
4767 tls_index entries resolvable at link time for __tls_get_addr_opt.
4768 Simplify expression to clear mem for prelink.
4770 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4772 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4774 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4776 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4777 (elf_backend_hash_symbol): Define.
4779 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4782 * elflink.c (bfd_elf_record_link_assignment): Clear any
4783 `forced_local' marking for DSO symbols that are not being
4786 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4788 * elfnn-riscv.c (riscv_elf_object_p): New function.
4790 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4793 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4795 (elf_x86_64_check_relocs): Create .eh_frame section for the
4797 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4798 .eh_frame section for the .plt.bnd section.
4799 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4800 for the .plt.bnd section.
4802 2017-01-12 Nick Clifton <nickc@redhat.com>
4805 * opncls.c (find_separate_debug_file): Add include_dirs
4806 parameter. Only include the directory part of the bfd's filename
4807 in search paths if include_dirs is true. Add a couple of extra
4808 locations for looking for debug files.
4809 ( bfd_follow_gnu_debuglink): Update invocation of
4810 find_separate_debug_file.
4811 (bfd_follow_gnu_debugaltlink): Likewise.
4812 (get_build_id): New function: Finds the build-id of the given bfd.
4813 (get_build_id_name): New function: Computes the name of the
4814 separate debug info file for a bfd, based upon its build-id.
4815 (check_build_id_file): New function: Checks to see if a separate
4816 debug info file exists at the given location, and that its
4817 build-id matches that of the original bfd.
4818 (bfd_follow_build_id_debuglink): New function: Finds a separate
4819 debug info file for a given bfd by using the build-id method.
4820 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4821 method of locating a separate debug info file before using the
4823 * bfd-in2.h: Regenerate.
4825 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4828 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4829 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4830 elf_x86_64_eh_frame_plt_got.
4831 (elf_x86_64_size_dynamic_sections): Get unwind info from
4832 elf_x86_64_bnd_arch_bed for the BND PLT.
4834 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4836 * config.bfd: Add entries for i686-redox and x86_64-redox.
4838 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4840 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4842 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4843 .eh_frame section to 4 bytes for x32.
4844 (elf_x86_64_check_relocs): Likewise.
4846 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4849 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4850 (PLT_GOT_FDE_LENGTH): Likewise.
4851 (elf_i386_plt_layout): Add eh_frame_plt_got and
4852 eh_frame_plt_got_size.
4853 (elf_i386_plt): Updated.
4854 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4855 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4856 (elf_i386_size_dynamic_sections): Allocate and initialize
4857 .eh_frame section for .plt.got.
4858 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4860 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4861 eh_frame_plt_got_size.
4862 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4863 (PLT_GOT_FDE_LENGTH): Likewise.
4864 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4865 eh_frame_plt_got_size.
4866 (elf_x86_64_arch_bed): Updated.
4867 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4868 eh_frame_plt_got_size.
4869 (elf_x86_64_nacl_arch_bed): Likewise.
4870 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4871 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4872 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4873 .eh_frame section for .plt.got.
4874 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4877 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4879 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4880 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4882 2017-01-09 Nick Clifton <nickc@redhat.com>
4884 * dwarf2.c (lookup_address_in_function_table): Return early if
4885 there are no functions in the given comp unit, or if the high
4886 address of the last function in the comp unit is less than the
4889 2017-01-09 Nick Clifton <nickc@redhat.com>
4892 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4893 message if there are too many symbols to load.
4895 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4897 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4898 if relocs are cached.
4900 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4903 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4904 for R_MICROBLAZE_GOTOFF_64.
4906 2017-01-03 Nick Clifton <nickc@redhat.com>
4908 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4909 warning about using a possibly uninitialised variable.
4911 2017-01-02 Alan Modra <amodra@gmail.com>
4913 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4914 (allocate_plt_static, allocate_dynrelocs): Use it.
4916 2017-01-02 Alan Modra <amodra@gmail.com>
4918 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4919 .PARISC.unwind section.
4921 2017-01-02 Alan Modra <amodra@gmail.com>
4924 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4925 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4926 indirect to GOT pointer relative code edit.
4928 2017-01-02 Alan Modra <amodra@gmail.com>
4930 Update year range in copyright notice of all files.
4932 For older changes see ChangeLog-2016
4934 Copyright (C) 2017 Free Software Foundation, Inc.
4936 Copying and distribution of this file, with or without modification,
4937 are permitted in any medium without royalty provided the copyright
4938 notice and this notice are preserved.
4944 version-control: never