1 2017-11-01 Nick Clifton <nickc@redhat.com>
4 * coffcode.h (coff_slurp_line_table): Check for an excessively
5 large line number count.
7 2017-11-01 Nick Clifton <nickc@redhat.com>
10 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
11 and offset in light of further possible bogus values.
13 2017-11-01 Alan Modra <amodra@gmail.com>
16 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
17 entry when just a dynamic reloc can serve. Ensure no dynamic
18 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
19 Expand and move the non_got_ref comment.
20 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
22 2017-11-01 Nick Clifton <nickc@redhat.com>
25 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
27 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
28 members of an archive.
30 2017-10-31 Nick Clifton <nickc@redhat.com>
33 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
36 2017-10-30 Alan Modra <amodra@gmail.com>
38 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
41 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
43 (bfd_elf_gc_sections): Likewise.
45 2017-10-30 Alan Modra <amodra@gmail.com>
48 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
49 ensure non_got_ref is not set due to debug references.
50 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
51 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
53 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
54 dynamic relocs when pic. Remove bogus code attempting to handle
56 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
58 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
59 and SYMBOL_REFERENCES_LOCAL in GOT handling.
61 2017-10-28 Alan Modra <amodra@gmail.com>
64 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
65 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
66 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
67 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
69 2017-10-25 Alan Modra <amodra@gmail.com>
71 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
72 optionally prefixed with "_".
73 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
75 2017-10-24 Andrew Waterman <andrew@sifive.com>
77 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
80 2017-10-24 Renlin Li <renlin.li@arm.com>
83 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
85 2017-10-23 Nick Clifton <nickc@redhat.com>
88 * elflink.c (elf_link_output_extsym): Keep global undefined
89 symbols if they have been marked as needed.
91 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
93 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
95 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
96 `_bfd_mips_elf_mkobject'.
98 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
101 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
103 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
105 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
106 (riscv_pcgp_lo_reloc): Likewise.
107 (riscv_pcgp_relocs): Likewise.
108 (riscv_init_pcgp_relocs): New function.
109 (riscv_free_pcgp_relocs): Likewise.
110 (riscv_record_pcgp_hi_reloc): Likewise.
111 (riscv_record_pcgp_lo_reloc): Likewise.
112 (riscv_delete_pcgp_hi_reloc): Likewise.
113 (riscv_use_pcgp_hi_reloc): Likewise.
114 (riscv_record_pcgp_lo_reloc): Likewise.
115 (riscv_find_pcgp_lo_reloc): Likewise.
116 (riscv_delete_pcgp_lo_reloc): Likewise.
117 (_bfd_riscv_relax_pc): Likewise.
118 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
119 via the new functions above.
121 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
123 * elfnn-riscv.c (R_RISCV_DELETE): New define.
124 (_bfd_riscv_relax_delete): New function.
125 (perform_relocation): Handle R_RISCV_DELETE.
126 (_bfd_riscv_relax_section): Likewise.
128 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
131 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
132 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
133 bfd_link_executable for TLS check.
134 (tilegx_elf_check_relocs): Likewise.
135 (allocate_dynrelocs): Likewise.
136 (tilegx_elf_relocate_section): Likewise.
138 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
141 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
142 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
143 bfd_link_executable for TLS check.
144 (tilepro_elf_check_relocs): Likewise.
145 (allocate_dynrelocs): Likewise.
146 (tilepro_elf_relocate_section): Likewise.
148 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
151 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
152 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
153 bfd_link_executable for TLS check.
154 (_bfd_sparc_elf_check_relocs): Likewise.
155 (allocate_dynrelocs): Likewise.
156 (_bfd_sparc_elf_relocate_section): Likewise.
158 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
160 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
161 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
162 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
164 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
166 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
167 indirect and warning symbols.
169 2017-10-17 Alan Modra <amodra@gmail.com>
172 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
173 against size left rather than comparing pointers. Reorganise loop.
175 2017-10-17 Alan Modra <amodra@gmail.com>
178 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
179 and error for any other size that doesn't cover the header word.
181 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
183 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
184 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
185 (elf_backend_gc_sweep_hook): Likewise.
186 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
187 (bfinfdpic_gc_sweep_hook): Likewise.
188 (elf_backend_gc_sweep_hook): Likewise.
189 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
190 (elf_backend_gc_sweep_hook): Likewise.
191 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
192 (elf_backend_gc_sweep_hook): Likewise.
193 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
194 (elf_backend_gc_sweep_hook): Likewise.
195 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
196 (elf_backend_gc_sweep_hook): Likewise.
197 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
198 (elf_backend_gc_sweep_hook): Likewise.
199 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
201 (elf_m68k_remove_got_entry_type): Removed.
202 (elf_m68k_find_got_entry_ptr): Likewise.
203 (elf_m68k_remove_got_entry): Likewise.
204 (elf_m68k_gc_sweep_hook): Likewise.
205 (elf_backend_gc_sweep_hook): Likewise.
206 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
207 (elf_backend_gc_sweep_hook): Likewise.
208 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
209 (elf_backend_gc_sweep_hook): Likewise.
210 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
211 (elf_backend_gc_sweep_hook): Likewise.
212 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
213 (elf_backend_gc_sweep_hook): Likewise.
214 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
215 (elf_backend_gc_sweep_hook): Likewise.
216 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
217 (elf_backend_gc_sweep_hook): Likewise.
218 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
219 (elf_backend_gc_sweep_hook): Likewise.
220 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
221 (elf_backend_gc_sweep_hook): Likewise.
222 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
223 (elf_backend_gc_sweep_hook): Likewise.
224 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
225 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
226 (elf_backend_gc_sweep_hook): Likewise.
227 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
228 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
229 (elf_backend_gc_sweep_hook): Likewise.
230 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
231 (elf_backend_gc_sweep_hook): Likewise.
232 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
233 (elf_backend_gc_sweep_hook): Likewise.
234 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
235 (elf_backend_gc_sweep_hook): Likewise.
236 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
237 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
238 (elf_backend_gc_sweep_hook): Likewise.
239 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
240 (ppc64_elf_gc_sweep_hook): Likewise.
241 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
242 (elf_backend_gc_sweep_hook): Likewise.
243 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
244 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
245 * elflink.c (elf_link_add_object_symbols): Don't call
246 _bfd_elf_link_check_relocs here.
247 (gc_sweep_hook_fn): Removed.
248 (elf_gc_sweep): Remove gc_sweep_hook.
249 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
250 (elf_backend_gc_sweep_hook): Likewise.
251 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
252 (elf_backend_gc_sweep_hook): Likewise.
253 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
254 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
255 (elf_backend_gc_sweep_hook): Likewise.
256 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
257 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
258 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
259 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
260 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
261 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
263 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
265 * elf32-i386.c (elf_i386_backend_data): Removed.
266 (get_elf_i386_backend_data): Likewise.
267 (elf_i386_arch_bed): Replace elf_i386_backend_data with
268 elf_x86_backend_data.
269 (elf_i386_get_synthetic_symtab): Likewise.
270 (elf_i386_nacl_arch_bed): Likewise.
271 (elf_i386_vxworks_arch_bed): Likewise.
272 (elf_i386_relocate_section): Check target_os instead of
274 (elf_i386_finish_dynamic_symbol): Likewise.
275 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
276 Check target_os instead of is_vxworks.
277 (elf_i386_link_setup_gnu_properties): Remove normal_target and
278 is_vxworks. Initialize plt0_pad_byte.
279 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
280 (get_elf_x86_64_arch_data): Likewise.
281 (get_elf_x86_64_backend_data): Likewise.
282 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
283 elf_x86_backend_data.
284 (elf_x86_64_get_synthetic_symtab): Likewise.
285 (elf_x86_64_nacl_arch_bed): Likewise.
286 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
287 normal_target. Initialize plt0_pad_byte.
288 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
289 instead of is_vxworks.
290 (_bfd_x86_elf_size_dynamic_sections): Likewise.
291 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
292 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
293 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
294 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
295 Update normal_target. Set up plt0_pad_byte. Check target_os
296 instead of is_vxworks.
297 * elfxx-x86.h (elf_x86_target_os): New.
298 (elf_x86_backend_data): Likewise.
299 (get_elf_x86_backend_data): Likewise.
300 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
302 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
305 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
307 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
308 _bfd_x86_elf_finish_dynamic_sections.
309 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
310 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
312 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
315 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
318 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
319 hide symbol which was forced to be dynamic.
321 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
324 * elf32-cris.c (cris_elf_relocate_section): Don't generate
325 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
326 (cris_elf_check_relocs): Don't allocate dynamic relocation
327 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
329 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
332 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
333 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
334 (sh_elf_relocate_section): Don't generate dynamic relocation if
335 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
337 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
340 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
341 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
342 (elf_s390_relocate_section): Don't generate dynamic relocation
343 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
344 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
345 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
346 (elf_s390_relocate_section): Don't generate dynamic relocation
347 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
349 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
352 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
353 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
354 (allocate_dynrelocs): Discard dynamic relocations if
355 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
357 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
360 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
361 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
363 (allocate_dynrelocs): Discard dynamic relocations if
364 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
366 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
369 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
370 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
371 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
372 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
373 (elf_m68k_relocate_section): Don't generate dynamic relocation
374 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
376 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
379 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
380 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
381 (allocate_dynrelocs): Discard dynamic relocations if
382 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
383 (elf32_hppa_relocate_section): Don't generate dynamic
384 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
386 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
389 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
390 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
391 (allocate_fptr): Don't allocate function pointer if
392 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
393 (allocate_dynrel_entries): Don't allocate dynamic relocation
394 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
395 (set_got_entry): Don't set GOT entry if
396 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
397 (set_pltoff_entry): Don't set PLTOFF entry if
398 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
399 (elfNN_ia64_relocate_section): Don't install dynamic relocation
400 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
402 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
405 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
406 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
407 (allocate_dynrelocs): Don't allocate dynamic relocations if
408 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
410 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
413 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
414 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
415 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
416 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
418 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
421 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
422 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
423 (tilepro_elf_relocate_section): Don't generate dynamic
424 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
425 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
426 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
427 (tilegx_elf_relocate_section): Don't generate dynamic
428 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
430 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
433 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
434 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
436 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
437 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
439 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
441 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
442 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
443 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
445 2017-10-12 James Bowman <james.bowman@ftdichip.com>
447 * bfd-in2.h: Regenerate.
448 * libbfd.h: Regenerate.
449 * elf32-ft32.c: Add HOWTO R_FT32_15.
450 * reloc.c: Add BFD_RELOC_FT32_15.
452 2017-10-12 Nick Clifton <nickc@redhat.com>
454 * reloc.c (enum bfd_reloc_status): Start values at 2.
455 * bfd-in2.h: Regenerate.
456 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
457 that a TRUE return indicates success. Compare the result of
458 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
459 (build_one_stub): Change sense of tests against aarch64_relocate
461 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
462 than FALSE, when an error is detected.
463 (elfNN_aarch64_final_link_relocate): Likewise.
465 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
467 * elf32-i386.c (elf_backend_hide_symbol): New.
468 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
469 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
470 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
472 2017-10-12 Alan Modra <amodra@gmail.com>
474 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
475 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
476 (bfd_elf_define_start_stop): Likewise.
478 2017-10-12 Alan Modra <amodra@gmail.com>
480 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
481 when executable rather than non-PIC.
482 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
483 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
485 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
487 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
489 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
490 (elf_external_linux_prpsinfo64_ugid32): ... this.
491 (swap_linux_prpsinfo32_out): Rename to...
492 (swap_linux_prpsinfo32_ugid32_out): ... this.
493 (elf_external_linux_prpsinfo64_ugid16): New structure.
494 (swap_linux_prpsinfo64_ugid16_out): New function.
495 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
496 (elf_backend_linux_prpsinfo64_ugid16): Define.
497 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
498 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
499 of the 64-bit Linux core PRPSINFO note.
500 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
502 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
504 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
506 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
507 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
508 (elf_external_ppc_linux_prpsinfo32)
509 (swap_ppc_linux_prpsinfo32_out): Move to...
510 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
511 (swap_linux_prpsinfo32_ugid32_out): ... these.
512 (elf_external_linux_prpsinfo32): Rename to...
513 (elf_external_linux_prpsinfo32_ugid16): ... this.
514 (swap_linux_prpsinfo32_out): Rename to...
515 (swap_linux_prpsinfo32_ugid16_out): ... this.
516 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
517 (elf_backend_linux_prpsinfo32_ugid16): Define.
518 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
519 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
520 of the 32-bit Linux core PRPSINFO note.
521 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
522 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
523 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
524 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
525 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
526 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
527 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
528 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
529 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
530 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
532 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
534 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
535 `gap' member ahead of `pr_flag'.
537 2017-10-11 Pedro Alves <palves@redhat.com>
539 * bfd.c (_doprnt): Rename to ...
540 (_bfd_doprnt): ... this.
541 (error_handler_internal): Adjust.
543 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
545 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
546 instead of incrementing it.
547 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
549 2017-10-10 Renlin Li <renlin.li@arm.com>
552 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
553 symbols into dynamic.
555 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
558 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
559 (riscv_elf_link_hash_table_create): Initialize max_alignment to
561 (_bfd_riscv_relax_section): Cache the max alignment of output
562 sections if possible.
564 2017-10-10 Alan Modra <amodra@gmail.com>
566 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
567 .opd whenever .opd is present and non-zero size. Move code
568 setting abiversion to/from output file earlier. Only set
569 u.opd.func_sec when --gc-sections. Read relocs and set up
570 u.opd.func_sec values here..
571 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
573 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
575 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
577 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
580 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
582 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
583 .interp section with "ld --no-dynamic-linker".
585 2017-10-09 Alan Modra <amodra@gmail.com>
588 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
589 funcinfo_hash_table and varinfo_hash_table.
591 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
593 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
594 in read-only section with minfo.
595 (sh_elf_size_dynamic_sections): Likewise.
597 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
599 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
602 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
604 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
605 this_hdr.sh_entsize only if section size > 0.
607 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
609 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
611 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
613 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
614 in read-only section with minfo.
615 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
617 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
619 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
622 2017-10-06 John Baldwin <jhb@FreeBSD.org>
624 * elf-bfd.h (struct elf_backend_data): Add
625 `elf_backend_grok_freebsd_prstatus'.
626 * elf.c (elfcore_grok_freebsd_note): Call
627 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
629 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
631 (elf_backend_grok_freebsd_prstatus): Define.
632 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
633 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
635 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
637 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
638 and has_non_got_reloc with zero_undefweak.
639 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
640 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
642 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
643 has_non_got_reloc with zero_undefweak.
644 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
645 has_got_reloc and has_non_got_reloc with zero_undefweak.
646 (elf_x86_link_hash_entry): Likewise.
648 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
650 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
651 (VERIFY_COPY_RELOC): Likewise.
653 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
655 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
656 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
657 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
659 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
661 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
662 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
663 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
665 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
667 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
668 * elf32-i386.c (elf_i386_relocate_section): Use it.
669 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
671 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
673 * elf32-i386.c (X86_SIZE_TYPE_P): New.
674 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
675 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
676 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
677 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
679 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
681 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
682 (PLT_LOCAL_IFUNC_P): Likewise.
683 * elf32-i386.c (elf_i386_relocate_section): Use them.
684 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
686 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
688 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
689 * elf32-i386.c (elf_i386_relocate_section): Use it.
690 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
692 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
694 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
695 * elf32-i386.c (elf_i386_relocate_section): Use it.
696 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
698 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
700 * elf32-i386.c (X86_PCREL_TYPE_P): New.
701 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
702 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
703 (X86_PCREL_TYPE_P): This.
704 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
705 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
706 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
708 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
710 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
712 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
713 * elf32-i386.c (elf_i386_tls_transition): Use it.
714 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
716 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
718 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
719 Dump dynamic relocation in read-only section with minfo if
721 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
722 (maybe_set_textrel): Likewise.
723 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
724 read-only section with minfo.
726 2017-10-05 John Baldwin <jhb@FreeBSD.org>
728 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
730 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
732 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
733 in read-only section with minfo.
734 (tilepro_elf_size_dynamic_sections): Likewise.
735 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
736 (tilegx_elf_size_dynamic_sections): Likewise.
738 2017-10-05 Pedro Alves <palves@redhat.com>
741 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
742 ellipsis parameter. Split out bfd_error_on_input code to..
743 (bfd_set_input_error): .. New function.
744 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
745 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
746 * bfd-in2.h: Regenerate.
748 2017-10-05 Alan Modra <amodra@gmail.com>
750 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
751 fini_array error value.
753 2017-10-05 Alan Modra <amodra@gmail.com>
756 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
758 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
760 (elf_fake_sections): Adjust calls. Exit immediately on failure.
761 (bfd_elf_set_group_contents): Add associated reloc section indices
764 2017-10-04 Alan Modra <amodra@gmail.com>
766 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
767 classify symbols for ELFv2.
769 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
772 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
773 undergoes default promotion.
774 * bfd-in2.h: Regenerate.
776 2017-10-02 Alan Modra <amodra@gmail.com>
778 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
779 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
781 2017-10-01 Alan Modra <amodra@gmail.com>
784 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
785 (add_line_info): Always put end_sequence last.
787 2017-10-01 Alan Modra <amodra@gmail.com>
790 * dwarf2.c (read_section): Allocate buffer with extra byte for
791 bfd_simple_get_relocated_section_contents rather than copying
794 2017-09-29 Alan Modra <amodra@gmail.com>
796 * merge.c (merge_strings): Return FALSE on malloc failure.
797 (_bfd_merge_sections): Return failures from record_section and
800 2017-09-28 Alan Modra <amodra@gmail.com>
803 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
804 a case where plugin_notice isn't called.
806 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
808 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
811 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
814 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
815 output_bfd to info->callbacks->minfo.
817 2017-09-26 Nick Clifton <nickc@redhat.com>
820 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
821 assertion failure if elf_x86_64_rtype_to_howto has already issued
824 2017-09-26 Alan Modra <amodra@gmail.com>
827 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
830 2017-09-26 Nick Clifton <nickc@redhat.com>
833 * dwarf2.c (read_formatted_entries): Fail early if we know that
834 the loop parsing data entries will overflow the end of the
837 2017-09-26 Alan Modra <amodra@gmail.com>
840 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
841 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
842 to stash->info_ptr_memory, and check die_ref is within that memory.
843 Set info_ptr_end correctly when another CU is refd. Check die_ref
844 for DW_FORM_ref4 etc. is within CU.
846 2017-09-26 Alan Modra <amodra@gmail.com>
849 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
850 (read_formatted_entries): Init "fe".
851 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
853 2017-09-26 Alan Modra <amodra@gmail.com>
856 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
857 bounds in inner loop.
859 2017-09-25 Alan Modra <amodra@gmail.com>
862 * dwarf1.c (parse_die): Sanity check pointer against section limit
863 before dereferencing.
864 (parse_line_table): Likewise.
866 2017-09-25 Alan Modra <amodra@gmail.com>
869 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
871 (parse_comp_unit): Likewise.
873 2017-09-25 Alan Modra <amodra@gmail.com>
876 * dwarf2.c (read_formatted_entries): Error on format_count zero.
878 2017-09-24 Alan Modra <amodra@gmail.com>
881 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
882 within section bounds.
884 2017-09-24 Alan Modra <amodra@gmail.com>
887 * dwarf2.c (decode_line_info): Properly free line sequences on error.
889 2017-09-24 Alan Modra <amodra@gmail.com>
892 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
893 pname param. Return status. Make name const. Don't abort,
894 return an error. Formatting. Exit if current info_ptr matches
895 orig_info_ptr. Update callers.
896 (scan_unit_for_symbols): Start at nesting_level of zero. Make
897 nested_funcs an array of structs for extensibility. Formatting.
899 2017-09-24 Alan Modra <amodra@gmail.com>
902 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
903 rather than dividing by zero.
905 2017-09-24 Alan Modra <amodra@gmail.com>
908 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
910 2017-09-24 Alan Modra <amodra@gmail.com>
913 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
915 2017-09-24 Alan Modra <amodra@gmail.com>
918 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
919 SHT_GNU_verneed section for sanity. Don't zalloc memory for
922 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
925 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
928 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
931 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
932 -1 if bfd_canonicalize_dynamic_reloc returns 0.
934 2017-09-22 Pedro Alves <palves@redhat.com>
935 Alan Modra <amodra@gmail.com>
937 * version.h: Add comment.
939 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
941 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
942 NT_S390_GS_BC, correct the previously swapped invocations of
943 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
945 2017-09-19 Alan Modra <amodra@gmail.com>
948 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
951 2017-09-19 Alan Modra <amodra@gmail.com>
954 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
955 symbols before calculating verrefs. Don't renumber dynsyms
956 after gc. Exclude .gnu.version when zero or one dynsym.
957 Localize some vars and reindent.
959 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
962 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
963 return from bfd_canonicalize_dynamic_reloc.
965 2017-09-15 Alan Modra <amodra@gmail.com>
968 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
969 overflows bfd_size_type.
971 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
974 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
975 to indicate if conversion is performed.
976 (elf_i386_check_relocs): Cache section contents and relocations
977 if conversion is performed.
978 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
979 contents and relocations if conversion is performed.
981 2017-09-14 Nick Clifton <nickc@redhat.com>
984 * peXXigen.c (pe_print_idata): Extend check for HintName vector
987 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
989 * elfxx-x86.h: Fix a typo in comments.
991 2017-09-09 Kamil Rytarowski <n54@gmx.com>
993 * elf32-nds32.c: Rename __BIT() to N32_BIT().
995 2017-09-09 Alan Modra <amodra@gmail.com>
997 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1000 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1002 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1003 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1004 (elf_i386_finish_dynamic_symbol): Likewise.
1005 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1006 (elf_x86_64_finish_dynamic_symbol): Likewise.
1007 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1008 (_bfd_x86_elf_fixup_symbol): Likewise.
1010 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1012 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1013 check has_non_got_reloc.
1015 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1018 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1019 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1020 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1021 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1022 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1023 and linker_def on __ehdr_start if it is referenced and not
1025 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1026 and return TRUE when building executable, if a symbol has
1027 non-GOT/non-PLT relocations in text section or there is no
1029 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1031 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1033 * elfxx-x86.h: Update comments.
1035 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1037 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1038 elf_x86_plt_layout_table with elf_x86_init_table.
1039 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1041 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1043 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1044 (elf_x86_init_table): This.
1045 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1046 elf_x86_plt_layout_table with elf_x86_init_table.
1048 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1050 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1051 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1052 * configure: Regenerated.
1053 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1054 and r_sym fields of plt_layout.
1055 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1057 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1058 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1059 r_info nor r_sym fields.
1060 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1062 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1064 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1066 * (_bfd_riscv_relax_align): Call bfd_set_error and
1067 print an error message when unable to relax a .align directive.
1069 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1071 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1072 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1073 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1074 R_RISCV_PCREL_HI20 relocs, and pass the result to
1075 riscv_record_pcrel_hi_reloc.
1077 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1079 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1080 r_type_p. Remove the converted argument. Replace
1081 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1082 the new relocation type via r_type_p.
1083 (elf_i386_relocate_section): Likewise.
1084 (elf_i386_finish_dynamic_symbol): Likewise.
1085 (need_convert_load): Removed.
1086 (check_relocs_failed): Updated.
1087 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1088 instead of setting need_convert_load.
1089 (_bfd_i386_elf_convert_load): Removed.
1090 * elf64-x86-64.c (need_convert_load): Removed.
1091 (check_relocs_failed): Updated.
1092 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1093 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1094 Return the new relocation type via r_type_p.
1095 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1096 instead of setting need_convert_load.
1097 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1099 (_bfd_x86_64_elf_convert_load): Removed.
1100 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1101 with SYMBOL_REFERENCES_LOCAL_P.
1102 (elf_x86_64_finish_dynamic_symbol): Likewise.
1103 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1105 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1106 (_bfd_x86_elf_link_symbol_references_local): New function.
1107 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1108 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1109 SYMBOL_REFERENCES_LOCAL_P.
1110 (elf_x86_link_hash_entry): Add local_ref.
1111 (elf_x86_link_hash_table): Remove convert_load.
1112 (_bfd_i386_elf_convert_load): Removed.
1113 (_bfd_x86_64_elf_convert_load): Likewise.
1114 (_bfd_x86_elf_link_symbol_references_local): New.
1116 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1118 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1119 (elf_x86_64_info_to_howto): Get the real relocation type by
1120 masking out R_X86_64_converted_reloc_bit.
1121 (elf_x86_64_check_tls_transition): Get the real relocation type
1122 by masking out R_X86_64_converted_reloc_bit.
1123 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1124 instead of setting converted_reloc.
1125 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1126 instead of converted_reloc. Get the real relocation type by
1127 masking out R_X86_64_converted_reloc_bit.
1128 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1129 R_X86_64_converted_reloc_bit is valid.
1130 * elfxx-x86.h (converted_reloc): Removed.
1132 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1134 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1135 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1136 to get the relocation type again.
1137 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1138 r_type when calling elf_x86_64_tls_transition. Don't use
1139 ELF32_R_TYPE to get the relocation type again.
1141 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1143 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1146 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1148 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1149 argument. Don't check relocation overflow. Avoid relocation
1150 overflow if --no-relax is used. Set converted_reloc on symbol
1151 if a GOTPCREL relocation is converted.
1152 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1153 --no-relax if GOTPCREL relocation conversion leads to relocation
1155 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1157 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1158 Edmar Wienskoski <edmar.wienskoski@nxp.com
1160 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1161 (ppc_elf_check_relocs): Handle it.
1162 (ppc_elf_vle_split20): New function.
1163 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1165 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1168 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1169 for x86-64 if GOT_TLS_GDESC_P is true.
1171 2017-09-03 Alan Modra <amodra@gmail.com>
1174 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1176 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1178 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1179 tls_get_addr for x86-64 in one place.
1181 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1183 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1184 with elfxx-x86.lo for 64-bit BFD.
1185 * configure: Regenerated.
1187 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1189 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1190 (_bfd_i386_elf_convert_load): This. Remove static.
1191 (elf_i386_size_dynamic_sections): Removed.
1192 (elf_backend_size_dynamic_sections): Likewise.
1193 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1194 (_bfd_x86_64_elf_convert_load): This. Remove static.
1195 (elf_x86_64_size_dynamic_sections): Removed.
1196 (elf_backend_size_dynamic_sections): Likewise.
1197 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1198 (elf_x86_allocate_dynrelocs): This. Make it static.
1199 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1200 (elf_x86_allocate_local_dynreloc): This. Make it static.
1201 (elf_i386_is_reloc_section): New function.
1202 (elf_x86_64_is_reloc_section): Likewise.
1203 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1204 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1205 Rearrange got_entry_size initialization.
1206 (_bfd_x86_elf_size_dynamic_sections): New function.
1207 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1208 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1209 (_bfd_i386_elf_convert_load): New.
1210 (_bfd_x86_64_elf_convert_load): Likewise.
1211 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1212 (elf_backend_size_dynamic_sections): Likewise.
1213 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1214 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1216 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1218 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1221 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1223 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1224 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1226 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1228 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1229 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1230 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1231 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1232 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1233 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1235 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1237 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1238 (elf_i386_allocate_local_dynrelocs): Likewise.
1239 (elf_i386_size_dynamic_sections): Replace
1240 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1241 with _bfd_x86_elf_allocate_dynrelocs and
1242 _bfd_x86_elf_allocate_local_dynrelocs.
1243 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1244 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1245 (elf_x86_64_size_dynamic_sections): Replace
1246 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1247 with _bfd_x86_elf_allocate_dynrelocs and
1248 _bfd_x86_elf_allocate_local_dynrelocs.
1249 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1250 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1251 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1252 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1254 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1256 * elf32-i386.c (is_i386_elf): Removed.
1257 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1258 (elf_i386_size_dynamic_sections): Likewise.
1259 (elf_i386_relocate_section): Likewise.
1260 * elf64-x86-64.c (is_x86_64_elf): Removed.
1261 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1263 (elf_x86_64_size_dynamic_sections): Likewise.
1264 (elf_x86_64_relocate_section): Likewise.
1265 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1267 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1270 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1272 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1273 (elf_i386_allocate_dynrelocs): Replace
1274 elf_i386_compute_jump_table_size with
1275 elf_x86_compute_jump_table_size.
1276 (elf_i386_size_dynamic_sections): Likewise.
1277 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1278 (elf_x86_64_allocate_dynrelocs): Replace
1279 elf_x86_64_compute_jump_table_size with
1280 elf_x86_compute_jump_table_size.
1281 (elf_x86_64_size_dynamic_sections): Likewise.
1282 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1284 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1285 (elf_x86_compute_jump_table_size): New.
1287 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1289 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1291 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1292 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1294 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1296 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1297 with htab->is_vxworks.
1298 (elf_i386_size_dynamic_sections): Likewise.
1299 (elf_i386_relocate_section): Likewise.
1300 (elf_i386_finish_dynamic_symbol): Likewise.
1301 (elf_i386_finish_dynamic_sections): Likewise.
1303 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1305 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1306 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1307 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1308 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1309 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1310 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1311 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1312 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1314 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1317 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1318 ELF_COMMON_DEF_P for common symbols.
1320 2017-09-02 Alan Modra <amodra@gmail.com>
1322 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1323 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1324 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1326 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1328 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1329 (elf_backend_gc_mark_hook): Likewise.
1330 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1331 (elf_backend_gc_mark_hook): Likewise.
1332 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1333 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1334 (elf_backend_gc_mark_hook): Likewise.
1336 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1338 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1339 (elf_backend_adjust_dynamic_symbol): Likewise.
1340 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1341 (elf_backend_adjust_dynamic_symbol): Likewise.
1342 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1343 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1344 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1345 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1346 (elf_backend_adjust_dynamic_symbol): Likewise.
1348 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1350 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1353 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1355 * elf32-i386.c (elf_i386_mkobject): Removed.
1356 (bfd_elf32_mkobject): Likewise.
1357 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1358 (bfd_elf64_mkobject): Likewise.
1359 (bfd_elf32_mkobject): Likewise.
1360 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1361 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1362 (bfd_elf64_mkobject): Likewise.
1363 (bfd_elf32_mkobject): Likewise.
1365 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1367 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1368 Call _bfd_x86_elf_link_setup_gnu_properties.
1369 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1370 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1372 (elf_x86_64_non_lazy_plt): Likewise.
1373 (elf_x86_64_lazy_bnd_plt): Likewise.
1374 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1375 (elf_x86_64_lazy_ibt_plt): Likewise.
1376 (elf_x32_lazy_ibt_plt): Likewise.
1377 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1378 (elf_x32_non_lazy_ibt_plt): Likewise.
1379 (elf_x86_64_nacl_plt): Likewise.
1380 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1381 _bfd_x86_elf_link_setup_gnu_properties.
1382 * elfxx-x86.c: Include elf-vxworks.h".
1383 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1384 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1385 comments for pic_plt0_entry and pic_plt_entry.
1386 (elf_x86_non_lazy_plt_layout): Likewise.
1387 (elf_x86_plt_layout_table): New.
1388 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1390 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1393 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1394 .eh_frame section for the second PLT.
1395 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1396 alignment of .eh_frame section for the second PLT.
1398 2017-09-01 Nick Clifton <nickc@redhat.com>
1401 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1404 2017-09-01 Nick Clifton <nickc@redhat.com>
1407 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1408 attribute buffer is NUL terminated.
1410 2017-08-31 Nick Clifton <nickc@redhat.com>
1413 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1414 to dwarf string sections.
1416 2017-08-31 Alan Modra <amodra@gmail.com>
1418 * po/SRC-POTFILES.in: Regenerate.
1420 2017-08-31 Alan Modra <amodra@gmail.com>
1422 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1423 for a section containing just a terminator. Allow multiple
1424 terminators at end of section.
1425 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1426 sections when not adding alignment. Assert on terminator in
1429 2017-08-31 Alan Modra <amodra@gmail.com>
1433 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1436 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1438 * configure.ac (bfd_backends): Add elf64.lo together with
1439 elfxx-x86.lo for 64-bit BFD.
1440 * configure: Regenerated.
1442 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1444 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1447 2017-08-31 Alan Modra <amodra@gmail.com>
1450 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1451 before _close_and_cleanup. Call iovec->bclose after.
1452 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1454 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1456 * elf32-i386.c (elf_i386_plt_type): Removed.
1457 (elf_i386_plt): Likewise.
1458 (elf_i386_get_synthetic_symtab): Updated. Call
1459 _bfd_x86_elf_get_synthetic_symtab.
1460 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1461 (elf_x86_64_plt): Likewise.
1462 (elf_x86_64_get_synthetic_symtab): Updated. Call
1463 _bfd_x86_elf_get_synthetic_symtab.
1464 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1465 (elf_x86_64_get_plt_got_vma): Likewise.
1466 (elf_i386_valid_plt_reloc_p): Likewise.
1467 (elf_x86_64_valid_plt_reloc_p): Likewise.
1468 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1469 * elfxx-x86.h (elf_x86_plt_type): New.
1470 (elf_x86_plt): Likewise.
1471 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1473 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1475 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1476 target_id instead of elf_machine_code.
1478 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1480 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1481 (elf_i386_lazy_plt_layout): Likewise.
1482 (elf_i386_non_lazy_plt_layout): Likewise.
1483 (elf_i386_plt_layout): Likewise.
1484 (elf_i386_link_hash_table): Likewise.
1485 (elf_i386_next_tls_desc_index): Likewise.
1486 (elf_i386_srelplt2): Likewise.
1487 (elf_i386_plt): Likewise.
1488 (elf_i386_lazy_plt): Likewise.
1489 (elf_i386_non_lazy_plt): Likewise.
1490 (elf_i386_link_hash_table_create): Likewise.
1491 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1492 (elf_i386_lazy_plt): Updated.
1493 (elf_i386_non_lazy_plt): Likewise.
1494 (elf_i386_lazy_ibt_plt): Likewise.
1495 (elf_i386_non_lazy_ibt_plt): Likewise.
1496 (elf_i386_allocate_dynrelocs): Likewise.
1497 (elf_i386_size_dynamic_sections): Likewise.
1498 (elf_i386_relocate_section): Likewise.
1499 (elf_i386_finish_dynamic_symbol): Likewise.
1500 (elf_i386_finish_dynamic_sections): Likewise.
1501 (elf_i386_get_synthetic_symtab): Likewise.
1502 (elf_i386_link_setup_gnu_properties): Likewise.
1503 (elf_i386_nacl_plt): Likewise.
1504 * elf64-x86-64.c (ABI_64_P): Removed.
1505 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1506 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1507 (elf_x86_64_lazy_plt_layout): Likewise.
1508 (elf_x86_64_non_lazy_plt_layout): Likewise.
1509 (elf_x86_64_plt_layout): Likewise.
1510 (elf_x86_64_link_hash_table): Likewise.
1511 (elf_x86_64_plt): Likewise.
1512 (elf_x86_64_lazy_plt): Likewise.
1513 (elf_x86_64_non_lazy_plt): Likewise.
1514 (elf_x86_64_link_hash_table_create): Likewise.
1515 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1516 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1517 (elf_x86_64_lazy_plt): Updated.
1518 (elf_x86_64_non_lazy_plt): Likewise.
1519 (elf_x86_64_lazy_bnd_plt): Likewise.
1520 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1521 (elf_x86_64_lazy_ibt_plt): Likewise.
1522 (elf_x32_lazy_ibt_plt): Likewise.
1523 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1524 (elf_x32_non_lazy_ibt_plt): Likewise.
1525 (elf_x86_64_allocate_dynrelocs): Likewise.
1526 (elf_x86_64_size_dynamic_sections): Likewise.
1527 (elf_x86_64_relocate_section): Likewise.
1528 (elf_x86_64_finish_dynamic_symbol): Likewise.
1529 (elf_x86_64_finish_dynamic_sections): Likewise.
1530 (elf_x86_64_get_synthetic_symtab): Likewise.
1531 (elf_x86_64_link_setup_gnu_properties): Likewise.
1532 (elf_x86_64_nacl_plt): Likewise.
1533 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1535 (ELF32_DYNAMIC_INTERPRETER): New.
1536 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1537 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1538 (_bfd_x86_elf_link_hash_table_create): Likewise.
1539 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1540 (elf_x86_link_hash_table_free): This. Make it static.
1541 * elfxx-x86.h: Don't include "objalloc.h".
1543 (elf_x86_lazy_plt_layout): Likewise.
1544 (elf_x86_non_lazy_plt_layout): Likewise.
1545 (elf_x86_plt_layout): Likewise.
1546 (_bfd_x86_elf_link_hash_table_create): Likewise.
1547 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1548 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1549 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1550 srelplt2 and next_tls_desc_index.
1551 (_bfd_x86_elf_link_hash_table_free): Removed.
1553 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1555 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1556 branch offset interpretation.
1558 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1561 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1563 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1565 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1566 (elf_x86_64_srelplt2): Likewise.
1568 2017-08-30 Alan Modra <amodra@gmail.com>
1570 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1571 (ppc64_elf_tls_optimize): Set it.
1572 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1573 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1574 addis would add zero.
1575 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1576 (ppc_elf_tls_optimize): Set it.
1577 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1578 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1580 2017-08-30 Alan Modra <amodra@gmail.com>
1582 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1583 __tls_get_addr call sequences to LE, don't move the addi down
1584 to the nop. Replace the bl with addi and leave the nop alone.
1586 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1588 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1590 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1592 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1594 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1596 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1597 (BFD64_BACKENDS): Likewise.
1598 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1599 (BFD64_BACKENDS_CFILES): Likewise.
1600 * Makefile.in: Regenerated.
1601 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1602 elf32-i386.lo and elf64-x86-64.lo.
1603 * configure: Regenerated.
1604 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1605 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1606 "objalloc.h" and "hashtab.h".
1607 (ELIMINATE_COPY_RELOCS): Removed.
1608 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1609 (SYMBOL_NO_COPYRELOC): Likewise.
1610 (elf_i386_link_hash_entry): Likewise.
1611 (GOT_UNKNOWN): Likewise.
1612 (GOT_NORMAL): Likewise.
1613 (GOT_TLS_GD): Likewise.
1614 (elf_i386_hash_entry): Likewise.
1615 (elf_i386_obj_tdata): Likewise.
1616 (elf_i386_tdata): Likewise.
1617 (elf_i386_local_got_tls_type): Likewise.
1618 (elf_i386_local_tlsdesc_gotent): Likewise.
1619 (elf_i386_hash_table): Likewise.
1620 (elf_i386_link_hash_newfunc): Likewise.
1621 (elf_i386_local_htab_hash): Likewise.
1622 (elf_i386_local_htab_eq): Likewise.
1623 (elf_i386_get_local_sym_hash): Likewise.
1624 (elf_i386_link_hash_table_free): Likewise.
1625 (elf_i386_copy_indirect_symbol): Likewise.
1626 (elf_i386_fixup_symbol): Likewise.
1627 (elf_i386_readonly_dynrelocs): Likewise.
1628 (elf_i386_always_size_sections): Likewise.
1629 (elf_i386_set_tls_module_base): Likewise.
1630 (elf_i386_dtpoff_base): Likewise.
1631 (compare_relocs): Likewise.
1632 (elf_i386_hash_symbol): Likewise.
1633 (elf_i386_parse_gnu_properties): Likewise.
1634 (elf_i386_merge_gnu_properties): Likewise.
1635 (elf_i386_link_check_relocs): Likewise.
1636 (elf_i386_merge_symbol_attribute): Likewise.
1637 (bfd_elf32_bfd_link_check_relocs): Likewise.
1638 (elf_backend_copy_indirect_symbol): Likewise.
1639 (elf_backend_always_size_sections): Likewise.
1640 (elf_backend_omit_section_dynsym): Likewise.
1641 (elf_backend_hash_symbol): Likewise.
1642 (elf_backend_fixup_symbol): Likewise.
1643 (elf_backend_parse_gnu_properties): Likewise.
1644 (elf_backend_merge_gnu_properties): Likewise.
1645 (elf_backend_merge_symbol_attribute): Likewise.
1646 (elf_i386_mkobject): Updated.
1647 (elf_i386_link_hash_table_create): Likewise.
1648 (elf_i386_check_tls_transition): Likewise.
1649 (elf_i386_tls_transition): Likewise.
1650 (elf_i386_convert_load_reloc): Likewise.
1651 (elf_i386_check_relocs): Likewise.
1652 (elf_i386_adjust_dynamic_symbol): Likewise.
1653 (elf_i386_allocate_dynrelocs): Likewise.
1654 (elf_i386_convert_load): Likewise.
1655 (elf_i386_size_dynamic_sections): Likewise.
1656 (elf_i386_relocate_section): Likewise.
1657 (elf_i386_finish_dynamic_symbol ): Likewise.
1658 (elf_i386_finish_dynamic_sections): Likewise.
1659 (elf_i386_output_arch_local_syms): Likewise.
1660 (elf_i386_get_synthetic_symtab): Likewise.
1661 (elf_i386_link_setup_gnu_properties): Likewise.
1662 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1663 of elf_link_hash_table, as base.
1664 (elf_i386_next_tls_desc_index): New.
1665 (elf_i386_srelplt2): Likewise.
1666 (elf_i386_plt): Likewise.
1667 (elf_i386_lazy_plt): Likewise.
1668 (elf_i386_non_lazy_plt): Likewise.
1669 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1670 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1671 "objalloc.h" and "hashtab.h".
1672 (ELIMINATE_COPY_RELOCS): Removed.
1673 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1674 (SYMBOL_NO_COPYRELOC): Likewise.
1675 (elf_x86_64_link_hash_entry): Likewise.
1676 (GOT_UNKNOWN): Likewise.
1677 (GOT_NORMAL): Likewise.
1678 (GOT_TLS_GD): Likewise.
1679 (elf_x86_64_hash_entry): Likewise.
1680 (elf_x86_64_obj_tdata): Likewise.
1681 (elf_x86_64_tdata): Likewise.
1682 (elf_x86_64_local_got_tls_type): Likewise.
1683 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1684 (elf_x86_64_hash_table): Likewise.
1685 (elf_x86_64_link_hash_newfunc): Likewise.
1686 (elf_x86_64_local_htab_hash): Likewise.
1687 (elf_x86_64_local_htab_eq): Likewise.
1688 (elf_x86_64_get_local_sym_hash): Likewise.
1689 (elf_x86_64_link_hash_table_free): Likewise.
1690 (elf_x86_64_copy_indirect_symbol): Likewise.
1691 (elf_x86_64_fixup_symbol): Likewise.
1692 (elf_x86_64_readonly_dynrelocs): Likewise.
1693 (elf_x86_64_always_size_sections): Likewise.
1694 (elf_x86_64_set_tls_module_base): Likewise.
1695 (elf_x86_64_dtpoff_base): Likewise.
1696 (compare_relocs): Likewise.
1697 (elf_x86_64_merge_symbol_attribute): Likewise.
1698 (elf_x86_64_hash_symbol): Likewise.
1699 (elf_x86_64_parse_gnu_properties): Likewise.
1700 (elf_x86_64_merge_gnu_properties): Likewise.
1701 (elf_x86_64_link_check_relocs): Likewise.
1702 (elf_backend_copy_indirect_symbol): Likewise.
1703 (elf_backend_always_size_sections): Likewise.
1704 (bfd_elf64_bfd_link_check_relocs): Likewise.
1705 (elf_backend_merge_symbol_attribute): Likewise.
1706 (elf_backend_hash_symbol): Likewise.
1707 (elf_backend_omit_section_dynsym): Likewise.
1708 (elf_backend_fixup_symbol): Likewise.
1709 (elf_backend_parse_gnu_properties): Likewise.
1710 (elf_backend_merge_gnu_properties): Likewise.
1711 (bfd_elf32_bfd_link_check_relocs): Likewise.
1712 (elf_x86_64_mkobject): Updated.
1713 (elf_x86_64_link_hash_table_create): Likewise.
1714 (elf_x86_64_check_tls_transition): Likewise.
1715 (elf_x86_64_tls_transition): Likewise.
1716 (elf_x86_64_convert_load_reloc): Likewise.
1717 (elf_x86_64_check_relocs): Likewise.
1718 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1719 (elf_x86_64_allocate_dynrelocs): Likewise.
1720 (elf_x86_64_convert_load): Likewise.
1721 (elf_x86_64_size_dynamic_sections): Likewise.
1722 (elf_x86_64_relocate_section): Likewise.
1723 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1724 (elf_x86_64_finish_dynamic_sections): Likewise.
1725 (elf_x86_64_output_arch_local_syms): Likewise.
1726 (elf_x86_64_get_synthetic_symtab): Likewise.
1727 (elf_x86_64_link_setup_gnu_properties): Likewise.
1728 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1729 instead of elf_link_hash_table, as base.
1730 (elf_x86_64_next_tls_desc_index): New.
1731 (elf_x86_64_srelplt2): Likewise.
1732 (elf_x86_64_plt): Likewise.
1733 (elf_x86_64_lazy_plt): Likewise.
1734 (elf_x86_64_non_lazy_plt): Likewise.
1735 * elfxx-x86.c: New file.
1736 * elfxx-x86.h: Likewise.
1738 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1740 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1742 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1744 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1746 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1747 sections before checking dynamic relocations and free invalid
1748 PLT section contents.
1749 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1751 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1753 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1754 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1756 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1759 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1761 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1763 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1765 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1767 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1769 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1772 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1773 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1774 Add a has_no_copy_on_protected bitfield.
1775 (elf_has_no_copy_on_protected): New.
1776 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1777 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1778 (elf_merge_gnu_property_list): Likewise.
1779 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1780 to FALSE for elf_has_no_copy_on_protected.
1781 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1782 (elf_i386_link_hash_entry): Add def_protected.
1783 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1784 when checking info->nocopyreloc.
1785 (elf_i386_link_setup_gnu_properties): Don't set
1786 extern_protected_data here.
1787 (elf_i386_merge_symbol_attribute): New function.
1788 (elf_backend_merge_symbol_attribute): New.
1789 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1790 (elf_x86_64_link_hash_entry): Add def_protected.
1791 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1792 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1793 when checking info->nocopyreloc.
1794 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1795 relocation run-time overflow and unresolvable R_X86_64_32S
1796 relocation against protected data symbol defined in shared object
1797 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1798 (elf_x86_64_link_setup_gnu_properties): Don't set
1799 extern_protected_data here.
1800 (elf_x86_64_merge_symbol_attribute): New function.
1801 (elf_backend_merge_symbol_attribute): New.
1803 2017-08-26 Alan Modra <amodra@gmail.com>
1805 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1806 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1807 (ppc_elf_relocate_section): Comment fix.
1808 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1809 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1810 Support dynamic relocs for TPREL16 when non-pic too.
1811 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1812 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1815 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1817 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1818 "symbol" in comments.
1819 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1821 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1824 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1825 R_X86_64_PC32 relocation run-time overflow and unresolvable
1826 R_X86_64_32S relocation with -z nocopyreloc.
1828 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1830 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1831 Undefined symbols may not have a type.
1832 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1834 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1836 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1837 bfd_link_info. Report shared, PIE or PDE object based on
1839 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1840 (elf_x86_64_relocate_section): Likewise.
1842 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1844 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1845 for function symbols.
1846 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1848 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1850 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1851 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1852 is set on any input relocatable file.
1853 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1855 2017-08-23 Alan Modra <amodra@gmail.com>
1858 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1859 ensure_undefweak_dynamic. Handle undefined too.
1860 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1861 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1862 (allocate_dynrelocs): Discard undefined non-default visibility
1863 relocs first. Make undefined syms dynamic. Tidy goto.
1865 2017-08-21 Alan Modra <amodra@gmail.com>
1866 H.J. Lu <hongjiu.lu@intel.com>
1869 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1870 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1872 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1875 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1876 undefined weak symbols.
1878 2017-08-18 Nick Clifton <nickc@redhat.com>
1881 * tekhex.c (getsym): Fix check for source pointer walking off the
1882 end of the input buffer.
1884 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1887 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1888 relocations in debug sections, change abort to _bfd_error_handler.
1890 2017-08-14 Nick Clifton <nickc@redhat.com>
1893 * elf.c (setup_group): Check for an empty or very small group
1895 * po/bfd.pot: Regenerate.
1897 2017-08-14 Alan Modra <amodra@gmail.com>
1900 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1901 alignment padding here.
1902 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1903 in a reverse pass over sections.
1905 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1908 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1909 for @plt suffixes first.
1910 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1912 2017-08-08 Nick Clifton <nickc@redhat.com>
1915 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1916 small section lengths.
1917 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1919 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1920 there is enough data present in the note.
1922 2017-08-08 Alan Modra <amodra@gmail.com>
1925 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1926 got.refcount for GOTOFF relocs, just create .got section.
1928 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1930 * elflink.c (elf_link_add_object_symbols): Move common symbol
1931 check after bed->common_definition.
1933 2017-08-07 Alan Modra <amodra@gmail.com>
1936 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1937 needed to define various dynamic tags have been discarded.
1939 2017-08-07 Nick Clifton <nickc@redhat.com>
1942 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1943 has not been set then use the bfd returned by
1944 _bfd_elf_link_setup_gnu_properties. If that is null then search
1945 through all the input bfds selecting the first normal, ELF format
1947 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1949 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1951 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1953 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1954 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1955 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1956 (elf_i386_link_check_relocs): New function.
1957 (bfd_elf32_bfd_link_check_relocs): New.
1958 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1960 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1961 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1962 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1963 (elf_x86_64_link_check_relocs): New function.
1964 (bfd_elf64_bfd_link_check_relocs): New.
1965 (bfd_elf32_bfd_link_check_relocs): Likewise.
1967 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1970 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1971 as undefined for --no-define-common.
1973 2017-08-05 Alan Modra <amodra@gmail.com>
1975 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1976 hppa_link_hash_table.
1978 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1980 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1981 entries for sysregs with negative indices.
1983 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1985 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1986 isn't the S/390 specific elf data.
1987 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1989 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1991 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1992 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1993 [R_RISCV_ADD16]: Likewise.
1994 [R_RISCV_ADD32]: Likewise.
1995 [R_RISCV_ADD64]: Likewise.
1996 [R_RISCV_SUB6]: Likewise.
1997 [R_RISCV_SUB8]: Likewise.
1998 [R_RISCV_SUB16]: Likewise.
1999 [R_RISCV_SUB32]: Likewise.
2000 [R_RISCV_SUB64]: Likewise.
2002 2017-07-31 Alan Modra <amodra@gmail.com>
2004 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2005 without ld.so checks.
2007 2017-07-29 Alan Modra <amodra@gmail.com>
2010 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2011 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2012 (is_elfv2_localentry0): Test non_zero_localentry.
2013 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2015 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2017 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2018 pointer check for htab->elf.irelplt.
2019 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2021 2017-07-27 Nick Clifton <nickc@redhat.com>
2024 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2026 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2028 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2030 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2032 (evax_bfd_print_emh): Check for invalid string lengths.
2034 2017-07-25 Nick Clifton <nickc@redhat.com>
2036 * po/fr.po: Updated French translation.
2038 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2041 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2042 16-bit absolute branches into 10-bit pc-relative branches on the
2043 MSP430 as well as the MSP430X.
2045 2017-07-25 Alan Modra <amodra@gmail.com>
2047 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2048 (stub_eh_frame_size): New function.
2049 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2050 (group_sections): Init group tls_get_addr_opt_bctrl.
2051 (ppc64_elf_size_stubs): Update sizing and initialization of
2052 .eh_frame. Iteration over stubs via group list.
2053 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2054 (ppc64_elf_finish_dynamic_sections): Update finalization of
2057 2017-07-24 Nick Clifton <nickc@redhat.com>
2060 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2061 of the relocs to the canonicalize_one_reloc routine.
2062 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2063 for the _bfd_mach_o_canonicalize_one_reloc field.
2064 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2065 res_base parameter. Use to check for corrupt pair relocs.
2066 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2068 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2070 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2073 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2074 enough data in the record before attempting to parse it.
2075 (_bfd_vms_slurp_eeom): Likewise.
2077 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2078 (image_set_ptr): Likewise.
2079 (alpha_vms_slurp_relocs): Likewise.
2081 (alpha_vms_object_p): Check for a truncated record.
2083 2017-07-24 Nick Clifton <nickc@redhat.com>
2086 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2087 an unrecognized reloc and sets the bfd_error value.
2088 * libbfd.h: Regenerate.
2089 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2091 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2092 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2093 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2094 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2095 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2097 2017-07-23 Alan Modra <amodra@gmail.com>
2099 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2102 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2105 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2106 reloc_class_ifunc for ifunc symbols.
2108 2017-07-19 Nick Clifton <nickc@redhat.com>
2111 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2112 correct magic bytes at the start, set the error to wrong format
2113 and clear the format selector before returning NULL.
2115 2017-07-19 Nick Clifton <nickc@redhat.com>
2118 * coff-rs6000.c (_bfd_strntol): New function.
2119 (_bfd_strntoll): New function.
2120 (GET_VALUE_IN_FIELD): New macro.
2121 (EQ_VALUE_IN_FIELD): new macro.
2122 (_bfd_xcoff_slurp_armap): Use new macros.
2123 (_bfd_xcoff_archive_p): Likewise.
2124 (_bfd_xcoff_read_ar_hdr): Likewise.
2125 (_bfd_xcoff_openr_next_archived_file): Likewise.
2126 (_bfd_xcoff_stat_arch_elt): Likewise.
2127 * coff64-rs6000.c (_bfd_strntol): New function.
2128 (_bfd_strntoll): New function.
2129 (GET_VALUE_IN_FIELD): New macro.
2130 (xcoff64_slurp_armap): Use new macros.
2132 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2133 John Eric Martin <John.Martin@emmicro-us.com>
2135 * bfd-in2.h: Regenerate.
2136 * libbfd.h: Regenerate.
2137 * elf32-arc.c (JLI): Define.
2138 * reloc.c: Add JLI relocations.
2140 2017-07-18 Nick Clifton <nickc@redhat.com>
2143 * coff-sh.c: Fix spelling typos.
2144 * compress.c: Likewise.
2145 * cpu-pdp11.c: Likewise.
2146 * ecofflink.c: Likewise.
2147 * elf-m10300.c: Likewise.
2149 * elf32-arm.c: Likewise.
2150 * elf32-m68k.c: Likewise.
2151 * elf32-nds32.c: Likewise.
2152 * elf32-ppc.c: Likewise.
2153 * elf32-sh.c: Likewise.
2154 * elf32-v850.c: Likewise.
2155 * elf64-ppc.c: Likewise.
2156 * elf64-x86-64.c: Likewise.
2157 * elflink.c: Likewise.
2158 * elfnn-aarch64.c: Likewise.
2159 * elfxx-mips.c: Likewise.
2161 * sunos.c: Likewise.
2162 * vms-alpha.c: Likewise.
2163 * xcofflink.c: Likewise.
2165 2017-07-18 Nick Clifton <nickc@redhat.com>
2168 * coffcode.h (handle_COMDAT): Replace abort with an error message
2171 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2174 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2177 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2179 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2181 2017-07-16 Alan Modra <amodra@gmail.com>
2183 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2184 __tls_index GOT entries when using __tls_get_addr_opt stub.
2185 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2187 2017-07-12 Alan Modra <amodra@gmail.com>
2189 * po/es.po: Update from translationproject.org/latest/bfd/.
2190 * po/fi.po: Likewise.
2191 * po/fr.po: Likewise.
2192 * po/id.po: Likewise.
2193 * po/ja.po: Likewise.
2194 * po/ro.po: Likewise.
2195 * po/ru.po: Likewise.
2196 * po/sr.po: Likewise.
2197 * po/sv.po: Likewise.
2198 * po/tr.po: Likewise.
2199 * po/uk.po: Likewise.
2200 * po/vi.po: Likewise.
2201 * po/zh_CN.po: Likewise.
2202 * po/hr.po: New file from translationproject.org.
2203 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2204 * configure: Regenerate.
2206 2017-07-12 Nick Clifton <nickc@redhat.com>
2208 Fix compile time warnings using gcc 7.1.1.
2209 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2211 (elf_xtensa_get_gotplt_section): Increase length of got_name
2213 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2214 default return of FALSE.
2215 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2216 default return of FALSE.
2218 2017-07-12 Alan Modra <amodra@gmail.com>
2220 * binary.c (binary_set_section_contents): Don't print filepos in
2222 (coff_write_object_contents): Cast size_t for error message.
2223 (coff_slurp_line_table): Don't use bfd_vma symndx.
2224 (coff_slurp_reloc_table): Remove unneeded cast.
2225 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2227 (find_abstract_instance_name): Likewise.
2228 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2229 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2230 (elf32_arm_check_relocs): Make r_symndx an int.
2231 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2233 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2235 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2237 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2238 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2239 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2240 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2241 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2242 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2243 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2244 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2245 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2246 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2247 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2248 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2249 and use %lu for error message.
2250 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2251 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2254 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2256 (elf32_arm_final_link_relocate): Likewise.
2257 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2258 * coffcode.h (styp_to_sec_flags): Likewise.
2259 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2260 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2261 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2262 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2263 (elf32_bfin_merge_private_bfd_data): Likewise.
2264 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2265 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2266 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2267 (i370_elf_relocate_section): Likewise.
2268 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2269 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2270 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2271 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2272 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2273 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2274 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2275 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2276 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2277 * ieee.c (ieee_write_id, read_id): Likewise.
2278 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2279 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2280 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2281 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2282 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2283 * stabs.c (_bfd_link_section_stabs): Likewise.
2285 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2287 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2288 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2289 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2290 * coff-sh.c (sh_relax_section): Likewise.
2291 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2292 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2293 * coffcode.h (coff_slurp_reloc_table): Likewise.
2294 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2295 (_bfd_coff_read_string_table): Likewise.
2296 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2297 * compress.c (bfd_get_full_section_contents): Likewise.
2298 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2299 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2300 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2301 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2302 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2303 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2304 (elf32_arm_write_section): Likewise.
2305 * elf32-bfin.c (bfin_relocate_section): Likewise.
2306 (bfinfdpic_relocate_section): Likewise.
2307 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2308 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2309 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2310 (elf_i386_relocate_section): Likewise.
2311 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2312 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2313 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2314 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2315 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2316 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2317 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2318 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2319 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2320 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2321 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2322 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2323 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2324 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2325 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2326 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2327 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2328 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2329 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2330 * elf32-sh.c (sh_elf_relax_section): Likewise.
2331 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2332 (sh_elf_relocate_section): Likewise.
2333 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2334 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2335 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2336 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2337 * elf32-v850.c (v850_elf_relax_section): Likewise.
2338 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2339 (elf_vax_relocate_section): Likewise.
2340 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2341 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2342 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2343 (do_fix_for_relocatable_link): Likewise.
2344 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2345 (elf64_alpha_relax_with_lituse): Likewise.
2346 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2347 (elf_hppa_final_link_relocate): Likewise.
2348 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2349 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2350 (elf64_vms_link_add_object_symbols): Likewise.
2351 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2352 (mmix_final_link_relocate): Likewise.
2353 * elf64-s390.c (invalid_tls_insn): Likewise.
2354 (elf_s390_relocate_section): Likewise.
2355 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2356 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2357 (elf_x86_64_relocate_section): Likewise.
2358 * elfcode.h (elf_slurp_symbol_table): Likewise.
2359 * elfcore.h (elf_core_file_p): Likewise.
2360 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2361 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2362 (elfNN_aarch64_relocate_section): Likewise.
2363 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2364 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2365 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2366 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2367 (_bfd_mips_elf_relocate_section): Likewise.
2368 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2369 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2370 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2371 * ieee.c (ieee_slurp_external_symbols): Likewise.
2372 * ihex.c (ihex_write_object_content): Likewise.
2373 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2374 * merge.c (_bfd_merged_section_offset): Likewise.
2375 * mmo.c (mmo_write_loc_chunk): Likewise.
2376 (mmo_write_object_contents): Likewise.
2377 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2378 * stabs.c (_bfd_link_section_stabs): Likewise.
2379 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2381 2017-07-11 Alan Modra <amodra@gmail.com>
2383 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2385 2017-07-11 Alan Modra <amodra@gmail.com>
2387 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2388 instruction" error using _bfd_error_handler, not einfo.
2390 2017-07-10 Nick Clifton <nickc@redhat.com>
2392 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2393 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2395 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2397 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2399 2017-07-07 Alan Modra <amodra@gmail.com>
2401 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2403 2017-07-07 Alan Modra <amodra@gmail.com>
2405 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2406 as long long. Move code replacing "ll" with "I64", and simplify.
2408 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2410 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2413 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2415 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2417 (line_info_add_file_name): Likewise.
2418 (decode_line_info): Likewise.
2420 2017-07-04 Tristan Gingold <gingold@adacore.com>
2422 * version.m4: Bump version to 2.29.51
2423 * configure: Regenerate.
2425 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2427 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2428 sanity check at the head of this function.
2430 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2432 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2433 dwarf_line_str_size.
2434 (struct attr_abbrev): Add field implicit_const.
2435 (dwarf_debug_sections): Add .debug_line_str.
2436 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2437 (dwarf_debug_section_assert): Add static assertion.
2438 (read_indirect_line_string): New.
2439 (read_abbrevs): Support DW_FORM_implicit_const.
2440 (is_str_attr): Support DW_FORM_line_strp.
2441 (read_attribute_value): Support DW_FORM_line_strp and
2442 DW_FORM_implicit_const.
2443 (read_attribute): Support DW_FORM_implicit_const.
2444 (line_info_add_include_dir, line_info_add_include_dir_stub):
2445 (line_info_add_file_name, read_formatted_entries): New.
2446 (decode_line_info, parse_comp_unit): Support DWARF 5.
2447 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2449 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2451 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2452 abort statement that was put for symbols that are not dynamic.
2454 2017-07-03 Tristan Gingold <gingold@adacore.com>
2456 * po/bfd.pot: Regenerate
2458 2017-07-03 Alan Modra <amodra@gmail.com>
2460 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2461 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2462 * elf.c (setup_group): Use "Lx" to print sh_size.
2463 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2464 unknown section type in hex.
2465 (copy_special_section_fields): Style fix.
2466 (bfd_section_from_shdr): Correct format for sh_link. Use a
2467 common error message for all the variants of unrecognized
2469 (assign_file_positions_for_load_sections): Use "Lx" for lma
2470 adjust error message.
2471 (assign_file_positions_for_non_load_sections): Formatting.
2472 (rewrite_elf_program_header): Formatting. Use "Lx" for
2473 bfd_vma values in error messages.
2474 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2475 ELF_R_SYM value to type expected by format.
2476 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2478 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2479 (elf_link_input_bfd): Use "Lx" for r_info.
2480 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2482 2017-07-03 Alan Modra <amodra@gmail.com>
2484 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2485 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2486 Microsoft C library variant of long long format specifier.
2487 (PRINT20): Cast value to bfd_uint64_t not long long.
2488 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2489 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2490 long long. Don't cast to bfd_vma.
2491 * elf32-score.c (score3_bfd_getl48): Likewise.
2492 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2494 2017-07-03 Alan Modra <amodra@gmail.com>
2496 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2498 (bfd_elf_print_symbol): Don't cast symbol->flags.
2499 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2500 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2501 _bfd_error_handler argument order.
2502 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2504 2017-07-03 Alan Modra <amodra@gmail.com>
2506 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2507 AC_TYPE_LONG_DOUBLE.
2508 * configure: Regenerate.
2509 * config.in: Regenerate.
2511 2017-06-29 Andrew Waterman <andrew@sifive.com>
2513 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2516 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2518 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2519 unless it is undefined weak.
2520 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2521 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2523 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2524 is not dynamic in PIC, abort.
2526 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2529 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2530 undefined weak symbols into dynamic.
2531 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2532 relocation for non-dynamic symbols.
2533 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2535 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2537 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2538 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2539 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2540 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2541 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2544 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2546 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2547 (elfcore_write_s390_gs_bc): Likewise.
2548 * elf.c (elfcore_grok_s390_gs_cb): New function.
2549 (elfcore_grok_s390_gs_bc): New function.
2550 (elfcore_grok_note): Call them.
2551 (elfcore_write_s390_gs_cb): New function.
2552 (elfcore_write_s390_gs_bc): New function.
2553 (elfcore_write_register_note): Call them.
2555 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2557 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2558 bfd_get_file_size. Check archive element size.
2559 (_bfd_generic_get_section_contents_in_window): Likewise.
2561 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2563 * bfd-in2.h: Regenerated.
2564 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2565 (bfd_get_file_size): Likewise.
2567 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2568 Matthew Fortune <matthew.fortune@imgtec.com>
2570 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2571 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2572 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2573 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2575 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2576 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2577 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2578 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2579 `bfd_mach_mips_interaptiv_mr2' entries.
2580 * bfd-in2.h: Regenerate.
2582 2017-06-27 Nick Clifton <nickc@redhat.com>
2584 * tekhex.c (pass_over): Revert accidental conversion of a local
2585 array to a static array.
2587 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2590 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2591 reloc addend if necessary. Adjust diff only if
2592 shrinked_insn_address < end_address.
2594 2017-06-27 Alan Modra <amodra@gmail.com>
2597 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2598 (_bfd_generic_get_section_contents_in_window): Likewise.
2600 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2602 * elfnn-riscv.c (perform_relocation): Support the new
2603 R_RISCV_32_PCREL relocation.
2604 (riscv_elf_relocate_section): Likewise.
2605 * elfxx-riscv.c (howto_table): Likewise.
2606 (riscv_reloc_map): Likewise.
2607 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2608 * libbfd.h: Regenerate.
2610 2017-06-27 Alan Modra <amodra@gmail.com>
2613 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2614 Use unsigned file pointer type, and remove cast.
2615 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2616 Add "count", not "sz".
2618 2017-06-26 Pedro Alves <palves@redhat.com>
2621 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2624 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2627 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2630 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2632 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2633 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2634 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2635 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2636 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2638 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2641 * compress.c (bfd_get_full_section_contents): Don't check the
2643 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2644 reject a section whose size + offset is greater than the size
2646 (_bfd_generic_get_section_contents_in_window): Likewise.
2648 2017-06-26 Nick Clifton <nickc@redhat.com>
2651 * tekhex.c (getvalue): Check for the source pointer exceeding the
2652 end pointer before the first byte is read.
2654 2017-06-26 Nick Clifton <nickc@redhat.com>
2657 * opncls.c (get_build_id): Check that the section is big enough
2658 to contain the whole note.
2659 * compress.c (bfd_get_full_section_contents): Check for and reject
2660 a section whose size is greater than the size of the entire file.
2661 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2662 contain a notes section.
2664 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2666 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2668 (elf_s390_modify_segment_map): Likewise.
2669 (bfd_elf_s390_set_options): Lisewise.
2671 2017-06-26 Alan Modra <amodra@gmail.com>
2673 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2675 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2676 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2677 .preinit_array on --just-syms bfds.
2678 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2679 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2680 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2682 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2684 * elf.c (find_link): Bounds check "hint".
2686 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2688 * elf32-arm.c (using_thumb_only): Update list of architectures in
2689 BFD_ASSERT for which the logic is valid.
2690 (using_thumb2_bl): Likewise.
2691 (using_thumb2): Likewise and return true for ARMv8-R.
2692 (arch_has_arm_nop): Likewise.
2693 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2694 merging logic. Update commentis for value 15 of v8m_baseline,
2695 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2696 merging of value 15 of Tag_CPU_arch.
2698 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2700 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2701 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2702 * bfd-in2.h: Regenerate.
2704 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2706 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2707 the error_alignment label forward. Properly align program
2708 property note section.
2710 2017-06-22 Eric Christopher <echristo@gmail.com>
2712 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2713 abs to fix a truncation warning.
2715 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2717 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2718 local undefined weak symbol to 0.
2719 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2721 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2723 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2724 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2725 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2726 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2727 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2728 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2729 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2730 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2732 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2734 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2735 (elf_i386_lazy_ibt_plt_entry): Likewise.
2736 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2737 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2738 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2739 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2740 (elf_i386_lazy_plt_layout): Likewise.
2741 (elf_i386_non_lazy_plt_layout): Likewise.
2742 (elf_i386_link_hash_entry): Add plt_second.
2743 (elf_i386_link_hash_table): Add plt_second and
2744 plt_second_eh_frame.
2745 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2746 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2747 the second PLT. Check the second PLT.
2748 (elf_i386_relocate_section): Use the second PLT to resolve
2749 PLT reference if needed.
2750 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2752 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2753 second PLT. Generate unwind info for the second PLT.
2754 (elf_i386_plt_type): Add plt_second.
2755 (elf_i386_get_synthetic_symtab): Support the second PLT.
2756 (elf_i386_parse_gnu_properties): Support
2757 GNU_PROPERTY_X86_FEATURE_1_AND.
2758 (elf_i386_merge_gnu_properties): Support
2759 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2760 on GNU_PROPERTY_X86_FEATURE_1_IBT
2761 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2762 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2763 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2764 is set on all relocatable inputs.
2765 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2766 (elf_x32_lazy_ibt_plt_entry): Likewise.
2767 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2768 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2769 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2770 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2771 (elf_x86_64_lazy_ibt_plt): Likewise.
2772 (elf_x32_lazy_ibt_plt): Likewise.
2773 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2774 (elf_x32_non_lazy_ibt_plt): Likewise.
2775 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2776 (elf_x86_64_parse_gnu_properties): Support
2777 GNU_PROPERTY_X86_FEATURE_1_AND.
2778 (elf_x86_64_merge_gnu_properties): Support
2779 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2780 on GNU_PROPERTY_X86_FEATURE_1_IBT
2781 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2782 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2783 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2784 is set on all relocatable inputs.
2786 2017-06-22 Nick Clifton <nickc@redhat.com>
2789 * som.c (setup_sections): NUL terminate the space_strings buffer.
2790 Check that the space.name field does not index beyond the end of
2791 the space_strings buffer.
2793 2017-06-21 Nick Clifton <nickc@redhat.com>
2796 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2798 2017-06-21 Nick Clifton <nickc@redhat.com>
2801 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2802 type of the size parameter.
2803 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2804 length of the counted string.
2805 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2806 (_bfd_vms_save_counted_string): Likewise.
2807 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2808 _bfd_vms_save_counted_string.
2809 (_bfd_vms_slurp_ehdr): Likewise.
2810 (_bfd_vms_slurp_egsd): Likewise.
2811 (Parse_module): Likewise.
2813 2017-06-21 Alan Modra <amodra@gmail.com>
2815 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2816 calls before tocsave calls.
2817 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2820 2017-06-21 Nick Clifton <nickc@redhat.com>
2823 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2824 bfd_get_full_section_contents returns no contents.
2826 2017-06-21 Nick Clifton <nickc@redhat.com>
2829 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2832 2017-06-21 Nick Clifton <nickc@redhat.com>
2835 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2837 (image_set_ptr): Likewise.
2838 (alpha_vms_fix_sec_rel): Likewise.
2839 (alpha_vms_slurp_relocs): Likewise.
2841 2017-06-21 Nick Clifton <nickc@redhat.com>
2844 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2846 (ieee_archive_p): Likewise.
2847 (ieee_object_p): Likewise.
2849 2017-06-21 Nick Clifton <nickc@redhat.com>
2852 * elf.c (setup_group): Zero the group section pointer list after
2853 allocation so that loops can be caught. Check for NULL pointers
2854 when processing a group list.
2856 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2858 * elf-s390.h: New file.
2859 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2861 (elf_s390_additional_program_headers): New function.
2862 (elf_s390_modify_segment_map): New function.
2863 (bfd_elf_s390_set_options): New function.
2864 (elf_backend_additional_program_headers)
2865 (elf_backend_modify_segment_map): Add macro definitions.
2867 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2870 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2871 the DYNAMIC bit instead of bfd_count_sections.
2873 2017-06-19 Nick Clifton <nickc@redhat.com>
2876 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2878 (evax_bfd_print_eeom): Likewise.
2879 (evax_bfd_print_egsd): Check for an overlarge record length.
2880 (evax_bfd_print_etir): Likewise.
2882 2017-06-19 Nick Clifton <nickc@redhat.com>
2885 * libieee.h (struct common_header_type): Add end_p field.
2886 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2888 (read_id): Check for a length that exceeds the remaining bytes in
2890 (ieee_seek): Initialise end_p.
2891 (ieee_archive_p): Likewise.
2892 (ieee_object_p): Likewise.
2894 2017-06-19 Nick Clifton <nickc@redhat.com>
2897 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2898 before reading the EIHS structure entries.
2900 2017-06-19 Nick Clifton <nickc@redhat.com>
2903 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2904 gsd_size. Check that there are enough bytes remaining to read the
2905 type and size of the next egsd. Check that the size of the egsd
2906 does not exceed the size of the record.
2908 2017-06-19 Alan Modra <amodra@gmail.com>
2910 * config.bfd: Correct targ_underscore for cris.
2912 2017-06-18 Alan Modra <amodra@gmail.com>
2914 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2915 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2917 2017-06-16 Nick Clifton <nickc@redhat.com>
2919 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2920 bucketlist is empty because there are no symbols to add to the
2923 2017-06-16 Alan Modra <amodra@gmail.com>
2929 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2930 (BFD_JUMP_TABLE_LINK): Likewise.
2931 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2932 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2933 (bfd_elf_define_start_stop): New function.
2934 * linker.c (bfd_generic_define_start_stop): New function.
2935 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2937 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2938 * aout-target.h (MY_bfd_define_start_stop): Define.
2939 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2940 * binary.c (binary_bfd_define_start_stop): Define.
2941 * bout.c (b_out_bfd_define_start_stop): Define.
2942 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2943 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2944 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2945 * coffcode.h (coff_bfd_define_start_stop): Define.
2946 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2947 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2948 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2949 * ieee.c (ieee_bfd_define_start_stop): Define.
2950 * ihex.c (ihex_bfd_define_start_stop): Define.
2951 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2952 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2953 * mmo.c (mmo_bfd_define_start_stop): Define.
2954 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2955 * oasys.c (oasys_bfd_define_start_stop): Define.
2956 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2957 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2958 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2959 * som.c (som_bfd_define_start_stop): Define.
2960 * srec.c (srec_bfd_define_start_stop): Define.
2961 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2962 * versados.c (versados_bfd_define_start_stop): Define.
2963 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2964 (alpha_vms_bfd_define_start_stop): Define.
2965 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2966 * bfd-in2.h: Regenerate.
2967 * libbfd.h: Regenerate.
2969 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2971 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2972 SYMBOL_REFERENCES_LOCAL.
2974 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2977 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2978 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2979 runtime for if there needs copy relocation elimination.
2980 (need_copy_relocation_p): New function. Return true for symbol with
2981 pc-relative references and if it's against read-only sections.
2982 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2983 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2984 that are related with accessing external objects.
2985 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2986 in elfNN_aarch64_check_relocs.
2988 2017-06-15 Nick Clifton <nickc@redhat.com>
2991 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2994 (ieee_archive_p): Likewise.
2996 2017-06-15 Nick Clifton <nickc@redhat.com>
2999 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3001 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3003 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3004 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3005 keep both windowed and call0 ABI PLT definitions.
3006 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3007 elf_xtensa_*_plt_entry endex.
3008 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3010 2017-06-14 Nick Clifton <nickc@redhat.com>
3013 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3016 2017-06-14 Nick Clifton <nickc@redhat.com>
3019 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3020 maximum value for the ascic pointer. Check that name processing
3021 does not read beyond this value.
3022 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3025 2017-06-14 Nick Clifton <nickc@redhat.com>
3028 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3029 (process_otr): Check for an invalid offset in the otr structure.
3031 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3033 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3035 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3041 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3042 vtable field to a union.
3043 (_bfd_elf_is_start_stop): Removed.
3044 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3045 __start_SECNAME and __stop_SECNAME symbols.
3046 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3047 * elflink.c (_bfd_elf_is_start_stop): Removed.
3048 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3049 _bfd_elf_is_start_stop.
3050 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3051 __stop_SECNAME symbols. Updated.
3052 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3053 (bfd_elf_gc_record_vtinherit): Likewise.
3054 (bfd_elf_gc_record_vtentry): Likewise.
3056 2017-06-13 Nick Clifton <nickc@redhat.com>
3059 * elflink.c (elf_link_adjust_relocs): Generate an error when
3060 encountering a reloc against a symbol removed by garbage
3063 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3065 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3066 to merge_gnu_properties.
3067 * elf-properties.c (elf_merge_gnu_properties): Add struct
3068 bfd_link_info * and pass it to merge_gnu_properties.
3069 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3070 and pass it to elf_merge_gnu_properties.
3071 (_bfd_elf_link_setup_gnu_properties): Pass info to
3072 elf_merge_gnu_property_list.
3073 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3075 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3077 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3080 * binary.c (binary_set_section_contents): Scale lma by octets
3081 per byte to set filepos.
3083 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3085 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3088 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3090 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3093 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3095 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3096 patched section contents for TLS IE reloc.
3097 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3099 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3101 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3102 RELOC_FOR_GLOBAL_SYMBOL macro.
3104 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3106 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3109 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3111 * config/tc-arc.c (md_undefined_symbol): Changed.
3112 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3114 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3116 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3119 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3121 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3122 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3124 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3126 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3129 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3131 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3132 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3133 is non-zero. Add clarifying comments.
3135 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3137 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3138 name. Use local IFUNC symbol name string to report unsupported
3139 non-PIC call to IFUNC function.
3140 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3141 when generating R_386_IRELATIVE relocation.
3142 (elf_i386_finish_dynamic_symbol): Likewise.
3143 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3145 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3146 when generating R_X86_64_IRELATIVE relocation.
3147 (elf_x86_64_finish_dynamic_symbol): Likewise.
3149 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3151 * elf.c (setup_group): Make sure BFD sections are created for all
3152 group sections in the input file when processing SHF_GROUP
3154 (bfd_section_from_shdr): Avoid duplicating logic already
3155 implemented in `setup_group'.
3157 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3160 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3161 if the hint address is zero.
3163 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3166 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3167 ELF_COMMON_DEF_P for common symbols.
3169 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3171 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3172 SEC_GROUP sections as SEC_EXCLUDE.
3173 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3174 (assign_section_numbers): Use resolve_section_groups flag instead
3175 of relocatable link type.
3176 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3177 flag instead of checking the final_link flag for part of the
3178 checks in here. Fix white space as a result.
3179 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3180 instead of relocatable link type.
3181 (bfd_elf_final_link): Likewise.
3183 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3185 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3187 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3188 (s3_bfd_score_elf_check_relocs): Likewise.
3189 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3190 (score_elf_final_link_relocate): Likewise.
3191 (s7_bfd_score_elf_check_relocs): Likewise.
3193 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3195 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3198 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3200 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3201 from `reloc_count' rather than decrementing it.
3202 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3203 `reloc_count' by `int_rels_per_ext_rel'.
3204 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3205 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3206 entry determination.
3207 (s3_bfd_score_elf_check_relocs): Likewise.
3208 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3209 (s7_bfd_score_elf_relocate_section): Likewise.
3210 (s7_bfd_score_elf_check_relocs): Likewise.
3211 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3212 prototype and function.
3213 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3214 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3215 triple rather than once the sum of REL and RELA relocation entry
3217 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3218 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3219 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3220 storage allocation size determination.
3221 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3222 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3223 by `int_rels_per_ext_rel' for last relocation entry
3225 (bfd_elf_final_link): Do not multiply `reloc_count' by
3226 `int_rels_per_ext_rel' for internal relocation storage
3227 allocation size determination.
3228 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3229 `int_rels_per_ext_rel' for last relocation entry determination.
3230 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3231 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3232 (_bfd_mips_elf_relocate_section): Likewise.
3234 2017-06-05 Alan Modra <amodra@gmail.com>
3237 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3239 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3241 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3242 determine structure sizes.
3243 (elfcore_grok_freebsd_prstatus): Likewise.
3245 2017-06-01 Alan Modra <amodra@gmail.com>
3247 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3248 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3250 (is_elfv2_localentry0): New function.
3251 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3252 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3253 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3254 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3255 optimized localentry:0 stubs.
3256 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3257 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3259 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3261 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3263 2017-05-30 Casey Smith <clegg89@gmail.com>
3266 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3267 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3269 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3271 * cpu-arc.c (arc_compatible): New function.
3273 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3275 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3277 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3280 * bfdio.c (bfd_get_file_size): New function.
3281 * bfd-in2.h: Regenerated.
3283 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3285 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3288 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3290 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3291 dynobj instead of htab->elf.dynobj.
3293 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3295 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3297 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3298 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3299 actual number of internal relocations retrieved. Adjust
3300 function description.
3301 (bfd_elf64_canonicalize_reloc): Remove macro.
3302 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3304 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3306 * archures.c (bfd_mach_sparc_v9m8): Define.
3307 (bfd_mach_sparc_v8plusm8): Likewise.
3308 (bfd_mach_sparc_v9_p): Adjust to M8.
3309 (bfd_mach_sparc_64bit_p): Likewise.
3310 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3311 bfd_mach_sparc_v8plusm8.
3312 * bfd-in2.h: Regenerated.
3313 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3315 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3316 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3317 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3319 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3320 bfd_mach_sparc_v8plusm8.
3322 2017-05-19 Alan Modra <amodra@gmail.com>
3324 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3325 debug and special sections when no non-note alloc sections in an
3328 2017-05-18 Alan Modra <amodra@gmail.com>
3330 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3331 * elf-m10300.c: Likewise.
3333 * elf32-arc.c: Likewise.
3334 * elf32-bfin.c: Likewise.
3335 * elf32-m68k.c: Likewise.
3336 * elf32-nds32.c: Likewise.
3337 * elf32-tilepro.c: Likewise.
3338 * elflink.c: Likewise.
3339 * elfnn-aarch64.c: Likewise.
3340 * elfnn-riscv.c: Likewise.
3341 * elfxx-tilegx.c: Likewise.
3342 * mach-o.c: Likewise.
3343 * peXXigen.c: Likewise.
3344 * vms-alpha.c: Likewise.
3345 * vms-lib.c: Likewise.
3347 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3350 * elflink.c (elf_gc_mark_debug_section): New function.
3351 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3352 referenced by kept debug sections.
3354 2017-05-16 Alan Modra <amodra@gmail.com>
3356 * elf-m10300.c: Rename occurrences of non_ir_ref.
3357 * elf32-arm.c: Likewise.
3358 * elf32-bfin.c: Likewise.
3359 * elf32-cr16.c: Likewise.
3360 * elf32-cris.c: Likewise.
3361 * elf32-d10v.c: Likewise.
3362 * elf32-dlx.c: Likewise.
3363 * elf32-fr30.c: Likewise.
3364 * elf32-frv.c: Likewise.
3365 * elf32-hppa.c: Likewise.
3366 * elf32-i370.c: Likewise.
3367 * elf32-i386.c: Likewise.
3368 * elf32-iq2000.c: Likewise.
3369 * elf32-lm32.c: Likewise.
3370 * elf32-m32c.c: Likewise.
3371 * elf32-m32r.c: Likewise.
3372 * elf32-m68hc1x.c: Likewise.
3373 * elf32-m68k.c: Likewise.
3374 * elf32-mcore.c: Likewise.
3375 * elf32-metag.c: Likewise.
3376 * elf32-microblaze.c: Likewise.
3377 * elf32-moxie.c: Likewise.
3378 * elf32-msp430.c: Likewise.
3379 * elf32-mt.c: Likewise.
3380 * elf32-nios2.c: Likewise.
3381 * elf32-or1k.c: Likewise.
3382 * elf32-ppc.c: Likewise.
3383 * elf32-rl78.c: Likewise.
3384 * elf32-s390.c: Likewise.
3385 * elf32-score.c: Likewise.
3386 * elf32-score7.c: Likewise.
3387 * elf32-sh.c: Likewise.
3388 * elf32-tic6x.c: Likewise.
3389 * elf32-tilepro.c: Likewise.
3390 * elf32-v850.c: Likewise.
3391 * elf32-vax.c: Likewise.
3392 * elf32-xstormy16.c: Likewise.
3393 * elf32-xtensa.c: Likewise.
3394 * elf64-alpha.c: Likewise.
3395 * elf64-hppa.c: Likewise.
3396 * elf64-ia64-vms.c: Likewise.
3397 * elf64-mmix.c: Likewise.
3398 * elf64-ppc.c: Likewise.
3399 * elf64-s390.c: Likewise.
3400 * elf64-sh64.c: Likewise.
3401 * elf64-x86-64.c: Likewise.
3402 * elflink.c: Likewise.
3403 * elfnn-aarch64.c: Likewise.
3404 * elfnn-ia64.c: Likewise.
3405 * elfnn-riscv.c: Likewise.
3406 * elfxx-mips.c: Likewise.
3407 * elfxx-sparc.c: Likewise.
3408 * elfxx-tilegx.c: Likewise.
3409 * linker.c: Likewise.
3411 2017-05-16 Alan Modra <amodra@gmail.com>
3413 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3414 * elflink.c (elf_link_add_object_symbols): Update to use
3416 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3418 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3420 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3422 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3424 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3426 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3427 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3429 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3431 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3433 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3435 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3436 to plt_second/plt_second_eh_frame.
3437 (elf_x86_64_link_hash_newfunc): Updated.
3438 (elf_x86_64_allocate_dynrelocs): Likewise.
3439 (elf_x86_64_size_dynamic_sections): Likewise.
3440 (elf_x86_64_relocate_section): Likewise.
3441 (elf_x86_64_finish_dynamic_symbol): Likewise.
3442 (elf_x86_64_finish_dynamic_sections): Likewise.
3443 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3444 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3446 (elf_backend_setup_gnu_properties): Updated. Create the
3447 .plt.sec section instead of the .plt.sec section.
3449 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3451 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3452 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3453 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3455 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3457 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3458 (bfd_elf64_set_reloc): Define.
3459 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3461 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3463 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3464 (struct bfd_target): New field _bfd_set_reloc.
3465 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3466 * reloc.c (_bfd_generic_set_reloc): New function.
3467 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3468 * nlm-target.h (nlm_set_reloc): Likewise.
3469 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3470 * aout-tic30.c (MY_set_reloc): Likewise.
3471 * aout-target.h (MY_set_reloc): Likewise.
3472 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3473 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3474 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3475 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3476 * aout-adobe.c (aout_32_set_reloc): Likewise.
3477 * bout.c (b_out_set_reloc): Likewise.
3478 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3479 * i386os9k.c (aout_32_set_reloc): Likewise.
3480 * ieee.c (ieee_set_reloc): Likewise.
3481 * oasys.c (oasys_set_reloc): Likewise.
3482 * som.c (som_set_reloc): Likewise.
3483 * versados.c (versados_set_reloc): Likewise.
3484 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3485 _bfd_generic_set_reloc.
3486 (rs6000_xcoff64_aix_vec): LIkewise.
3487 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3488 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3489 * i386msdos.c (msdos_set_reloc): Define to
3490 _bfd_norelocs_set_reloc.
3491 * elfcode.h (elf_set_reloc): Define.
3492 * bfd-in2.h: Regenerated.
3494 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3497 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3498 for IFUNC function address.
3500 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3502 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3503 (CONFLICT_LIST): Likewise.
3504 (opcode/arc-attrs.h): Include.
3505 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3506 (arc_extract_features): New file.
3507 (arc_stralloc): Likewise.
3508 (arc_elf_merge_attributes): Likewise.
3509 (arc_elf_merge_private_bfd_data): Use object attributes.
3510 (bfd_arc_get_mach_from_attributes): New function.
3511 (arc_elf_object_p): Use object attributes.
3512 (arc_elf_final_write_processing): Likewise.
3513 (elf32_arc_obj_attrs_arg_type): New function.
3514 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3515 (elf32_arc_section_from_shdr): Likewise.
3516 (elf_backend_obj_attrs_vendor): Define.
3517 (elf_backend_obj_attrs_section): Likewise.
3518 (elf_backend_obj_attrs_arg_type): Likewise.
3519 (elf_backend_obj_attrs_section_type): Likewise.
3520 (elf_backend_obj_attrs_handle_unknown): Likewise.
3521 (elf_backend_section_from_shdr): Likewise.
3523 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3526 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3527 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3528 and the destination is a Thumb symbol.
3530 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3532 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3533 initializer to silence GCC 4.2.
3534 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3536 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3538 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3539 (LAZY_PLT_ENTRY_SIZE): This.
3540 (NON_LAZY_PLT_ENTRY_SIZE): New.
3541 (elf_x86_64_plt0_entry): Renamed to ...
3542 (elf_x86_64_lazy_plt0_entry): This.
3543 (elf_x86_64_plt_entry): Renamed to ...
3544 (elf_x86_64_lazy_plt_entry): This.
3545 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3546 (elf_x86_64_lazy_bnd_plt0_entry): This.
3547 (elf_x86_64_legacy_plt_entry): Removed.
3548 (elf_x86_64_bnd_plt_entry): Renamed to ...
3549 (elf_x86_64_lazy_bnd_plt_entry): This.
3550 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3551 (elf_x86_64_non_lazy_plt_entry): This.
3552 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3553 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3554 (elf_x86_64_eh_frame_plt): Renamed to ...
3555 (elf_x86_64_eh_frame_lazy_plt): This.
3556 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3557 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3558 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3559 (elf_x86_64_eh_frame_non_lazy_plt): This.
3560 (elf_x86_64_lazy_plt_layout): New.
3561 (elf_x86_64_non_lazy_plt_layout): Likewise.
3562 (elf_x86_64_plt_layout): Likewise.
3563 (elf_x86_64_backend_data): Remove PLT layout information. Add
3564 os for target system.
3565 (GET_PLT_ENTRY_SIZE): Removed.
3566 (elf_x86_64_lazy_plt): New.
3567 (elf_x86_64_non_lazy_plt): Likewise.
3568 (elf_x86_64_lazy_bnd_plt): Likewise.
3569 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3570 (elf_x86-64_arch_bed): Updated.
3571 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3572 (elf_x86_64_create_dynamic_sections): Removed.
3573 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3574 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3575 (elf_x86-64_adjust_dynamic_symbol): Updated.
3576 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3577 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3578 size for PLT0 if there is no PLT0. Get plt_entry_size from
3579 non_lazy_plt for non-lazy PLT entries.
3580 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3581 from non_lazy_plt for non-lazy PLT entries.
3582 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3583 if there is no PLT0.
3584 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3585 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3586 entries with non-lazy PLT layout. Don't fill the second and third
3587 slots in the PLT entry if there is no PLT0.
3588 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3589 if there is no PLT0. Set sh_entsize on the .plt.got section.
3590 (compare_relocs): New.
3591 (elf_x86_64_plt_type): Likewise.
3592 (elf_x86_64_plt): Likewise.
3593 (elf_x86_64_nacl_plt): New. Forward declaration.
3594 (elf_x86_64_get_plt_sym_val): Removed.
3595 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3596 against all dynamic relocations.
3597 (elf_x86_64_link_setup_gnu_properties): New function.
3598 (elf_backend_create_dynamic_sections): Updated.
3599 (elf_backend_setup_gnu_properties): New.
3600 (elf_x86_64_nacl_plt): New.
3601 (elf_x86_64_nacl_arch_bed): Updated.
3603 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3605 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3606 (LAZY_PLT_ENTRY_SIZE): This.
3607 (NON_LAZY_PLT_ENTRY_SIZE): New.
3608 (elf_i386_plt0_entry): Renamed to ...
3609 (elf_i386_lazy_plt0_entry): This.
3610 (elf_i386_plt_entry): Renamed to ...
3611 (elf_i386_lazy_plt_entry): This.
3612 (elf_i386_pic_plt0_entry): Renamed to ...
3613 (elf_i386_pic_lazy_plt0_entry): This.
3614 (elf_i386_pic_plt_entry): Renamed to ...
3615 (elf_i386_pic_lazy_plt_entry): This.
3616 (elf_i386_got_plt_entry): Renamed to ...
3617 (elf_i386_non_lazy_plt_entry): This.
3618 (elf_i386_pic_got_plt_entry): Renamed to ...
3619 (elf_i386_pic_non_lazy_plt_entry): This.
3620 (elf_i386_eh_frame_plt): Renamed to ...
3621 (elf_i386_eh_frame_lazy_plt): This.
3622 (elf_i386_eh_frame_plt_got): Renamed to ...
3623 (elf_i386_eh_frame_non_lazy_plt): This.
3624 (elf_i386_plt_layout): Renamed to ...
3625 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3626 eh_frame_plt_got_size.
3627 (elf_i386_non_lazy_plt_layout): New.
3628 (elf_i386_plt_layout): Likewise.
3629 (elf_i386_non_lazy_plt): Likewise.
3630 (GET_PLT_ENTRY_SIZE): Removed.
3631 (elf_i386_plt): Renamed to ...
3632 (elf_i386_lazy_plt): This.
3633 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3634 (elf_i386_arch_bed): Updated.
3635 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3636 (elf_i386_create_dynamic_sections): Removed.
3637 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3638 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3639 (elf_i386_adjust_dynamic_symbol): Updated.
3640 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3641 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3642 size for PLT0 if there is no PLT0.
3643 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3644 output section is discarded only if GOT isn't empty.
3645 (elf_i386_relocate_section): Updated. Properly get PLT index
3646 if there is no PLT0.
3647 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3648 second and third slots in the PLT entry if there is no PLT0.
3649 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3650 if there is no PLT0. Set sh_entsize on the .plt.got section.
3651 (elf_i386_nacl_plt): Forward declaration.
3652 (elf_i386_get_plt_sym_val): Removed.
3653 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3654 against all dynamic relocations.
3655 (elf_i386_link_setup_gnu_properties): New function.
3656 (elf_backend_create_dynamic_sections): Updated.
3657 (elf_backend_setup_gnu_properties): New.
3658 (elf_i386_nacl_plt): Updated.
3659 (elf_i386_nacl_arch_bed): Likewise.
3660 (elf_i386_vxworks_arch_bed): Likewise.
3662 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3664 * elflink.c (elf_output_implib): Remove executable flag from import
3666 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3667 library is a relocatable object file.
3669 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3672 * elf32-avr.c (avr_should_move_sym): New function.
3673 (avr_should_reduce_sym_size): Likewise.
3674 (avr_should_increase_sym_size): Likewise.
3675 (elf32_avr_relax_delete_bytes): Adjust symbol values
3676 and sizes by calling new functions.
3678 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3680 * config.bfd (riscv32-*): Enable rv64.
3682 2017-05-02 Alan Modra <amodra@gmail.com>
3685 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3686 rather than h->root.type == bfd_link_hash_new.
3687 (bfd_elf_record_link_assignment): Similarly, call
3688 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3690 2017-04-29 Alan Modra <amodra@gmail.com>
3693 * reloc.c (reloc_offset_in_range): New function.
3694 (bfd_perform_relocation, bfd_install_relocation): Use it.
3695 (_bfd_final_link_relocate): Likewise.
3697 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3699 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3700 before using .plt.got.
3701 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3703 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3705 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3706 instead of "+=" to update 0.
3708 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3710 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3711 .plt.got section here.
3712 (elf_i386_check_relocs): Don't create the .plt.got section.
3713 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3714 the .plt.got and .plt.bnd sections here.
3715 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3718 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3720 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3722 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3723 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3724 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3725 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3728 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3730 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3732 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3733 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3734 the first relocatable ELF input with GNU properties.
3736 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3738 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3739 VxWorks for non-PIC.
3741 2017-04-27 Alan Modra <amodra@gmail.com>
3743 * elf-bfd.h (struct elf_backend_data): Make asection param of
3744 elf_backend_eh_frame_address_size const.
3745 (_bfd_elf_eh_frame_address_size): Likewise.
3746 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3747 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3748 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3749 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3750 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3751 (next_cie_fde_offset): Constify params.
3752 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3754 2017-04-27 Alan Modra <amodra@gmail.com>
3756 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3757 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3758 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3760 (offset_adjust): New function.
3761 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3762 (adjust_eh_frame_local_symbols): Likewise.
3763 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3764 after changing anything. Return true if anything changed.
3765 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3766 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3768 2017-04-27 Alan Modra <amodra@gmail.com>
3770 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3773 2017-04-27 Alan Modra <amodra@gmail.com>
3775 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3776 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3777 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3778 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3779 for undef and undefweak dyn_relocs.
3780 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3781 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3782 (allocate_got, allocate_dynrelocs): Likewise.
3783 (ppc64_elf_relocate_section): Likewise.
3785 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3787 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3788 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3789 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3790 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3792 2017-04-26 Nick Clifton <nickc@redhat.com>
3795 * reloc.c (bfd_perform_relocation): Check for a negative address
3798 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3801 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3803 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3804 (elf_backend_always_renumber_dynsyms): Define.
3805 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3806 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3807 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3808 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3810 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3812 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3814 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3815 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3816 sections have been created.
3818 2017-04-26 Nick Clifton <nickc@redhat.com>
3821 * compress.c (bfd_init_section_compress_status): Check the return
3822 value from bfd_malloc.
3824 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3826 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3827 no_finish_dynamic_symbol.
3828 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3830 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3831 weak symbol, don't make it dynamic.
3832 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3833 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3834 relocation for GOT reference.
3835 (elf_x86_64_finish_dynamic_symbol): Abort if
3836 no_finish_dynamic_symbol isn't 0.
3838 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3841 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3842 undefined weak symbol, don't make it dynamic.
3843 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3844 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3845 relocation for R_386_GOT32.
3847 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3850 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3852 2017-04-23 Alan Modra <amodra@gmail.com>
3855 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3856 * elf.c (lcomm_sym): New.
3857 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3858 * bfd-in2.h: Regenerate.
3860 2017-04-23 Alan Modra <amodra@gmail.com>
3863 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3864 parameters and comment.
3865 (_bfd_elf_get_reloc_section): Delete.
3866 (_bfd_elf_plt_get_reloc_section): Declare.
3867 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3868 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3870 (_bfd_elf_get_reloc_section): ..here. Delete.
3871 (assign_section_numbers): Call elf_get_reloc_section.
3872 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3873 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3875 2017-04-23 Alan Modra <amodra@gmail.com>
3878 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3881 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3884 * elf32-i386.c (elf_i386_link_hash_entry): Add
3885 no_finish_dynamic_symbol.
3886 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3887 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3888 symbol, don't make it dynamic in PIE.
3889 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3890 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3891 relocation for R_386_GOT32
3892 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3895 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3899 * elflink.c (elf_link_add_object_symbols): Require
3900 --no-dynamic-linker with -E/--dynamic-list when creating
3903 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3905 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3908 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3910 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3911 dynamic symbol sorting.
3913 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3916 * elflink.c (elf_link_add_object_symbols): Preserve
3917 dynamic_ref_after_ir_def when restoring the symbol table for
3918 unneeded dynamic object.
3920 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3923 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3924 on on undefined IFUNC symbol in the second PLT.
3926 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3928 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3930 2017-04-19 Alan Modra <amodra@gmail.com>
3932 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3933 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3934 * elf32-ppc.c:Formatting.
3935 (ensure_undefweak_dynamic): Don't make dynamic when
3936 info->dynamic_undefined_weak is zero.
3937 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3938 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3939 not default visibility. Discard undef and undefweak
3941 (ppc_elf_relocate_section): Adjust to suit.
3942 * elf64-ppc.c: Formatting.
3943 (ensure_undefweak_dynamic): Don't make dynamic when
3944 info->dynamic_undefined_weak is zero.
3945 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3946 info->dynamic_undefined_weak. Discard them earlier.
3948 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3951 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3952 before generating the version definition section.
3954 2017-04-17 Alan Modra <amodra@gmail.com>
3956 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3957 state when a regular object file defines a symbol with
3958 incompatible type to that defined by an earlier shared lib.
3960 2017-04-13 Alan Modra <amodra@gmail.com>
3962 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3964 * elf32-arm.c: Likewise.
3965 * elf32-i386.c: Likewise.
3966 * elf32-mep.c: Likewise.
3967 * elf64-ia64-vms.c: Likewise.
3968 * elf64-x86-64.c: Likewise.
3969 * elflink.c: Likewise.
3970 * elfnn-ia64.c: Likewise.
3971 * elfxx-mips.c: Likewise.
3973 2017-04-13 Alan Modra <amodra@gmail.com>
3975 * aoutx.h: Use %B and %A in error messages throughout file.
3976 * aout-cris.c: Likewise.
3977 * archive.c: Likewise.
3978 * binary.c: Likewise.
3979 * coff-rs6000.c: Likewise.
3980 * coff-tic4x.c: Likewise.
3981 * coffcode.h: Likewise.
3982 * coffgen.c: Likewise.
3983 * cofflink.c: Likewise.
3984 * coffswap.h: Likewise.
3985 * cpu-arm.c: Likewise.
3986 * elf-eh-frame.c: Likewise.
3987 * elf-m10300.c: Likewise.
3989 * elf32-arc.c: Likewise.
3990 * elf32-arm.c: Likewise.
3991 * elf32-bfin.c: Likewise.
3992 * elf32-frv.c: Likewise.
3993 * elf32-iq2000.c: Likewise.
3994 * elf32-m32c.c: Likewise.
3995 * elf32-microblaze.c: Likewise.
3996 * elf32-nds32.c: Likewise.
3997 * elf32-rl78.c: Likewise.
3998 * elf32-rx.c: Likewise.
3999 * elf32-score.c: Likewise.
4000 * elf32-score7.c: Likewise.
4001 * elf32-sh64.c: Likewise.
4002 * elf32-v850.c: Likewise.
4003 * elf32-vax.c: Likewise.
4004 * elf32-visium.c: Likewise.
4005 * elf64-ia64-vms.c: Likewise.
4006 * elf64-mmix.c: Likewise.
4007 * elf64-sh64.c: Likewise.
4008 * elfcode.h: Likewise.
4009 * elfnn-aarch64.c: Likewise.
4010 * elfnn-ia64.c: Likewise.
4011 * elfxx-mips.c: Likewise.
4012 * hpux-core.c: Likewise.
4015 * linker.c: Likewise.
4016 * merge.c: Likewise.
4018 * oasys.c: Likewise.
4019 * pdp11.c: Likewise.
4020 * peXXigen.c: Likewise.
4021 * rs6000-core.c: Likewise.
4022 * vms-alpha.c: Likewise.
4023 * xcofflink.c: Likewise.
4025 2017-04-13 Alan Modra <amodra@gmail.com>
4027 * bfd.c (PRINT_TYPE): Define.
4028 (_doprnt): New function.
4029 (error_handler_internal): Use _doprnt.
4030 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4031 calls in their natural order, throughout file.
4032 * coff-mcore.c: Likewise.
4033 * coff-ppc.c: Likewise.
4034 * coff-tic80.c: Likewise.
4035 * cofflink.c: Likewise.
4036 * elf-s390-common.c: Likewise.
4038 * elf32-arm.c: Likewise.
4039 * elf32-i386.c: Likewise.
4040 * elf32-m32r.c: Likewise.
4041 * elf32-msp430.c: Likewise.
4042 * elf32-spu.c: Likewise.
4043 * elf64-ia64-vms.c: Likewise.
4044 * elf64-sparc.c: Likewise.
4045 * elf64-x86-64.c: Likewise.
4046 * elflink.c: Likewise.
4047 * elfnn-aarch64.c: Likewise.
4048 * elfnn-ia64.c: Likewise.
4049 * elfxx-mips.c: Likewise.
4051 2017-04-13 Alan Modra <amodra@gmail.com>
4053 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4054 branch veneers" error. Fix double space and format message.
4055 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4056 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4058 2017-04-13 Alan Modra <amodra@gmail.com>
4060 * bfd-in2.h: Regenerate.
4062 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4064 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4065 extra `\n' in warning/error messages.
4066 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4067 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4069 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4071 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4072 processor-specific properties with generic ELF target vector.
4074 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4076 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4077 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4078 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4079 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4081 (link_hash_newfunc): Initialize has_got_reloc and
4083 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4085 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4087 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4089 (_bfd_sparc_elf_fixup_symbol): New function.
4090 (allocate_dynrelocs): Don't allocate space for dynamic
4091 relocations and discard relocations against resolved undefined
4092 weak symbols in executable. Don't make resolved undefined weak
4093 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4094 relocation against undefined weak symbols in PIE.
4095 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4096 relocations against resolved undefined weak symbols in PIE
4097 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4098 without ynamic PLT/GOT relocations for resolved undefined weak
4100 Don't generate dynamic relocation against resolved undefined
4101 weak symbol in executable.
4102 (pie_finish_undefweak_symbol): New function.
4103 (_bfd_sparc_elf_finish_dynamic_sections): Call
4104 pie_finish_undefweak_symbol on all symbols in PIE.
4105 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4106 (_bfd_sparc_elf_fixup_symbol): New function.
4108 2017-04-10 Nick Clifton <nickc@redhat.com>
4110 * config.bfd: Remove ns32k from obsolete list.
4112 2017-04-10 Alan Modra <amodra@gmail.com>
4115 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4116 (special_sections_i): Likewise for .init_array.
4117 (special_sections_p): Likewise for .preinit_array.
4119 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4123 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4124 ELF_COMMON_DEF_P for common symbols.
4125 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4126 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4127 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4128 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4129 07492f668d2173da7a2bda3707ff0985e0f460b6.
4131 2017-04-07 Pedro Alves <palves@redhat.com>
4133 * opncls.c (bfd_get_debug_link_info): Rename to...
4134 (bfd_get_debug_link_info_1): ... this. Change type of second
4135 parameter to void pointer. Adjust.
4136 (bfd_get_debug_link_info): Reimplement on top of
4137 bfd_get_debug_link_info_1.
4138 (separate_debug_file_exists, separate_alt_debug_file_exists):
4139 Change type of second parameter to void pointer. Adjust.
4140 (get_func_type, check_func_type): Change type of second parameter
4142 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4143 the callback functions instead of passing the address of a local.
4144 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4145 find_separate_debug_file.
4146 (get_alt_debug_link_info_shim): Change type of second parameter to
4147 void pointer. Adjust.
4148 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4149 find_separate_debug_file.
4150 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4151 of second parameter to void pointer. Adjust.
4152 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4153 pointer local to find_separate_debug_file.
4155 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4157 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4158 external symbols with a definition.
4159 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4161 2017-04-07 Alan Modra <amodra@gmail.com>
4163 * po/SRC-POTFILES.in: Regenerate.
4165 2017-04-05 Alan Modra <amodra@gmail.com>
4167 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4170 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4172 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4173 numbers for DataDirectory entry indicies passed to
4176 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4178 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4179 each GNU_MBIND section and align GNU_MBIND section to page size.
4180 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4181 segment for each GNU_MBIND section.
4182 (_bfd_elf_init_private_section_data): Copy sh_info from input
4183 for GNU_MBIND section.
4185 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4187 * elfnn-riscv.c (GP_NAME): Delete.
4188 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4189 (_bfd_riscv_relax_lui): Likewise.
4191 2017-04-04 Nick Clifton <nickc@redhat.com>
4194 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4196 (bfd_elf_final_link): Only initialize the extended symbol index
4197 section if there are extended symbol tables to list.
4199 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4201 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4202 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4203 * configure.ac (elf): Add elf-properties.lo.
4204 * Makefile.in: Regenerated.
4205 * configure: Likewise.
4206 * elf-bfd.h (elf_property_kind): New.
4207 (elf_property): Likewise.
4208 (elf_property_list): Likewise.
4209 (elf_properties): Likewise.
4210 (_bfd_elf_parse_gnu_properties): Likewise.
4211 (_bfd_elf_get_property): Likewise.
4212 (_bfd_elf_link_setup_gnu_properties): Likewise.
4213 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4214 and setup_gnu_properties.
4215 (elf_obj_tdata): Add properties.
4216 * elf-properties.c: New file.
4217 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4218 (elf_i386_merge_gnu_properties): Likewise.
4219 (elf_backend_parse_gnu_properties): Likewise.
4220 (elf_backend_merge_gnu_properties): Likewise.
4221 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4222 (elf_x86_64_merge_gnu_properties): Likewise.
4223 (elf_backend_parse_gnu_properties): Likewise.
4224 (elf_backend_merge_gnu_properties): Likewise.
4225 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4226 (elf_backend_parse_gnu_properties): Likewise.
4227 (elf_backend_setup_gnu_properties): Likewise.
4228 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4229 elf_backend_merge_gnu_properties and
4230 elf_backend_setup_gnu_properties.
4232 2017-03-30 Pip Cet <pipcet@gmail.com>
4234 * elf32-wasm32.c: Add relocation code, two relocs.
4235 * reloc.c: Add wasm32 relocations.
4236 * libbfd.h: Regenerate.
4237 * bfd-in2.h: Regenerate.
4238 * bfd/po/bfd.pot: Regenerate.
4240 2017-03-29 Nick Clifton <nickc@redhat.com>
4243 * coff-bfd.h (struct coff_section_data): Add new fields:
4244 saved_bias and bias.
4245 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4246 computed for PE binaries.
4247 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4250 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4253 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4254 to handle a local symbol with a hash-symbol-entry; without PLT.
4255 Add BFD_ASSERT for an incidental case with GOT entry present.
4256 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4257 isn't forced-or-set local.
4259 2017-03-27 Pip Cet <pipcet@gmail.com>
4261 * wasm-module.c: New file to support WebAssembly modules.
4262 * wasm-module.h: New file to support WebAssembly modules.
4263 * doc/webassembly.texi: Start documenting wasm-module.c.
4264 * config.bfd: Add wasm_vec.
4265 * targets.c: Likewise.
4266 * configure.ac: Likewise.
4267 * Makefile.am: Add entries for wasm-module.c.
4268 * Makefile.in: Regenerate.
4269 * configure: Regenerate.
4270 * po/SRC-POTFILES.in: Regenerate.
4272 2017-03-27 Pip Cet <pipcet@gmail.com>
4274 * cpu-wasm32.c: New file to support wasm32 architecture.
4275 * elf32-wasm32.c: New file to support wasm32 architecture.
4276 * Makefile.am: Add wasm32 architecture.
4277 * archures.c: Likewise.
4278 * config.bfd: Likewise.
4279 * configure.ac: Likewise.
4280 * targets.c: Likewise.
4281 * Makefile.in: Regenerate.
4282 * bfd-in2.h: Regenerate.
4283 * configure: Regenerate.
4284 * po/SRC-POTFILES.in: Regenerate.
4286 2017-03-20 Alan Modra <amodra@gmail.com>
4289 * elf64-ppc.c (compare_symbols): Stabilize sort.
4291 2017-03-18 Alan Modra <amodra@gmail.com>
4293 * elf64-ppc.c (struct ppc_link_hash_table): Add
4294 local_ifunc_resolver and maybe_local_ifunc_resolver.
4295 (ppc_build_one_stub): Set flags on emitting dynamic
4296 relocation to ifunc.
4297 (ppc64_elf_relocate_section): Likewise.
4298 (ppc64_elf_finish_dynamic_symbol): Likewise.
4299 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4300 local dynamic relocs to ifuncs.
4301 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4302 local_ifunc_resolver and maybe_local_ifunc_resolver.
4303 (ppc_elf_relocate_section): Set flag on emitting dynamic
4304 relocation to ifuncs.
4305 (ppc_elf_finish_dynamic_symbol): Likewise.
4306 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4307 dynamic relocs to ifuncs.
4309 2017-03-13 Nick Clifton <nickc@redhat.com>
4312 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4313 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4314 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4315 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4316 * bfd-in2.h: Regenerate.
4317 * libbfd.h: Regenerate.
4318 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4320 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4321 (elfNN_aarch64_howto_table): Likewise.
4322 (aarch64_tls_transition_without_check): Likewise.
4323 (aarch64_reloc_got_type): Likewise.
4324 (elfNN_aarch64_final_link_relocate): Likewise.
4325 (elfNN_aarch64_tls_relax): Likewise.
4326 (elfNN_aarch64_relocate_section): Likewise.
4327 (elfNN_aarch64_gc_sweep_hook): Likewise.
4328 (elfNN_aarch64_check_relocs): Likewise.
4329 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4330 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4332 2017-03-11 Alan Modra <amodra@gmail.com>
4334 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4335 parameter is in fact used. Whitespace fixes.
4336 * elf64-ppc.c: Likewise.
4338 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4340 * rs6000-core.c (CORE_NEW): Simplify macro when
4341 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4343 2017-03-07 Alan Modra <amodra@gmail.com>
4347 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4350 2017-03-05 Alan Modra <amodra@gmail.com>
4352 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4353 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4354 (next_cie_fde_offset): New function.
4355 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4356 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4357 four bytes. Align CIEs to four or eight bytes depending on
4358 per_encoding_aligned8. Align FDEs according to their encoding.
4359 Pad last FDE to output section alignment.
4360 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4362 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4363 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4364 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4366 2017-03-02 Martin Bickel <binutils@ineranves.de>
4369 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4370 empty segments which have a zero filesz, but a non-zero memsz.
4372 2017-03-02 Alan Modra <amodra@gmail.com>
4374 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4376 2017-02-28 Alan Modra <amodra@gmail.com>
4378 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4379 (ppc64_elf_relocate_section): Likewise.
4381 2017-02-28 Alan Modra <amodra@gmail.com>
4384 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4385 rather than elf32_nios2_hash_table or elf_hash_table.
4386 (create_got_section): Likewise.
4387 (nios2_elf32_finish_dynamic_symbol): Likewise.
4388 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4389 (nios2_elf32_size_dynamic_sections): Likewise.
4390 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4391 vars. Use htab equivalents directly instead. Don't create
4392 all dynamic sections on needing just the GOT. Use a goto
4393 rather than a fall-through with reloc test. Ensure
4394 htab->dynobj is set when making dynamic sreloc section.
4395 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4396 equivalent directly instead. Don't segfault on looking for
4397 .dynamic when dynamic sections have not been created. Don't
4398 segfault on .got.plt being discarded.
4399 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4400 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4401 fixme and another not so relevant comment.
4402 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4403 already set, set hash table dynobj on creating .sbss.
4405 2017-02-28 Alan Modra <amodra@gmail.com>
4407 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4408 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4409 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4410 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4411 (ppc64_elf_relocate_section): Likewise.
4412 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4413 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4414 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4415 * libbfd.h: Regenerate.
4416 * bfd-in2.h: Regenerate.
4418 2017-02-28 Alan Modra <amodra@gmail.com>
4420 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4421 dynamic .data.rel.ro read-only.
4422 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4423 rather than section flags when deciding where copy reloc goes.
4424 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4425 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4426 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4427 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4428 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4429 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4430 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4431 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4432 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4433 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4434 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4435 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4436 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4437 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4438 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4439 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4440 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4441 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4442 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4444 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4446 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4447 `jalr $0, $25' instruction encoding.
4449 2017-02-27 Nick Clifton <nickc@redhat.com>
4452 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4453 generating a seg-fault when encountering a symbol that has been
4454 deleted by garbage collection.
4456 2017-02-25 Alan Modra <amodra@gmail.com>
4458 * elf32-arc.c (struct dynamic_sections): Delete.
4459 (enum dyn_section_types): Delete.
4460 (dyn_section_names): Delete.
4461 (arc_create_dynamic_sections): Delete.
4462 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4463 segfault on discarded .rela.plt section.
4464 (elf_arc_size_dynamic_sections): Formatting. Don't call
4465 arc_create_dynamic_sections. Don't allocate memory for sections
4466 handled by the generic linker. Correct code finding relocs in
4467 read-only sections. Set SEC_EXCLUDE on zero size .got,
4468 .got.plt, and .dynbss sections. Do set .interp for pies.
4470 2017-02-24 Andrew Waterman <andrew@sifive.com>
4472 * elfnn-riscv.c (GP_NAME): New macro.
4473 (riscv_global_pointer_value): Use it.
4474 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4475 output section, consider only that section's alignment.
4477 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4479 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4480 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4481 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4482 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4484 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4486 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4487 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4490 2017-02-23 Alan Modra <amodra@gmail.com>
4493 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4495 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4496 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4499 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4502 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4503 processing ahead of the call to `elf_gc_sweep_symbol'.
4505 2017-02-22 Nick Clifton <nickc@redhat.com>
4508 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4509 created section 4-byte alignment.
4511 2017-02-22 Alan Modra <amodra@gmail.com>
4513 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4514 on .got or .plt output section being discarded by script.
4515 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4518 2017-02-21 Alan Modra <amodra@gmail.com>
4520 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4521 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4523 2017-02-20 Alan Modra <amodra@gmail.com>
4526 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4527 if DT_RELSZ/DT_RELASZ is zero.
4529 2017-02-17 Nick Clifton <nickc@redhat.com>
4531 * compress.c (bfd_get_full_section_contents): Remember to reduce
4532 compressed size by the sizeof the compression header when
4533 decompressing the contents.
4535 2017-02-17 Pedro Alves <palves@redhat.com>
4537 * srec.c (Chunk): Rename to ...
4538 (_bfd_srec_len): ... this.
4539 (S3Forced): Rename to ...
4540 (_bfd_srec_forceS3): ... this.
4541 * objcopy.c: Adjust all references.
4543 2017-02-17 Pedro Alves <palves@redhat.com>
4545 * archive.c (bsd_write_armap): Rename to ...
4546 (_bfd_bsd_write_armap): ... this.
4547 (coff_write_armap): Rename to ...
4548 (_bfd_coff_write_armap): ... this.
4549 * libbfd-in.h (bsd_write_armap): Rename to ...
4550 (_bfd_bsd_write_armap): ... this.
4551 (coff_write_armap): Rename to ...
4552 (_bfd_coff_write_armap): ... this.
4553 * aout-target.h, aout-tic30.c: Adjust all users.
4554 * libbfd.h: Regenerate.
4556 2017-02-17 Pedro Alves <palves@redhat.com>
4558 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4559 (warn_deprecated): Rename to ...
4560 (_bfd_warn_deprecated): ... this.
4561 * libbfd.c (warn_deprecated): Rename to ...
4562 (_bfd_warn_deprecated): ... this.
4563 * bfd-in2.h: Regenerate.
4565 2017-02-17 Pedro Alves <palves@redhat.com>
4567 * bfdio.c (real_ftell): Rename to ...
4568 (_bfd_real_ftell): ... this.
4569 (real_fseek): Rename to ...
4570 (_bfd_real_fseek): ... this.
4571 (real_fopen): Rename to ...
4572 (_bfd_real_fopen): ... this.
4573 * libbfd-in.h (real_ftell): Rename to ...
4574 (_bfd_real_ftell): ... this.
4575 (real_fseek): Rename to ...
4576 (_bfd_real_fseek): ... this.
4577 (real_fopen): Rename to ...
4578 (_bfd_real_fopen): ... this.
4579 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4580 * libbfd.h: Regenerate.
4582 2017-02-17 Pedro Alves <palves@redhat.com>
4584 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4585 * libbfd.c (read_unsigned_leb128): Rename to ...
4586 (_bfd_read_unsigned_leb128): ... this.
4587 (read_signed_leb128): Rename to ...
4588 (_bfd_read_signed_leb128): ... this.
4589 (safe_read_leb128): Rename to ...
4590 (_bfd_safe_read_leb128): ... this.
4591 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4592 (_bfd_read_unsigned_leb128): ... this.
4593 (read_signed_leb128): Rename to ...
4594 (_bfd_read_signed_leb128): ... this.
4595 (safe_read_leb128): Rename to ...
4596 (_bfd_safe_read_leb128): ... this.
4597 * libbfd.h: Renegerate.
4599 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4601 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4602 before trying to fine matching file and line information.
4604 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4606 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4607 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4608 not match current bfd, then reload debug information. Record bfd
4609 we're loading debug info for in the stash. If we have debug
4610 informatin in the cache then perform section placement before
4613 2017-02-16 Alan Modra <amodra@gmail.com>
4616 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4617 * elfxx-target.h (elf_backend_no_page_alias): Define.
4618 (elfNN_bed): Init new field.
4619 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4620 ensure PT_LOAD segment starts on a new page.
4621 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4623 2017-02-16 Alan Modra <amodra@gmail.com>
4626 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4629 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4631 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4632 * bfd-in2.h: Regenerated.
4634 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4637 * elf32-i386.c (elf_i386_relocate_section): Allow
4638 "lea foo@GOT, %reg" in PIC.
4640 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4643 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4644 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4645 error against local IFUNC symbol without a base register for
4648 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4650 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4651 `%P: %H:' with `info->callbacks->einfo'.
4652 (ppc_elf_relocate_section): Likewise.
4653 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4654 (ppc64_elf_edit_toc): Likewise.
4655 (ppc64_elf_relocate_section): Likewise.
4657 2017-02-14 Alan Modra <amodra@gmail.com>
4659 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4660 --gc-keep-exported, and test versioned field of sym rather than
4661 looking for @ in name.
4663 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4665 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4668 2017-02-13 Nick Clifton <nickc@redhat.com>
4671 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4674 2017-02-07 Andrew Waterman <andrew@sifive.com>
4676 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4677 entry size if PLT header is written.
4679 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4681 Fix sparc64 dynamic relocation processing to use the dynamic
4683 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4684 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4687 2017-02-03 Nick Clifton <nickc@redhat.com>
4690 * coffcode.h (coff_write_object_contents): Enlarge size of
4691 s_name_buf in order to avoid compile time warning about possible
4693 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4694 32-bits of insn value before printing into buffer.
4696 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4698 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4699 `max_local_dynindx'.
4700 (mips_elf_sort_hash_table): Handle it.
4701 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4702 symbols bump up `max_local_dynindx' rather than
4703 `max_non_got_dynindx'.
4705 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4707 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4708 `min_got_dynindx', `max_unref_got_dynindx' and
4709 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4710 (mips_elf_sort_hash_table): Adjust accordingly.
4712 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4714 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4715 to access the hash table.
4717 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4719 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4720 non-NULL `htab' to the beginning.
4722 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4724 * elflink.c (elf_gc_sweep): Wrap overlong line.
4726 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4728 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4729 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4730 * elfxx-mips.c (mips_elf_link_hash_table): Add
4731 `ignore_branch_isa' member.
4732 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4733 in branch relocation calculation as an error if
4734 `ignore_branch_isa' has been set.
4735 (_bfd_mips_elf_insn32): Rename to...
4736 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4737 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4738 Handle the new parameter.
4740 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4742 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4743 local variable dynobj.
4746 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4747 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4748 executable from read-only sections into sdynrelro.
4749 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4750 dynamic relocs in sdynrelro.
4751 (elf_backend_want_dynrelro): Define.
4753 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4755 * config.bfd (*-*-rtemsaout*): Mark as removed.
4757 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4759 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4760 (arm-*-rtems*): Move to (arm*-*-eabi*).
4761 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4762 (m68-*-rtems*): Move to (m68*-*-elf*).
4764 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4766 * config.bfd (*-*-rtemscoff*): Mark as removed.
4768 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4771 * elflink.c (bfd_elf_record_link_assignment): Revert last
4772 change and don't ever clear `forced_local'. Set `mark'
4774 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4776 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4777 (bfd_elf_size_dynamic_sections): ... here.
4778 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4779 and set `mark' instead in `__tls_get_addr_opt' processing.
4780 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4782 2017-01-24 Alan Modra <amodra@gmail.com>
4784 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4785 where dynamic relocs are preferable. Allow ifunc too.
4786 (ensure_undefweak_dynamic): New function.
4787 (allocate_dynrelocs): Use it here. Move plt handling last and
4788 don't make symbols dynamic, simplifying loop. Only make undef
4789 weak symbols with GOT entries dynamic. Correct condition
4790 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4791 comments. Remove goto.
4792 (ppc_elf_relocate_section): Correct test for using dynamic
4793 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4794 to suit. Set up explicit tls_index entries and implicit GOT
4795 tls_index entries resolvable at link time for
4796 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4797 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4798 (ensure_undefweak_dynamic): New function.
4799 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4800 with GOT entries dynamic. Remove unnecessary test of
4801 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4802 (ppc64_elf_relocate_section): Correct test for using dynamic
4803 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4804 to suit. Set up explicit tls_index entries and implicit GOT
4805 tls_index entries resolvable at link time for __tls_get_addr_opt.
4806 Simplify expression to clear mem for prelink.
4808 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4810 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4812 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4814 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4815 (elf_backend_hash_symbol): Define.
4817 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4820 * elflink.c (bfd_elf_record_link_assignment): Clear any
4821 `forced_local' marking for DSO symbols that are not being
4824 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4826 * elfnn-riscv.c (riscv_elf_object_p): New function.
4828 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4831 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4833 (elf_x86_64_check_relocs): Create .eh_frame section for the
4835 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4836 .eh_frame section for the .plt.bnd section.
4837 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4838 for the .plt.bnd section.
4840 2017-01-12 Nick Clifton <nickc@redhat.com>
4843 * opncls.c (find_separate_debug_file): Add include_dirs
4844 parameter. Only include the directory part of the bfd's filename
4845 in search paths if include_dirs is true. Add a couple of extra
4846 locations for looking for debug files.
4847 ( bfd_follow_gnu_debuglink): Update invocation of
4848 find_separate_debug_file.
4849 (bfd_follow_gnu_debugaltlink): Likewise.
4850 (get_build_id): New function: Finds the build-id of the given bfd.
4851 (get_build_id_name): New function: Computes the name of the
4852 separate debug info file for a bfd, based upon its build-id.
4853 (check_build_id_file): New function: Checks to see if a separate
4854 debug info file exists at the given location, and that its
4855 build-id matches that of the original bfd.
4856 (bfd_follow_build_id_debuglink): New function: Finds a separate
4857 debug info file for a given bfd by using the build-id method.
4858 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4859 method of locating a separate debug info file before using the
4861 * bfd-in2.h: Regenerate.
4863 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4866 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4867 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4868 elf_x86_64_eh_frame_plt_got.
4869 (elf_x86_64_size_dynamic_sections): Get unwind info from
4870 elf_x86_64_bnd_arch_bed for the BND PLT.
4872 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4874 * config.bfd: Add entries for i686-redox and x86_64-redox.
4876 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4878 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4880 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4881 .eh_frame section to 4 bytes for x32.
4882 (elf_x86_64_check_relocs): Likewise.
4884 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4887 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4888 (PLT_GOT_FDE_LENGTH): Likewise.
4889 (elf_i386_plt_layout): Add eh_frame_plt_got and
4890 eh_frame_plt_got_size.
4891 (elf_i386_plt): Updated.
4892 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4893 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4894 (elf_i386_size_dynamic_sections): Allocate and initialize
4895 .eh_frame section for .plt.got.
4896 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4898 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4899 eh_frame_plt_got_size.
4900 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4901 (PLT_GOT_FDE_LENGTH): Likewise.
4902 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4903 eh_frame_plt_got_size.
4904 (elf_x86_64_arch_bed): Updated.
4905 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4906 eh_frame_plt_got_size.
4907 (elf_x86_64_nacl_arch_bed): Likewise.
4908 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4909 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4910 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4911 .eh_frame section for .plt.got.
4912 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4915 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4917 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4918 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4920 2017-01-09 Nick Clifton <nickc@redhat.com>
4922 * dwarf2.c (lookup_address_in_function_table): Return early if
4923 there are no functions in the given comp unit, or if the high
4924 address of the last function in the comp unit is less than the
4927 2017-01-09 Nick Clifton <nickc@redhat.com>
4930 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4931 message if there are too many symbols to load.
4933 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4935 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4936 if relocs are cached.
4938 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4941 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4942 for R_MICROBLAZE_GOTOFF_64.
4944 2017-01-03 Nick Clifton <nickc@redhat.com>
4946 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4947 warning about using a possibly uninitialised variable.
4949 2017-01-02 Alan Modra <amodra@gmail.com>
4951 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4952 (allocate_plt_static, allocate_dynrelocs): Use it.
4954 2017-01-02 Alan Modra <amodra@gmail.com>
4956 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4957 .PARISC.unwind section.
4959 2017-01-02 Alan Modra <amodra@gmail.com>
4962 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4963 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4964 indirect to GOT pointer relative code edit.
4966 2017-01-02 Alan Modra <amodra@gmail.com>
4968 Update year range in copyright notice of all files.
4970 For older changes see ChangeLog-2016
4972 Copyright (C) 2017 Free Software Foundation, Inc.
4974 Copying and distribution of this file, with or without modification,
4975 are permitted in any medium without royalty provided the copyright
4976 notice and this notice are preserved.
4982 version-control: never