1 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
2 Nick Clifton <nickc@redhat.com>
5 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
6 overlarge raw syment count.
7 (coff_get_normalized_symtab): Likewise.
9 2017-11-01 James Bowman <james.bowman@ftdichip.com>
11 * archures.c: Add bfd_mach_ft32b.
12 * cpu-ft32.c: Add arch_info_struct.
13 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
15 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
17 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
18 (elf32_ft32_adjust_diff_reloc_value)
19 (elf32_ft32_adjust_reloc_if_spans_insn)
20 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
21 (ft32_elf_relax_section): New function.
22 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
23 * bfd-in2.h: Regenerate.
24 * libbfd.h: Regenerate.
26 2017-11-01 Nick Clifton <nickc@redhat.com>
29 * coffcode.h (coff_slurp_line_table): Check for an excessively
30 large line number count.
32 2017-11-01 Nick Clifton <nickc@redhat.com>
35 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
36 and offset in light of further possible bogus values.
38 2017-11-01 Alan Modra <amodra@gmail.com>
41 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
42 entry when just a dynamic reloc can serve. Ensure no dynamic
43 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
44 Expand and move the non_got_ref comment.
45 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
47 2017-11-01 Nick Clifton <nickc@redhat.com>
50 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
52 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
53 members of an archive.
55 2017-10-31 Nick Clifton <nickc@redhat.com>
58 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
61 2017-10-30 Alan Modra <amodra@gmail.com>
63 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
66 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
68 (bfd_elf_gc_sections): Likewise.
70 2017-10-30 Alan Modra <amodra@gmail.com>
73 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
74 ensure non_got_ref is not set due to debug references.
75 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
76 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
78 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
79 dynamic relocs when pic. Remove bogus code attempting to handle
81 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
83 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
84 and SYMBOL_REFERENCES_LOCAL in GOT handling.
86 2017-10-28 Alan Modra <amodra@gmail.com>
89 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
90 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
91 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
92 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
94 2017-10-25 Alan Modra <amodra@gmail.com>
96 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
97 optionally prefixed with "_".
98 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
100 2017-10-24 Andrew Waterman <andrew@sifive.com>
102 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
105 2017-10-24 Renlin Li <renlin.li@arm.com>
108 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
110 2017-10-23 Nick Clifton <nickc@redhat.com>
113 * elflink.c (elf_link_output_extsym): Keep global undefined
114 symbols if they have been marked as needed.
116 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
118 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
120 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
121 `_bfd_mips_elf_mkobject'.
123 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
126 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
128 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
130 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
131 (riscv_pcgp_lo_reloc): Likewise.
132 (riscv_pcgp_relocs): Likewise.
133 (riscv_init_pcgp_relocs): New function.
134 (riscv_free_pcgp_relocs): Likewise.
135 (riscv_record_pcgp_hi_reloc): Likewise.
136 (riscv_record_pcgp_lo_reloc): Likewise.
137 (riscv_delete_pcgp_hi_reloc): Likewise.
138 (riscv_use_pcgp_hi_reloc): Likewise.
139 (riscv_record_pcgp_lo_reloc): Likewise.
140 (riscv_find_pcgp_lo_reloc): Likewise.
141 (riscv_delete_pcgp_lo_reloc): Likewise.
142 (_bfd_riscv_relax_pc): Likewise.
143 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
144 via the new functions above.
146 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
148 * elfnn-riscv.c (R_RISCV_DELETE): New define.
149 (_bfd_riscv_relax_delete): New function.
150 (perform_relocation): Handle R_RISCV_DELETE.
151 (_bfd_riscv_relax_section): Likewise.
153 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
156 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
157 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
158 bfd_link_executable for TLS check.
159 (tilegx_elf_check_relocs): Likewise.
160 (allocate_dynrelocs): Likewise.
161 (tilegx_elf_relocate_section): Likewise.
163 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
166 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
167 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
168 bfd_link_executable for TLS check.
169 (tilepro_elf_check_relocs): Likewise.
170 (allocate_dynrelocs): Likewise.
171 (tilepro_elf_relocate_section): Likewise.
173 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
176 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
177 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
178 bfd_link_executable for TLS check.
179 (_bfd_sparc_elf_check_relocs): Likewise.
180 (allocate_dynrelocs): Likewise.
181 (_bfd_sparc_elf_relocate_section): Likewise.
183 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
185 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
186 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
187 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
189 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
191 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
192 indirect and warning symbols.
194 2017-10-17 Alan Modra <amodra@gmail.com>
197 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
198 against size left rather than comparing pointers. Reorganise loop.
200 2017-10-17 Alan Modra <amodra@gmail.com>
203 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
204 and error for any other size that doesn't cover the header word.
206 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
208 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
209 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
210 (elf_backend_gc_sweep_hook): Likewise.
211 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
212 (bfinfdpic_gc_sweep_hook): Likewise.
213 (elf_backend_gc_sweep_hook): Likewise.
214 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
215 (elf_backend_gc_sweep_hook): Likewise.
216 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
217 (elf_backend_gc_sweep_hook): Likewise.
218 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
219 (elf_backend_gc_sweep_hook): Likewise.
220 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
221 (elf_backend_gc_sweep_hook): Likewise.
222 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
223 (elf_backend_gc_sweep_hook): Likewise.
224 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
226 (elf_m68k_remove_got_entry_type): Removed.
227 (elf_m68k_find_got_entry_ptr): Likewise.
228 (elf_m68k_remove_got_entry): Likewise.
229 (elf_m68k_gc_sweep_hook): Likewise.
230 (elf_backend_gc_sweep_hook): Likewise.
231 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
232 (elf_backend_gc_sweep_hook): Likewise.
233 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
234 (elf_backend_gc_sweep_hook): Likewise.
235 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
236 (elf_backend_gc_sweep_hook): Likewise.
237 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
238 (elf_backend_gc_sweep_hook): Likewise.
239 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
240 (elf_backend_gc_sweep_hook): Likewise.
241 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
242 (elf_backend_gc_sweep_hook): Likewise.
243 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
244 (elf_backend_gc_sweep_hook): Likewise.
245 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
246 (elf_backend_gc_sweep_hook): Likewise.
247 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
248 (elf_backend_gc_sweep_hook): Likewise.
249 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
250 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
251 (elf_backend_gc_sweep_hook): Likewise.
252 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
253 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
254 (elf_backend_gc_sweep_hook): Likewise.
255 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
256 (elf_backend_gc_sweep_hook): Likewise.
257 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
258 (elf_backend_gc_sweep_hook): Likewise.
259 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
260 (elf_backend_gc_sweep_hook): Likewise.
261 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
262 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
263 (elf_backend_gc_sweep_hook): Likewise.
264 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
265 (ppc64_elf_gc_sweep_hook): Likewise.
266 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
267 (elf_backend_gc_sweep_hook): Likewise.
268 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
269 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
270 * elflink.c (elf_link_add_object_symbols): Don't call
271 _bfd_elf_link_check_relocs here.
272 (gc_sweep_hook_fn): Removed.
273 (elf_gc_sweep): Remove gc_sweep_hook.
274 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
275 (elf_backend_gc_sweep_hook): Likewise.
276 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
277 (elf_backend_gc_sweep_hook): Likewise.
278 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
279 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
280 (elf_backend_gc_sweep_hook): Likewise.
281 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
282 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
283 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
284 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
285 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
286 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
288 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
290 * elf32-i386.c (elf_i386_backend_data): Removed.
291 (get_elf_i386_backend_data): Likewise.
292 (elf_i386_arch_bed): Replace elf_i386_backend_data with
293 elf_x86_backend_data.
294 (elf_i386_get_synthetic_symtab): Likewise.
295 (elf_i386_nacl_arch_bed): Likewise.
296 (elf_i386_vxworks_arch_bed): Likewise.
297 (elf_i386_relocate_section): Check target_os instead of
299 (elf_i386_finish_dynamic_symbol): Likewise.
300 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
301 Check target_os instead of is_vxworks.
302 (elf_i386_link_setup_gnu_properties): Remove normal_target and
303 is_vxworks. Initialize plt0_pad_byte.
304 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
305 (get_elf_x86_64_arch_data): Likewise.
306 (get_elf_x86_64_backend_data): Likewise.
307 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
308 elf_x86_backend_data.
309 (elf_x86_64_get_synthetic_symtab): Likewise.
310 (elf_x86_64_nacl_arch_bed): Likewise.
311 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
312 normal_target. Initialize plt0_pad_byte.
313 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
314 instead of is_vxworks.
315 (_bfd_x86_elf_size_dynamic_sections): Likewise.
316 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
317 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
318 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
319 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
320 Update normal_target. Set up plt0_pad_byte. Check target_os
321 instead of is_vxworks.
322 * elfxx-x86.h (elf_x86_target_os): New.
323 (elf_x86_backend_data): Likewise.
324 (get_elf_x86_backend_data): Likewise.
325 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
327 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
330 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
332 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
333 _bfd_x86_elf_finish_dynamic_sections.
334 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
335 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
337 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
340 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
343 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
344 hide symbol which was forced to be dynamic.
346 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
349 * elf32-cris.c (cris_elf_relocate_section): Don't generate
350 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
351 (cris_elf_check_relocs): Don't allocate dynamic relocation
352 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
354 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
357 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
358 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
359 (sh_elf_relocate_section): Don't generate dynamic relocation if
360 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
362 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
365 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
366 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
367 (elf_s390_relocate_section): Don't generate dynamic relocation
368 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
369 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
370 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
371 (elf_s390_relocate_section): Don't generate dynamic relocation
372 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
374 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
377 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
378 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
379 (allocate_dynrelocs): Discard dynamic relocations if
380 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
382 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
385 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
386 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
388 (allocate_dynrelocs): Discard dynamic relocations if
389 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
391 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
394 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
395 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
396 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
397 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
398 (elf_m68k_relocate_section): Don't generate dynamic relocation
399 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
401 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
404 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
405 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
406 (allocate_dynrelocs): Discard dynamic relocations if
407 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
408 (elf32_hppa_relocate_section): Don't generate dynamic
409 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
411 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
414 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
415 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
416 (allocate_fptr): Don't allocate function pointer if
417 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
418 (allocate_dynrel_entries): Don't allocate dynamic relocation
419 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
420 (set_got_entry): Don't set GOT entry if
421 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
422 (set_pltoff_entry): Don't set PLTOFF entry if
423 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
424 (elfNN_ia64_relocate_section): Don't install dynamic relocation
425 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
427 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
430 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
431 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
432 (allocate_dynrelocs): Don't allocate dynamic relocations if
433 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
435 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
438 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
439 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
440 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
441 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
443 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
446 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
447 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
448 (tilepro_elf_relocate_section): Don't generate dynamic
449 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
450 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
451 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
452 (tilegx_elf_relocate_section): Don't generate dynamic
453 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
455 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
458 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
459 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
461 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
462 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
464 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
466 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
467 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
468 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
470 2017-10-12 James Bowman <james.bowman@ftdichip.com>
472 * bfd-in2.h: Regenerate.
473 * libbfd.h: Regenerate.
474 * elf32-ft32.c: Add HOWTO R_FT32_15.
475 * reloc.c: Add BFD_RELOC_FT32_15.
477 2017-10-12 Nick Clifton <nickc@redhat.com>
479 * reloc.c (enum bfd_reloc_status): Start values at 2.
480 * bfd-in2.h: Regenerate.
481 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
482 that a TRUE return indicates success. Compare the result of
483 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
484 (build_one_stub): Change sense of tests against aarch64_relocate
486 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
487 than FALSE, when an error is detected.
488 (elfNN_aarch64_final_link_relocate): Likewise.
490 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
492 * elf32-i386.c (elf_backend_hide_symbol): New.
493 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
494 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
495 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
497 2017-10-12 Alan Modra <amodra@gmail.com>
499 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
500 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
501 (bfd_elf_define_start_stop): Likewise.
503 2017-10-12 Alan Modra <amodra@gmail.com>
505 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
506 when executable rather than non-PIC.
507 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
508 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
510 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
512 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
514 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
515 (elf_external_linux_prpsinfo64_ugid32): ... this.
516 (swap_linux_prpsinfo32_out): Rename to...
517 (swap_linux_prpsinfo32_ugid32_out): ... this.
518 (elf_external_linux_prpsinfo64_ugid16): New structure.
519 (swap_linux_prpsinfo64_ugid16_out): New function.
520 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
521 (elf_backend_linux_prpsinfo64_ugid16): Define.
522 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
523 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
524 of the 64-bit Linux core PRPSINFO note.
525 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
527 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
529 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
531 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
532 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
533 (elf_external_ppc_linux_prpsinfo32)
534 (swap_ppc_linux_prpsinfo32_out): Move to...
535 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
536 (swap_linux_prpsinfo32_ugid32_out): ... these.
537 (elf_external_linux_prpsinfo32): Rename to...
538 (elf_external_linux_prpsinfo32_ugid16): ... this.
539 (swap_linux_prpsinfo32_out): Rename to...
540 (swap_linux_prpsinfo32_ugid16_out): ... this.
541 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
542 (elf_backend_linux_prpsinfo32_ugid16): Define.
543 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
544 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
545 of the 32-bit Linux core PRPSINFO note.
546 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
547 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
548 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
549 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
550 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
551 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
552 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
553 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
554 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
555 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
557 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
559 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
560 `gap' member ahead of `pr_flag'.
562 2017-10-11 Pedro Alves <palves@redhat.com>
564 * bfd.c (_doprnt): Rename to ...
565 (_bfd_doprnt): ... this.
566 (error_handler_internal): Adjust.
568 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
570 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
571 instead of incrementing it.
572 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
574 2017-10-10 Renlin Li <renlin.li@arm.com>
577 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
578 symbols into dynamic.
580 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
583 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
584 (riscv_elf_link_hash_table_create): Initialize max_alignment to
586 (_bfd_riscv_relax_section): Cache the max alignment of output
587 sections if possible.
589 2017-10-10 Alan Modra <amodra@gmail.com>
591 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
592 .opd whenever .opd is present and non-zero size. Move code
593 setting abiversion to/from output file earlier. Only set
594 u.opd.func_sec when --gc-sections. Read relocs and set up
595 u.opd.func_sec values here..
596 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
598 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
600 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
602 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
605 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
607 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
608 .interp section with "ld --no-dynamic-linker".
610 2017-10-09 Alan Modra <amodra@gmail.com>
613 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
614 funcinfo_hash_table and varinfo_hash_table.
616 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
618 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
619 in read-only section with minfo.
620 (sh_elf_size_dynamic_sections): Likewise.
622 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
624 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
627 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
629 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
630 this_hdr.sh_entsize only if section size > 0.
632 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
634 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
636 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
638 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
639 in read-only section with minfo.
640 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
642 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
644 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
647 2017-10-06 John Baldwin <jhb@FreeBSD.org>
649 * elf-bfd.h (struct elf_backend_data): Add
650 `elf_backend_grok_freebsd_prstatus'.
651 * elf.c (elfcore_grok_freebsd_note): Call
652 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
654 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
656 (elf_backend_grok_freebsd_prstatus): Define.
657 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
658 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
660 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
662 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
663 and has_non_got_reloc with zero_undefweak.
664 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
665 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
667 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
668 has_non_got_reloc with zero_undefweak.
669 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
670 has_got_reloc and has_non_got_reloc with zero_undefweak.
671 (elf_x86_link_hash_entry): Likewise.
673 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
675 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
676 (VERIFY_COPY_RELOC): Likewise.
678 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
680 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
681 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
682 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
684 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
686 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
687 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
688 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
690 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
692 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
693 * elf32-i386.c (elf_i386_relocate_section): Use it.
694 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
696 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
698 * elf32-i386.c (X86_SIZE_TYPE_P): New.
699 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
700 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
701 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
702 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
704 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
706 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
707 (PLT_LOCAL_IFUNC_P): Likewise.
708 * elf32-i386.c (elf_i386_relocate_section): Use them.
709 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
711 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
713 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
714 * elf32-i386.c (elf_i386_relocate_section): Use it.
715 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
717 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
719 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
720 * elf32-i386.c (elf_i386_relocate_section): Use it.
721 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
723 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
725 * elf32-i386.c (X86_PCREL_TYPE_P): New.
726 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
727 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
728 (X86_PCREL_TYPE_P): This.
729 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
730 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
731 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
733 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
735 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
737 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
738 * elf32-i386.c (elf_i386_tls_transition): Use it.
739 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
741 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
743 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
744 Dump dynamic relocation in read-only section with minfo if
746 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
747 (maybe_set_textrel): Likewise.
748 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
749 read-only section with minfo.
751 2017-10-05 John Baldwin <jhb@FreeBSD.org>
753 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
755 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
757 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
758 in read-only section with minfo.
759 (tilepro_elf_size_dynamic_sections): Likewise.
760 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
761 (tilegx_elf_size_dynamic_sections): Likewise.
763 2017-10-05 Pedro Alves <palves@redhat.com>
766 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
767 ellipsis parameter. Split out bfd_error_on_input code to..
768 (bfd_set_input_error): .. New function.
769 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
770 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
771 * bfd-in2.h: Regenerate.
773 2017-10-05 Alan Modra <amodra@gmail.com>
775 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
776 fini_array error value.
778 2017-10-05 Alan Modra <amodra@gmail.com>
781 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
783 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
785 (elf_fake_sections): Adjust calls. Exit immediately on failure.
786 (bfd_elf_set_group_contents): Add associated reloc section indices
789 2017-10-04 Alan Modra <amodra@gmail.com>
791 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
792 classify symbols for ELFv2.
794 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
797 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
798 undergoes default promotion.
799 * bfd-in2.h: Regenerate.
801 2017-10-02 Alan Modra <amodra@gmail.com>
803 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
804 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
806 2017-10-01 Alan Modra <amodra@gmail.com>
809 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
810 (add_line_info): Always put end_sequence last.
812 2017-10-01 Alan Modra <amodra@gmail.com>
815 * dwarf2.c (read_section): Allocate buffer with extra byte for
816 bfd_simple_get_relocated_section_contents rather than copying
819 2017-09-29 Alan Modra <amodra@gmail.com>
821 * merge.c (merge_strings): Return FALSE on malloc failure.
822 (_bfd_merge_sections): Return failures from record_section and
825 2017-09-28 Alan Modra <amodra@gmail.com>
828 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
829 a case where plugin_notice isn't called.
831 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
833 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
836 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
839 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
840 output_bfd to info->callbacks->minfo.
842 2017-09-26 Nick Clifton <nickc@redhat.com>
845 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
846 assertion failure if elf_x86_64_rtype_to_howto has already issued
849 2017-09-26 Alan Modra <amodra@gmail.com>
852 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
855 2017-09-26 Nick Clifton <nickc@redhat.com>
858 * dwarf2.c (read_formatted_entries): Fail early if we know that
859 the loop parsing data entries will overflow the end of the
862 2017-09-26 Alan Modra <amodra@gmail.com>
865 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
866 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
867 to stash->info_ptr_memory, and check die_ref is within that memory.
868 Set info_ptr_end correctly when another CU is refd. Check die_ref
869 for DW_FORM_ref4 etc. is within CU.
871 2017-09-26 Alan Modra <amodra@gmail.com>
874 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
875 (read_formatted_entries): Init "fe".
876 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
878 2017-09-26 Alan Modra <amodra@gmail.com>
881 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
882 bounds in inner loop.
884 2017-09-25 Alan Modra <amodra@gmail.com>
887 * dwarf1.c (parse_die): Sanity check pointer against section limit
888 before dereferencing.
889 (parse_line_table): Likewise.
891 2017-09-25 Alan Modra <amodra@gmail.com>
894 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
896 (parse_comp_unit): Likewise.
898 2017-09-25 Alan Modra <amodra@gmail.com>
901 * dwarf2.c (read_formatted_entries): Error on format_count zero.
903 2017-09-24 Alan Modra <amodra@gmail.com>
906 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
907 within section bounds.
909 2017-09-24 Alan Modra <amodra@gmail.com>
912 * dwarf2.c (decode_line_info): Properly free line sequences on error.
914 2017-09-24 Alan Modra <amodra@gmail.com>
917 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
918 pname param. Return status. Make name const. Don't abort,
919 return an error. Formatting. Exit if current info_ptr matches
920 orig_info_ptr. Update callers.
921 (scan_unit_for_symbols): Start at nesting_level of zero. Make
922 nested_funcs an array of structs for extensibility. Formatting.
924 2017-09-24 Alan Modra <amodra@gmail.com>
927 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
928 rather than dividing by zero.
930 2017-09-24 Alan Modra <amodra@gmail.com>
933 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
935 2017-09-24 Alan Modra <amodra@gmail.com>
938 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
940 2017-09-24 Alan Modra <amodra@gmail.com>
943 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
944 SHT_GNU_verneed section for sanity. Don't zalloc memory for
947 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
950 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
953 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
956 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
957 -1 if bfd_canonicalize_dynamic_reloc returns 0.
959 2017-09-22 Pedro Alves <palves@redhat.com>
960 Alan Modra <amodra@gmail.com>
962 * version.h: Add comment.
964 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
966 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
967 NT_S390_GS_BC, correct the previously swapped invocations of
968 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
970 2017-09-19 Alan Modra <amodra@gmail.com>
973 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
976 2017-09-19 Alan Modra <amodra@gmail.com>
979 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
980 symbols before calculating verrefs. Don't renumber dynsyms
981 after gc. Exclude .gnu.version when zero or one dynsym.
982 Localize some vars and reindent.
984 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
987 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
988 return from bfd_canonicalize_dynamic_reloc.
990 2017-09-15 Alan Modra <amodra@gmail.com>
993 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
994 overflows bfd_size_type.
996 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
999 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1000 to indicate if conversion is performed.
1001 (elf_i386_check_relocs): Cache section contents and relocations
1002 if conversion is performed.
1003 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1004 contents and relocations if conversion is performed.
1006 2017-09-14 Nick Clifton <nickc@redhat.com>
1009 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1012 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1014 * elfxx-x86.h: Fix a typo in comments.
1016 2017-09-09 Kamil Rytarowski <n54@gmx.com>
1018 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1020 2017-09-09 Alan Modra <amodra@gmail.com>
1022 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1025 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1027 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1028 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1029 (elf_i386_finish_dynamic_symbol): Likewise.
1030 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1031 (elf_x86_64_finish_dynamic_symbol): Likewise.
1032 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1033 (_bfd_x86_elf_fixup_symbol): Likewise.
1035 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1037 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1038 check has_non_got_reloc.
1040 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1043 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1044 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1045 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1046 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1047 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1048 and linker_def on __ehdr_start if it is referenced and not
1050 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1051 and return TRUE when building executable, if a symbol has
1052 non-GOT/non-PLT relocations in text section or there is no
1054 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1056 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1058 * elfxx-x86.h: Update comments.
1060 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1062 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1063 elf_x86_plt_layout_table with elf_x86_init_table.
1064 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1066 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1068 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1069 (elf_x86_init_table): This.
1070 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1071 elf_x86_plt_layout_table with elf_x86_init_table.
1073 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1075 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1076 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1077 * configure: Regenerated.
1078 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1079 and r_sym fields of plt_layout.
1080 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1082 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1083 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1084 r_info nor r_sym fields.
1085 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1087 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1089 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1091 * (_bfd_riscv_relax_align): Call bfd_set_error and
1092 print an error message when unable to relax a .align directive.
1094 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1096 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1097 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1098 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1099 R_RISCV_PCREL_HI20 relocs, and pass the result to
1100 riscv_record_pcrel_hi_reloc.
1102 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1104 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1105 r_type_p. Remove the converted argument. Replace
1106 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1107 the new relocation type via r_type_p.
1108 (elf_i386_relocate_section): Likewise.
1109 (elf_i386_finish_dynamic_symbol): Likewise.
1110 (need_convert_load): Removed.
1111 (check_relocs_failed): Updated.
1112 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1113 instead of setting need_convert_load.
1114 (_bfd_i386_elf_convert_load): Removed.
1115 * elf64-x86-64.c (need_convert_load): Removed.
1116 (check_relocs_failed): Updated.
1117 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1118 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1119 Return the new relocation type via r_type_p.
1120 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1121 instead of setting need_convert_load.
1122 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1124 (_bfd_x86_64_elf_convert_load): Removed.
1125 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1126 with SYMBOL_REFERENCES_LOCAL_P.
1127 (elf_x86_64_finish_dynamic_symbol): Likewise.
1128 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1130 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1131 (_bfd_x86_elf_link_symbol_references_local): New function.
1132 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1133 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1134 SYMBOL_REFERENCES_LOCAL_P.
1135 (elf_x86_link_hash_entry): Add local_ref.
1136 (elf_x86_link_hash_table): Remove convert_load.
1137 (_bfd_i386_elf_convert_load): Removed.
1138 (_bfd_x86_64_elf_convert_load): Likewise.
1139 (_bfd_x86_elf_link_symbol_references_local): New.
1141 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1143 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1144 (elf_x86_64_info_to_howto): Get the real relocation type by
1145 masking out R_X86_64_converted_reloc_bit.
1146 (elf_x86_64_check_tls_transition): Get the real relocation type
1147 by masking out R_X86_64_converted_reloc_bit.
1148 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1149 instead of setting converted_reloc.
1150 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1151 instead of converted_reloc. Get the real relocation type by
1152 masking out R_X86_64_converted_reloc_bit.
1153 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1154 R_X86_64_converted_reloc_bit is valid.
1155 * elfxx-x86.h (converted_reloc): Removed.
1157 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1159 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1160 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1161 to get the relocation type again.
1162 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1163 r_type when calling elf_x86_64_tls_transition. Don't use
1164 ELF32_R_TYPE to get the relocation type again.
1166 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1168 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1171 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1173 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1174 argument. Don't check relocation overflow. Avoid relocation
1175 overflow if --no-relax is used. Set converted_reloc on symbol
1176 if a GOTPCREL relocation is converted.
1177 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1178 --no-relax if GOTPCREL relocation conversion leads to relocation
1180 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1182 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1183 Edmar Wienskoski <edmar.wienskoski@nxp.com
1185 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1186 (ppc_elf_check_relocs): Handle it.
1187 (ppc_elf_vle_split20): New function.
1188 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1190 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1193 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1194 for x86-64 if GOT_TLS_GDESC_P is true.
1196 2017-09-03 Alan Modra <amodra@gmail.com>
1199 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1201 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1203 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1204 tls_get_addr for x86-64 in one place.
1206 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1208 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1209 with elfxx-x86.lo for 64-bit BFD.
1210 * configure: Regenerated.
1212 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1214 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1215 (_bfd_i386_elf_convert_load): This. Remove static.
1216 (elf_i386_size_dynamic_sections): Removed.
1217 (elf_backend_size_dynamic_sections): Likewise.
1218 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1219 (_bfd_x86_64_elf_convert_load): This. Remove static.
1220 (elf_x86_64_size_dynamic_sections): Removed.
1221 (elf_backend_size_dynamic_sections): Likewise.
1222 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1223 (elf_x86_allocate_dynrelocs): This. Make it static.
1224 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1225 (elf_x86_allocate_local_dynreloc): This. Make it static.
1226 (elf_i386_is_reloc_section): New function.
1227 (elf_x86_64_is_reloc_section): Likewise.
1228 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1229 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1230 Rearrange got_entry_size initialization.
1231 (_bfd_x86_elf_size_dynamic_sections): New function.
1232 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1233 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1234 (_bfd_i386_elf_convert_load): New.
1235 (_bfd_x86_64_elf_convert_load): Likewise.
1236 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1237 (elf_backend_size_dynamic_sections): Likewise.
1238 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1239 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1241 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1243 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1246 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1248 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1249 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1251 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1253 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1254 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1255 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1256 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1257 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1258 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1260 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1262 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1263 (elf_i386_allocate_local_dynrelocs): Likewise.
1264 (elf_i386_size_dynamic_sections): Replace
1265 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1266 with _bfd_x86_elf_allocate_dynrelocs and
1267 _bfd_x86_elf_allocate_local_dynrelocs.
1268 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1269 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1270 (elf_x86_64_size_dynamic_sections): Replace
1271 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1272 with _bfd_x86_elf_allocate_dynrelocs and
1273 _bfd_x86_elf_allocate_local_dynrelocs.
1274 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1275 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1276 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1277 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1279 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1281 * elf32-i386.c (is_i386_elf): Removed.
1282 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1283 (elf_i386_size_dynamic_sections): Likewise.
1284 (elf_i386_relocate_section): Likewise.
1285 * elf64-x86-64.c (is_x86_64_elf): Removed.
1286 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1288 (elf_x86_64_size_dynamic_sections): Likewise.
1289 (elf_x86_64_relocate_section): Likewise.
1290 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1292 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1295 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1297 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1298 (elf_i386_allocate_dynrelocs): Replace
1299 elf_i386_compute_jump_table_size with
1300 elf_x86_compute_jump_table_size.
1301 (elf_i386_size_dynamic_sections): Likewise.
1302 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1303 (elf_x86_64_allocate_dynrelocs): Replace
1304 elf_x86_64_compute_jump_table_size with
1305 elf_x86_compute_jump_table_size.
1306 (elf_x86_64_size_dynamic_sections): Likewise.
1307 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1309 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1310 (elf_x86_compute_jump_table_size): New.
1312 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1314 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1316 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1317 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1319 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1321 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1322 with htab->is_vxworks.
1323 (elf_i386_size_dynamic_sections): Likewise.
1324 (elf_i386_relocate_section): Likewise.
1325 (elf_i386_finish_dynamic_symbol): Likewise.
1326 (elf_i386_finish_dynamic_sections): Likewise.
1328 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1330 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1331 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1332 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1333 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1334 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1335 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1336 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1337 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1339 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1342 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1343 ELF_COMMON_DEF_P for common symbols.
1345 2017-09-02 Alan Modra <amodra@gmail.com>
1347 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1348 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1349 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1351 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1353 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1354 (elf_backend_gc_mark_hook): Likewise.
1355 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1356 (elf_backend_gc_mark_hook): Likewise.
1357 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1358 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1359 (elf_backend_gc_mark_hook): Likewise.
1361 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1363 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1364 (elf_backend_adjust_dynamic_symbol): Likewise.
1365 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1366 (elf_backend_adjust_dynamic_symbol): Likewise.
1367 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1368 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1369 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1370 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1371 (elf_backend_adjust_dynamic_symbol): Likewise.
1373 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1375 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1378 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1380 * elf32-i386.c (elf_i386_mkobject): Removed.
1381 (bfd_elf32_mkobject): Likewise.
1382 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1383 (bfd_elf64_mkobject): Likewise.
1384 (bfd_elf32_mkobject): Likewise.
1385 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1386 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1387 (bfd_elf64_mkobject): Likewise.
1388 (bfd_elf32_mkobject): Likewise.
1390 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1392 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1393 Call _bfd_x86_elf_link_setup_gnu_properties.
1394 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1395 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1397 (elf_x86_64_non_lazy_plt): Likewise.
1398 (elf_x86_64_lazy_bnd_plt): Likewise.
1399 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1400 (elf_x86_64_lazy_ibt_plt): Likewise.
1401 (elf_x32_lazy_ibt_plt): Likewise.
1402 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1403 (elf_x32_non_lazy_ibt_plt): Likewise.
1404 (elf_x86_64_nacl_plt): Likewise.
1405 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1406 _bfd_x86_elf_link_setup_gnu_properties.
1407 * elfxx-x86.c: Include elf-vxworks.h".
1408 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1409 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1410 comments for pic_plt0_entry and pic_plt_entry.
1411 (elf_x86_non_lazy_plt_layout): Likewise.
1412 (elf_x86_plt_layout_table): New.
1413 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1415 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1418 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1419 .eh_frame section for the second PLT.
1420 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1421 alignment of .eh_frame section for the second PLT.
1423 2017-09-01 Nick Clifton <nickc@redhat.com>
1426 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1429 2017-09-01 Nick Clifton <nickc@redhat.com>
1432 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1433 attribute buffer is NUL terminated.
1435 2017-08-31 Nick Clifton <nickc@redhat.com>
1438 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1439 to dwarf string sections.
1441 2017-08-31 Alan Modra <amodra@gmail.com>
1443 * po/SRC-POTFILES.in: Regenerate.
1445 2017-08-31 Alan Modra <amodra@gmail.com>
1447 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1448 for a section containing just a terminator. Allow multiple
1449 terminators at end of section.
1450 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1451 sections when not adding alignment. Assert on terminator in
1454 2017-08-31 Alan Modra <amodra@gmail.com>
1458 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1461 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1463 * configure.ac (bfd_backends): Add elf64.lo together with
1464 elfxx-x86.lo for 64-bit BFD.
1465 * configure: Regenerated.
1467 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1469 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1472 2017-08-31 Alan Modra <amodra@gmail.com>
1475 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1476 before _close_and_cleanup. Call iovec->bclose after.
1477 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1479 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1481 * elf32-i386.c (elf_i386_plt_type): Removed.
1482 (elf_i386_plt): Likewise.
1483 (elf_i386_get_synthetic_symtab): Updated. Call
1484 _bfd_x86_elf_get_synthetic_symtab.
1485 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1486 (elf_x86_64_plt): Likewise.
1487 (elf_x86_64_get_synthetic_symtab): Updated. Call
1488 _bfd_x86_elf_get_synthetic_symtab.
1489 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1490 (elf_x86_64_get_plt_got_vma): Likewise.
1491 (elf_i386_valid_plt_reloc_p): Likewise.
1492 (elf_x86_64_valid_plt_reloc_p): Likewise.
1493 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1494 * elfxx-x86.h (elf_x86_plt_type): New.
1495 (elf_x86_plt): Likewise.
1496 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1498 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1500 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1501 target_id instead of elf_machine_code.
1503 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1505 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1506 (elf_i386_lazy_plt_layout): Likewise.
1507 (elf_i386_non_lazy_plt_layout): Likewise.
1508 (elf_i386_plt_layout): Likewise.
1509 (elf_i386_link_hash_table): Likewise.
1510 (elf_i386_next_tls_desc_index): Likewise.
1511 (elf_i386_srelplt2): Likewise.
1512 (elf_i386_plt): Likewise.
1513 (elf_i386_lazy_plt): Likewise.
1514 (elf_i386_non_lazy_plt): Likewise.
1515 (elf_i386_link_hash_table_create): Likewise.
1516 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1517 (elf_i386_lazy_plt): Updated.
1518 (elf_i386_non_lazy_plt): Likewise.
1519 (elf_i386_lazy_ibt_plt): Likewise.
1520 (elf_i386_non_lazy_ibt_plt): Likewise.
1521 (elf_i386_allocate_dynrelocs): Likewise.
1522 (elf_i386_size_dynamic_sections): Likewise.
1523 (elf_i386_relocate_section): Likewise.
1524 (elf_i386_finish_dynamic_symbol): Likewise.
1525 (elf_i386_finish_dynamic_sections): Likewise.
1526 (elf_i386_get_synthetic_symtab): Likewise.
1527 (elf_i386_link_setup_gnu_properties): Likewise.
1528 (elf_i386_nacl_plt): Likewise.
1529 * elf64-x86-64.c (ABI_64_P): Removed.
1530 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1531 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1532 (elf_x86_64_lazy_plt_layout): Likewise.
1533 (elf_x86_64_non_lazy_plt_layout): Likewise.
1534 (elf_x86_64_plt_layout): Likewise.
1535 (elf_x86_64_link_hash_table): Likewise.
1536 (elf_x86_64_plt): Likewise.
1537 (elf_x86_64_lazy_plt): Likewise.
1538 (elf_x86_64_non_lazy_plt): Likewise.
1539 (elf_x86_64_link_hash_table_create): Likewise.
1540 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1541 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1542 (elf_x86_64_lazy_plt): Updated.
1543 (elf_x86_64_non_lazy_plt): Likewise.
1544 (elf_x86_64_lazy_bnd_plt): Likewise.
1545 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1546 (elf_x86_64_lazy_ibt_plt): Likewise.
1547 (elf_x32_lazy_ibt_plt): Likewise.
1548 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1549 (elf_x32_non_lazy_ibt_plt): Likewise.
1550 (elf_x86_64_allocate_dynrelocs): Likewise.
1551 (elf_x86_64_size_dynamic_sections): Likewise.
1552 (elf_x86_64_relocate_section): Likewise.
1553 (elf_x86_64_finish_dynamic_symbol): Likewise.
1554 (elf_x86_64_finish_dynamic_sections): Likewise.
1555 (elf_x86_64_get_synthetic_symtab): Likewise.
1556 (elf_x86_64_link_setup_gnu_properties): Likewise.
1557 (elf_x86_64_nacl_plt): Likewise.
1558 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1560 (ELF32_DYNAMIC_INTERPRETER): New.
1561 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1562 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1563 (_bfd_x86_elf_link_hash_table_create): Likewise.
1564 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1565 (elf_x86_link_hash_table_free): This. Make it static.
1566 * elfxx-x86.h: Don't include "objalloc.h".
1568 (elf_x86_lazy_plt_layout): Likewise.
1569 (elf_x86_non_lazy_plt_layout): Likewise.
1570 (elf_x86_plt_layout): Likewise.
1571 (_bfd_x86_elf_link_hash_table_create): Likewise.
1572 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1573 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1574 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1575 srelplt2 and next_tls_desc_index.
1576 (_bfd_x86_elf_link_hash_table_free): Removed.
1578 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1580 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1581 branch offset interpretation.
1583 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1586 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1588 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1590 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1591 (elf_x86_64_srelplt2): Likewise.
1593 2017-08-30 Alan Modra <amodra@gmail.com>
1595 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1596 (ppc64_elf_tls_optimize): Set it.
1597 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1598 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1599 addis would add zero.
1600 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1601 (ppc_elf_tls_optimize): Set it.
1602 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1603 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1605 2017-08-30 Alan Modra <amodra@gmail.com>
1607 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1608 __tls_get_addr call sequences to LE, don't move the addi down
1609 to the nop. Replace the bl with addi and leave the nop alone.
1611 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1613 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1615 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1617 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1619 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1621 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1622 (BFD64_BACKENDS): Likewise.
1623 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1624 (BFD64_BACKENDS_CFILES): Likewise.
1625 * Makefile.in: Regenerated.
1626 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1627 elf32-i386.lo and elf64-x86-64.lo.
1628 * configure: Regenerated.
1629 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1630 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1631 "objalloc.h" and "hashtab.h".
1632 (ELIMINATE_COPY_RELOCS): Removed.
1633 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1634 (SYMBOL_NO_COPYRELOC): Likewise.
1635 (elf_i386_link_hash_entry): Likewise.
1636 (GOT_UNKNOWN): Likewise.
1637 (GOT_NORMAL): Likewise.
1638 (GOT_TLS_GD): Likewise.
1639 (elf_i386_hash_entry): Likewise.
1640 (elf_i386_obj_tdata): Likewise.
1641 (elf_i386_tdata): Likewise.
1642 (elf_i386_local_got_tls_type): Likewise.
1643 (elf_i386_local_tlsdesc_gotent): Likewise.
1644 (elf_i386_hash_table): Likewise.
1645 (elf_i386_link_hash_newfunc): Likewise.
1646 (elf_i386_local_htab_hash): Likewise.
1647 (elf_i386_local_htab_eq): Likewise.
1648 (elf_i386_get_local_sym_hash): Likewise.
1649 (elf_i386_link_hash_table_free): Likewise.
1650 (elf_i386_copy_indirect_symbol): Likewise.
1651 (elf_i386_fixup_symbol): Likewise.
1652 (elf_i386_readonly_dynrelocs): Likewise.
1653 (elf_i386_always_size_sections): Likewise.
1654 (elf_i386_set_tls_module_base): Likewise.
1655 (elf_i386_dtpoff_base): Likewise.
1656 (compare_relocs): Likewise.
1657 (elf_i386_hash_symbol): Likewise.
1658 (elf_i386_parse_gnu_properties): Likewise.
1659 (elf_i386_merge_gnu_properties): Likewise.
1660 (elf_i386_link_check_relocs): Likewise.
1661 (elf_i386_merge_symbol_attribute): Likewise.
1662 (bfd_elf32_bfd_link_check_relocs): Likewise.
1663 (elf_backend_copy_indirect_symbol): Likewise.
1664 (elf_backend_always_size_sections): Likewise.
1665 (elf_backend_omit_section_dynsym): Likewise.
1666 (elf_backend_hash_symbol): Likewise.
1667 (elf_backend_fixup_symbol): Likewise.
1668 (elf_backend_parse_gnu_properties): Likewise.
1669 (elf_backend_merge_gnu_properties): Likewise.
1670 (elf_backend_merge_symbol_attribute): Likewise.
1671 (elf_i386_mkobject): Updated.
1672 (elf_i386_link_hash_table_create): Likewise.
1673 (elf_i386_check_tls_transition): Likewise.
1674 (elf_i386_tls_transition): Likewise.
1675 (elf_i386_convert_load_reloc): Likewise.
1676 (elf_i386_check_relocs): Likewise.
1677 (elf_i386_adjust_dynamic_symbol): Likewise.
1678 (elf_i386_allocate_dynrelocs): Likewise.
1679 (elf_i386_convert_load): Likewise.
1680 (elf_i386_size_dynamic_sections): Likewise.
1681 (elf_i386_relocate_section): Likewise.
1682 (elf_i386_finish_dynamic_symbol ): Likewise.
1683 (elf_i386_finish_dynamic_sections): Likewise.
1684 (elf_i386_output_arch_local_syms): Likewise.
1685 (elf_i386_get_synthetic_symtab): Likewise.
1686 (elf_i386_link_setup_gnu_properties): Likewise.
1687 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1688 of elf_link_hash_table, as base.
1689 (elf_i386_next_tls_desc_index): New.
1690 (elf_i386_srelplt2): Likewise.
1691 (elf_i386_plt): Likewise.
1692 (elf_i386_lazy_plt): Likewise.
1693 (elf_i386_non_lazy_plt): Likewise.
1694 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1695 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1696 "objalloc.h" and "hashtab.h".
1697 (ELIMINATE_COPY_RELOCS): Removed.
1698 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1699 (SYMBOL_NO_COPYRELOC): Likewise.
1700 (elf_x86_64_link_hash_entry): Likewise.
1701 (GOT_UNKNOWN): Likewise.
1702 (GOT_NORMAL): Likewise.
1703 (GOT_TLS_GD): Likewise.
1704 (elf_x86_64_hash_entry): Likewise.
1705 (elf_x86_64_obj_tdata): Likewise.
1706 (elf_x86_64_tdata): Likewise.
1707 (elf_x86_64_local_got_tls_type): Likewise.
1708 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1709 (elf_x86_64_hash_table): Likewise.
1710 (elf_x86_64_link_hash_newfunc): Likewise.
1711 (elf_x86_64_local_htab_hash): Likewise.
1712 (elf_x86_64_local_htab_eq): Likewise.
1713 (elf_x86_64_get_local_sym_hash): Likewise.
1714 (elf_x86_64_link_hash_table_free): Likewise.
1715 (elf_x86_64_copy_indirect_symbol): Likewise.
1716 (elf_x86_64_fixup_symbol): Likewise.
1717 (elf_x86_64_readonly_dynrelocs): Likewise.
1718 (elf_x86_64_always_size_sections): Likewise.
1719 (elf_x86_64_set_tls_module_base): Likewise.
1720 (elf_x86_64_dtpoff_base): Likewise.
1721 (compare_relocs): Likewise.
1722 (elf_x86_64_merge_symbol_attribute): Likewise.
1723 (elf_x86_64_hash_symbol): Likewise.
1724 (elf_x86_64_parse_gnu_properties): Likewise.
1725 (elf_x86_64_merge_gnu_properties): Likewise.
1726 (elf_x86_64_link_check_relocs): Likewise.
1727 (elf_backend_copy_indirect_symbol): Likewise.
1728 (elf_backend_always_size_sections): Likewise.
1729 (bfd_elf64_bfd_link_check_relocs): Likewise.
1730 (elf_backend_merge_symbol_attribute): Likewise.
1731 (elf_backend_hash_symbol): Likewise.
1732 (elf_backend_omit_section_dynsym): Likewise.
1733 (elf_backend_fixup_symbol): Likewise.
1734 (elf_backend_parse_gnu_properties): Likewise.
1735 (elf_backend_merge_gnu_properties): Likewise.
1736 (bfd_elf32_bfd_link_check_relocs): Likewise.
1737 (elf_x86_64_mkobject): Updated.
1738 (elf_x86_64_link_hash_table_create): Likewise.
1739 (elf_x86_64_check_tls_transition): Likewise.
1740 (elf_x86_64_tls_transition): Likewise.
1741 (elf_x86_64_convert_load_reloc): Likewise.
1742 (elf_x86_64_check_relocs): Likewise.
1743 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1744 (elf_x86_64_allocate_dynrelocs): Likewise.
1745 (elf_x86_64_convert_load): Likewise.
1746 (elf_x86_64_size_dynamic_sections): Likewise.
1747 (elf_x86_64_relocate_section): Likewise.
1748 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1749 (elf_x86_64_finish_dynamic_sections): Likewise.
1750 (elf_x86_64_output_arch_local_syms): Likewise.
1751 (elf_x86_64_get_synthetic_symtab): Likewise.
1752 (elf_x86_64_link_setup_gnu_properties): Likewise.
1753 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1754 instead of elf_link_hash_table, as base.
1755 (elf_x86_64_next_tls_desc_index): New.
1756 (elf_x86_64_srelplt2): Likewise.
1757 (elf_x86_64_plt): Likewise.
1758 (elf_x86_64_lazy_plt): Likewise.
1759 (elf_x86_64_non_lazy_plt): Likewise.
1760 * elfxx-x86.c: New file.
1761 * elfxx-x86.h: Likewise.
1763 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1765 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1767 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1769 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1771 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1772 sections before checking dynamic relocations and free invalid
1773 PLT section contents.
1774 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1776 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1778 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1779 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1781 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1784 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1786 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1788 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1790 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1792 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1794 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1797 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1798 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1799 Add a has_no_copy_on_protected bitfield.
1800 (elf_has_no_copy_on_protected): New.
1801 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1802 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1803 (elf_merge_gnu_property_list): Likewise.
1804 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1805 to FALSE for elf_has_no_copy_on_protected.
1806 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1807 (elf_i386_link_hash_entry): Add def_protected.
1808 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1809 when checking info->nocopyreloc.
1810 (elf_i386_link_setup_gnu_properties): Don't set
1811 extern_protected_data here.
1812 (elf_i386_merge_symbol_attribute): New function.
1813 (elf_backend_merge_symbol_attribute): New.
1814 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1815 (elf_x86_64_link_hash_entry): Add def_protected.
1816 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1817 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1818 when checking info->nocopyreloc.
1819 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1820 relocation run-time overflow and unresolvable R_X86_64_32S
1821 relocation against protected data symbol defined in shared object
1822 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1823 (elf_x86_64_link_setup_gnu_properties): Don't set
1824 extern_protected_data here.
1825 (elf_x86_64_merge_symbol_attribute): New function.
1826 (elf_backend_merge_symbol_attribute): New.
1828 2017-08-26 Alan Modra <amodra@gmail.com>
1830 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1831 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1832 (ppc_elf_relocate_section): Comment fix.
1833 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1834 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1835 Support dynamic relocs for TPREL16 when non-pic too.
1836 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1837 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1840 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1842 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1843 "symbol" in comments.
1844 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1846 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1849 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1850 R_X86_64_PC32 relocation run-time overflow and unresolvable
1851 R_X86_64_32S relocation with -z nocopyreloc.
1853 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1855 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1856 Undefined symbols may not have a type.
1857 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1859 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1861 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1862 bfd_link_info. Report shared, PIE or PDE object based on
1864 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1865 (elf_x86_64_relocate_section): Likewise.
1867 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1869 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1870 for function symbols.
1871 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1873 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1875 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1876 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1877 is set on any input relocatable file.
1878 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1880 2017-08-23 Alan Modra <amodra@gmail.com>
1883 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1884 ensure_undefweak_dynamic. Handle undefined too.
1885 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1886 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1887 (allocate_dynrelocs): Discard undefined non-default visibility
1888 relocs first. Make undefined syms dynamic. Tidy goto.
1890 2017-08-21 Alan Modra <amodra@gmail.com>
1891 H.J. Lu <hongjiu.lu@intel.com>
1894 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1895 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1897 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1900 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1901 undefined weak symbols.
1903 2017-08-18 Nick Clifton <nickc@redhat.com>
1906 * tekhex.c (getsym): Fix check for source pointer walking off the
1907 end of the input buffer.
1909 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1912 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1913 relocations in debug sections, change abort to _bfd_error_handler.
1915 2017-08-14 Nick Clifton <nickc@redhat.com>
1918 * elf.c (setup_group): Check for an empty or very small group
1920 * po/bfd.pot: Regenerate.
1922 2017-08-14 Alan Modra <amodra@gmail.com>
1925 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1926 alignment padding here.
1927 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1928 in a reverse pass over sections.
1930 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1933 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1934 for @plt suffixes first.
1935 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1937 2017-08-08 Nick Clifton <nickc@redhat.com>
1940 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1941 small section lengths.
1942 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1944 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1945 there is enough data present in the note.
1947 2017-08-08 Alan Modra <amodra@gmail.com>
1950 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1951 got.refcount for GOTOFF relocs, just create .got section.
1953 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1955 * elflink.c (elf_link_add_object_symbols): Move common symbol
1956 check after bed->common_definition.
1958 2017-08-07 Alan Modra <amodra@gmail.com>
1961 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1962 needed to define various dynamic tags have been discarded.
1964 2017-08-07 Nick Clifton <nickc@redhat.com>
1967 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1968 has not been set then use the bfd returned by
1969 _bfd_elf_link_setup_gnu_properties. If that is null then search
1970 through all the input bfds selecting the first normal, ELF format
1972 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1974 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1976 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1978 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1979 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1980 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1981 (elf_i386_link_check_relocs): New function.
1982 (bfd_elf32_bfd_link_check_relocs): New.
1983 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1985 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1986 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1987 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1988 (elf_x86_64_link_check_relocs): New function.
1989 (bfd_elf64_bfd_link_check_relocs): New.
1990 (bfd_elf32_bfd_link_check_relocs): Likewise.
1992 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1995 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1996 as undefined for --no-define-common.
1998 2017-08-05 Alan Modra <amodra@gmail.com>
2000 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2001 hppa_link_hash_table.
2003 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2005 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2006 entries for sysregs with negative indices.
2008 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2010 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2011 isn't the S/390 specific elf data.
2012 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2014 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2016 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2017 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2018 [R_RISCV_ADD16]: Likewise.
2019 [R_RISCV_ADD32]: Likewise.
2020 [R_RISCV_ADD64]: Likewise.
2021 [R_RISCV_SUB6]: Likewise.
2022 [R_RISCV_SUB8]: Likewise.
2023 [R_RISCV_SUB16]: Likewise.
2024 [R_RISCV_SUB32]: Likewise.
2025 [R_RISCV_SUB64]: Likewise.
2027 2017-07-31 Alan Modra <amodra@gmail.com>
2029 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2030 without ld.so checks.
2032 2017-07-29 Alan Modra <amodra@gmail.com>
2035 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2036 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2037 (is_elfv2_localentry0): Test non_zero_localentry.
2038 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2040 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2042 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2043 pointer check for htab->elf.irelplt.
2044 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2046 2017-07-27 Nick Clifton <nickc@redhat.com>
2049 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2051 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2053 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2055 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2057 (evax_bfd_print_emh): Check for invalid string lengths.
2059 2017-07-25 Nick Clifton <nickc@redhat.com>
2061 * po/fr.po: Updated French translation.
2063 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2066 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2067 16-bit absolute branches into 10-bit pc-relative branches on the
2068 MSP430 as well as the MSP430X.
2070 2017-07-25 Alan Modra <amodra@gmail.com>
2072 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2073 (stub_eh_frame_size): New function.
2074 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2075 (group_sections): Init group tls_get_addr_opt_bctrl.
2076 (ppc64_elf_size_stubs): Update sizing and initialization of
2077 .eh_frame. Iteration over stubs via group list.
2078 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2079 (ppc64_elf_finish_dynamic_sections): Update finalization of
2082 2017-07-24 Nick Clifton <nickc@redhat.com>
2085 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2086 of the relocs to the canonicalize_one_reloc routine.
2087 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2088 for the _bfd_mach_o_canonicalize_one_reloc field.
2089 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2090 res_base parameter. Use to check for corrupt pair relocs.
2091 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2093 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2095 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2098 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2099 enough data in the record before attempting to parse it.
2100 (_bfd_vms_slurp_eeom): Likewise.
2102 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2103 (image_set_ptr): Likewise.
2104 (alpha_vms_slurp_relocs): Likewise.
2106 (alpha_vms_object_p): Check for a truncated record.
2108 2017-07-24 Nick Clifton <nickc@redhat.com>
2111 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2112 an unrecognized reloc and sets the bfd_error value.
2113 * libbfd.h: Regenerate.
2114 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2116 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2117 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2118 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2119 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2120 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2122 2017-07-23 Alan Modra <amodra@gmail.com>
2124 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2127 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2130 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2131 reloc_class_ifunc for ifunc symbols.
2133 2017-07-19 Nick Clifton <nickc@redhat.com>
2136 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2137 correct magic bytes at the start, set the error to wrong format
2138 and clear the format selector before returning NULL.
2140 2017-07-19 Nick Clifton <nickc@redhat.com>
2143 * coff-rs6000.c (_bfd_strntol): New function.
2144 (_bfd_strntoll): New function.
2145 (GET_VALUE_IN_FIELD): New macro.
2146 (EQ_VALUE_IN_FIELD): new macro.
2147 (_bfd_xcoff_slurp_armap): Use new macros.
2148 (_bfd_xcoff_archive_p): Likewise.
2149 (_bfd_xcoff_read_ar_hdr): Likewise.
2150 (_bfd_xcoff_openr_next_archived_file): Likewise.
2151 (_bfd_xcoff_stat_arch_elt): Likewise.
2152 * coff64-rs6000.c (_bfd_strntol): New function.
2153 (_bfd_strntoll): New function.
2154 (GET_VALUE_IN_FIELD): New macro.
2155 (xcoff64_slurp_armap): Use new macros.
2157 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2158 John Eric Martin <John.Martin@emmicro-us.com>
2160 * bfd-in2.h: Regenerate.
2161 * libbfd.h: Regenerate.
2162 * elf32-arc.c (JLI): Define.
2163 * reloc.c: Add JLI relocations.
2165 2017-07-18 Nick Clifton <nickc@redhat.com>
2168 * coff-sh.c: Fix spelling typos.
2169 * compress.c: Likewise.
2170 * cpu-pdp11.c: Likewise.
2171 * ecofflink.c: Likewise.
2172 * elf-m10300.c: Likewise.
2174 * elf32-arm.c: Likewise.
2175 * elf32-m68k.c: Likewise.
2176 * elf32-nds32.c: Likewise.
2177 * elf32-ppc.c: Likewise.
2178 * elf32-sh.c: Likewise.
2179 * elf32-v850.c: Likewise.
2180 * elf64-ppc.c: Likewise.
2181 * elf64-x86-64.c: Likewise.
2182 * elflink.c: Likewise.
2183 * elfnn-aarch64.c: Likewise.
2184 * elfxx-mips.c: Likewise.
2186 * sunos.c: Likewise.
2187 * vms-alpha.c: Likewise.
2188 * xcofflink.c: Likewise.
2190 2017-07-18 Nick Clifton <nickc@redhat.com>
2193 * coffcode.h (handle_COMDAT): Replace abort with an error message
2196 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2199 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2202 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2204 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2206 2017-07-16 Alan Modra <amodra@gmail.com>
2208 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2209 __tls_index GOT entries when using __tls_get_addr_opt stub.
2210 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2212 2017-07-12 Alan Modra <amodra@gmail.com>
2214 * po/es.po: Update from translationproject.org/latest/bfd/.
2215 * po/fi.po: Likewise.
2216 * po/fr.po: Likewise.
2217 * po/id.po: Likewise.
2218 * po/ja.po: Likewise.
2219 * po/ro.po: Likewise.
2220 * po/ru.po: Likewise.
2221 * po/sr.po: Likewise.
2222 * po/sv.po: Likewise.
2223 * po/tr.po: Likewise.
2224 * po/uk.po: Likewise.
2225 * po/vi.po: Likewise.
2226 * po/zh_CN.po: Likewise.
2227 * po/hr.po: New file from translationproject.org.
2228 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2229 * configure: Regenerate.
2231 2017-07-12 Nick Clifton <nickc@redhat.com>
2233 Fix compile time warnings using gcc 7.1.1.
2234 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2236 (elf_xtensa_get_gotplt_section): Increase length of got_name
2238 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2239 default return of FALSE.
2240 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2241 default return of FALSE.
2243 2017-07-12 Alan Modra <amodra@gmail.com>
2245 * binary.c (binary_set_section_contents): Don't print filepos in
2247 (coff_write_object_contents): Cast size_t for error message.
2248 (coff_slurp_line_table): Don't use bfd_vma symndx.
2249 (coff_slurp_reloc_table): Remove unneeded cast.
2250 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2252 (find_abstract_instance_name): Likewise.
2253 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2254 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2255 (elf32_arm_check_relocs): Make r_symndx an int.
2256 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2258 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2260 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2262 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2263 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2264 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2265 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2266 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2267 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2268 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2269 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2270 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2271 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2272 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2273 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2274 and use %lu for error message.
2275 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2276 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2279 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2281 (elf32_arm_final_link_relocate): Likewise.
2282 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2283 * coffcode.h (styp_to_sec_flags): Likewise.
2284 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2285 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2286 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2287 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2288 (elf32_bfin_merge_private_bfd_data): Likewise.
2289 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2290 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2291 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2292 (i370_elf_relocate_section): Likewise.
2293 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2294 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2295 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2296 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2297 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2298 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2299 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2300 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2301 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2302 * ieee.c (ieee_write_id, read_id): Likewise.
2303 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2304 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2305 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2306 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2307 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2308 * stabs.c (_bfd_link_section_stabs): Likewise.
2310 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2312 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2313 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2314 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2315 * coff-sh.c (sh_relax_section): Likewise.
2316 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2317 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2318 * coffcode.h (coff_slurp_reloc_table): Likewise.
2319 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2320 (_bfd_coff_read_string_table): Likewise.
2321 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2322 * compress.c (bfd_get_full_section_contents): Likewise.
2323 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2324 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2325 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2326 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2327 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2328 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2329 (elf32_arm_write_section): Likewise.
2330 * elf32-bfin.c (bfin_relocate_section): Likewise.
2331 (bfinfdpic_relocate_section): Likewise.
2332 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2333 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2334 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2335 (elf_i386_relocate_section): Likewise.
2336 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2337 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2338 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2339 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2340 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2341 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2342 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2343 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2344 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2345 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2346 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2347 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2348 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2349 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2350 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2351 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2352 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2353 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2354 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2355 * elf32-sh.c (sh_elf_relax_section): Likewise.
2356 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2357 (sh_elf_relocate_section): Likewise.
2358 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2359 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2360 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2361 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2362 * elf32-v850.c (v850_elf_relax_section): Likewise.
2363 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2364 (elf_vax_relocate_section): Likewise.
2365 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2366 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2367 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2368 (do_fix_for_relocatable_link): Likewise.
2369 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2370 (elf64_alpha_relax_with_lituse): Likewise.
2371 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2372 (elf_hppa_final_link_relocate): Likewise.
2373 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2374 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2375 (elf64_vms_link_add_object_symbols): Likewise.
2376 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2377 (mmix_final_link_relocate): Likewise.
2378 * elf64-s390.c (invalid_tls_insn): Likewise.
2379 (elf_s390_relocate_section): Likewise.
2380 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2381 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2382 (elf_x86_64_relocate_section): Likewise.
2383 * elfcode.h (elf_slurp_symbol_table): Likewise.
2384 * elfcore.h (elf_core_file_p): Likewise.
2385 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2386 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2387 (elfNN_aarch64_relocate_section): Likewise.
2388 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2389 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2390 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2391 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2392 (_bfd_mips_elf_relocate_section): Likewise.
2393 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2394 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2395 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2396 * ieee.c (ieee_slurp_external_symbols): Likewise.
2397 * ihex.c (ihex_write_object_content): Likewise.
2398 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2399 * merge.c (_bfd_merged_section_offset): Likewise.
2400 * mmo.c (mmo_write_loc_chunk): Likewise.
2401 (mmo_write_object_contents): Likewise.
2402 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2403 * stabs.c (_bfd_link_section_stabs): Likewise.
2404 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2406 2017-07-11 Alan Modra <amodra@gmail.com>
2408 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2410 2017-07-11 Alan Modra <amodra@gmail.com>
2412 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2413 instruction" error using _bfd_error_handler, not einfo.
2415 2017-07-10 Nick Clifton <nickc@redhat.com>
2417 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2418 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2420 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2422 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2424 2017-07-07 Alan Modra <amodra@gmail.com>
2426 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2428 2017-07-07 Alan Modra <amodra@gmail.com>
2430 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2431 as long long. Move code replacing "ll" with "I64", and simplify.
2433 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2435 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2438 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2440 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2442 (line_info_add_file_name): Likewise.
2443 (decode_line_info): Likewise.
2445 2017-07-04 Tristan Gingold <gingold@adacore.com>
2447 * version.m4: Bump version to 2.29.51
2448 * configure: Regenerate.
2450 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2452 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2453 sanity check at the head of this function.
2455 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2457 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2458 dwarf_line_str_size.
2459 (struct attr_abbrev): Add field implicit_const.
2460 (dwarf_debug_sections): Add .debug_line_str.
2461 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2462 (dwarf_debug_section_assert): Add static assertion.
2463 (read_indirect_line_string): New.
2464 (read_abbrevs): Support DW_FORM_implicit_const.
2465 (is_str_attr): Support DW_FORM_line_strp.
2466 (read_attribute_value): Support DW_FORM_line_strp and
2467 DW_FORM_implicit_const.
2468 (read_attribute): Support DW_FORM_implicit_const.
2469 (line_info_add_include_dir, line_info_add_include_dir_stub):
2470 (line_info_add_file_name, read_formatted_entries): New.
2471 (decode_line_info, parse_comp_unit): Support DWARF 5.
2472 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2474 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2476 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2477 abort statement that was put for symbols that are not dynamic.
2479 2017-07-03 Tristan Gingold <gingold@adacore.com>
2481 * po/bfd.pot: Regenerate
2483 2017-07-03 Alan Modra <amodra@gmail.com>
2485 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2486 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2487 * elf.c (setup_group): Use "Lx" to print sh_size.
2488 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2489 unknown section type in hex.
2490 (copy_special_section_fields): Style fix.
2491 (bfd_section_from_shdr): Correct format for sh_link. Use a
2492 common error message for all the variants of unrecognized
2494 (assign_file_positions_for_load_sections): Use "Lx" for lma
2495 adjust error message.
2496 (assign_file_positions_for_non_load_sections): Formatting.
2497 (rewrite_elf_program_header): Formatting. Use "Lx" for
2498 bfd_vma values in error messages.
2499 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2500 ELF_R_SYM value to type expected by format.
2501 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2503 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2504 (elf_link_input_bfd): Use "Lx" for r_info.
2505 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2507 2017-07-03 Alan Modra <amodra@gmail.com>
2509 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2510 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2511 Microsoft C library variant of long long format specifier.
2512 (PRINT20): Cast value to bfd_uint64_t not long long.
2513 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2514 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2515 long long. Don't cast to bfd_vma.
2516 * elf32-score.c (score3_bfd_getl48): Likewise.
2517 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2519 2017-07-03 Alan Modra <amodra@gmail.com>
2521 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2523 (bfd_elf_print_symbol): Don't cast symbol->flags.
2524 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2525 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2526 _bfd_error_handler argument order.
2527 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2529 2017-07-03 Alan Modra <amodra@gmail.com>
2531 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2532 AC_TYPE_LONG_DOUBLE.
2533 * configure: Regenerate.
2534 * config.in: Regenerate.
2536 2017-06-29 Andrew Waterman <andrew@sifive.com>
2538 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2541 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2543 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2544 unless it is undefined weak.
2545 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2546 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2548 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2549 is not dynamic in PIC, abort.
2551 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2554 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2555 undefined weak symbols into dynamic.
2556 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2557 relocation for non-dynamic symbols.
2558 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2560 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2562 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2563 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2564 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2565 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2566 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2569 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2571 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2572 (elfcore_write_s390_gs_bc): Likewise.
2573 * elf.c (elfcore_grok_s390_gs_cb): New function.
2574 (elfcore_grok_s390_gs_bc): New function.
2575 (elfcore_grok_note): Call them.
2576 (elfcore_write_s390_gs_cb): New function.
2577 (elfcore_write_s390_gs_bc): New function.
2578 (elfcore_write_register_note): Call them.
2580 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2582 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2583 bfd_get_file_size. Check archive element size.
2584 (_bfd_generic_get_section_contents_in_window): Likewise.
2586 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2588 * bfd-in2.h: Regenerated.
2589 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2590 (bfd_get_file_size): Likewise.
2592 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2593 Matthew Fortune <matthew.fortune@imgtec.com>
2595 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2596 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2597 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2598 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2600 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2601 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2602 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2603 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2604 `bfd_mach_mips_interaptiv_mr2' entries.
2605 * bfd-in2.h: Regenerate.
2607 2017-06-27 Nick Clifton <nickc@redhat.com>
2609 * tekhex.c (pass_over): Revert accidental conversion of a local
2610 array to a static array.
2612 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2615 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2616 reloc addend if necessary. Adjust diff only if
2617 shrinked_insn_address < end_address.
2619 2017-06-27 Alan Modra <amodra@gmail.com>
2622 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2623 (_bfd_generic_get_section_contents_in_window): Likewise.
2625 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2627 * elfnn-riscv.c (perform_relocation): Support the new
2628 R_RISCV_32_PCREL relocation.
2629 (riscv_elf_relocate_section): Likewise.
2630 * elfxx-riscv.c (howto_table): Likewise.
2631 (riscv_reloc_map): Likewise.
2632 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2633 * libbfd.h: Regenerate.
2635 2017-06-27 Alan Modra <amodra@gmail.com>
2638 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2639 Use unsigned file pointer type, and remove cast.
2640 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2641 Add "count", not "sz".
2643 2017-06-26 Pedro Alves <palves@redhat.com>
2646 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2649 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2652 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2655 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2657 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2658 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2659 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2660 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2661 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2663 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2666 * compress.c (bfd_get_full_section_contents): Don't check the
2668 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2669 reject a section whose size + offset is greater than the size
2671 (_bfd_generic_get_section_contents_in_window): Likewise.
2673 2017-06-26 Nick Clifton <nickc@redhat.com>
2676 * tekhex.c (getvalue): Check for the source pointer exceeding the
2677 end pointer before the first byte is read.
2679 2017-06-26 Nick Clifton <nickc@redhat.com>
2682 * opncls.c (get_build_id): Check that the section is big enough
2683 to contain the whole note.
2684 * compress.c (bfd_get_full_section_contents): Check for and reject
2685 a section whose size is greater than the size of the entire file.
2686 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2687 contain a notes section.
2689 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2691 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2693 (elf_s390_modify_segment_map): Likewise.
2694 (bfd_elf_s390_set_options): Lisewise.
2696 2017-06-26 Alan Modra <amodra@gmail.com>
2698 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2700 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2701 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2702 .preinit_array on --just-syms bfds.
2703 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2704 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2705 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2707 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2709 * elf.c (find_link): Bounds check "hint".
2711 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2713 * elf32-arm.c (using_thumb_only): Update list of architectures in
2714 BFD_ASSERT for which the logic is valid.
2715 (using_thumb2_bl): Likewise.
2716 (using_thumb2): Likewise and return true for ARMv8-R.
2717 (arch_has_arm_nop): Likewise.
2718 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2719 merging logic. Update commentis for value 15 of v8m_baseline,
2720 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2721 merging of value 15 of Tag_CPU_arch.
2723 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2725 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2726 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2727 * bfd-in2.h: Regenerate.
2729 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2731 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2732 the error_alignment label forward. Properly align program
2733 property note section.
2735 2017-06-22 Eric Christopher <echristo@gmail.com>
2737 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2738 abs to fix a truncation warning.
2740 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2742 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2743 local undefined weak symbol to 0.
2744 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2746 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2748 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2749 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2750 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2751 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2752 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2753 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2754 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2755 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2757 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2759 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2760 (elf_i386_lazy_ibt_plt_entry): Likewise.
2761 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2762 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2763 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2764 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2765 (elf_i386_lazy_plt_layout): Likewise.
2766 (elf_i386_non_lazy_plt_layout): Likewise.
2767 (elf_i386_link_hash_entry): Add plt_second.
2768 (elf_i386_link_hash_table): Add plt_second and
2769 plt_second_eh_frame.
2770 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2771 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2772 the second PLT. Check the second PLT.
2773 (elf_i386_relocate_section): Use the second PLT to resolve
2774 PLT reference if needed.
2775 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2777 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2778 second PLT. Generate unwind info for the second PLT.
2779 (elf_i386_plt_type): Add plt_second.
2780 (elf_i386_get_synthetic_symtab): Support the second PLT.
2781 (elf_i386_parse_gnu_properties): Support
2782 GNU_PROPERTY_X86_FEATURE_1_AND.
2783 (elf_i386_merge_gnu_properties): Support
2784 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2785 on GNU_PROPERTY_X86_FEATURE_1_IBT
2786 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2787 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2788 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2789 is set on all relocatable inputs.
2790 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2791 (elf_x32_lazy_ibt_plt_entry): Likewise.
2792 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2793 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2794 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2795 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2796 (elf_x86_64_lazy_ibt_plt): Likewise.
2797 (elf_x32_lazy_ibt_plt): Likewise.
2798 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2799 (elf_x32_non_lazy_ibt_plt): Likewise.
2800 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2801 (elf_x86_64_parse_gnu_properties): Support
2802 GNU_PROPERTY_X86_FEATURE_1_AND.
2803 (elf_x86_64_merge_gnu_properties): Support
2804 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2805 on GNU_PROPERTY_X86_FEATURE_1_IBT
2806 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2807 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2808 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2809 is set on all relocatable inputs.
2811 2017-06-22 Nick Clifton <nickc@redhat.com>
2814 * som.c (setup_sections): NUL terminate the space_strings buffer.
2815 Check that the space.name field does not index beyond the end of
2816 the space_strings buffer.
2818 2017-06-21 Nick Clifton <nickc@redhat.com>
2821 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2823 2017-06-21 Nick Clifton <nickc@redhat.com>
2826 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2827 type of the size parameter.
2828 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2829 length of the counted string.
2830 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2831 (_bfd_vms_save_counted_string): Likewise.
2832 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2833 _bfd_vms_save_counted_string.
2834 (_bfd_vms_slurp_ehdr): Likewise.
2835 (_bfd_vms_slurp_egsd): Likewise.
2836 (Parse_module): Likewise.
2838 2017-06-21 Alan Modra <amodra@gmail.com>
2840 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2841 calls before tocsave calls.
2842 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2845 2017-06-21 Nick Clifton <nickc@redhat.com>
2848 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2849 bfd_get_full_section_contents returns no contents.
2851 2017-06-21 Nick Clifton <nickc@redhat.com>
2854 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2857 2017-06-21 Nick Clifton <nickc@redhat.com>
2860 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2862 (image_set_ptr): Likewise.
2863 (alpha_vms_fix_sec_rel): Likewise.
2864 (alpha_vms_slurp_relocs): Likewise.
2866 2017-06-21 Nick Clifton <nickc@redhat.com>
2869 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2871 (ieee_archive_p): Likewise.
2872 (ieee_object_p): Likewise.
2874 2017-06-21 Nick Clifton <nickc@redhat.com>
2877 * elf.c (setup_group): Zero the group section pointer list after
2878 allocation so that loops can be caught. Check for NULL pointers
2879 when processing a group list.
2881 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2883 * elf-s390.h: New file.
2884 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2886 (elf_s390_additional_program_headers): New function.
2887 (elf_s390_modify_segment_map): New function.
2888 (bfd_elf_s390_set_options): New function.
2889 (elf_backend_additional_program_headers)
2890 (elf_backend_modify_segment_map): Add macro definitions.
2892 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2895 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2896 the DYNAMIC bit instead of bfd_count_sections.
2898 2017-06-19 Nick Clifton <nickc@redhat.com>
2901 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2903 (evax_bfd_print_eeom): Likewise.
2904 (evax_bfd_print_egsd): Check for an overlarge record length.
2905 (evax_bfd_print_etir): Likewise.
2907 2017-06-19 Nick Clifton <nickc@redhat.com>
2910 * libieee.h (struct common_header_type): Add end_p field.
2911 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2913 (read_id): Check for a length that exceeds the remaining bytes in
2915 (ieee_seek): Initialise end_p.
2916 (ieee_archive_p): Likewise.
2917 (ieee_object_p): Likewise.
2919 2017-06-19 Nick Clifton <nickc@redhat.com>
2922 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2923 before reading the EIHS structure entries.
2925 2017-06-19 Nick Clifton <nickc@redhat.com>
2928 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2929 gsd_size. Check that there are enough bytes remaining to read the
2930 type and size of the next egsd. Check that the size of the egsd
2931 does not exceed the size of the record.
2933 2017-06-19 Alan Modra <amodra@gmail.com>
2935 * config.bfd: Correct targ_underscore for cris.
2937 2017-06-18 Alan Modra <amodra@gmail.com>
2939 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2940 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2942 2017-06-16 Nick Clifton <nickc@redhat.com>
2944 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2945 bucketlist is empty because there are no symbols to add to the
2948 2017-06-16 Alan Modra <amodra@gmail.com>
2954 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2955 (BFD_JUMP_TABLE_LINK): Likewise.
2956 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2957 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2958 (bfd_elf_define_start_stop): New function.
2959 * linker.c (bfd_generic_define_start_stop): New function.
2960 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2962 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2963 * aout-target.h (MY_bfd_define_start_stop): Define.
2964 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2965 * binary.c (binary_bfd_define_start_stop): Define.
2966 * bout.c (b_out_bfd_define_start_stop): Define.
2967 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2968 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2969 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2970 * coffcode.h (coff_bfd_define_start_stop): Define.
2971 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2972 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2973 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2974 * ieee.c (ieee_bfd_define_start_stop): Define.
2975 * ihex.c (ihex_bfd_define_start_stop): Define.
2976 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2977 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2978 * mmo.c (mmo_bfd_define_start_stop): Define.
2979 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2980 * oasys.c (oasys_bfd_define_start_stop): Define.
2981 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2982 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2983 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2984 * som.c (som_bfd_define_start_stop): Define.
2985 * srec.c (srec_bfd_define_start_stop): Define.
2986 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2987 * versados.c (versados_bfd_define_start_stop): Define.
2988 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2989 (alpha_vms_bfd_define_start_stop): Define.
2990 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2991 * bfd-in2.h: Regenerate.
2992 * libbfd.h: Regenerate.
2994 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2996 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2997 SYMBOL_REFERENCES_LOCAL.
2999 2017-06-15 Jiong Wang <jiong.wang@arm.com>
3002 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3003 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3004 runtime for if there needs copy relocation elimination.
3005 (need_copy_relocation_p): New function. Return true for symbol with
3006 pc-relative references and if it's against read-only sections.
3007 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3008 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3009 that are related with accessing external objects.
3010 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3011 in elfNN_aarch64_check_relocs.
3013 2017-06-15 Nick Clifton <nickc@redhat.com>
3016 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3019 (ieee_archive_p): Likewise.
3021 2017-06-15 Nick Clifton <nickc@redhat.com>
3024 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3026 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3028 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3029 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3030 keep both windowed and call0 ABI PLT definitions.
3031 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3032 elf_xtensa_*_plt_entry endex.
3033 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3035 2017-06-14 Nick Clifton <nickc@redhat.com>
3038 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3041 2017-06-14 Nick Clifton <nickc@redhat.com>
3044 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3045 maximum value for the ascic pointer. Check that name processing
3046 does not read beyond this value.
3047 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3050 2017-06-14 Nick Clifton <nickc@redhat.com>
3053 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3054 (process_otr): Check for an invalid offset in the otr structure.
3056 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3058 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3060 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3066 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3067 vtable field to a union.
3068 (_bfd_elf_is_start_stop): Removed.
3069 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3070 __start_SECNAME and __stop_SECNAME symbols.
3071 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3072 * elflink.c (_bfd_elf_is_start_stop): Removed.
3073 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3074 _bfd_elf_is_start_stop.
3075 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3076 __stop_SECNAME symbols. Updated.
3077 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3078 (bfd_elf_gc_record_vtinherit): Likewise.
3079 (bfd_elf_gc_record_vtentry): Likewise.
3081 2017-06-13 Nick Clifton <nickc@redhat.com>
3084 * elflink.c (elf_link_adjust_relocs): Generate an error when
3085 encountering a reloc against a symbol removed by garbage
3088 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3090 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3091 to merge_gnu_properties.
3092 * elf-properties.c (elf_merge_gnu_properties): Add struct
3093 bfd_link_info * and pass it to merge_gnu_properties.
3094 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3095 and pass it to elf_merge_gnu_properties.
3096 (_bfd_elf_link_setup_gnu_properties): Pass info to
3097 elf_merge_gnu_property_list.
3098 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3100 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3102 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3105 * binary.c (binary_set_section_contents): Scale lma by octets
3106 per byte to set filepos.
3108 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3110 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3113 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3115 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3118 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3120 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3121 patched section contents for TLS IE reloc.
3122 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3124 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3126 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3127 RELOC_FOR_GLOBAL_SYMBOL macro.
3129 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3131 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3134 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3136 * config/tc-arc.c (md_undefined_symbol): Changed.
3137 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3139 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3141 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3144 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3146 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3147 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3149 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3151 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3154 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3156 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3157 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3158 is non-zero. Add clarifying comments.
3160 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3162 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3163 name. Use local IFUNC symbol name string to report unsupported
3164 non-PIC call to IFUNC function.
3165 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3166 when generating R_386_IRELATIVE relocation.
3167 (elf_i386_finish_dynamic_symbol): Likewise.
3168 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3170 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3171 when generating R_X86_64_IRELATIVE relocation.
3172 (elf_x86_64_finish_dynamic_symbol): Likewise.
3174 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3176 * elf.c (setup_group): Make sure BFD sections are created for all
3177 group sections in the input file when processing SHF_GROUP
3179 (bfd_section_from_shdr): Avoid duplicating logic already
3180 implemented in `setup_group'.
3182 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3185 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3186 if the hint address is zero.
3188 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3191 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3192 ELF_COMMON_DEF_P for common symbols.
3194 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3196 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3197 SEC_GROUP sections as SEC_EXCLUDE.
3198 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3199 (assign_section_numbers): Use resolve_section_groups flag instead
3200 of relocatable link type.
3201 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3202 flag instead of checking the final_link flag for part of the
3203 checks in here. Fix white space as a result.
3204 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3205 instead of relocatable link type.
3206 (bfd_elf_final_link): Likewise.
3208 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3210 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3212 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3213 (s3_bfd_score_elf_check_relocs): Likewise.
3214 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3215 (score_elf_final_link_relocate): Likewise.
3216 (s7_bfd_score_elf_check_relocs): Likewise.
3218 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3220 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3223 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3225 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3226 from `reloc_count' rather than decrementing it.
3227 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3228 `reloc_count' by `int_rels_per_ext_rel'.
3229 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3230 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3231 entry determination.
3232 (s3_bfd_score_elf_check_relocs): Likewise.
3233 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3234 (s7_bfd_score_elf_relocate_section): Likewise.
3235 (s7_bfd_score_elf_check_relocs): Likewise.
3236 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3237 prototype and function.
3238 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3239 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3240 triple rather than once the sum of REL and RELA relocation entry
3242 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3243 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3244 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3245 storage allocation size determination.
3246 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3247 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3248 by `int_rels_per_ext_rel' for last relocation entry
3250 (bfd_elf_final_link): Do not multiply `reloc_count' by
3251 `int_rels_per_ext_rel' for internal relocation storage
3252 allocation size determination.
3253 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3254 `int_rels_per_ext_rel' for last relocation entry determination.
3255 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3256 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3257 (_bfd_mips_elf_relocate_section): Likewise.
3259 2017-06-05 Alan Modra <amodra@gmail.com>
3262 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3264 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3266 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3267 determine structure sizes.
3268 (elfcore_grok_freebsd_prstatus): Likewise.
3270 2017-06-01 Alan Modra <amodra@gmail.com>
3272 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3273 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3275 (is_elfv2_localentry0): New function.
3276 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3277 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3278 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3279 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3280 optimized localentry:0 stubs.
3281 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3282 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3284 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3286 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3288 2017-05-30 Casey Smith <clegg89@gmail.com>
3291 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3292 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3294 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3296 * cpu-arc.c (arc_compatible): New function.
3298 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3300 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3302 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3305 * bfdio.c (bfd_get_file_size): New function.
3306 * bfd-in2.h: Regenerated.
3308 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3310 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3313 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3315 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3316 dynobj instead of htab->elf.dynobj.
3318 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3320 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3322 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3323 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3324 actual number of internal relocations retrieved. Adjust
3325 function description.
3326 (bfd_elf64_canonicalize_reloc): Remove macro.
3327 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3329 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3331 * archures.c (bfd_mach_sparc_v9m8): Define.
3332 (bfd_mach_sparc_v8plusm8): Likewise.
3333 (bfd_mach_sparc_v9_p): Adjust to M8.
3334 (bfd_mach_sparc_64bit_p): Likewise.
3335 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3336 bfd_mach_sparc_v8plusm8.
3337 * bfd-in2.h: Regenerated.
3338 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3340 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3341 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3342 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3344 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3345 bfd_mach_sparc_v8plusm8.
3347 2017-05-19 Alan Modra <amodra@gmail.com>
3349 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3350 debug and special sections when no non-note alloc sections in an
3353 2017-05-18 Alan Modra <amodra@gmail.com>
3355 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3356 * elf-m10300.c: Likewise.
3358 * elf32-arc.c: Likewise.
3359 * elf32-bfin.c: Likewise.
3360 * elf32-m68k.c: Likewise.
3361 * elf32-nds32.c: Likewise.
3362 * elf32-tilepro.c: Likewise.
3363 * elflink.c: Likewise.
3364 * elfnn-aarch64.c: Likewise.
3365 * elfnn-riscv.c: Likewise.
3366 * elfxx-tilegx.c: Likewise.
3367 * mach-o.c: Likewise.
3368 * peXXigen.c: Likewise.
3369 * vms-alpha.c: Likewise.
3370 * vms-lib.c: Likewise.
3372 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3375 * elflink.c (elf_gc_mark_debug_section): New function.
3376 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3377 referenced by kept debug sections.
3379 2017-05-16 Alan Modra <amodra@gmail.com>
3381 * elf-m10300.c: Rename occurrences of non_ir_ref.
3382 * elf32-arm.c: Likewise.
3383 * elf32-bfin.c: Likewise.
3384 * elf32-cr16.c: Likewise.
3385 * elf32-cris.c: Likewise.
3386 * elf32-d10v.c: Likewise.
3387 * elf32-dlx.c: Likewise.
3388 * elf32-fr30.c: Likewise.
3389 * elf32-frv.c: Likewise.
3390 * elf32-hppa.c: Likewise.
3391 * elf32-i370.c: Likewise.
3392 * elf32-i386.c: Likewise.
3393 * elf32-iq2000.c: Likewise.
3394 * elf32-lm32.c: Likewise.
3395 * elf32-m32c.c: Likewise.
3396 * elf32-m32r.c: Likewise.
3397 * elf32-m68hc1x.c: Likewise.
3398 * elf32-m68k.c: Likewise.
3399 * elf32-mcore.c: Likewise.
3400 * elf32-metag.c: Likewise.
3401 * elf32-microblaze.c: Likewise.
3402 * elf32-moxie.c: Likewise.
3403 * elf32-msp430.c: Likewise.
3404 * elf32-mt.c: Likewise.
3405 * elf32-nios2.c: Likewise.
3406 * elf32-or1k.c: Likewise.
3407 * elf32-ppc.c: Likewise.
3408 * elf32-rl78.c: Likewise.
3409 * elf32-s390.c: Likewise.
3410 * elf32-score.c: Likewise.
3411 * elf32-score7.c: Likewise.
3412 * elf32-sh.c: Likewise.
3413 * elf32-tic6x.c: Likewise.
3414 * elf32-tilepro.c: Likewise.
3415 * elf32-v850.c: Likewise.
3416 * elf32-vax.c: Likewise.
3417 * elf32-xstormy16.c: Likewise.
3418 * elf32-xtensa.c: Likewise.
3419 * elf64-alpha.c: Likewise.
3420 * elf64-hppa.c: Likewise.
3421 * elf64-ia64-vms.c: Likewise.
3422 * elf64-mmix.c: Likewise.
3423 * elf64-ppc.c: Likewise.
3424 * elf64-s390.c: Likewise.
3425 * elf64-sh64.c: Likewise.
3426 * elf64-x86-64.c: Likewise.
3427 * elflink.c: Likewise.
3428 * elfnn-aarch64.c: Likewise.
3429 * elfnn-ia64.c: Likewise.
3430 * elfnn-riscv.c: Likewise.
3431 * elfxx-mips.c: Likewise.
3432 * elfxx-sparc.c: Likewise.
3433 * elfxx-tilegx.c: Likewise.
3434 * linker.c: Likewise.
3436 2017-05-16 Alan Modra <amodra@gmail.com>
3438 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3439 * elflink.c (elf_link_add_object_symbols): Update to use
3441 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3443 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3445 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3447 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3449 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3451 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3452 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3454 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3456 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3458 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3460 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3461 to plt_second/plt_second_eh_frame.
3462 (elf_x86_64_link_hash_newfunc): Updated.
3463 (elf_x86_64_allocate_dynrelocs): Likewise.
3464 (elf_x86_64_size_dynamic_sections): Likewise.
3465 (elf_x86_64_relocate_section): Likewise.
3466 (elf_x86_64_finish_dynamic_symbol): Likewise.
3467 (elf_x86_64_finish_dynamic_sections): Likewise.
3468 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3469 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3471 (elf_backend_setup_gnu_properties): Updated. Create the
3472 .plt.sec section instead of the .plt.sec section.
3474 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3476 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3477 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3478 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3480 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3482 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3483 (bfd_elf64_set_reloc): Define.
3484 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3486 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3488 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3489 (struct bfd_target): New field _bfd_set_reloc.
3490 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3491 * reloc.c (_bfd_generic_set_reloc): New function.
3492 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3493 * nlm-target.h (nlm_set_reloc): Likewise.
3494 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3495 * aout-tic30.c (MY_set_reloc): Likewise.
3496 * aout-target.h (MY_set_reloc): Likewise.
3497 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3498 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3499 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3500 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3501 * aout-adobe.c (aout_32_set_reloc): Likewise.
3502 * bout.c (b_out_set_reloc): Likewise.
3503 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3504 * i386os9k.c (aout_32_set_reloc): Likewise.
3505 * ieee.c (ieee_set_reloc): Likewise.
3506 * oasys.c (oasys_set_reloc): Likewise.
3507 * som.c (som_set_reloc): Likewise.
3508 * versados.c (versados_set_reloc): Likewise.
3509 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3510 _bfd_generic_set_reloc.
3511 (rs6000_xcoff64_aix_vec): LIkewise.
3512 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3513 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3514 * i386msdos.c (msdos_set_reloc): Define to
3515 _bfd_norelocs_set_reloc.
3516 * elfcode.h (elf_set_reloc): Define.
3517 * bfd-in2.h: Regenerated.
3519 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3522 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3523 for IFUNC function address.
3525 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3527 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3528 (CONFLICT_LIST): Likewise.
3529 (opcode/arc-attrs.h): Include.
3530 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3531 (arc_extract_features): New file.
3532 (arc_stralloc): Likewise.
3533 (arc_elf_merge_attributes): Likewise.
3534 (arc_elf_merge_private_bfd_data): Use object attributes.
3535 (bfd_arc_get_mach_from_attributes): New function.
3536 (arc_elf_object_p): Use object attributes.
3537 (arc_elf_final_write_processing): Likewise.
3538 (elf32_arc_obj_attrs_arg_type): New function.
3539 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3540 (elf32_arc_section_from_shdr): Likewise.
3541 (elf_backend_obj_attrs_vendor): Define.
3542 (elf_backend_obj_attrs_section): Likewise.
3543 (elf_backend_obj_attrs_arg_type): Likewise.
3544 (elf_backend_obj_attrs_section_type): Likewise.
3545 (elf_backend_obj_attrs_handle_unknown): Likewise.
3546 (elf_backend_section_from_shdr): Likewise.
3548 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3551 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3552 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3553 and the destination is a Thumb symbol.
3555 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3557 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3558 initializer to silence GCC 4.2.
3559 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3561 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3563 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3564 (LAZY_PLT_ENTRY_SIZE): This.
3565 (NON_LAZY_PLT_ENTRY_SIZE): New.
3566 (elf_x86_64_plt0_entry): Renamed to ...
3567 (elf_x86_64_lazy_plt0_entry): This.
3568 (elf_x86_64_plt_entry): Renamed to ...
3569 (elf_x86_64_lazy_plt_entry): This.
3570 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3571 (elf_x86_64_lazy_bnd_plt0_entry): This.
3572 (elf_x86_64_legacy_plt_entry): Removed.
3573 (elf_x86_64_bnd_plt_entry): Renamed to ...
3574 (elf_x86_64_lazy_bnd_plt_entry): This.
3575 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3576 (elf_x86_64_non_lazy_plt_entry): This.
3577 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3578 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3579 (elf_x86_64_eh_frame_plt): Renamed to ...
3580 (elf_x86_64_eh_frame_lazy_plt): This.
3581 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3582 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3583 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3584 (elf_x86_64_eh_frame_non_lazy_plt): This.
3585 (elf_x86_64_lazy_plt_layout): New.
3586 (elf_x86_64_non_lazy_plt_layout): Likewise.
3587 (elf_x86_64_plt_layout): Likewise.
3588 (elf_x86_64_backend_data): Remove PLT layout information. Add
3589 os for target system.
3590 (GET_PLT_ENTRY_SIZE): Removed.
3591 (elf_x86_64_lazy_plt): New.
3592 (elf_x86_64_non_lazy_plt): Likewise.
3593 (elf_x86_64_lazy_bnd_plt): Likewise.
3594 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3595 (elf_x86-64_arch_bed): Updated.
3596 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3597 (elf_x86_64_create_dynamic_sections): Removed.
3598 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3599 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3600 (elf_x86-64_adjust_dynamic_symbol): Updated.
3601 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3602 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3603 size for PLT0 if there is no PLT0. Get plt_entry_size from
3604 non_lazy_plt for non-lazy PLT entries.
3605 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3606 from non_lazy_plt for non-lazy PLT entries.
3607 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3608 if there is no PLT0.
3609 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3610 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3611 entries with non-lazy PLT layout. Don't fill the second and third
3612 slots in the PLT entry if there is no PLT0.
3613 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3614 if there is no PLT0. Set sh_entsize on the .plt.got section.
3615 (compare_relocs): New.
3616 (elf_x86_64_plt_type): Likewise.
3617 (elf_x86_64_plt): Likewise.
3618 (elf_x86_64_nacl_plt): New. Forward declaration.
3619 (elf_x86_64_get_plt_sym_val): Removed.
3620 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3621 against all dynamic relocations.
3622 (elf_x86_64_link_setup_gnu_properties): New function.
3623 (elf_backend_create_dynamic_sections): Updated.
3624 (elf_backend_setup_gnu_properties): New.
3625 (elf_x86_64_nacl_plt): New.
3626 (elf_x86_64_nacl_arch_bed): Updated.
3628 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3630 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3631 (LAZY_PLT_ENTRY_SIZE): This.
3632 (NON_LAZY_PLT_ENTRY_SIZE): New.
3633 (elf_i386_plt0_entry): Renamed to ...
3634 (elf_i386_lazy_plt0_entry): This.
3635 (elf_i386_plt_entry): Renamed to ...
3636 (elf_i386_lazy_plt_entry): This.
3637 (elf_i386_pic_plt0_entry): Renamed to ...
3638 (elf_i386_pic_lazy_plt0_entry): This.
3639 (elf_i386_pic_plt_entry): Renamed to ...
3640 (elf_i386_pic_lazy_plt_entry): This.
3641 (elf_i386_got_plt_entry): Renamed to ...
3642 (elf_i386_non_lazy_plt_entry): This.
3643 (elf_i386_pic_got_plt_entry): Renamed to ...
3644 (elf_i386_pic_non_lazy_plt_entry): This.
3645 (elf_i386_eh_frame_plt): Renamed to ...
3646 (elf_i386_eh_frame_lazy_plt): This.
3647 (elf_i386_eh_frame_plt_got): Renamed to ...
3648 (elf_i386_eh_frame_non_lazy_plt): This.
3649 (elf_i386_plt_layout): Renamed to ...
3650 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3651 eh_frame_plt_got_size.
3652 (elf_i386_non_lazy_plt_layout): New.
3653 (elf_i386_plt_layout): Likewise.
3654 (elf_i386_non_lazy_plt): Likewise.
3655 (GET_PLT_ENTRY_SIZE): Removed.
3656 (elf_i386_plt): Renamed to ...
3657 (elf_i386_lazy_plt): This.
3658 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3659 (elf_i386_arch_bed): Updated.
3660 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3661 (elf_i386_create_dynamic_sections): Removed.
3662 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3663 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3664 (elf_i386_adjust_dynamic_symbol): Updated.
3665 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3666 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3667 size for PLT0 if there is no PLT0.
3668 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3669 output section is discarded only if GOT isn't empty.
3670 (elf_i386_relocate_section): Updated. Properly get PLT index
3671 if there is no PLT0.
3672 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3673 second and third slots in the PLT entry if there is no PLT0.
3674 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3675 if there is no PLT0. Set sh_entsize on the .plt.got section.
3676 (elf_i386_nacl_plt): Forward declaration.
3677 (elf_i386_get_plt_sym_val): Removed.
3678 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3679 against all dynamic relocations.
3680 (elf_i386_link_setup_gnu_properties): New function.
3681 (elf_backend_create_dynamic_sections): Updated.
3682 (elf_backend_setup_gnu_properties): New.
3683 (elf_i386_nacl_plt): Updated.
3684 (elf_i386_nacl_arch_bed): Likewise.
3685 (elf_i386_vxworks_arch_bed): Likewise.
3687 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3689 * elflink.c (elf_output_implib): Remove executable flag from import
3691 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3692 library is a relocatable object file.
3694 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3697 * elf32-avr.c (avr_should_move_sym): New function.
3698 (avr_should_reduce_sym_size): Likewise.
3699 (avr_should_increase_sym_size): Likewise.
3700 (elf32_avr_relax_delete_bytes): Adjust symbol values
3701 and sizes by calling new functions.
3703 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3705 * config.bfd (riscv32-*): Enable rv64.
3707 2017-05-02 Alan Modra <amodra@gmail.com>
3710 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3711 rather than h->root.type == bfd_link_hash_new.
3712 (bfd_elf_record_link_assignment): Similarly, call
3713 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3715 2017-04-29 Alan Modra <amodra@gmail.com>
3718 * reloc.c (reloc_offset_in_range): New function.
3719 (bfd_perform_relocation, bfd_install_relocation): Use it.
3720 (_bfd_final_link_relocate): Likewise.
3722 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3724 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3725 before using .plt.got.
3726 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3728 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3730 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3731 instead of "+=" to update 0.
3733 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3735 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3736 .plt.got section here.
3737 (elf_i386_check_relocs): Don't create the .plt.got section.
3738 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3739 the .plt.got and .plt.bnd sections here.
3740 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3743 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3745 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3747 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3748 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3749 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3750 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3753 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3755 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3757 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3758 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3759 the first relocatable ELF input with GNU properties.
3761 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3763 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3764 VxWorks for non-PIC.
3766 2017-04-27 Alan Modra <amodra@gmail.com>
3768 * elf-bfd.h (struct elf_backend_data): Make asection param of
3769 elf_backend_eh_frame_address_size const.
3770 (_bfd_elf_eh_frame_address_size): Likewise.
3771 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3772 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3773 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3774 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3775 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3776 (next_cie_fde_offset): Constify params.
3777 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3779 2017-04-27 Alan Modra <amodra@gmail.com>
3781 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3782 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3783 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3785 (offset_adjust): New function.
3786 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3787 (adjust_eh_frame_local_symbols): Likewise.
3788 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3789 after changing anything. Return true if anything changed.
3790 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3791 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3793 2017-04-27 Alan Modra <amodra@gmail.com>
3795 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3798 2017-04-27 Alan Modra <amodra@gmail.com>
3800 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3801 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3802 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3803 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3804 for undef and undefweak dyn_relocs.
3805 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3806 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3807 (allocate_got, allocate_dynrelocs): Likewise.
3808 (ppc64_elf_relocate_section): Likewise.
3810 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3812 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3813 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3814 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3815 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3817 2017-04-26 Nick Clifton <nickc@redhat.com>
3820 * reloc.c (bfd_perform_relocation): Check for a negative address
3823 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3826 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3828 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3829 (elf_backend_always_renumber_dynsyms): Define.
3830 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3831 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3832 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3833 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3835 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3837 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3839 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3840 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3841 sections have been created.
3843 2017-04-26 Nick Clifton <nickc@redhat.com>
3846 * compress.c (bfd_init_section_compress_status): Check the return
3847 value from bfd_malloc.
3849 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3851 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3852 no_finish_dynamic_symbol.
3853 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3855 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3856 weak symbol, don't make it dynamic.
3857 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3858 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3859 relocation for GOT reference.
3860 (elf_x86_64_finish_dynamic_symbol): Abort if
3861 no_finish_dynamic_symbol isn't 0.
3863 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3866 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3867 undefined weak symbol, don't make it dynamic.
3868 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3869 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3870 relocation for R_386_GOT32.
3872 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3875 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3877 2017-04-23 Alan Modra <amodra@gmail.com>
3880 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3881 * elf.c (lcomm_sym): New.
3882 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3883 * bfd-in2.h: Regenerate.
3885 2017-04-23 Alan Modra <amodra@gmail.com>
3888 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3889 parameters and comment.
3890 (_bfd_elf_get_reloc_section): Delete.
3891 (_bfd_elf_plt_get_reloc_section): Declare.
3892 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3893 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3895 (_bfd_elf_get_reloc_section): ..here. Delete.
3896 (assign_section_numbers): Call elf_get_reloc_section.
3897 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3898 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3900 2017-04-23 Alan Modra <amodra@gmail.com>
3903 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3906 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3909 * elf32-i386.c (elf_i386_link_hash_entry): Add
3910 no_finish_dynamic_symbol.
3911 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3912 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3913 symbol, don't make it dynamic in PIE.
3914 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3915 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3916 relocation for R_386_GOT32
3917 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3920 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3924 * elflink.c (elf_link_add_object_symbols): Require
3925 --no-dynamic-linker with -E/--dynamic-list when creating
3928 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3930 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3933 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3935 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3936 dynamic symbol sorting.
3938 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3941 * elflink.c (elf_link_add_object_symbols): Preserve
3942 dynamic_ref_after_ir_def when restoring the symbol table for
3943 unneeded dynamic object.
3945 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3948 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3949 on on undefined IFUNC symbol in the second PLT.
3951 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3953 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3955 2017-04-19 Alan Modra <amodra@gmail.com>
3957 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3958 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3959 * elf32-ppc.c:Formatting.
3960 (ensure_undefweak_dynamic): Don't make dynamic when
3961 info->dynamic_undefined_weak is zero.
3962 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3963 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3964 not default visibility. Discard undef and undefweak
3966 (ppc_elf_relocate_section): Adjust to suit.
3967 * elf64-ppc.c: Formatting.
3968 (ensure_undefweak_dynamic): Don't make dynamic when
3969 info->dynamic_undefined_weak is zero.
3970 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3971 info->dynamic_undefined_weak. Discard them earlier.
3973 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3976 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3977 before generating the version definition section.
3979 2017-04-17 Alan Modra <amodra@gmail.com>
3981 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3982 state when a regular object file defines a symbol with
3983 incompatible type to that defined by an earlier shared lib.
3985 2017-04-13 Alan Modra <amodra@gmail.com>
3987 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3989 * elf32-arm.c: Likewise.
3990 * elf32-i386.c: Likewise.
3991 * elf32-mep.c: Likewise.
3992 * elf64-ia64-vms.c: Likewise.
3993 * elf64-x86-64.c: Likewise.
3994 * elflink.c: Likewise.
3995 * elfnn-ia64.c: Likewise.
3996 * elfxx-mips.c: Likewise.
3998 2017-04-13 Alan Modra <amodra@gmail.com>
4000 * aoutx.h: Use %B and %A in error messages throughout file.
4001 * aout-cris.c: Likewise.
4002 * archive.c: Likewise.
4003 * binary.c: Likewise.
4004 * coff-rs6000.c: Likewise.
4005 * coff-tic4x.c: Likewise.
4006 * coffcode.h: Likewise.
4007 * coffgen.c: Likewise.
4008 * cofflink.c: Likewise.
4009 * coffswap.h: Likewise.
4010 * cpu-arm.c: Likewise.
4011 * elf-eh-frame.c: Likewise.
4012 * elf-m10300.c: Likewise.
4014 * elf32-arc.c: Likewise.
4015 * elf32-arm.c: Likewise.
4016 * elf32-bfin.c: Likewise.
4017 * elf32-frv.c: Likewise.
4018 * elf32-iq2000.c: Likewise.
4019 * elf32-m32c.c: Likewise.
4020 * elf32-microblaze.c: Likewise.
4021 * elf32-nds32.c: Likewise.
4022 * elf32-rl78.c: Likewise.
4023 * elf32-rx.c: Likewise.
4024 * elf32-score.c: Likewise.
4025 * elf32-score7.c: Likewise.
4026 * elf32-sh64.c: Likewise.
4027 * elf32-v850.c: Likewise.
4028 * elf32-vax.c: Likewise.
4029 * elf32-visium.c: Likewise.
4030 * elf64-ia64-vms.c: Likewise.
4031 * elf64-mmix.c: Likewise.
4032 * elf64-sh64.c: Likewise.
4033 * elfcode.h: Likewise.
4034 * elfnn-aarch64.c: Likewise.
4035 * elfnn-ia64.c: Likewise.
4036 * elfxx-mips.c: Likewise.
4037 * hpux-core.c: Likewise.
4040 * linker.c: Likewise.
4041 * merge.c: Likewise.
4043 * oasys.c: Likewise.
4044 * pdp11.c: Likewise.
4045 * peXXigen.c: Likewise.
4046 * rs6000-core.c: Likewise.
4047 * vms-alpha.c: Likewise.
4048 * xcofflink.c: Likewise.
4050 2017-04-13 Alan Modra <amodra@gmail.com>
4052 * bfd.c (PRINT_TYPE): Define.
4053 (_doprnt): New function.
4054 (error_handler_internal): Use _doprnt.
4055 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4056 calls in their natural order, throughout file.
4057 * coff-mcore.c: Likewise.
4058 * coff-ppc.c: Likewise.
4059 * coff-tic80.c: Likewise.
4060 * cofflink.c: Likewise.
4061 * elf-s390-common.c: Likewise.
4063 * elf32-arm.c: Likewise.
4064 * elf32-i386.c: Likewise.
4065 * elf32-m32r.c: Likewise.
4066 * elf32-msp430.c: Likewise.
4067 * elf32-spu.c: Likewise.
4068 * elf64-ia64-vms.c: Likewise.
4069 * elf64-sparc.c: Likewise.
4070 * elf64-x86-64.c: Likewise.
4071 * elflink.c: Likewise.
4072 * elfnn-aarch64.c: Likewise.
4073 * elfnn-ia64.c: Likewise.
4074 * elfxx-mips.c: Likewise.
4076 2017-04-13 Alan Modra <amodra@gmail.com>
4078 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4079 branch veneers" error. Fix double space and format message.
4080 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4081 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4083 2017-04-13 Alan Modra <amodra@gmail.com>
4085 * bfd-in2.h: Regenerate.
4087 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4089 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4090 extra `\n' in warning/error messages.
4091 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4092 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4094 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4096 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4097 processor-specific properties with generic ELF target vector.
4099 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4101 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4102 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4103 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4104 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4106 (link_hash_newfunc): Initialize has_got_reloc and
4108 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4110 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4112 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4114 (_bfd_sparc_elf_fixup_symbol): New function.
4115 (allocate_dynrelocs): Don't allocate space for dynamic
4116 relocations and discard relocations against resolved undefined
4117 weak symbols in executable. Don't make resolved undefined weak
4118 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4119 relocation against undefined weak symbols in PIE.
4120 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4121 relocations against resolved undefined weak symbols in PIE
4122 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4123 without ynamic PLT/GOT relocations for resolved undefined weak
4125 Don't generate dynamic relocation against resolved undefined
4126 weak symbol in executable.
4127 (pie_finish_undefweak_symbol): New function.
4128 (_bfd_sparc_elf_finish_dynamic_sections): Call
4129 pie_finish_undefweak_symbol on all symbols in PIE.
4130 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4131 (_bfd_sparc_elf_fixup_symbol): New function.
4133 2017-04-10 Nick Clifton <nickc@redhat.com>
4135 * config.bfd: Remove ns32k from obsolete list.
4137 2017-04-10 Alan Modra <amodra@gmail.com>
4140 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4141 (special_sections_i): Likewise for .init_array.
4142 (special_sections_p): Likewise for .preinit_array.
4144 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4148 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4149 ELF_COMMON_DEF_P for common symbols.
4150 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4151 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4152 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4153 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4154 07492f668d2173da7a2bda3707ff0985e0f460b6.
4156 2017-04-07 Pedro Alves <palves@redhat.com>
4158 * opncls.c (bfd_get_debug_link_info): Rename to...
4159 (bfd_get_debug_link_info_1): ... this. Change type of second
4160 parameter to void pointer. Adjust.
4161 (bfd_get_debug_link_info): Reimplement on top of
4162 bfd_get_debug_link_info_1.
4163 (separate_debug_file_exists, separate_alt_debug_file_exists):
4164 Change type of second parameter to void pointer. Adjust.
4165 (get_func_type, check_func_type): Change type of second parameter
4167 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4168 the callback functions instead of passing the address of a local.
4169 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4170 find_separate_debug_file.
4171 (get_alt_debug_link_info_shim): Change type of second parameter to
4172 void pointer. Adjust.
4173 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4174 find_separate_debug_file.
4175 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4176 of second parameter to void pointer. Adjust.
4177 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4178 pointer local to find_separate_debug_file.
4180 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4182 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4183 external symbols with a definition.
4184 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4186 2017-04-07 Alan Modra <amodra@gmail.com>
4188 * po/SRC-POTFILES.in: Regenerate.
4190 2017-04-05 Alan Modra <amodra@gmail.com>
4192 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4195 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4197 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4198 numbers for DataDirectory entry indicies passed to
4201 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4203 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4204 each GNU_MBIND section and align GNU_MBIND section to page size.
4205 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4206 segment for each GNU_MBIND section.
4207 (_bfd_elf_init_private_section_data): Copy sh_info from input
4208 for GNU_MBIND section.
4210 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4212 * elfnn-riscv.c (GP_NAME): Delete.
4213 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4214 (_bfd_riscv_relax_lui): Likewise.
4216 2017-04-04 Nick Clifton <nickc@redhat.com>
4219 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4221 (bfd_elf_final_link): Only initialize the extended symbol index
4222 section if there are extended symbol tables to list.
4224 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4226 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4227 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4228 * configure.ac (elf): Add elf-properties.lo.
4229 * Makefile.in: Regenerated.
4230 * configure: Likewise.
4231 * elf-bfd.h (elf_property_kind): New.
4232 (elf_property): Likewise.
4233 (elf_property_list): Likewise.
4234 (elf_properties): Likewise.
4235 (_bfd_elf_parse_gnu_properties): Likewise.
4236 (_bfd_elf_get_property): Likewise.
4237 (_bfd_elf_link_setup_gnu_properties): Likewise.
4238 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4239 and setup_gnu_properties.
4240 (elf_obj_tdata): Add properties.
4241 * elf-properties.c: New file.
4242 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4243 (elf_i386_merge_gnu_properties): Likewise.
4244 (elf_backend_parse_gnu_properties): Likewise.
4245 (elf_backend_merge_gnu_properties): Likewise.
4246 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4247 (elf_x86_64_merge_gnu_properties): Likewise.
4248 (elf_backend_parse_gnu_properties): Likewise.
4249 (elf_backend_merge_gnu_properties): Likewise.
4250 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4251 (elf_backend_parse_gnu_properties): Likewise.
4252 (elf_backend_setup_gnu_properties): Likewise.
4253 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4254 elf_backend_merge_gnu_properties and
4255 elf_backend_setup_gnu_properties.
4257 2017-03-30 Pip Cet <pipcet@gmail.com>
4259 * elf32-wasm32.c: Add relocation code, two relocs.
4260 * reloc.c: Add wasm32 relocations.
4261 * libbfd.h: Regenerate.
4262 * bfd-in2.h: Regenerate.
4263 * bfd/po/bfd.pot: Regenerate.
4265 2017-03-29 Nick Clifton <nickc@redhat.com>
4268 * coff-bfd.h (struct coff_section_data): Add new fields:
4269 saved_bias and bias.
4270 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4271 computed for PE binaries.
4272 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4275 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4278 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4279 to handle a local symbol with a hash-symbol-entry; without PLT.
4280 Add BFD_ASSERT for an incidental case with GOT entry present.
4281 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4282 isn't forced-or-set local.
4284 2017-03-27 Pip Cet <pipcet@gmail.com>
4286 * wasm-module.c: New file to support WebAssembly modules.
4287 * wasm-module.h: New file to support WebAssembly modules.
4288 * doc/webassembly.texi: Start documenting wasm-module.c.
4289 * config.bfd: Add wasm_vec.
4290 * targets.c: Likewise.
4291 * configure.ac: Likewise.
4292 * Makefile.am: Add entries for wasm-module.c.
4293 * Makefile.in: Regenerate.
4294 * configure: Regenerate.
4295 * po/SRC-POTFILES.in: Regenerate.
4297 2017-03-27 Pip Cet <pipcet@gmail.com>
4299 * cpu-wasm32.c: New file to support wasm32 architecture.
4300 * elf32-wasm32.c: New file to support wasm32 architecture.
4301 * Makefile.am: Add wasm32 architecture.
4302 * archures.c: Likewise.
4303 * config.bfd: Likewise.
4304 * configure.ac: Likewise.
4305 * targets.c: Likewise.
4306 * Makefile.in: Regenerate.
4307 * bfd-in2.h: Regenerate.
4308 * configure: Regenerate.
4309 * po/SRC-POTFILES.in: Regenerate.
4311 2017-03-20 Alan Modra <amodra@gmail.com>
4314 * elf64-ppc.c (compare_symbols): Stabilize sort.
4316 2017-03-18 Alan Modra <amodra@gmail.com>
4318 * elf64-ppc.c (struct ppc_link_hash_table): Add
4319 local_ifunc_resolver and maybe_local_ifunc_resolver.
4320 (ppc_build_one_stub): Set flags on emitting dynamic
4321 relocation to ifunc.
4322 (ppc64_elf_relocate_section): Likewise.
4323 (ppc64_elf_finish_dynamic_symbol): Likewise.
4324 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4325 local dynamic relocs to ifuncs.
4326 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4327 local_ifunc_resolver and maybe_local_ifunc_resolver.
4328 (ppc_elf_relocate_section): Set flag on emitting dynamic
4329 relocation to ifuncs.
4330 (ppc_elf_finish_dynamic_symbol): Likewise.
4331 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4332 dynamic relocs to ifuncs.
4334 2017-03-13 Nick Clifton <nickc@redhat.com>
4337 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4338 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4339 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4340 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4341 * bfd-in2.h: Regenerate.
4342 * libbfd.h: Regenerate.
4343 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4345 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4346 (elfNN_aarch64_howto_table): Likewise.
4347 (aarch64_tls_transition_without_check): Likewise.
4348 (aarch64_reloc_got_type): Likewise.
4349 (elfNN_aarch64_final_link_relocate): Likewise.
4350 (elfNN_aarch64_tls_relax): Likewise.
4351 (elfNN_aarch64_relocate_section): Likewise.
4352 (elfNN_aarch64_gc_sweep_hook): Likewise.
4353 (elfNN_aarch64_check_relocs): Likewise.
4354 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4355 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4357 2017-03-11 Alan Modra <amodra@gmail.com>
4359 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4360 parameter is in fact used. Whitespace fixes.
4361 * elf64-ppc.c: Likewise.
4363 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4365 * rs6000-core.c (CORE_NEW): Simplify macro when
4366 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4368 2017-03-07 Alan Modra <amodra@gmail.com>
4372 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4375 2017-03-05 Alan Modra <amodra@gmail.com>
4377 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4378 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4379 (next_cie_fde_offset): New function.
4380 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4381 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4382 four bytes. Align CIEs to four or eight bytes depending on
4383 per_encoding_aligned8. Align FDEs according to their encoding.
4384 Pad last FDE to output section alignment.
4385 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4387 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4388 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4389 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4391 2017-03-02 Martin Bickel <binutils@ineranves.de>
4394 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4395 empty segments which have a zero filesz, but a non-zero memsz.
4397 2017-03-02 Alan Modra <amodra@gmail.com>
4399 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4401 2017-02-28 Alan Modra <amodra@gmail.com>
4403 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4404 (ppc64_elf_relocate_section): Likewise.
4406 2017-02-28 Alan Modra <amodra@gmail.com>
4409 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4410 rather than elf32_nios2_hash_table or elf_hash_table.
4411 (create_got_section): Likewise.
4412 (nios2_elf32_finish_dynamic_symbol): Likewise.
4413 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4414 (nios2_elf32_size_dynamic_sections): Likewise.
4415 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4416 vars. Use htab equivalents directly instead. Don't create
4417 all dynamic sections on needing just the GOT. Use a goto
4418 rather than a fall-through with reloc test. Ensure
4419 htab->dynobj is set when making dynamic sreloc section.
4420 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4421 equivalent directly instead. Don't segfault on looking for
4422 .dynamic when dynamic sections have not been created. Don't
4423 segfault on .got.plt being discarded.
4424 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4425 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4426 fixme and another not so relevant comment.
4427 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4428 already set, set hash table dynobj on creating .sbss.
4430 2017-02-28 Alan Modra <amodra@gmail.com>
4432 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4433 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4434 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4435 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4436 (ppc64_elf_relocate_section): Likewise.
4437 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4438 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4439 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4440 * libbfd.h: Regenerate.
4441 * bfd-in2.h: Regenerate.
4443 2017-02-28 Alan Modra <amodra@gmail.com>
4445 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4446 dynamic .data.rel.ro read-only.
4447 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4448 rather than section flags when deciding where copy reloc goes.
4449 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4450 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4451 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4452 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4453 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4454 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4455 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4456 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4457 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4458 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4459 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4460 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4461 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4462 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4463 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4464 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4465 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4466 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4467 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4469 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4471 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4472 `jalr $0, $25' instruction encoding.
4474 2017-02-27 Nick Clifton <nickc@redhat.com>
4477 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4478 generating a seg-fault when encountering a symbol that has been
4479 deleted by garbage collection.
4481 2017-02-25 Alan Modra <amodra@gmail.com>
4483 * elf32-arc.c (struct dynamic_sections): Delete.
4484 (enum dyn_section_types): Delete.
4485 (dyn_section_names): Delete.
4486 (arc_create_dynamic_sections): Delete.
4487 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4488 segfault on discarded .rela.plt section.
4489 (elf_arc_size_dynamic_sections): Formatting. Don't call
4490 arc_create_dynamic_sections. Don't allocate memory for sections
4491 handled by the generic linker. Correct code finding relocs in
4492 read-only sections. Set SEC_EXCLUDE on zero size .got,
4493 .got.plt, and .dynbss sections. Do set .interp for pies.
4495 2017-02-24 Andrew Waterman <andrew@sifive.com>
4497 * elfnn-riscv.c (GP_NAME): New macro.
4498 (riscv_global_pointer_value): Use it.
4499 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4500 output section, consider only that section's alignment.
4502 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4504 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4505 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4506 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4507 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4509 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4511 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4512 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4515 2017-02-23 Alan Modra <amodra@gmail.com>
4518 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4520 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4521 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4524 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4527 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4528 processing ahead of the call to `elf_gc_sweep_symbol'.
4530 2017-02-22 Nick Clifton <nickc@redhat.com>
4533 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4534 created section 4-byte alignment.
4536 2017-02-22 Alan Modra <amodra@gmail.com>
4538 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4539 on .got or .plt output section being discarded by script.
4540 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4543 2017-02-21 Alan Modra <amodra@gmail.com>
4545 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4546 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4548 2017-02-20 Alan Modra <amodra@gmail.com>
4551 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4552 if DT_RELSZ/DT_RELASZ is zero.
4554 2017-02-17 Nick Clifton <nickc@redhat.com>
4556 * compress.c (bfd_get_full_section_contents): Remember to reduce
4557 compressed size by the sizeof the compression header when
4558 decompressing the contents.
4560 2017-02-17 Pedro Alves <palves@redhat.com>
4562 * srec.c (Chunk): Rename to ...
4563 (_bfd_srec_len): ... this.
4564 (S3Forced): Rename to ...
4565 (_bfd_srec_forceS3): ... this.
4566 * objcopy.c: Adjust all references.
4568 2017-02-17 Pedro Alves <palves@redhat.com>
4570 * archive.c (bsd_write_armap): Rename to ...
4571 (_bfd_bsd_write_armap): ... this.
4572 (coff_write_armap): Rename to ...
4573 (_bfd_coff_write_armap): ... this.
4574 * libbfd-in.h (bsd_write_armap): Rename to ...
4575 (_bfd_bsd_write_armap): ... this.
4576 (coff_write_armap): Rename to ...
4577 (_bfd_coff_write_armap): ... this.
4578 * aout-target.h, aout-tic30.c: Adjust all users.
4579 * libbfd.h: Regenerate.
4581 2017-02-17 Pedro Alves <palves@redhat.com>
4583 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4584 (warn_deprecated): Rename to ...
4585 (_bfd_warn_deprecated): ... this.
4586 * libbfd.c (warn_deprecated): Rename to ...
4587 (_bfd_warn_deprecated): ... this.
4588 * bfd-in2.h: Regenerate.
4590 2017-02-17 Pedro Alves <palves@redhat.com>
4592 * bfdio.c (real_ftell): Rename to ...
4593 (_bfd_real_ftell): ... this.
4594 (real_fseek): Rename to ...
4595 (_bfd_real_fseek): ... this.
4596 (real_fopen): Rename to ...
4597 (_bfd_real_fopen): ... this.
4598 * libbfd-in.h (real_ftell): Rename to ...
4599 (_bfd_real_ftell): ... this.
4600 (real_fseek): Rename to ...
4601 (_bfd_real_fseek): ... this.
4602 (real_fopen): Rename to ...
4603 (_bfd_real_fopen): ... this.
4604 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4605 * libbfd.h: Regenerate.
4607 2017-02-17 Pedro Alves <palves@redhat.com>
4609 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4610 * libbfd.c (read_unsigned_leb128): Rename to ...
4611 (_bfd_read_unsigned_leb128): ... this.
4612 (read_signed_leb128): Rename to ...
4613 (_bfd_read_signed_leb128): ... this.
4614 (safe_read_leb128): Rename to ...
4615 (_bfd_safe_read_leb128): ... this.
4616 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4617 (_bfd_read_unsigned_leb128): ... this.
4618 (read_signed_leb128): Rename to ...
4619 (_bfd_read_signed_leb128): ... this.
4620 (safe_read_leb128): Rename to ...
4621 (_bfd_safe_read_leb128): ... this.
4622 * libbfd.h: Renegerate.
4624 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4626 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4627 before trying to fine matching file and line information.
4629 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4631 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4632 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4633 not match current bfd, then reload debug information. Record bfd
4634 we're loading debug info for in the stash. If we have debug
4635 informatin in the cache then perform section placement before
4638 2017-02-16 Alan Modra <amodra@gmail.com>
4641 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4642 * elfxx-target.h (elf_backend_no_page_alias): Define.
4643 (elfNN_bed): Init new field.
4644 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4645 ensure PT_LOAD segment starts on a new page.
4646 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4648 2017-02-16 Alan Modra <amodra@gmail.com>
4651 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4654 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4656 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4657 * bfd-in2.h: Regenerated.
4659 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4662 * elf32-i386.c (elf_i386_relocate_section): Allow
4663 "lea foo@GOT, %reg" in PIC.
4665 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4668 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4669 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4670 error against local IFUNC symbol without a base register for
4673 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4675 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4676 `%P: %H:' with `info->callbacks->einfo'.
4677 (ppc_elf_relocate_section): Likewise.
4678 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4679 (ppc64_elf_edit_toc): Likewise.
4680 (ppc64_elf_relocate_section): Likewise.
4682 2017-02-14 Alan Modra <amodra@gmail.com>
4684 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4685 --gc-keep-exported, and test versioned field of sym rather than
4686 looking for @ in name.
4688 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4690 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4693 2017-02-13 Nick Clifton <nickc@redhat.com>
4696 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4699 2017-02-07 Andrew Waterman <andrew@sifive.com>
4701 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4702 entry size if PLT header is written.
4704 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4706 Fix sparc64 dynamic relocation processing to use the dynamic
4708 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4709 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4712 2017-02-03 Nick Clifton <nickc@redhat.com>
4715 * coffcode.h (coff_write_object_contents): Enlarge size of
4716 s_name_buf in order to avoid compile time warning about possible
4718 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4719 32-bits of insn value before printing into buffer.
4721 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4723 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4724 `max_local_dynindx'.
4725 (mips_elf_sort_hash_table): Handle it.
4726 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4727 symbols bump up `max_local_dynindx' rather than
4728 `max_non_got_dynindx'.
4730 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4732 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4733 `min_got_dynindx', `max_unref_got_dynindx' and
4734 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4735 (mips_elf_sort_hash_table): Adjust accordingly.
4737 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4739 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4740 to access the hash table.
4742 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4744 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4745 non-NULL `htab' to the beginning.
4747 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4749 * elflink.c (elf_gc_sweep): Wrap overlong line.
4751 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4753 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4754 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4755 * elfxx-mips.c (mips_elf_link_hash_table): Add
4756 `ignore_branch_isa' member.
4757 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4758 in branch relocation calculation as an error if
4759 `ignore_branch_isa' has been set.
4760 (_bfd_mips_elf_insn32): Rename to...
4761 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4762 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4763 Handle the new parameter.
4765 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4767 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4768 local variable dynobj.
4771 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4772 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4773 executable from read-only sections into sdynrelro.
4774 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4775 dynamic relocs in sdynrelro.
4776 (elf_backend_want_dynrelro): Define.
4778 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4780 * config.bfd (*-*-rtemsaout*): Mark as removed.
4782 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4784 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4785 (arm-*-rtems*): Move to (arm*-*-eabi*).
4786 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4787 (m68-*-rtems*): Move to (m68*-*-elf*).
4789 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4791 * config.bfd (*-*-rtemscoff*): Mark as removed.
4793 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4796 * elflink.c (bfd_elf_record_link_assignment): Revert last
4797 change and don't ever clear `forced_local'. Set `mark'
4799 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4801 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4802 (bfd_elf_size_dynamic_sections): ... here.
4803 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4804 and set `mark' instead in `__tls_get_addr_opt' processing.
4805 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4807 2017-01-24 Alan Modra <amodra@gmail.com>
4809 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4810 where dynamic relocs are preferable. Allow ifunc too.
4811 (ensure_undefweak_dynamic): New function.
4812 (allocate_dynrelocs): Use it here. Move plt handling last and
4813 don't make symbols dynamic, simplifying loop. Only make undef
4814 weak symbols with GOT entries dynamic. Correct condition
4815 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4816 comments. Remove goto.
4817 (ppc_elf_relocate_section): Correct test for using dynamic
4818 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4819 to suit. Set up explicit tls_index entries and implicit GOT
4820 tls_index entries resolvable at link time for
4821 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4822 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4823 (ensure_undefweak_dynamic): New function.
4824 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4825 with GOT entries dynamic. Remove unnecessary test of
4826 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4827 (ppc64_elf_relocate_section): Correct test for using dynamic
4828 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4829 to suit. Set up explicit tls_index entries and implicit GOT
4830 tls_index entries resolvable at link time for __tls_get_addr_opt.
4831 Simplify expression to clear mem for prelink.
4833 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4835 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4837 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4839 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4840 (elf_backend_hash_symbol): Define.
4842 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4845 * elflink.c (bfd_elf_record_link_assignment): Clear any
4846 `forced_local' marking for DSO symbols that are not being
4849 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4851 * elfnn-riscv.c (riscv_elf_object_p): New function.
4853 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4856 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4858 (elf_x86_64_check_relocs): Create .eh_frame section for the
4860 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4861 .eh_frame section for the .plt.bnd section.
4862 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4863 for the .plt.bnd section.
4865 2017-01-12 Nick Clifton <nickc@redhat.com>
4868 * opncls.c (find_separate_debug_file): Add include_dirs
4869 parameter. Only include the directory part of the bfd's filename
4870 in search paths if include_dirs is true. Add a couple of extra
4871 locations for looking for debug files.
4872 ( bfd_follow_gnu_debuglink): Update invocation of
4873 find_separate_debug_file.
4874 (bfd_follow_gnu_debugaltlink): Likewise.
4875 (get_build_id): New function: Finds the build-id of the given bfd.
4876 (get_build_id_name): New function: Computes the name of the
4877 separate debug info file for a bfd, based upon its build-id.
4878 (check_build_id_file): New function: Checks to see if a separate
4879 debug info file exists at the given location, and that its
4880 build-id matches that of the original bfd.
4881 (bfd_follow_build_id_debuglink): New function: Finds a separate
4882 debug info file for a given bfd by using the build-id method.
4883 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4884 method of locating a separate debug info file before using the
4886 * bfd-in2.h: Regenerate.
4888 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4891 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4892 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4893 elf_x86_64_eh_frame_plt_got.
4894 (elf_x86_64_size_dynamic_sections): Get unwind info from
4895 elf_x86_64_bnd_arch_bed for the BND PLT.
4897 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4899 * config.bfd: Add entries for i686-redox and x86_64-redox.
4901 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4903 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4905 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4906 .eh_frame section to 4 bytes for x32.
4907 (elf_x86_64_check_relocs): Likewise.
4909 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4912 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4913 (PLT_GOT_FDE_LENGTH): Likewise.
4914 (elf_i386_plt_layout): Add eh_frame_plt_got and
4915 eh_frame_plt_got_size.
4916 (elf_i386_plt): Updated.
4917 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4918 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4919 (elf_i386_size_dynamic_sections): Allocate and initialize
4920 .eh_frame section for .plt.got.
4921 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4923 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4924 eh_frame_plt_got_size.
4925 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4926 (PLT_GOT_FDE_LENGTH): Likewise.
4927 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4928 eh_frame_plt_got_size.
4929 (elf_x86_64_arch_bed): Updated.
4930 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4931 eh_frame_plt_got_size.
4932 (elf_x86_64_nacl_arch_bed): Likewise.
4933 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4934 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4935 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4936 .eh_frame section for .plt.got.
4937 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4940 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4942 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4943 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4945 2017-01-09 Nick Clifton <nickc@redhat.com>
4947 * dwarf2.c (lookup_address_in_function_table): Return early if
4948 there are no functions in the given comp unit, or if the high
4949 address of the last function in the comp unit is less than the
4952 2017-01-09 Nick Clifton <nickc@redhat.com>
4955 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4956 message if there are too many symbols to load.
4958 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4960 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4961 if relocs are cached.
4963 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4966 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4967 for R_MICROBLAZE_GOTOFF_64.
4969 2017-01-03 Nick Clifton <nickc@redhat.com>
4971 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4972 warning about using a possibly uninitialised variable.
4974 2017-01-02 Alan Modra <amodra@gmail.com>
4976 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4977 (allocate_plt_static, allocate_dynrelocs): Use it.
4979 2017-01-02 Alan Modra <amodra@gmail.com>
4981 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4982 .PARISC.unwind section.
4984 2017-01-02 Alan Modra <amodra@gmail.com>
4987 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4988 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4989 indirect to GOT pointer relative code edit.
4991 2017-01-02 Alan Modra <amodra@gmail.com>
4993 Update year range in copyright notice of all files.
4995 For older changes see ChangeLog-2016
4997 Copyright (C) 2017 Free Software Foundation, Inc.
4999 Copying and distribution of this file, with or without modification,
5000 are permitted in any medium without royalty provided the copyright
5001 notice and this notice are preserved.
5007 version-control: never