1 2017-10-05 John Baldwin <jhb@FreeBSD.org>
3 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
5 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
7 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
8 in read-only section with minfo.
9 (tilepro_elf_size_dynamic_sections): Likewise.
10 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
11 (tilegx_elf_size_dynamic_sections): Likewise.
13 2017-10-05 Pedro Alves <palves@redhat.com>
16 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
17 ellipsis parameter. Split out bfd_error_on_input code to..
18 (bfd_set_input_error): .. New function.
19 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
20 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
21 * bfd-in2.h: Regenerate.
23 2017-10-05 Alan Modra <amodra@gmail.com>
25 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
26 fini_array error value.
28 2017-10-05 Alan Modra <amodra@gmail.com>
31 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
33 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
35 (elf_fake_sections): Adjust calls. Exit immediately on failure.
36 (bfd_elf_set_group_contents): Add associated reloc section indices
39 2017-10-04 Alan Modra <amodra@gmail.com>
41 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
42 classify symbols for ELFv2.
44 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
47 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
48 undergoes default promotion.
49 * bfd-in2.h: Regenerate.
51 2017-10-02 Alan Modra <amodra@gmail.com>
53 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
54 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
56 2017-10-01 Alan Modra <amodra@gmail.com>
59 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
60 (add_line_info): Always put end_sequence last.
62 2017-10-01 Alan Modra <amodra@gmail.com>
65 * dwarf2.c (read_section): Allocate buffer with extra byte for
66 bfd_simple_get_relocated_section_contents rather than copying
69 2017-09-29 Alan Modra <amodra@gmail.com>
71 * merge.c (merge_strings): Return FALSE on malloc failure.
72 (_bfd_merge_sections): Return failures from record_section and
75 2017-09-28 Alan Modra <amodra@gmail.com>
78 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
79 a case where plugin_notice isn't called.
81 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
83 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
86 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
89 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
90 output_bfd to info->callbacks->minfo.
92 2017-09-26 Nick Clifton <nickc@redhat.com>
95 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
96 assertion failure if elf_x86_64_rtype_to_howto has already issued
99 2017-09-26 Alan Modra <amodra@gmail.com>
102 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
105 2017-09-26 Nick Clifton <nickc@redhat.com>
108 * dwarf2.c (read_formatted_entries): Fail early if we know that
109 the loop parsing data entries will overflow the end of the
112 2017-09-26 Alan Modra <amodra@gmail.com>
115 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
116 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
117 to stash->info_ptr_memory, and check die_ref is within that memory.
118 Set info_ptr_end correctly when another CU is refd. Check die_ref
119 for DW_FORM_ref4 etc. is within CU.
121 2017-09-26 Alan Modra <amodra@gmail.com>
124 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
125 (read_formatted_entries): Init "fe".
126 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
128 2017-09-26 Alan Modra <amodra@gmail.com>
131 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
132 bounds in inner loop.
134 2017-09-25 Alan Modra <amodra@gmail.com>
137 * dwarf1.c (parse_die): Sanity check pointer against section limit
138 before dereferencing.
139 (parse_line_table): Likewise.
141 2017-09-25 Alan Modra <amodra@gmail.com>
144 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
146 (parse_comp_unit): Likewise.
148 2017-09-25 Alan Modra <amodra@gmail.com>
151 * dwarf2.c (read_formatted_entries): Error on format_count zero.
153 2017-09-24 Alan Modra <amodra@gmail.com>
156 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
157 within section bounds.
159 2017-09-24 Alan Modra <amodra@gmail.com>
162 * dwarf2.c (decode_line_info): Properly free line sequences on error.
164 2017-09-24 Alan Modra <amodra@gmail.com>
167 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
168 pname param. Return status. Make name const. Don't abort,
169 return an error. Formatting. Exit if current info_ptr matches
170 orig_info_ptr. Update callers.
171 (scan_unit_for_symbols): Start at nesting_level of zero. Make
172 nested_funcs an array of structs for extensibility. Formatting.
174 2017-09-24 Alan Modra <amodra@gmail.com>
177 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
178 rather than dividing by zero.
180 2017-09-24 Alan Modra <amodra@gmail.com>
183 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
185 2017-09-24 Alan Modra <amodra@gmail.com>
188 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
190 2017-09-24 Alan Modra <amodra@gmail.com>
193 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
194 SHT_GNU_verneed section for sanity. Don't zalloc memory for
197 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
200 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
203 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
206 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
207 -1 if bfd_canonicalize_dynamic_reloc returns 0.
209 2017-09-22 Pedro Alves <palves@redhat.com>
210 Alan Modra <amodra@gmail.com>
212 * version.h: Add comment.
214 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
216 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
217 NT_S390_GS_BC, correct the previously swapped invocations of
218 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
220 2017-09-19 Alan Modra <amodra@gmail.com>
223 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
226 2017-09-19 Alan Modra <amodra@gmail.com>
229 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
230 symbols before calculating verrefs. Don't renumber dynsyms
231 after gc. Exclude .gnu.version when zero or one dynsym.
232 Localize some vars and reindent.
234 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
237 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
238 return from bfd_canonicalize_dynamic_reloc.
240 2017-09-15 Alan Modra <amodra@gmail.com>
243 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
244 overflows bfd_size_type.
246 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
249 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
250 to indicate if conversion is performed.
251 (elf_i386_check_relocs): Cache section contents and relocations
252 if conversion is performed.
253 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
254 contents and relocations if conversion is performed.
256 2017-09-14 Nick Clifton <nickc@redhat.com>
259 * peXXigen.c (pe_print_idata): Extend check for HintName vector
262 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
264 * elfxx-x86.h: Fix a typo in comments.
266 2017-09-09 Kamil Rytarowski <n54@gmx.com>
268 * elf32-nds32.c: Rename __BIT() to N32_BIT().
270 2017-09-09 Alan Modra <amodra@gmail.com>
272 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
275 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
277 * elf32-i386.c (elf_i386_relocate_section): Update usage of
278 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
279 (elf_i386_finish_dynamic_symbol): Likewise.
280 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
281 (elf_x86_64_finish_dynamic_symbol): Likewise.
282 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
283 (_bfd_x86_elf_fixup_symbol): Likewise.
285 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
287 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
288 check has_non_got_reloc.
290 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
293 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
294 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
295 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
296 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
297 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
298 and linker_def on __ehdr_start if it is referenced and not
300 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
301 and return TRUE when building executable, if a symbol has
302 non-GOT/non-PLT relocations in text section or there is no
304 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
306 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
308 * elfxx-x86.h: Update comments.
310 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
312 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
313 elf_x86_plt_layout_table with elf_x86_init_table.
314 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
316 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
318 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
319 (elf_x86_init_table): This.
320 (_bfd_x86_elf_link_setup_gnu_properties): Replace
321 elf_x86_plt_layout_table with elf_x86_init_table.
323 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
325 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
326 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
327 * configure: Regenerated.
328 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
329 and r_sym fields of plt_layout.
330 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
332 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
333 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
334 r_info nor r_sym fields.
335 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
337 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
339 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
341 * (_bfd_riscv_relax_align): Call bfd_set_error and
342 print an error message when unable to relax a .align directive.
344 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
346 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
347 (riscv_record_pcrel_hi_reloc): Add absolute argument.
348 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
349 R_RISCV_PCREL_HI20 relocs, and pass the result to
350 riscv_record_pcrel_hi_reloc.
352 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
354 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
355 r_type_p. Remove the converted argument. Replace
356 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
357 the new relocation type via r_type_p.
358 (elf_i386_relocate_section): Likewise.
359 (elf_i386_finish_dynamic_symbol): Likewise.
360 (need_convert_load): Removed.
361 (check_relocs_failed): Updated.
362 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
363 instead of setting need_convert_load.
364 (_bfd_i386_elf_convert_load): Removed.
365 * elf64-x86-64.c (need_convert_load): Removed.
366 (check_relocs_failed): Updated.
367 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
368 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
369 Return the new relocation type via r_type_p.
370 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
371 instead of setting need_convert_load.
372 (elf_x86_64_check_relocs): Don't check PIC if relocation has
374 (_bfd_x86_64_elf_convert_load): Removed.
375 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
376 with SYMBOL_REFERENCES_LOCAL_P.
377 (elf_x86_64_finish_dynamic_symbol): Likewise.
378 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
380 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
381 (_bfd_x86_elf_link_symbol_references_local): New function.
382 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
383 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
384 SYMBOL_REFERENCES_LOCAL_P.
385 (elf_x86_link_hash_entry): Add local_ref.
386 (elf_x86_link_hash_table): Remove convert_load.
387 (_bfd_i386_elf_convert_load): Removed.
388 (_bfd_x86_64_elf_convert_load): Likewise.
389 (_bfd_x86_elf_link_symbol_references_local): New.
391 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
393 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
394 (elf_x86_64_info_to_howto): Get the real relocation type by
395 masking out R_X86_64_converted_reloc_bit.
396 (elf_x86_64_check_tls_transition): Get the real relocation type
397 by masking out R_X86_64_converted_reloc_bit.
398 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
399 instead of setting converted_reloc.
400 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
401 instead of converted_reloc. Get the real relocation type by
402 masking out R_X86_64_converted_reloc_bit.
403 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
404 R_X86_64_converted_reloc_bit is valid.
405 * elfxx-x86.h (converted_reloc): Removed.
407 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
409 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
410 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
411 to get the relocation type again.
412 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
413 r_type when calling elf_x86_64_tls_transition. Don't use
414 ELF32_R_TYPE to get the relocation type again.
416 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
418 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
421 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
423 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
424 argument. Don't check relocation overflow. Avoid relocation
425 overflow if --no-relax is used. Set converted_reloc on symbol
426 if a GOTPCREL relocation is converted.
427 (elf_x86_64_relocate_section): Issue a fatal error and suggest
428 --no-relax if GOTPCREL relocation conversion leads to relocation
430 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
432 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
433 Edmar Wienskoski <edmar.wienskoski@nxp.com
435 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
436 (ppc_elf_check_relocs): Handle it.
437 (ppc_elf_vle_split20): New function.
438 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
440 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
443 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
444 for x86-64 if GOT_TLS_GDESC_P is true.
446 2017-09-03 Alan Modra <amodra@gmail.com>
449 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
451 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
453 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
454 tls_get_addr for x86-64 in one place.
456 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
458 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
459 with elfxx-x86.lo for 64-bit BFD.
460 * configure: Regenerated.
462 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
464 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
465 (_bfd_i386_elf_convert_load): This. Remove static.
466 (elf_i386_size_dynamic_sections): Removed.
467 (elf_backend_size_dynamic_sections): Likewise.
468 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
469 (_bfd_x86_64_elf_convert_load): This. Remove static.
470 (elf_x86_64_size_dynamic_sections): Removed.
471 (elf_backend_size_dynamic_sections): Likewise.
472 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
473 (elf_x86_allocate_dynrelocs): This. Make it static.
474 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
475 (elf_x86_allocate_local_dynreloc): This. Make it static.
476 (elf_i386_is_reloc_section): New function.
477 (elf_x86_64_is_reloc_section): Likewise.
478 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
479 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
480 Rearrange got_entry_size initialization.
481 (_bfd_x86_elf_size_dynamic_sections): New function.
482 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
483 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
484 (_bfd_i386_elf_convert_load): New.
485 (_bfd_x86_64_elf_convert_load): Likewise.
486 (_bfd_x86_elf_size_dynamic_sections): Likewise.
487 (elf_backend_size_dynamic_sections): Likewise.
488 (_bfd_x86_elf_allocate_dynrelocs): Removed.
489 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
491 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
493 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
496 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
498 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
499 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
501 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
503 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
504 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
505 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
506 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
507 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
508 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
510 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
512 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
513 (elf_i386_allocate_local_dynrelocs): Likewise.
514 (elf_i386_size_dynamic_sections): Replace
515 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
516 with _bfd_x86_elf_allocate_dynrelocs and
517 _bfd_x86_elf_allocate_local_dynrelocs.
518 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
519 (elf_x86_64_allocate_local_dynrelocs): Likewise.
520 (elf_x86_64_size_dynamic_sections): Replace
521 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
522 with _bfd_x86_elf_allocate_dynrelocs and
523 _bfd_x86_elf_allocate_local_dynrelocs.
524 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
525 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
526 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
527 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
529 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
531 * elf32-i386.c (is_i386_elf): Removed.
532 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
533 (elf_i386_size_dynamic_sections): Likewise.
534 (elf_i386_relocate_section): Likewise.
535 * elf64-x86-64.c (is_x86_64_elf): Removed.
536 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
538 (elf_x86_64_size_dynamic_sections): Likewise.
539 (elf_x86_64_relocate_section): Likewise.
540 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
542 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
545 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
547 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
548 (elf_i386_allocate_dynrelocs): Replace
549 elf_i386_compute_jump_table_size with
550 elf_x86_compute_jump_table_size.
551 (elf_i386_size_dynamic_sections): Likewise.
552 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
553 (elf_x86_64_allocate_dynrelocs): Replace
554 elf_x86_64_compute_jump_table_size with
555 elf_x86_compute_jump_table_size.
556 (elf_x86_64_size_dynamic_sections): Likewise.
557 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
559 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
560 (elf_x86_compute_jump_table_size): New.
562 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
564 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
566 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
567 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
569 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
571 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
572 with htab->is_vxworks.
573 (elf_i386_size_dynamic_sections): Likewise.
574 (elf_i386_relocate_section): Likewise.
575 (elf_i386_finish_dynamic_symbol): Likewise.
576 (elf_i386_finish_dynamic_sections): Likewise.
578 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
580 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
581 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
582 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
583 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
584 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
585 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
586 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
587 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
589 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
592 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
593 ELF_COMMON_DEF_P for common symbols.
595 2017-09-02 Alan Modra <amodra@gmail.com>
597 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
598 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
599 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
601 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
603 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
604 (elf_backend_gc_mark_hook): Likewise.
605 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
606 (elf_backend_gc_mark_hook): Likewise.
607 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
608 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
609 (elf_backend_gc_mark_hook): Likewise.
611 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
613 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
614 (elf_backend_adjust_dynamic_symbol): Likewise.
615 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
616 (elf_backend_adjust_dynamic_symbol): Likewise.
617 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
618 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
619 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
620 (_bfd_x86_elf_adjust_dynamic_symbol): New.
621 (elf_backend_adjust_dynamic_symbol): Likewise.
623 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
625 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
628 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
630 * elf32-i386.c (elf_i386_mkobject): Removed.
631 (bfd_elf32_mkobject): Likewise.
632 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
633 (bfd_elf64_mkobject): Likewise.
634 (bfd_elf32_mkobject): Likewise.
635 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
636 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
637 (bfd_elf64_mkobject): Likewise.
638 (bfd_elf32_mkobject): Likewise.
640 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
642 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
643 Call _bfd_x86_elf_link_setup_gnu_properties.
644 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
645 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
647 (elf_x86_64_non_lazy_plt): Likewise.
648 (elf_x86_64_lazy_bnd_plt): Likewise.
649 (elf_x86_64_non_lazy_bnd_plt): Likewise.
650 (elf_x86_64_lazy_ibt_plt): Likewise.
651 (elf_x32_lazy_ibt_plt): Likewise.
652 (elf_x86_64_non_lazy_ibt_plt): Likewise.
653 (elf_x32_non_lazy_ibt_plt): Likewise.
654 (elf_x86_64_nacl_plt): Likewise.
655 (elf_x86_64_link_setup_gnu_properties): Updated. Call
656 _bfd_x86_elf_link_setup_gnu_properties.
657 * elfxx-x86.c: Include elf-vxworks.h".
658 (_bfd_x86_elf_link_setup_gnu_properties): New function.
659 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
660 comments for pic_plt0_entry and pic_plt_entry.
661 (elf_x86_non_lazy_plt_layout): Likewise.
662 (elf_x86_plt_layout_table): New.
663 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
665 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
668 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
669 .eh_frame section for the second PLT.
670 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
671 alignment of .eh_frame section for the second PLT.
673 2017-09-01 Nick Clifton <nickc@redhat.com>
676 * dwarf2.c (decode_line_info): Fix test for an overlong line info
679 2017-09-01 Nick Clifton <nickc@redhat.com>
682 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
683 attribute buffer is NUL terminated.
685 2017-08-31 Nick Clifton <nickc@redhat.com>
688 * dwarf2.c (read_section): If necessary add a terminating NUL byte
689 to dwarf string sections.
691 2017-08-31 Alan Modra <amodra@gmail.com>
693 * po/SRC-POTFILES.in: Regenerate.
695 2017-08-31 Alan Modra <amodra@gmail.com>
697 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
698 for a section containing just a terminator. Allow multiple
699 terminators at end of section.
700 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
701 sections when not adding alignment. Assert on terminator in
704 2017-08-31 Alan Modra <amodra@gmail.com>
708 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
711 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
713 * configure.ac (bfd_backends): Add elf64.lo together with
714 elfxx-x86.lo for 64-bit BFD.
715 * configure: Regenerated.
717 2017-08-31 James Bowman <james.bowman@ftdichip.com>
719 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
722 2017-08-31 Alan Modra <amodra@gmail.com>
725 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
726 before _close_and_cleanup. Call iovec->bclose after.
727 (bfd_close): Remove code common to, and call, bfd_close_all_done.
729 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
731 * elf32-i386.c (elf_i386_plt_type): Removed.
732 (elf_i386_plt): Likewise.
733 (elf_i386_get_synthetic_symtab): Updated. Call
734 _bfd_x86_elf_get_synthetic_symtab.
735 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
736 (elf_x86_64_plt): Likewise.
737 (elf_x86_64_get_synthetic_symtab): Updated. Call
738 _bfd_x86_elf_get_synthetic_symtab.
739 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
740 (elf_x86_64_get_plt_got_vma): Likewise.
741 (elf_i386_valid_plt_reloc_p): Likewise.
742 (elf_x86_64_valid_plt_reloc_p): Likewise.
743 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
744 * elfxx-x86.h (elf_x86_plt_type): New.
745 (elf_x86_plt): Likewise.
746 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
748 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
750 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
751 target_id instead of elf_machine_code.
753 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
755 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
756 (elf_i386_lazy_plt_layout): Likewise.
757 (elf_i386_non_lazy_plt_layout): Likewise.
758 (elf_i386_plt_layout): Likewise.
759 (elf_i386_link_hash_table): Likewise.
760 (elf_i386_next_tls_desc_index): Likewise.
761 (elf_i386_srelplt2): Likewise.
762 (elf_i386_plt): Likewise.
763 (elf_i386_lazy_plt): Likewise.
764 (elf_i386_non_lazy_plt): Likewise.
765 (elf_i386_link_hash_table_create): Likewise.
766 (bfd_elf32_bfd_link_hash_table_create): Likewise.
767 (elf_i386_lazy_plt): Updated.
768 (elf_i386_non_lazy_plt): Likewise.
769 (elf_i386_lazy_ibt_plt): Likewise.
770 (elf_i386_non_lazy_ibt_plt): Likewise.
771 (elf_i386_allocate_dynrelocs): Likewise.
772 (elf_i386_size_dynamic_sections): Likewise.
773 (elf_i386_relocate_section): Likewise.
774 (elf_i386_finish_dynamic_symbol): Likewise.
775 (elf_i386_finish_dynamic_sections): Likewise.
776 (elf_i386_get_synthetic_symtab): Likewise.
777 (elf_i386_link_setup_gnu_properties): Likewise.
778 (elf_i386_nacl_plt): Likewise.
779 * elf64-x86-64.c (ABI_64_P): Removed.
780 (ELF64_DYNAMIC_INTERPRETER): Likewise.
781 (ELF32_DYNAMIC_INTERPRETER): Likewise.
782 (elf_x86_64_lazy_plt_layout): Likewise.
783 (elf_x86_64_non_lazy_plt_layout): Likewise.
784 (elf_x86_64_plt_layout): Likewise.
785 (elf_x86_64_link_hash_table): Likewise.
786 (elf_x86_64_plt): Likewise.
787 (elf_x86_64_lazy_plt): Likewise.
788 (elf_x86_64_non_lazy_plt): Likewise.
789 (elf_x86_64_link_hash_table_create): Likewise.
790 (bfd_elf64_bfd_link_hash_table_create): Likewise.
791 (bfd_elf32_bfd_link_hash_table_create): Likewise.
792 (elf_x86_64_lazy_plt): Updated.
793 (elf_x86_64_non_lazy_plt): Likewise.
794 (elf_x86_64_lazy_bnd_plt): Likewise.
795 (elf_x86_64_non_lazy_bnd_plt): Likewise.
796 (elf_x86_64_lazy_ibt_plt): Likewise.
797 (elf_x32_lazy_ibt_plt): Likewise.
798 (elf_x86_64_non_lazy_ibt_plt): Likewise.
799 (elf_x32_non_lazy_ibt_plt): Likewise.
800 (elf_x86_64_allocate_dynrelocs): Likewise.
801 (elf_x86_64_size_dynamic_sections): Likewise.
802 (elf_x86_64_relocate_section): Likewise.
803 (elf_x86_64_finish_dynamic_symbol): Likewise.
804 (elf_x86_64_finish_dynamic_sections): Likewise.
805 (elf_x86_64_get_synthetic_symtab): Likewise.
806 (elf_x86_64_link_setup_gnu_properties): Likewise.
807 (elf_x86_64_nacl_plt): Likewise.
808 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
810 (ELF32_DYNAMIC_INTERPRETER): New.
811 (ELF64_DYNAMIC_INTERPRETER): Likewise.
812 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
813 (_bfd_x86_elf_link_hash_table_create): Likewise.
814 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
815 (elf_x86_link_hash_table_free): This. Make it static.
816 * elfxx-x86.h: Don't include "objalloc.h".
818 (elf_x86_lazy_plt_layout): Likewise.
819 (elf_x86_non_lazy_plt_layout): Likewise.
820 (elf_x86_plt_layout): Likewise.
821 (_bfd_x86_elf_link_hash_table_create): Likewise.
822 (bfd_elf64_bfd_link_hash_table_create): Likewise.
823 (bfd_elf32_bfd_link_hash_table_create): Likewise.
824 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
825 srelplt2 and next_tls_desc_index.
826 (_bfd_x86_elf_link_hash_table_free): Removed.
828 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
830 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
831 branch offset interpretation.
833 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
836 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
838 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
840 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
841 (elf_x86_64_srelplt2): Likewise.
843 2017-08-30 Alan Modra <amodra@gmail.com>
845 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
846 (ppc64_elf_tls_optimize): Set it.
847 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
848 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
849 addis would add zero.
850 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
851 (ppc_elf_tls_optimize): Set it.
852 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
853 insn on TPREL16_LO relocs to use r2 when addis would add zero.
855 2017-08-30 Alan Modra <amodra@gmail.com>
857 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
858 __tls_get_addr call sequences to LE, don't move the addi down
859 to the nop. Replace the bl with addi and leave the nop alone.
861 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
863 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
865 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
867 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
869 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
871 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
872 (BFD64_BACKENDS): Likewise.
873 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
874 (BFD64_BACKENDS_CFILES): Likewise.
875 * Makefile.in: Regenerated.
876 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
877 elf32-i386.lo and elf64-x86-64.lo.
878 * configure: Regenerated.
879 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
880 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
881 "objalloc.h" and "hashtab.h".
882 (ELIMINATE_COPY_RELOCS): Removed.
883 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
884 (SYMBOL_NO_COPYRELOC): Likewise.
885 (elf_i386_link_hash_entry): Likewise.
886 (GOT_UNKNOWN): Likewise.
887 (GOT_NORMAL): Likewise.
888 (GOT_TLS_GD): Likewise.
889 (elf_i386_hash_entry): Likewise.
890 (elf_i386_obj_tdata): Likewise.
891 (elf_i386_tdata): Likewise.
892 (elf_i386_local_got_tls_type): Likewise.
893 (elf_i386_local_tlsdesc_gotent): Likewise.
894 (elf_i386_hash_table): Likewise.
895 (elf_i386_link_hash_newfunc): Likewise.
896 (elf_i386_local_htab_hash): Likewise.
897 (elf_i386_local_htab_eq): Likewise.
898 (elf_i386_get_local_sym_hash): Likewise.
899 (elf_i386_link_hash_table_free): Likewise.
900 (elf_i386_copy_indirect_symbol): Likewise.
901 (elf_i386_fixup_symbol): Likewise.
902 (elf_i386_readonly_dynrelocs): Likewise.
903 (elf_i386_always_size_sections): Likewise.
904 (elf_i386_set_tls_module_base): Likewise.
905 (elf_i386_dtpoff_base): Likewise.
906 (compare_relocs): Likewise.
907 (elf_i386_hash_symbol): Likewise.
908 (elf_i386_parse_gnu_properties): Likewise.
909 (elf_i386_merge_gnu_properties): Likewise.
910 (elf_i386_link_check_relocs): Likewise.
911 (elf_i386_merge_symbol_attribute): Likewise.
912 (bfd_elf32_bfd_link_check_relocs): Likewise.
913 (elf_backend_copy_indirect_symbol): Likewise.
914 (elf_backend_always_size_sections): Likewise.
915 (elf_backend_omit_section_dynsym): Likewise.
916 (elf_backend_hash_symbol): Likewise.
917 (elf_backend_fixup_symbol): Likewise.
918 (elf_backend_parse_gnu_properties): Likewise.
919 (elf_backend_merge_gnu_properties): Likewise.
920 (elf_backend_merge_symbol_attribute): Likewise.
921 (elf_i386_mkobject): Updated.
922 (elf_i386_link_hash_table_create): Likewise.
923 (elf_i386_check_tls_transition): Likewise.
924 (elf_i386_tls_transition): Likewise.
925 (elf_i386_convert_load_reloc): Likewise.
926 (elf_i386_check_relocs): Likewise.
927 (elf_i386_adjust_dynamic_symbol): Likewise.
928 (elf_i386_allocate_dynrelocs): Likewise.
929 (elf_i386_convert_load): Likewise.
930 (elf_i386_size_dynamic_sections): Likewise.
931 (elf_i386_relocate_section): Likewise.
932 (elf_i386_finish_dynamic_symbol ): Likewise.
933 (elf_i386_finish_dynamic_sections): Likewise.
934 (elf_i386_output_arch_local_syms): Likewise.
935 (elf_i386_get_synthetic_symtab): Likewise.
936 (elf_i386_link_setup_gnu_properties): Likewise.
937 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
938 of elf_link_hash_table, as base.
939 (elf_i386_next_tls_desc_index): New.
940 (elf_i386_srelplt2): Likewise.
941 (elf_i386_plt): Likewise.
942 (elf_i386_lazy_plt): Likewise.
943 (elf_i386_non_lazy_plt): Likewise.
944 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
945 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
946 "objalloc.h" and "hashtab.h".
947 (ELIMINATE_COPY_RELOCS): Removed.
948 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
949 (SYMBOL_NO_COPYRELOC): Likewise.
950 (elf_x86_64_link_hash_entry): Likewise.
951 (GOT_UNKNOWN): Likewise.
952 (GOT_NORMAL): Likewise.
953 (GOT_TLS_GD): Likewise.
954 (elf_x86_64_hash_entry): Likewise.
955 (elf_x86_64_obj_tdata): Likewise.
956 (elf_x86_64_tdata): Likewise.
957 (elf_x86_64_local_got_tls_type): Likewise.
958 (elf_x86_64_local_tlsdesc_gotent): Likewise.
959 (elf_x86_64_hash_table): Likewise.
960 (elf_x86_64_link_hash_newfunc): Likewise.
961 (elf_x86_64_local_htab_hash): Likewise.
962 (elf_x86_64_local_htab_eq): Likewise.
963 (elf_x86_64_get_local_sym_hash): Likewise.
964 (elf_x86_64_link_hash_table_free): Likewise.
965 (elf_x86_64_copy_indirect_symbol): Likewise.
966 (elf_x86_64_fixup_symbol): Likewise.
967 (elf_x86_64_readonly_dynrelocs): Likewise.
968 (elf_x86_64_always_size_sections): Likewise.
969 (elf_x86_64_set_tls_module_base): Likewise.
970 (elf_x86_64_dtpoff_base): Likewise.
971 (compare_relocs): Likewise.
972 (elf_x86_64_merge_symbol_attribute): Likewise.
973 (elf_x86_64_hash_symbol): Likewise.
974 (elf_x86_64_parse_gnu_properties): Likewise.
975 (elf_x86_64_merge_gnu_properties): Likewise.
976 (elf_x86_64_link_check_relocs): Likewise.
977 (elf_backend_copy_indirect_symbol): Likewise.
978 (elf_backend_always_size_sections): Likewise.
979 (bfd_elf64_bfd_link_check_relocs): Likewise.
980 (elf_backend_merge_symbol_attribute): Likewise.
981 (elf_backend_hash_symbol): Likewise.
982 (elf_backend_omit_section_dynsym): Likewise.
983 (elf_backend_fixup_symbol): Likewise.
984 (elf_backend_parse_gnu_properties): Likewise.
985 (elf_backend_merge_gnu_properties): Likewise.
986 (bfd_elf32_bfd_link_check_relocs): Likewise.
987 (elf_x86_64_mkobject): Updated.
988 (elf_x86_64_link_hash_table_create): Likewise.
989 (elf_x86_64_check_tls_transition): Likewise.
990 (elf_x86_64_tls_transition): Likewise.
991 (elf_x86_64_convert_load_reloc): Likewise.
992 (elf_x86_64_check_relocs): Likewise.
993 (elf_x86_64_adjust_dynamic_symbol): Likewise.
994 (elf_x86_64_allocate_dynrelocs): Likewise.
995 (elf_x86_64_convert_load): Likewise.
996 (elf_x86_64_size_dynamic_sections): Likewise.
997 (elf_x86_64_relocate_section): Likewise.
998 (elf_x86_64_finish_dynamic_symbol ): Likewise.
999 (elf_x86_64_finish_dynamic_sections): Likewise.
1000 (elf_x86_64_output_arch_local_syms): Likewise.
1001 (elf_x86_64_get_synthetic_symtab): Likewise.
1002 (elf_x86_64_link_setup_gnu_properties): Likewise.
1003 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1004 instead of elf_link_hash_table, as base.
1005 (elf_x86_64_next_tls_desc_index): New.
1006 (elf_x86_64_srelplt2): Likewise.
1007 (elf_x86_64_plt): Likewise.
1008 (elf_x86_64_lazy_plt): Likewise.
1009 (elf_x86_64_non_lazy_plt): Likewise.
1010 * elfxx-x86.c: New file.
1011 * elfxx-x86.h: Likewise.
1013 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1015 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1017 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1019 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1021 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1022 sections before checking dynamic relocations and free invalid
1023 PLT section contents.
1024 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1026 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1028 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1029 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1031 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1034 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1036 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1038 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1040 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1042 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1044 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1047 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1048 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1049 Add a has_no_copy_on_protected bitfield.
1050 (elf_has_no_copy_on_protected): New.
1051 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1052 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1053 (elf_merge_gnu_property_list): Likewise.
1054 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1055 to FALSE for elf_has_no_copy_on_protected.
1056 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1057 (elf_i386_link_hash_entry): Add def_protected.
1058 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1059 when checking info->nocopyreloc.
1060 (elf_i386_link_setup_gnu_properties): Don't set
1061 extern_protected_data here.
1062 (elf_i386_merge_symbol_attribute): New function.
1063 (elf_backend_merge_symbol_attribute): New.
1064 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1065 (elf_x86_64_link_hash_entry): Add def_protected.
1066 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1067 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1068 when checking info->nocopyreloc.
1069 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1070 relocation run-time overflow and unresolvable R_X86_64_32S
1071 relocation against protected data symbol defined in shared object
1072 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1073 (elf_x86_64_link_setup_gnu_properties): Don't set
1074 extern_protected_data here.
1075 (elf_x86_64_merge_symbol_attribute): New function.
1076 (elf_backend_merge_symbol_attribute): New.
1078 2017-08-26 Alan Modra <amodra@gmail.com>
1080 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1081 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1082 (ppc_elf_relocate_section): Comment fix.
1083 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1084 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1085 Support dynamic relocs for TPREL16 when non-pic too.
1086 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1087 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1090 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1092 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1093 "symbol" in comments.
1094 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1096 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1099 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1100 R_X86_64_PC32 relocation run-time overflow and unresolvable
1101 R_X86_64_32S relocation with -z nocopyreloc.
1103 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1105 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1106 Undefined symbols may not have a type.
1107 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1109 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1111 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1112 bfd_link_info. Report shared, PIE or PDE object based on
1114 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1115 (elf_x86_64_relocate_section): Likewise.
1117 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1119 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1120 for function symbols.
1121 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1123 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1125 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1126 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1127 is set on any input relocatable file.
1128 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1130 2017-08-23 Alan Modra <amodra@gmail.com>
1133 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1134 ensure_undefweak_dynamic. Handle undefined too.
1135 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1136 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1137 (allocate_dynrelocs): Discard undefined non-default visibility
1138 relocs first. Make undefined syms dynamic. Tidy goto.
1140 2017-08-21 Alan Modra <amodra@gmail.com>
1141 H.J. Lu <hongjiu.lu@intel.com>
1144 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1145 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1147 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1150 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1151 undefined weak symbols.
1153 2017-08-18 Nick Clifton <nickc@redhat.com>
1156 * tekhex.c (getsym): Fix check for source pointer walking off the
1157 end of the input buffer.
1159 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1162 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1163 relocations in debug sections, change abort to _bfd_error_handler.
1165 2017-08-14 Nick Clifton <nickc@redhat.com>
1168 * elf.c (setup_group): Check for an empty or very small group
1170 * po/bfd.pot: Regenerate.
1172 2017-08-14 Alan Modra <amodra@gmail.com>
1175 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1176 alignment padding here.
1177 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1178 in a reverse pass over sections.
1180 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1183 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1184 for @plt suffixes first.
1185 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1187 2017-08-08 Nick Clifton <nickc@redhat.com>
1190 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1191 small section lengths.
1192 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1194 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1195 there is enough data present in the note.
1197 2017-08-08 Alan Modra <amodra@gmail.com>
1200 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1201 got.refcount for GOTOFF relocs, just create .got section.
1203 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1205 * elflink.c (elf_link_add_object_symbols): Move common symbol
1206 check after bed->common_definition.
1208 2017-08-07 Alan Modra <amodra@gmail.com>
1211 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1212 needed to define various dynamic tags have been discarded.
1214 2017-08-07 Nick Clifton <nickc@redhat.com>
1217 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1218 has not been set then use the bfd returned by
1219 _bfd_elf_link_setup_gnu_properties. If that is null then search
1220 through all the input bfds selecting the first normal, ELF format
1222 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1224 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1226 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1228 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1229 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1230 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1231 (elf_i386_link_check_relocs): New function.
1232 (bfd_elf32_bfd_link_check_relocs): New.
1233 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1235 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1236 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1237 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1238 (elf_x86_64_link_check_relocs): New function.
1239 (bfd_elf64_bfd_link_check_relocs): New.
1240 (bfd_elf32_bfd_link_check_relocs): Likewise.
1242 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1245 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1246 as undefined for --no-define-common.
1248 2017-08-05 Alan Modra <amodra@gmail.com>
1250 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1251 hppa_link_hash_table.
1253 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1255 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1256 entries for sysregs with negative indices.
1258 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1260 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1261 isn't the S/390 specific elf data.
1262 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1264 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1266 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1267 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1268 [R_RISCV_ADD16]: Likewise.
1269 [R_RISCV_ADD32]: Likewise.
1270 [R_RISCV_ADD64]: Likewise.
1271 [R_RISCV_SUB6]: Likewise.
1272 [R_RISCV_SUB8]: Likewise.
1273 [R_RISCV_SUB16]: Likewise.
1274 [R_RISCV_SUB32]: Likewise.
1275 [R_RISCV_SUB64]: Likewise.
1277 2017-07-31 Alan Modra <amodra@gmail.com>
1279 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1280 without ld.so checks.
1282 2017-07-29 Alan Modra <amodra@gmail.com>
1285 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1286 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1287 (is_elfv2_localentry0): Test non_zero_localentry.
1288 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1290 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1292 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1293 pointer check for htab->elf.irelplt.
1294 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1296 2017-07-27 Nick Clifton <nickc@redhat.com>
1299 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1301 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1303 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1305 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1307 (evax_bfd_print_emh): Check for invalid string lengths.
1309 2017-07-25 Nick Clifton <nickc@redhat.com>
1311 * po/fr.po: Updated French translation.
1313 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1316 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1317 16-bit absolute branches into 10-bit pc-relative branches on the
1318 MSP430 as well as the MSP430X.
1320 2017-07-25 Alan Modra <amodra@gmail.com>
1322 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1323 (stub_eh_frame_size): New function.
1324 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1325 (group_sections): Init group tls_get_addr_opt_bctrl.
1326 (ppc64_elf_size_stubs): Update sizing and initialization of
1327 .eh_frame. Iteration over stubs via group list.
1328 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1329 (ppc64_elf_finish_dynamic_sections): Update finalization of
1332 2017-07-24 Nick Clifton <nickc@redhat.com>
1335 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1336 of the relocs to the canonicalize_one_reloc routine.
1337 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1338 for the _bfd_mach_o_canonicalize_one_reloc field.
1339 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1340 res_base parameter. Use to check for corrupt pair relocs.
1341 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1343 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1345 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1348 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1349 enough data in the record before attempting to parse it.
1350 (_bfd_vms_slurp_eeom): Likewise.
1352 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1353 (image_set_ptr): Likewise.
1354 (alpha_vms_slurp_relocs): Likewise.
1356 (alpha_vms_object_p): Check for a truncated record.
1358 2017-07-24 Nick Clifton <nickc@redhat.com>
1361 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1362 an unrecognized reloc and sets the bfd_error value.
1363 * libbfd.h: Regenerate.
1364 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1366 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1367 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1368 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1369 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1370 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1372 2017-07-23 Alan Modra <amodra@gmail.com>
1374 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1377 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1380 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1381 reloc_class_ifunc for ifunc symbols.
1383 2017-07-19 Nick Clifton <nickc@redhat.com>
1386 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1387 correct magic bytes at the start, set the error to wrong format
1388 and clear the format selector before returning NULL.
1390 2017-07-19 Nick Clifton <nickc@redhat.com>
1393 * coff-rs6000.c (_bfd_strntol): New function.
1394 (_bfd_strntoll): New function.
1395 (GET_VALUE_IN_FIELD): New macro.
1396 (EQ_VALUE_IN_FIELD): new macro.
1397 (_bfd_xcoff_slurp_armap): Use new macros.
1398 (_bfd_xcoff_archive_p): Likewise.
1399 (_bfd_xcoff_read_ar_hdr): Likewise.
1400 (_bfd_xcoff_openr_next_archived_file): Likewise.
1401 (_bfd_xcoff_stat_arch_elt): Likewise.
1402 * coff64-rs6000.c (_bfd_strntol): New function.
1403 (_bfd_strntoll): New function.
1404 (GET_VALUE_IN_FIELD): New macro.
1405 (xcoff64_slurp_armap): Use new macros.
1407 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1408 John Eric Martin <John.Martin@emmicro-us.com>
1410 * bfd-in2.h: Regenerate.
1411 * libbfd.h: Regenerate.
1412 * elf32-arc.c (JLI): Define.
1413 * reloc.c: Add JLI relocations.
1415 2017-07-18 Nick Clifton <nickc@redhat.com>
1418 * coff-sh.c: Fix spelling typos.
1419 * compress.c: Likewise.
1420 * cpu-pdp11.c: Likewise.
1421 * ecofflink.c: Likewise.
1422 * elf-m10300.c: Likewise.
1424 * elf32-arm.c: Likewise.
1425 * elf32-m68k.c: Likewise.
1426 * elf32-nds32.c: Likewise.
1427 * elf32-ppc.c: Likewise.
1428 * elf32-sh.c: Likewise.
1429 * elf32-v850.c: Likewise.
1430 * elf64-ppc.c: Likewise.
1431 * elf64-x86-64.c: Likewise.
1432 * elflink.c: Likewise.
1433 * elfnn-aarch64.c: Likewise.
1434 * elfxx-mips.c: Likewise.
1436 * sunos.c: Likewise.
1437 * vms-alpha.c: Likewise.
1438 * xcofflink.c: Likewise.
1440 2017-07-18 Nick Clifton <nickc@redhat.com>
1443 * coffcode.h (handle_COMDAT): Replace abort with an error message
1446 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1449 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1452 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1454 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1456 2017-07-16 Alan Modra <amodra@gmail.com>
1458 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1459 __tls_index GOT entries when using __tls_get_addr_opt stub.
1460 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1462 2017-07-12 Alan Modra <amodra@gmail.com>
1464 * po/es.po: Update from translationproject.org/latest/bfd/.
1465 * po/fi.po: Likewise.
1466 * po/fr.po: Likewise.
1467 * po/id.po: Likewise.
1468 * po/ja.po: Likewise.
1469 * po/ro.po: Likewise.
1470 * po/ru.po: Likewise.
1471 * po/sr.po: Likewise.
1472 * po/sv.po: Likewise.
1473 * po/tr.po: Likewise.
1474 * po/uk.po: Likewise.
1475 * po/vi.po: Likewise.
1476 * po/zh_CN.po: Likewise.
1477 * po/hr.po: New file from translationproject.org.
1478 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1479 * configure: Regenerate.
1481 2017-07-12 Nick Clifton <nickc@redhat.com>
1483 Fix compile time warnings using gcc 7.1.1.
1484 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1486 (elf_xtensa_get_gotplt_section): Increase length of got_name
1488 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1489 default return of FALSE.
1490 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1491 default return of FALSE.
1493 2017-07-12 Alan Modra <amodra@gmail.com>
1495 * binary.c (binary_set_section_contents): Don't print filepos in
1497 (coff_write_object_contents): Cast size_t for error message.
1498 (coff_slurp_line_table): Don't use bfd_vma symndx.
1499 (coff_slurp_reloc_table): Remove unneeded cast.
1500 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1502 (find_abstract_instance_name): Likewise.
1503 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1504 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1505 (elf32_arm_check_relocs): Make r_symndx an int.
1506 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1508 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1510 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1512 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1513 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1514 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1515 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1516 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1517 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1518 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1519 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1520 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1521 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1522 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1523 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1524 and use %lu for error message.
1525 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1526 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1529 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1531 (elf32_arm_final_link_relocate): Likewise.
1532 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1533 * coffcode.h (styp_to_sec_flags): Likewise.
1534 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1535 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1536 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1537 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1538 (elf32_bfin_merge_private_bfd_data): Likewise.
1539 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1540 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1541 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1542 (i370_elf_relocate_section): Likewise.
1543 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1544 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1545 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1546 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1547 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1548 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1549 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1550 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1551 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1552 * ieee.c (ieee_write_id, read_id): Likewise.
1553 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1554 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1555 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1556 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1557 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1558 * stabs.c (_bfd_link_section_stabs): Likewise.
1560 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1562 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1563 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1564 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1565 * coff-sh.c (sh_relax_section): Likewise.
1566 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1567 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1568 * coffcode.h (coff_slurp_reloc_table): Likewise.
1569 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1570 (_bfd_coff_read_string_table): Likewise.
1571 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1572 * compress.c (bfd_get_full_section_contents): Likewise.
1573 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1574 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1575 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1576 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1577 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1578 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1579 (elf32_arm_write_section): Likewise.
1580 * elf32-bfin.c (bfin_relocate_section): Likewise.
1581 (bfinfdpic_relocate_section): Likewise.
1582 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1583 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1584 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1585 (elf_i386_relocate_section): Likewise.
1586 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1587 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1588 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1589 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1590 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1591 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1592 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1593 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1594 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1595 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1596 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1597 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1598 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1599 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1600 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1601 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1602 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1603 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1604 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1605 * elf32-sh.c (sh_elf_relax_section): Likewise.
1606 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1607 (sh_elf_relocate_section): Likewise.
1608 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1609 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1610 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1611 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1612 * elf32-v850.c (v850_elf_relax_section): Likewise.
1613 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1614 (elf_vax_relocate_section): Likewise.
1615 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1616 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1617 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1618 (do_fix_for_relocatable_link): Likewise.
1619 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1620 (elf64_alpha_relax_with_lituse): Likewise.
1621 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1622 (elf_hppa_final_link_relocate): Likewise.
1623 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1624 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1625 (elf64_vms_link_add_object_symbols): Likewise.
1626 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1627 (mmix_final_link_relocate): Likewise.
1628 * elf64-s390.c (invalid_tls_insn): Likewise.
1629 (elf_s390_relocate_section): Likewise.
1630 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1631 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1632 (elf_x86_64_relocate_section): Likewise.
1633 * elfcode.h (elf_slurp_symbol_table): Likewise.
1634 * elfcore.h (elf_core_file_p): Likewise.
1635 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1636 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1637 (elfNN_aarch64_relocate_section): Likewise.
1638 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1639 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1640 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1641 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1642 (_bfd_mips_elf_relocate_section): Likewise.
1643 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1644 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1645 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1646 * ieee.c (ieee_slurp_external_symbols): Likewise.
1647 * ihex.c (ihex_write_object_content): Likewise.
1648 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1649 * merge.c (_bfd_merged_section_offset): Likewise.
1650 * mmo.c (mmo_write_loc_chunk): Likewise.
1651 (mmo_write_object_contents): Likewise.
1652 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1653 * stabs.c (_bfd_link_section_stabs): Likewise.
1654 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1656 2017-07-11 Alan Modra <amodra@gmail.com>
1658 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1660 2017-07-11 Alan Modra <amodra@gmail.com>
1662 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1663 instruction" error using _bfd_error_handler, not einfo.
1665 2017-07-10 Nick Clifton <nickc@redhat.com>
1667 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1668 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1670 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1672 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1674 2017-07-07 Alan Modra <amodra@gmail.com>
1676 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1678 2017-07-07 Alan Modra <amodra@gmail.com>
1680 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1681 as long long. Move code replacing "ll" with "I64", and simplify.
1683 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1685 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1688 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1690 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1692 (line_info_add_file_name): Likewise.
1693 (decode_line_info): Likewise.
1695 2017-07-04 Tristan Gingold <gingold@adacore.com>
1697 * version.m4: Bump version to 2.29.51
1698 * configure: Regenerate.
1700 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1702 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1703 sanity check at the head of this function.
1705 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1707 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1708 dwarf_line_str_size.
1709 (struct attr_abbrev): Add field implicit_const.
1710 (dwarf_debug_sections): Add .debug_line_str.
1711 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1712 (dwarf_debug_section_assert): Add static assertion.
1713 (read_indirect_line_string): New.
1714 (read_abbrevs): Support DW_FORM_implicit_const.
1715 (is_str_attr): Support DW_FORM_line_strp.
1716 (read_attribute_value): Support DW_FORM_line_strp and
1717 DW_FORM_implicit_const.
1718 (read_attribute): Support DW_FORM_implicit_const.
1719 (line_info_add_include_dir, line_info_add_include_dir_stub):
1720 (line_info_add_file_name, read_formatted_entries): New.
1721 (decode_line_info, parse_comp_unit): Support DWARF 5.
1722 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1724 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1726 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1727 abort statement that was put for symbols that are not dynamic.
1729 2017-07-03 Tristan Gingold <gingold@adacore.com>
1731 * po/bfd.pot: Regenerate
1733 2017-07-03 Alan Modra <amodra@gmail.com>
1735 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1736 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1737 * elf.c (setup_group): Use "Lx" to print sh_size.
1738 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1739 unknown section type in hex.
1740 (copy_special_section_fields): Style fix.
1741 (bfd_section_from_shdr): Correct format for sh_link. Use a
1742 common error message for all the variants of unrecognized
1744 (assign_file_positions_for_load_sections): Use "Lx" for lma
1745 adjust error message.
1746 (assign_file_positions_for_non_load_sections): Formatting.
1747 (rewrite_elf_program_header): Formatting. Use "Lx" for
1748 bfd_vma values in error messages.
1749 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1750 ELF_R_SYM value to type expected by format.
1751 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1753 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1754 (elf_link_input_bfd): Use "Lx" for r_info.
1755 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1757 2017-07-03 Alan Modra <amodra@gmail.com>
1759 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1760 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1761 Microsoft C library variant of long long format specifier.
1762 (PRINT20): Cast value to bfd_uint64_t not long long.
1763 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1764 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1765 long long. Don't cast to bfd_vma.
1766 * elf32-score.c (score3_bfd_getl48): Likewise.
1767 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1769 2017-07-03 Alan Modra <amodra@gmail.com>
1771 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1773 (bfd_elf_print_symbol): Don't cast symbol->flags.
1774 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1775 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1776 _bfd_error_handler argument order.
1777 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1779 2017-07-03 Alan Modra <amodra@gmail.com>
1781 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1782 AC_TYPE_LONG_DOUBLE.
1783 * configure: Regenerate.
1784 * config.in: Regenerate.
1786 2017-06-29 Andrew Waterman <andrew@sifive.com>
1788 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1791 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1793 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1794 unless it is undefined weak.
1795 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1796 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1798 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1799 is not dynamic in PIC, abort.
1801 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1804 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1805 undefined weak symbols into dynamic.
1806 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1807 relocation for non-dynamic symbols.
1808 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1810 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1812 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1813 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1814 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1815 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1816 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1819 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1821 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1822 (elfcore_write_s390_gs_bc): Likewise.
1823 * elf.c (elfcore_grok_s390_gs_cb): New function.
1824 (elfcore_grok_s390_gs_bc): New function.
1825 (elfcore_grok_note): Call them.
1826 (elfcore_write_s390_gs_cb): New function.
1827 (elfcore_write_s390_gs_bc): New function.
1828 (elfcore_write_register_note): Call them.
1830 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1832 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1833 bfd_get_file_size. Check archive element size.
1834 (_bfd_generic_get_section_contents_in_window): Likewise.
1836 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1838 * bfd-in2.h: Regenerated.
1839 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1840 (bfd_get_file_size): Likewise.
1842 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1843 Matthew Fortune <matthew.fortune@imgtec.com>
1845 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1846 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1847 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1848 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1850 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1851 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1852 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1853 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1854 `bfd_mach_mips_interaptiv_mr2' entries.
1855 * bfd-in2.h: Regenerate.
1857 2017-06-27 Nick Clifton <nickc@redhat.com>
1859 * tekhex.c (pass_over): Revert accidental conversion of a local
1860 array to a static array.
1862 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1865 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1866 reloc addend if necessary. Adjust diff only if
1867 shrinked_insn_address < end_address.
1869 2017-06-27 Alan Modra <amodra@gmail.com>
1872 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1873 (_bfd_generic_get_section_contents_in_window): Likewise.
1875 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1877 * elfnn-riscv.c (perform_relocation): Support the new
1878 R_RISCV_32_PCREL relocation.
1879 (riscv_elf_relocate_section): Likewise.
1880 * elfxx-riscv.c (howto_table): Likewise.
1881 (riscv_reloc_map): Likewise.
1882 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1883 * libbfd.h: Regenerate.
1885 2017-06-27 Alan Modra <amodra@gmail.com>
1888 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1889 Use unsigned file pointer type, and remove cast.
1890 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1891 Add "count", not "sz".
1893 2017-06-26 Pedro Alves <palves@redhat.com>
1896 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1899 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1902 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1905 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1907 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1908 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1909 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1910 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1911 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1913 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1916 * compress.c (bfd_get_full_section_contents): Don't check the
1918 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1919 reject a section whose size + offset is greater than the size
1921 (_bfd_generic_get_section_contents_in_window): Likewise.
1923 2017-06-26 Nick Clifton <nickc@redhat.com>
1926 * tekhex.c (getvalue): Check for the source pointer exceeding the
1927 end pointer before the first byte is read.
1929 2017-06-26 Nick Clifton <nickc@redhat.com>
1932 * opncls.c (get_build_id): Check that the section is big enough
1933 to contain the whole note.
1934 * compress.c (bfd_get_full_section_contents): Check for and reject
1935 a section whose size is greater than the size of the entire file.
1936 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1937 contain a notes section.
1939 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1941 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1943 (elf_s390_modify_segment_map): Likewise.
1944 (bfd_elf_s390_set_options): Lisewise.
1946 2017-06-26 Alan Modra <amodra@gmail.com>
1948 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1950 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1951 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1952 .preinit_array on --just-syms bfds.
1953 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1954 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1955 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1957 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1959 * elf.c (find_link): Bounds check "hint".
1961 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1963 * elf32-arm.c (using_thumb_only): Update list of architectures in
1964 BFD_ASSERT for which the logic is valid.
1965 (using_thumb2_bl): Likewise.
1966 (using_thumb2): Likewise and return true for ARMv8-R.
1967 (arch_has_arm_nop): Likewise.
1968 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1969 merging logic. Update commentis for value 15 of v8m_baseline,
1970 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1971 merging of value 15 of Tag_CPU_arch.
1973 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1975 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1976 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1977 * bfd-in2.h: Regenerate.
1979 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1981 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1982 the error_alignment label forward. Properly align program
1983 property note section.
1985 2017-06-22 Eric Christopher <echristo@gmail.com>
1987 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1988 abs to fix a truncation warning.
1990 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1992 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1993 local undefined weak symbol to 0.
1994 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1996 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1998 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1999 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2000 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2001 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2002 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2003 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2004 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2005 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2007 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2009 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2010 (elf_i386_lazy_ibt_plt_entry): Likewise.
2011 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2012 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2013 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2014 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2015 (elf_i386_lazy_plt_layout): Likewise.
2016 (elf_i386_non_lazy_plt_layout): Likewise.
2017 (elf_i386_link_hash_entry): Add plt_second.
2018 (elf_i386_link_hash_table): Add plt_second and
2019 plt_second_eh_frame.
2020 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2021 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2022 the second PLT. Check the second PLT.
2023 (elf_i386_relocate_section): Use the second PLT to resolve
2024 PLT reference if needed.
2025 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2027 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2028 second PLT. Generate unwind info for the second PLT.
2029 (elf_i386_plt_type): Add plt_second.
2030 (elf_i386_get_synthetic_symtab): Support the second PLT.
2031 (elf_i386_parse_gnu_properties): Support
2032 GNU_PROPERTY_X86_FEATURE_1_AND.
2033 (elf_i386_merge_gnu_properties): Support
2034 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2035 on GNU_PROPERTY_X86_FEATURE_1_IBT
2036 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2037 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2038 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2039 is set on all relocatable inputs.
2040 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2041 (elf_x32_lazy_ibt_plt_entry): Likewise.
2042 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2043 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2044 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2045 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2046 (elf_x86_64_lazy_ibt_plt): Likewise.
2047 (elf_x32_lazy_ibt_plt): Likewise.
2048 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2049 (elf_x32_non_lazy_ibt_plt): Likewise.
2050 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2051 (elf_x86_64_parse_gnu_properties): Support
2052 GNU_PROPERTY_X86_FEATURE_1_AND.
2053 (elf_x86_64_merge_gnu_properties): Support
2054 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2055 on GNU_PROPERTY_X86_FEATURE_1_IBT
2056 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2057 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2058 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2059 is set on all relocatable inputs.
2061 2017-06-22 Nick Clifton <nickc@redhat.com>
2064 * som.c (setup_sections): NUL terminate the space_strings buffer.
2065 Check that the space.name field does not index beyond the end of
2066 the space_strings buffer.
2068 2017-06-21 Nick Clifton <nickc@redhat.com>
2071 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2073 2017-06-21 Nick Clifton <nickc@redhat.com>
2076 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2077 type of the size parameter.
2078 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2079 length of the counted string.
2080 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2081 (_bfd_vms_save_counted_string): Likewise.
2082 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2083 _bfd_vms_save_counted_string.
2084 (_bfd_vms_slurp_ehdr): Likewise.
2085 (_bfd_vms_slurp_egsd): Likewise.
2086 (Parse_module): Likewise.
2088 2017-06-21 Alan Modra <amodra@gmail.com>
2090 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2091 calls before tocsave calls.
2092 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2095 2017-06-21 Nick Clifton <nickc@redhat.com>
2098 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2099 bfd_get_full_section_contents returns no contents.
2101 2017-06-21 Nick Clifton <nickc@redhat.com>
2104 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2107 2017-06-21 Nick Clifton <nickc@redhat.com>
2110 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2112 (image_set_ptr): Likewise.
2113 (alpha_vms_fix_sec_rel): Likewise.
2114 (alpha_vms_slurp_relocs): Likewise.
2116 2017-06-21 Nick Clifton <nickc@redhat.com>
2119 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2121 (ieee_archive_p): Likewise.
2122 (ieee_object_p): Likewise.
2124 2017-06-21 Nick Clifton <nickc@redhat.com>
2127 * elf.c (setup_group): Zero the group section pointer list after
2128 allocation so that loops can be caught. Check for NULL pointers
2129 when processing a group list.
2131 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2133 * elf-s390.h: New file.
2134 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2136 (elf_s390_additional_program_headers): New function.
2137 (elf_s390_modify_segment_map): New function.
2138 (bfd_elf_s390_set_options): New function.
2139 (elf_backend_additional_program_headers)
2140 (elf_backend_modify_segment_map): Add macro definitions.
2142 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2145 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2146 the DYNAMIC bit instead of bfd_count_sections.
2148 2017-06-19 Nick Clifton <nickc@redhat.com>
2151 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2153 (evax_bfd_print_eeom): Likewise.
2154 (evax_bfd_print_egsd): Check for an overlarge record length.
2155 (evax_bfd_print_etir): Likewise.
2157 2017-06-19 Nick Clifton <nickc@redhat.com>
2160 * libieee.h (struct common_header_type): Add end_p field.
2161 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2163 (read_id): Check for a length that exceeds the remaining bytes in
2165 (ieee_seek): Initialise end_p.
2166 (ieee_archive_p): Likewise.
2167 (ieee_object_p): Likewise.
2169 2017-06-19 Nick Clifton <nickc@redhat.com>
2172 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2173 before reading the EIHS structure entries.
2175 2017-06-19 Nick Clifton <nickc@redhat.com>
2178 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2179 gsd_size. Check that there are enough bytes remaining to read the
2180 type and size of the next egsd. Check that the size of the egsd
2181 does not exceed the size of the record.
2183 2017-06-19 Alan Modra <amodra@gmail.com>
2185 * config.bfd: Correct targ_underscore for cris.
2187 2017-06-18 Alan Modra <amodra@gmail.com>
2189 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2190 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2192 2017-06-16 Nick Clifton <nickc@redhat.com>
2194 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2195 bucketlist is empty because there are no symbols to add to the
2198 2017-06-16 Alan Modra <amodra@gmail.com>
2204 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2205 (BFD_JUMP_TABLE_LINK): Likewise.
2206 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2207 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2208 (bfd_elf_define_start_stop): New function.
2209 * linker.c (bfd_generic_define_start_stop): New function.
2210 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2212 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2213 * aout-target.h (MY_bfd_define_start_stop): Define.
2214 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2215 * binary.c (binary_bfd_define_start_stop): Define.
2216 * bout.c (b_out_bfd_define_start_stop): Define.
2217 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2218 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2219 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2220 * coffcode.h (coff_bfd_define_start_stop): Define.
2221 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2222 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2223 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2224 * ieee.c (ieee_bfd_define_start_stop): Define.
2225 * ihex.c (ihex_bfd_define_start_stop): Define.
2226 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2227 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2228 * mmo.c (mmo_bfd_define_start_stop): Define.
2229 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2230 * oasys.c (oasys_bfd_define_start_stop): Define.
2231 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2232 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2233 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2234 * som.c (som_bfd_define_start_stop): Define.
2235 * srec.c (srec_bfd_define_start_stop): Define.
2236 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2237 * versados.c (versados_bfd_define_start_stop): Define.
2238 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2239 (alpha_vms_bfd_define_start_stop): Define.
2240 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2241 * bfd-in2.h: Regenerate.
2242 * libbfd.h: Regenerate.
2244 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2246 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2247 SYMBOL_REFERENCES_LOCAL.
2249 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2252 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2253 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2254 runtime for if there needs copy relocation elimination.
2255 (need_copy_relocation_p): New function. Return true for symbol with
2256 pc-relative references and if it's against read-only sections.
2257 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2258 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2259 that are related with accessing external objects.
2260 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2261 in elfNN_aarch64_check_relocs.
2263 2017-06-15 Nick Clifton <nickc@redhat.com>
2266 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2269 (ieee_archive_p): Likewise.
2271 2017-06-15 Nick Clifton <nickc@redhat.com>
2274 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2276 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2278 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2279 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2280 keep both windowed and call0 ABI PLT definitions.
2281 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2282 elf_xtensa_*_plt_entry endex.
2283 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2285 2017-06-14 Nick Clifton <nickc@redhat.com>
2288 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2291 2017-06-14 Nick Clifton <nickc@redhat.com>
2294 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2295 maximum value for the ascic pointer. Check that name processing
2296 does not read beyond this value.
2297 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2300 2017-06-14 Nick Clifton <nickc@redhat.com>
2303 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2304 (process_otr): Check for an invalid offset in the otr structure.
2306 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2308 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2310 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2316 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2317 vtable field to a union.
2318 (_bfd_elf_is_start_stop): Removed.
2319 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2320 __start_SECNAME and __stop_SECNAME symbols.
2321 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2322 * elflink.c (_bfd_elf_is_start_stop): Removed.
2323 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2324 _bfd_elf_is_start_stop.
2325 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2326 __stop_SECNAME symbols. Updated.
2327 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2328 (bfd_elf_gc_record_vtinherit): Likewise.
2329 (bfd_elf_gc_record_vtentry): Likewise.
2331 2017-06-13 Nick Clifton <nickc@redhat.com>
2334 * elflink.c (elf_link_adjust_relocs): Generate an error when
2335 encountering a reloc against a symbol removed by garbage
2338 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2340 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2341 to merge_gnu_properties.
2342 * elf-properties.c (elf_merge_gnu_properties): Add struct
2343 bfd_link_info * and pass it to merge_gnu_properties.
2344 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2345 and pass it to elf_merge_gnu_properties.
2346 (_bfd_elf_link_setup_gnu_properties): Pass info to
2347 elf_merge_gnu_property_list.
2348 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2350 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2352 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2355 * binary.c (binary_set_section_contents): Scale lma by octets
2356 per byte to set filepos.
2358 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2360 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2363 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2365 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2368 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2370 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2371 patched section contents for TLS IE reloc.
2372 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2374 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2376 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2377 RELOC_FOR_GLOBAL_SYMBOL macro.
2379 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2381 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2384 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2386 * config/tc-arc.c (md_undefined_symbol): Changed.
2387 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2389 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2391 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2394 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2396 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2397 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2399 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2401 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2404 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2406 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2407 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2408 is non-zero. Add clarifying comments.
2410 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2412 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2413 name. Use local IFUNC symbol name string to report unsupported
2414 non-PIC call to IFUNC function.
2415 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2416 when generating R_386_IRELATIVE relocation.
2417 (elf_i386_finish_dynamic_symbol): Likewise.
2418 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2420 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2421 when generating R_X86_64_IRELATIVE relocation.
2422 (elf_x86_64_finish_dynamic_symbol): Likewise.
2424 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2426 * elf.c (setup_group): Make sure BFD sections are created for all
2427 group sections in the input file when processing SHF_GROUP
2429 (bfd_section_from_shdr): Avoid duplicating logic already
2430 implemented in `setup_group'.
2432 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2435 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2436 if the hint address is zero.
2438 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2441 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2442 ELF_COMMON_DEF_P for common symbols.
2444 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2446 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2447 SEC_GROUP sections as SEC_EXCLUDE.
2448 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2449 (assign_section_numbers): Use resolve_section_groups flag instead
2450 of relocatable link type.
2451 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2452 flag instead of checking the final_link flag for part of the
2453 checks in here. Fix white space as a result.
2454 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2455 instead of relocatable link type.
2456 (bfd_elf_final_link): Likewise.
2458 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2460 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2462 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2463 (s3_bfd_score_elf_check_relocs): Likewise.
2464 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2465 (score_elf_final_link_relocate): Likewise.
2466 (s7_bfd_score_elf_check_relocs): Likewise.
2468 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2470 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2473 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2475 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2476 from `reloc_count' rather than decrementing it.
2477 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2478 `reloc_count' by `int_rels_per_ext_rel'.
2479 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2480 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2481 entry determination.
2482 (s3_bfd_score_elf_check_relocs): Likewise.
2483 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2484 (s7_bfd_score_elf_relocate_section): Likewise.
2485 (s7_bfd_score_elf_check_relocs): Likewise.
2486 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2487 prototype and function.
2488 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2489 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2490 triple rather than once the sum of REL and RELA relocation entry
2492 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2493 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2494 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2495 storage allocation size determination.
2496 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2497 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2498 by `int_rels_per_ext_rel' for last relocation entry
2500 (bfd_elf_final_link): Do not multiply `reloc_count' by
2501 `int_rels_per_ext_rel' for internal relocation storage
2502 allocation size determination.
2503 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2504 `int_rels_per_ext_rel' for last relocation entry determination.
2505 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2506 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2507 (_bfd_mips_elf_relocate_section): Likewise.
2509 2017-06-05 Alan Modra <amodra@gmail.com>
2512 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2514 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2516 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2517 determine structure sizes.
2518 (elfcore_grok_freebsd_prstatus): Likewise.
2520 2017-06-01 Alan Modra <amodra@gmail.com>
2522 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2523 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2525 (is_elfv2_localentry0): New function.
2526 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2527 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2528 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2529 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2530 optimized localentry:0 stubs.
2531 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2532 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2534 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2536 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2538 2017-05-30 Casey Smith <clegg89@gmail.com>
2541 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2542 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2544 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2546 * cpu-arc.c (arc_compatible): New function.
2548 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2550 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2552 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2555 * bfdio.c (bfd_get_file_size): New function.
2556 * bfd-in2.h: Regenerated.
2558 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2560 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2563 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2565 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2566 dynobj instead of htab->elf.dynobj.
2568 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2570 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2572 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2573 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2574 actual number of internal relocations retrieved. Adjust
2575 function description.
2576 (bfd_elf64_canonicalize_reloc): Remove macro.
2577 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2579 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2581 * archures.c (bfd_mach_sparc_v9m8): Define.
2582 (bfd_mach_sparc_v8plusm8): Likewise.
2583 (bfd_mach_sparc_v9_p): Adjust to M8.
2584 (bfd_mach_sparc_64bit_p): Likewise.
2585 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2586 bfd_mach_sparc_v8plusm8.
2587 * bfd-in2.h: Regenerated.
2588 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2590 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2591 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2592 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2594 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2595 bfd_mach_sparc_v8plusm8.
2597 2017-05-19 Alan Modra <amodra@gmail.com>
2599 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2600 debug and special sections when no non-note alloc sections in an
2603 2017-05-18 Alan Modra <amodra@gmail.com>
2605 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2606 * elf-m10300.c: Likewise.
2608 * elf32-arc.c: Likewise.
2609 * elf32-bfin.c: Likewise.
2610 * elf32-m68k.c: Likewise.
2611 * elf32-nds32.c: Likewise.
2612 * elf32-tilepro.c: Likewise.
2613 * elflink.c: Likewise.
2614 * elfnn-aarch64.c: Likewise.
2615 * elfnn-riscv.c: Likewise.
2616 * elfxx-tilegx.c: Likewise.
2617 * mach-o.c: Likewise.
2618 * peXXigen.c: Likewise.
2619 * vms-alpha.c: Likewise.
2620 * vms-lib.c: Likewise.
2622 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2625 * elflink.c (elf_gc_mark_debug_section): New function.
2626 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2627 referenced by kept debug sections.
2629 2017-05-16 Alan Modra <amodra@gmail.com>
2631 * elf-m10300.c: Rename occurrences of non_ir_ref.
2632 * elf32-arm.c: Likewise.
2633 * elf32-bfin.c: Likewise.
2634 * elf32-cr16.c: Likewise.
2635 * elf32-cris.c: Likewise.
2636 * elf32-d10v.c: Likewise.
2637 * elf32-dlx.c: Likewise.
2638 * elf32-fr30.c: Likewise.
2639 * elf32-frv.c: Likewise.
2640 * elf32-hppa.c: Likewise.
2641 * elf32-i370.c: Likewise.
2642 * elf32-i386.c: Likewise.
2643 * elf32-iq2000.c: Likewise.
2644 * elf32-lm32.c: Likewise.
2645 * elf32-m32c.c: Likewise.
2646 * elf32-m32r.c: Likewise.
2647 * elf32-m68hc1x.c: Likewise.
2648 * elf32-m68k.c: Likewise.
2649 * elf32-mcore.c: Likewise.
2650 * elf32-metag.c: Likewise.
2651 * elf32-microblaze.c: Likewise.
2652 * elf32-moxie.c: Likewise.
2653 * elf32-msp430.c: Likewise.
2654 * elf32-mt.c: Likewise.
2655 * elf32-nios2.c: Likewise.
2656 * elf32-or1k.c: Likewise.
2657 * elf32-ppc.c: Likewise.
2658 * elf32-rl78.c: Likewise.
2659 * elf32-s390.c: Likewise.
2660 * elf32-score.c: Likewise.
2661 * elf32-score7.c: Likewise.
2662 * elf32-sh.c: Likewise.
2663 * elf32-tic6x.c: Likewise.
2664 * elf32-tilepro.c: Likewise.
2665 * elf32-v850.c: Likewise.
2666 * elf32-vax.c: Likewise.
2667 * elf32-xstormy16.c: Likewise.
2668 * elf32-xtensa.c: Likewise.
2669 * elf64-alpha.c: Likewise.
2670 * elf64-hppa.c: Likewise.
2671 * elf64-ia64-vms.c: Likewise.
2672 * elf64-mmix.c: Likewise.
2673 * elf64-ppc.c: Likewise.
2674 * elf64-s390.c: Likewise.
2675 * elf64-sh64.c: Likewise.
2676 * elf64-x86-64.c: Likewise.
2677 * elflink.c: Likewise.
2678 * elfnn-aarch64.c: Likewise.
2679 * elfnn-ia64.c: Likewise.
2680 * elfnn-riscv.c: Likewise.
2681 * elfxx-mips.c: Likewise.
2682 * elfxx-sparc.c: Likewise.
2683 * elfxx-tilegx.c: Likewise.
2684 * linker.c: Likewise.
2686 2017-05-16 Alan Modra <amodra@gmail.com>
2688 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2689 * elflink.c (elf_link_add_object_symbols): Update to use
2691 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2693 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2695 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2697 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2699 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2701 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2702 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2704 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2706 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2708 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2710 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2711 to plt_second/plt_second_eh_frame.
2712 (elf_x86_64_link_hash_newfunc): Updated.
2713 (elf_x86_64_allocate_dynrelocs): Likewise.
2714 (elf_x86_64_size_dynamic_sections): Likewise.
2715 (elf_x86_64_relocate_section): Likewise.
2716 (elf_x86_64_finish_dynamic_symbol): Likewise.
2717 (elf_x86_64_finish_dynamic_sections): Likewise.
2718 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2719 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2721 (elf_backend_setup_gnu_properties): Updated. Create the
2722 .plt.sec section instead of the .plt.sec section.
2724 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2726 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2727 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2728 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2730 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2732 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2733 (bfd_elf64_set_reloc): Define.
2734 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2736 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2738 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2739 (struct bfd_target): New field _bfd_set_reloc.
2740 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2741 * reloc.c (_bfd_generic_set_reloc): New function.
2742 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2743 * nlm-target.h (nlm_set_reloc): Likewise.
2744 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2745 * aout-tic30.c (MY_set_reloc): Likewise.
2746 * aout-target.h (MY_set_reloc): Likewise.
2747 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2748 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2749 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2750 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2751 * aout-adobe.c (aout_32_set_reloc): Likewise.
2752 * bout.c (b_out_set_reloc): Likewise.
2753 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2754 * i386os9k.c (aout_32_set_reloc): Likewise.
2755 * ieee.c (ieee_set_reloc): Likewise.
2756 * oasys.c (oasys_set_reloc): Likewise.
2757 * som.c (som_set_reloc): Likewise.
2758 * versados.c (versados_set_reloc): Likewise.
2759 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2760 _bfd_generic_set_reloc.
2761 (rs6000_xcoff64_aix_vec): LIkewise.
2762 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2763 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2764 * i386msdos.c (msdos_set_reloc): Define to
2765 _bfd_norelocs_set_reloc.
2766 * elfcode.h (elf_set_reloc): Define.
2767 * bfd-in2.h: Regenerated.
2769 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2772 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2773 for IFUNC function address.
2775 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2777 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2778 (CONFLICT_LIST): Likewise.
2779 (opcode/arc-attrs.h): Include.
2780 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2781 (arc_extract_features): New file.
2782 (arc_stralloc): Likewise.
2783 (arc_elf_merge_attributes): Likewise.
2784 (arc_elf_merge_private_bfd_data): Use object attributes.
2785 (bfd_arc_get_mach_from_attributes): New function.
2786 (arc_elf_object_p): Use object attributes.
2787 (arc_elf_final_write_processing): Likewise.
2788 (elf32_arc_obj_attrs_arg_type): New function.
2789 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2790 (elf32_arc_section_from_shdr): Likewise.
2791 (elf_backend_obj_attrs_vendor): Define.
2792 (elf_backend_obj_attrs_section): Likewise.
2793 (elf_backend_obj_attrs_arg_type): Likewise.
2794 (elf_backend_obj_attrs_section_type): Likewise.
2795 (elf_backend_obj_attrs_handle_unknown): Likewise.
2796 (elf_backend_section_from_shdr): Likewise.
2798 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2801 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2802 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2803 and the destination is a Thumb symbol.
2805 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2807 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2808 initializer to silence GCC 4.2.
2809 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2811 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2813 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2814 (LAZY_PLT_ENTRY_SIZE): This.
2815 (NON_LAZY_PLT_ENTRY_SIZE): New.
2816 (elf_x86_64_plt0_entry): Renamed to ...
2817 (elf_x86_64_lazy_plt0_entry): This.
2818 (elf_x86_64_plt_entry): Renamed to ...
2819 (elf_x86_64_lazy_plt_entry): This.
2820 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2821 (elf_x86_64_lazy_bnd_plt0_entry): This.
2822 (elf_x86_64_legacy_plt_entry): Removed.
2823 (elf_x86_64_bnd_plt_entry): Renamed to ...
2824 (elf_x86_64_lazy_bnd_plt_entry): This.
2825 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2826 (elf_x86_64_non_lazy_plt_entry): This.
2827 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2828 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2829 (elf_x86_64_eh_frame_plt): Renamed to ...
2830 (elf_x86_64_eh_frame_lazy_plt): This.
2831 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2832 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2833 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2834 (elf_x86_64_eh_frame_non_lazy_plt): This.
2835 (elf_x86_64_lazy_plt_layout): New.
2836 (elf_x86_64_non_lazy_plt_layout): Likewise.
2837 (elf_x86_64_plt_layout): Likewise.
2838 (elf_x86_64_backend_data): Remove PLT layout information. Add
2839 os for target system.
2840 (GET_PLT_ENTRY_SIZE): Removed.
2841 (elf_x86_64_lazy_plt): New.
2842 (elf_x86_64_non_lazy_plt): Likewise.
2843 (elf_x86_64_lazy_bnd_plt): Likewise.
2844 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2845 (elf_x86-64_arch_bed): Updated.
2846 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2847 (elf_x86_64_create_dynamic_sections): Removed.
2848 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2849 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2850 (elf_x86-64_adjust_dynamic_symbol): Updated.
2851 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2852 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2853 size for PLT0 if there is no PLT0. Get plt_entry_size from
2854 non_lazy_plt for non-lazy PLT entries.
2855 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2856 from non_lazy_plt for non-lazy PLT entries.
2857 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2858 if there is no PLT0.
2859 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2860 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2861 entries with non-lazy PLT layout. Don't fill the second and third
2862 slots in the PLT entry if there is no PLT0.
2863 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2864 if there is no PLT0. Set sh_entsize on the .plt.got section.
2865 (compare_relocs): New.
2866 (elf_x86_64_plt_type): Likewise.
2867 (elf_x86_64_plt): Likewise.
2868 (elf_x86_64_nacl_plt): New. Forward declaration.
2869 (elf_x86_64_get_plt_sym_val): Removed.
2870 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2871 against all dynamic relocations.
2872 (elf_x86_64_link_setup_gnu_properties): New function.
2873 (elf_backend_create_dynamic_sections): Updated.
2874 (elf_backend_setup_gnu_properties): New.
2875 (elf_x86_64_nacl_plt): New.
2876 (elf_x86_64_nacl_arch_bed): Updated.
2878 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2880 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2881 (LAZY_PLT_ENTRY_SIZE): This.
2882 (NON_LAZY_PLT_ENTRY_SIZE): New.
2883 (elf_i386_plt0_entry): Renamed to ...
2884 (elf_i386_lazy_plt0_entry): This.
2885 (elf_i386_plt_entry): Renamed to ...
2886 (elf_i386_lazy_plt_entry): This.
2887 (elf_i386_pic_plt0_entry): Renamed to ...
2888 (elf_i386_pic_lazy_plt0_entry): This.
2889 (elf_i386_pic_plt_entry): Renamed to ...
2890 (elf_i386_pic_lazy_plt_entry): This.
2891 (elf_i386_got_plt_entry): Renamed to ...
2892 (elf_i386_non_lazy_plt_entry): This.
2893 (elf_i386_pic_got_plt_entry): Renamed to ...
2894 (elf_i386_pic_non_lazy_plt_entry): This.
2895 (elf_i386_eh_frame_plt): Renamed to ...
2896 (elf_i386_eh_frame_lazy_plt): This.
2897 (elf_i386_eh_frame_plt_got): Renamed to ...
2898 (elf_i386_eh_frame_non_lazy_plt): This.
2899 (elf_i386_plt_layout): Renamed to ...
2900 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2901 eh_frame_plt_got_size.
2902 (elf_i386_non_lazy_plt_layout): New.
2903 (elf_i386_plt_layout): Likewise.
2904 (elf_i386_non_lazy_plt): Likewise.
2905 (GET_PLT_ENTRY_SIZE): Removed.
2906 (elf_i386_plt): Renamed to ...
2907 (elf_i386_lazy_plt): This.
2908 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2909 (elf_i386_arch_bed): Updated.
2910 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2911 (elf_i386_create_dynamic_sections): Removed.
2912 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2913 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2914 (elf_i386_adjust_dynamic_symbol): Updated.
2915 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2916 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2917 size for PLT0 if there is no PLT0.
2918 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2919 output section is discarded only if GOT isn't empty.
2920 (elf_i386_relocate_section): Updated. Properly get PLT index
2921 if there is no PLT0.
2922 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2923 second and third slots in the PLT entry if there is no PLT0.
2924 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2925 if there is no PLT0. Set sh_entsize on the .plt.got section.
2926 (elf_i386_nacl_plt): Forward declaration.
2927 (elf_i386_get_plt_sym_val): Removed.
2928 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2929 against all dynamic relocations.
2930 (elf_i386_link_setup_gnu_properties): New function.
2931 (elf_backend_create_dynamic_sections): Updated.
2932 (elf_backend_setup_gnu_properties): New.
2933 (elf_i386_nacl_plt): Updated.
2934 (elf_i386_nacl_arch_bed): Likewise.
2935 (elf_i386_vxworks_arch_bed): Likewise.
2937 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2939 * elflink.c (elf_output_implib): Remove executable flag from import
2941 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2942 library is a relocatable object file.
2944 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2947 * elf32-avr.c (avr_should_move_sym): New function.
2948 (avr_should_reduce_sym_size): Likewise.
2949 (avr_should_increase_sym_size): Likewise.
2950 (elf32_avr_relax_delete_bytes): Adjust symbol values
2951 and sizes by calling new functions.
2953 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2955 * config.bfd (riscv32-*): Enable rv64.
2957 2017-05-02 Alan Modra <amodra@gmail.com>
2960 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2961 rather than h->root.type == bfd_link_hash_new.
2962 (bfd_elf_record_link_assignment): Similarly, call
2963 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2965 2017-04-29 Alan Modra <amodra@gmail.com>
2968 * reloc.c (reloc_offset_in_range): New function.
2969 (bfd_perform_relocation, bfd_install_relocation): Use it.
2970 (_bfd_final_link_relocate): Likewise.
2972 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2974 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2975 before using .plt.got.
2976 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2978 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2980 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2981 instead of "+=" to update 0.
2983 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2985 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2986 .plt.got section here.
2987 (elf_i386_check_relocs): Don't create the .plt.got section.
2988 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2989 the .plt.got and .plt.bnd sections here.
2990 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2993 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2995 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2997 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2998 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2999 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3000 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3003 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3005 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3007 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3008 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3009 the first relocatable ELF input with GNU properties.
3011 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3013 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3014 VxWorks for non-PIC.
3016 2017-04-27 Alan Modra <amodra@gmail.com>
3018 * elf-bfd.h (struct elf_backend_data): Make asection param of
3019 elf_backend_eh_frame_address_size const.
3020 (_bfd_elf_eh_frame_address_size): Likewise.
3021 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3022 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3023 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3024 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3025 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3026 (next_cie_fde_offset): Constify params.
3027 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3029 2017-04-27 Alan Modra <amodra@gmail.com>
3031 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3032 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3033 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3035 (offset_adjust): New function.
3036 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3037 (adjust_eh_frame_local_symbols): Likewise.
3038 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3039 after changing anything. Return true if anything changed.
3040 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3041 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3043 2017-04-27 Alan Modra <amodra@gmail.com>
3045 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3048 2017-04-27 Alan Modra <amodra@gmail.com>
3050 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3051 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3052 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3053 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3054 for undef and undefweak dyn_relocs.
3055 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3056 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3057 (allocate_got, allocate_dynrelocs): Likewise.
3058 (ppc64_elf_relocate_section): Likewise.
3060 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3062 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3063 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3064 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3065 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3067 2017-04-26 Nick Clifton <nickc@redhat.com>
3070 * reloc.c (bfd_perform_relocation): Check for a negative address
3073 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3076 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3078 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3079 (elf_backend_always_renumber_dynsyms): Define.
3080 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3081 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3082 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3083 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3085 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3087 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3089 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3090 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3091 sections have been created.
3093 2017-04-26 Nick Clifton <nickc@redhat.com>
3096 * compress.c (bfd_init_section_compress_status): Check the return
3097 value from bfd_malloc.
3099 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3101 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3102 no_finish_dynamic_symbol.
3103 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3105 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3106 weak symbol, don't make it dynamic.
3107 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3108 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3109 relocation for GOT reference.
3110 (elf_x86_64_finish_dynamic_symbol): Abort if
3111 no_finish_dynamic_symbol isn't 0.
3113 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3116 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3117 undefined weak symbol, don't make it dynamic.
3118 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3119 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3120 relocation for R_386_GOT32.
3122 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3125 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3127 2017-04-23 Alan Modra <amodra@gmail.com>
3130 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3131 * elf.c (lcomm_sym): New.
3132 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3133 * bfd-in2.h: Regenerate.
3135 2017-04-23 Alan Modra <amodra@gmail.com>
3138 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3139 parameters and comment.
3140 (_bfd_elf_get_reloc_section): Delete.
3141 (_bfd_elf_plt_get_reloc_section): Declare.
3142 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3143 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3145 (_bfd_elf_get_reloc_section): ..here. Delete.
3146 (assign_section_numbers): Call elf_get_reloc_section.
3147 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3148 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3150 2017-04-23 Alan Modra <amodra@gmail.com>
3153 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3156 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3159 * elf32-i386.c (elf_i386_link_hash_entry): Add
3160 no_finish_dynamic_symbol.
3161 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3162 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3163 symbol, don't make it dynamic in PIE.
3164 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3165 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3166 relocation for R_386_GOT32
3167 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3170 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3174 * elflink.c (elf_link_add_object_symbols): Require
3175 --no-dynamic-linker with -E/--dynamic-list when creating
3178 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3180 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3183 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3185 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3186 dynamic symbol sorting.
3188 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3191 * elflink.c (elf_link_add_object_symbols): Preserve
3192 dynamic_ref_after_ir_def when restoring the symbol table for
3193 unneeded dynamic object.
3195 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3198 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3199 on on undefined IFUNC symbol in the second PLT.
3201 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3203 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3205 2017-04-19 Alan Modra <amodra@gmail.com>
3207 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3208 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3209 * elf32-ppc.c:Formatting.
3210 (ensure_undefweak_dynamic): Don't make dynamic when
3211 info->dynamic_undefined_weak is zero.
3212 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3213 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3214 not default visibility. Discard undef and undefweak
3216 (ppc_elf_relocate_section): Adjust to suit.
3217 * elf64-ppc.c: Formatting.
3218 (ensure_undefweak_dynamic): Don't make dynamic when
3219 info->dynamic_undefined_weak is zero.
3220 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3221 info->dynamic_undefined_weak. Discard them earlier.
3223 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3226 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3227 before generating the version definition section.
3229 2017-04-17 Alan Modra <amodra@gmail.com>
3231 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3232 state when a regular object file defines a symbol with
3233 incompatible type to that defined by an earlier shared lib.
3235 2017-04-13 Alan Modra <amodra@gmail.com>
3237 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3239 * elf32-arm.c: Likewise.
3240 * elf32-i386.c: Likewise.
3241 * elf32-mep.c: Likewise.
3242 * elf64-ia64-vms.c: Likewise.
3243 * elf64-x86-64.c: Likewise.
3244 * elflink.c: Likewise.
3245 * elfnn-ia64.c: Likewise.
3246 * elfxx-mips.c: Likewise.
3248 2017-04-13 Alan Modra <amodra@gmail.com>
3250 * aoutx.h: Use %B and %A in error messages throughout file.
3251 * aout-cris.c: Likewise.
3252 * archive.c: Likewise.
3253 * binary.c: Likewise.
3254 * coff-rs6000.c: Likewise.
3255 * coff-tic4x.c: Likewise.
3256 * coffcode.h: Likewise.
3257 * coffgen.c: Likewise.
3258 * cofflink.c: Likewise.
3259 * coffswap.h: Likewise.
3260 * cpu-arm.c: Likewise.
3261 * elf-eh-frame.c: Likewise.
3262 * elf-m10300.c: Likewise.
3264 * elf32-arc.c: Likewise.
3265 * elf32-arm.c: Likewise.
3266 * elf32-bfin.c: Likewise.
3267 * elf32-frv.c: Likewise.
3268 * elf32-iq2000.c: Likewise.
3269 * elf32-m32c.c: Likewise.
3270 * elf32-microblaze.c: Likewise.
3271 * elf32-nds32.c: Likewise.
3272 * elf32-rl78.c: Likewise.
3273 * elf32-rx.c: Likewise.
3274 * elf32-score.c: Likewise.
3275 * elf32-score7.c: Likewise.
3276 * elf32-sh64.c: Likewise.
3277 * elf32-v850.c: Likewise.
3278 * elf32-vax.c: Likewise.
3279 * elf32-visium.c: Likewise.
3280 * elf64-ia64-vms.c: Likewise.
3281 * elf64-mmix.c: Likewise.
3282 * elf64-sh64.c: Likewise.
3283 * elfcode.h: Likewise.
3284 * elfnn-aarch64.c: Likewise.
3285 * elfnn-ia64.c: Likewise.
3286 * elfxx-mips.c: Likewise.
3287 * hpux-core.c: Likewise.
3290 * linker.c: Likewise.
3291 * merge.c: Likewise.
3293 * oasys.c: Likewise.
3294 * pdp11.c: Likewise.
3295 * peXXigen.c: Likewise.
3296 * rs6000-core.c: Likewise.
3297 * vms-alpha.c: Likewise.
3298 * xcofflink.c: Likewise.
3300 2017-04-13 Alan Modra <amodra@gmail.com>
3302 * bfd.c (PRINT_TYPE): Define.
3303 (_doprnt): New function.
3304 (error_handler_internal): Use _doprnt.
3305 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3306 calls in their natural order, throughout file.
3307 * coff-mcore.c: Likewise.
3308 * coff-ppc.c: Likewise.
3309 * coff-tic80.c: Likewise.
3310 * cofflink.c: Likewise.
3311 * elf-s390-common.c: Likewise.
3313 * elf32-arm.c: Likewise.
3314 * elf32-i386.c: Likewise.
3315 * elf32-m32r.c: Likewise.
3316 * elf32-msp430.c: Likewise.
3317 * elf32-spu.c: Likewise.
3318 * elf64-ia64-vms.c: Likewise.
3319 * elf64-sparc.c: Likewise.
3320 * elf64-x86-64.c: Likewise.
3321 * elflink.c: Likewise.
3322 * elfnn-aarch64.c: Likewise.
3323 * elfnn-ia64.c: Likewise.
3324 * elfxx-mips.c: Likewise.
3326 2017-04-13 Alan Modra <amodra@gmail.com>
3328 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3329 branch veneers" error. Fix double space and format message.
3330 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3331 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3333 2017-04-13 Alan Modra <amodra@gmail.com>
3335 * bfd-in2.h: Regenerate.
3337 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3339 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3340 extra `\n' in warning/error messages.
3341 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3342 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3344 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3346 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3347 processor-specific properties with generic ELF target vector.
3349 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3351 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3352 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3353 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3354 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3356 (link_hash_newfunc): Initialize has_got_reloc and
3358 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3360 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3362 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3364 (_bfd_sparc_elf_fixup_symbol): New function.
3365 (allocate_dynrelocs): Don't allocate space for dynamic
3366 relocations and discard relocations against resolved undefined
3367 weak symbols in executable. Don't make resolved undefined weak
3368 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3369 relocation against undefined weak symbols in PIE.
3370 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3371 relocations against resolved undefined weak symbols in PIE
3372 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3373 without ynamic PLT/GOT relocations for resolved undefined weak
3375 Don't generate dynamic relocation against resolved undefined
3376 weak symbol in executable.
3377 (pie_finish_undefweak_symbol): New function.
3378 (_bfd_sparc_elf_finish_dynamic_sections): Call
3379 pie_finish_undefweak_symbol on all symbols in PIE.
3380 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3381 (_bfd_sparc_elf_fixup_symbol): New function.
3383 2017-04-10 Nick Clifton <nickc@redhat.com>
3385 * config.bfd: Remove ns32k from obsolete list.
3387 2017-04-10 Alan Modra <amodra@gmail.com>
3390 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3391 (special_sections_i): Likewise for .init_array.
3392 (special_sections_p): Likewise for .preinit_array.
3394 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3398 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3399 ELF_COMMON_DEF_P for common symbols.
3400 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3401 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3402 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3403 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3404 07492f668d2173da7a2bda3707ff0985e0f460b6.
3406 2017-04-07 Pedro Alves <palves@redhat.com>
3408 * opncls.c (bfd_get_debug_link_info): Rename to...
3409 (bfd_get_debug_link_info_1): ... this. Change type of second
3410 parameter to void pointer. Adjust.
3411 (bfd_get_debug_link_info): Reimplement on top of
3412 bfd_get_debug_link_info_1.
3413 (separate_debug_file_exists, separate_alt_debug_file_exists):
3414 Change type of second parameter to void pointer. Adjust.
3415 (get_func_type, check_func_type): Change type of second parameter
3417 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3418 the callback functions instead of passing the address of a local.
3419 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3420 find_separate_debug_file.
3421 (get_alt_debug_link_info_shim): Change type of second parameter to
3422 void pointer. Adjust.
3423 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3424 find_separate_debug_file.
3425 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3426 of second parameter to void pointer. Adjust.
3427 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3428 pointer local to find_separate_debug_file.
3430 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3432 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3433 external symbols with a definition.
3434 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3436 2017-04-07 Alan Modra <amodra@gmail.com>
3438 * po/SRC-POTFILES.in: Regenerate.
3440 2017-04-05 Alan Modra <amodra@gmail.com>
3442 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3445 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3447 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3448 numbers for DataDirectory entry indicies passed to
3451 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3453 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3454 each GNU_MBIND section and align GNU_MBIND section to page size.
3455 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3456 segment for each GNU_MBIND section.
3457 (_bfd_elf_init_private_section_data): Copy sh_info from input
3458 for GNU_MBIND section.
3460 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3462 * elfnn-riscv.c (GP_NAME): Delete.
3463 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3464 (_bfd_riscv_relax_lui): Likewise.
3466 2017-04-04 Nick Clifton <nickc@redhat.com>
3469 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3471 (bfd_elf_final_link): Only initialize the extended symbol index
3472 section if there are extended symbol tables to list.
3474 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3476 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3477 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3478 * configure.ac (elf): Add elf-properties.lo.
3479 * Makefile.in: Regenerated.
3480 * configure: Likewise.
3481 * elf-bfd.h (elf_property_kind): New.
3482 (elf_property): Likewise.
3483 (elf_property_list): Likewise.
3484 (elf_properties): Likewise.
3485 (_bfd_elf_parse_gnu_properties): Likewise.
3486 (_bfd_elf_get_property): Likewise.
3487 (_bfd_elf_link_setup_gnu_properties): Likewise.
3488 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3489 and setup_gnu_properties.
3490 (elf_obj_tdata): Add properties.
3491 * elf-properties.c: New file.
3492 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3493 (elf_i386_merge_gnu_properties): Likewise.
3494 (elf_backend_parse_gnu_properties): Likewise.
3495 (elf_backend_merge_gnu_properties): Likewise.
3496 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3497 (elf_x86_64_merge_gnu_properties): Likewise.
3498 (elf_backend_parse_gnu_properties): Likewise.
3499 (elf_backend_merge_gnu_properties): Likewise.
3500 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3501 (elf_backend_parse_gnu_properties): Likewise.
3502 (elf_backend_setup_gnu_properties): Likewise.
3503 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3504 elf_backend_merge_gnu_properties and
3505 elf_backend_setup_gnu_properties.
3507 2017-03-30 Pip Cet <pipcet@gmail.com>
3509 * elf32-wasm32.c: Add relocation code, two relocs.
3510 * reloc.c: Add wasm32 relocations.
3511 * libbfd.h: Regenerate.
3512 * bfd-in2.h: Regenerate.
3513 * bfd/po/bfd.pot: Regenerate.
3515 2017-03-29 Nick Clifton <nickc@redhat.com>
3518 * coff-bfd.h (struct coff_section_data): Add new fields:
3519 saved_bias and bias.
3520 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3521 computed for PE binaries.
3522 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3525 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3528 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3529 to handle a local symbol with a hash-symbol-entry; without PLT.
3530 Add BFD_ASSERT for an incidental case with GOT entry present.
3531 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3532 isn't forced-or-set local.
3534 2017-03-27 Pip Cet <pipcet@gmail.com>
3536 * wasm-module.c: New file to support WebAssembly modules.
3537 * wasm-module.h: New file to support WebAssembly modules.
3538 * doc/webassembly.texi: Start documenting wasm-module.c.
3539 * config.bfd: Add wasm_vec.
3540 * targets.c: Likewise.
3541 * configure.ac: Likewise.
3542 * Makefile.am: Add entries for wasm-module.c.
3543 * Makefile.in: Regenerate.
3544 * configure: Regenerate.
3545 * po/SRC-POTFILES.in: Regenerate.
3547 2017-03-27 Pip Cet <pipcet@gmail.com>
3549 * cpu-wasm32.c: New file to support wasm32 architecture.
3550 * elf32-wasm32.c: New file to support wasm32 architecture.
3551 * Makefile.am: Add wasm32 architecture.
3552 * archures.c: Likewise.
3553 * config.bfd: Likewise.
3554 * configure.ac: Likewise.
3555 * targets.c: Likewise.
3556 * Makefile.in: Regenerate.
3557 * bfd-in2.h: Regenerate.
3558 * configure: Regenerate.
3559 * po/SRC-POTFILES.in: Regenerate.
3561 2017-03-20 Alan Modra <amodra@gmail.com>
3564 * elf64-ppc.c (compare_symbols): Stabilize sort.
3566 2017-03-18 Alan Modra <amodra@gmail.com>
3568 * elf64-ppc.c (struct ppc_link_hash_table): Add
3569 local_ifunc_resolver and maybe_local_ifunc_resolver.
3570 (ppc_build_one_stub): Set flags on emitting dynamic
3571 relocation to ifunc.
3572 (ppc64_elf_relocate_section): Likewise.
3573 (ppc64_elf_finish_dynamic_symbol): Likewise.
3574 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3575 local dynamic relocs to ifuncs.
3576 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3577 local_ifunc_resolver and maybe_local_ifunc_resolver.
3578 (ppc_elf_relocate_section): Set flag on emitting dynamic
3579 relocation to ifuncs.
3580 (ppc_elf_finish_dynamic_symbol): Likewise.
3581 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3582 dynamic relocs to ifuncs.
3584 2017-03-13 Nick Clifton <nickc@redhat.com>
3587 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3588 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3589 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3590 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3591 * bfd-in2.h: Regenerate.
3592 * libbfd.h: Regenerate.
3593 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3595 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3596 (elfNN_aarch64_howto_table): Likewise.
3597 (aarch64_tls_transition_without_check): Likewise.
3598 (aarch64_reloc_got_type): Likewise.
3599 (elfNN_aarch64_final_link_relocate): Likewise.
3600 (elfNN_aarch64_tls_relax): Likewise.
3601 (elfNN_aarch64_relocate_section): Likewise.
3602 (elfNN_aarch64_gc_sweep_hook): Likewise.
3603 (elfNN_aarch64_check_relocs): Likewise.
3604 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3605 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3607 2017-03-11 Alan Modra <amodra@gmail.com>
3609 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3610 parameter is in fact used. Whitespace fixes.
3611 * elf64-ppc.c: Likewise.
3613 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3615 * rs6000-core.c (CORE_NEW): Simplify macro when
3616 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3618 2017-03-07 Alan Modra <amodra@gmail.com>
3622 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3625 2017-03-05 Alan Modra <amodra@gmail.com>
3627 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3628 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3629 (next_cie_fde_offset): New function.
3630 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3631 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3632 four bytes. Align CIEs to four or eight bytes depending on
3633 per_encoding_aligned8. Align FDEs according to their encoding.
3634 Pad last FDE to output section alignment.
3635 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3637 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3638 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3639 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3641 2017-03-02 Martin Bickel <binutils@ineranves.de>
3644 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3645 empty segments which have a zero filesz, but a non-zero memsz.
3647 2017-03-02 Alan Modra <amodra@gmail.com>
3649 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3651 2017-02-28 Alan Modra <amodra@gmail.com>
3653 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3654 (ppc64_elf_relocate_section): Likewise.
3656 2017-02-28 Alan Modra <amodra@gmail.com>
3659 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3660 rather than elf32_nios2_hash_table or elf_hash_table.
3661 (create_got_section): Likewise.
3662 (nios2_elf32_finish_dynamic_symbol): Likewise.
3663 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3664 (nios2_elf32_size_dynamic_sections): Likewise.
3665 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3666 vars. Use htab equivalents directly instead. Don't create
3667 all dynamic sections on needing just the GOT. Use a goto
3668 rather than a fall-through with reloc test. Ensure
3669 htab->dynobj is set when making dynamic sreloc section.
3670 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3671 equivalent directly instead. Don't segfault on looking for
3672 .dynamic when dynamic sections have not been created. Don't
3673 segfault on .got.plt being discarded.
3674 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3675 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3676 fixme and another not so relevant comment.
3677 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3678 already set, set hash table dynobj on creating .sbss.
3680 2017-02-28 Alan Modra <amodra@gmail.com>
3682 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3683 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3684 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3685 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3686 (ppc64_elf_relocate_section): Likewise.
3687 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3688 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3689 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3690 * libbfd.h: Regenerate.
3691 * bfd-in2.h: Regenerate.
3693 2017-02-28 Alan Modra <amodra@gmail.com>
3695 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3696 dynamic .data.rel.ro read-only.
3697 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3698 rather than section flags when deciding where copy reloc goes.
3699 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3700 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3701 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3702 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3703 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3704 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3705 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3706 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3707 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3708 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3709 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3710 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3711 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3712 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3713 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3714 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3715 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3716 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3717 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3719 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3721 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3722 `jalr $0, $25' instruction encoding.
3724 2017-02-27 Nick Clifton <nickc@redhat.com>
3727 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3728 generating a seg-fault when encountering a symbol that has been
3729 deleted by garbage collection.
3731 2017-02-25 Alan Modra <amodra@gmail.com>
3733 * elf32-arc.c (struct dynamic_sections): Delete.
3734 (enum dyn_section_types): Delete.
3735 (dyn_section_names): Delete.
3736 (arc_create_dynamic_sections): Delete.
3737 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3738 segfault on discarded .rela.plt section.
3739 (elf_arc_size_dynamic_sections): Formatting. Don't call
3740 arc_create_dynamic_sections. Don't allocate memory for sections
3741 handled by the generic linker. Correct code finding relocs in
3742 read-only sections. Set SEC_EXCLUDE on zero size .got,
3743 .got.plt, and .dynbss sections. Do set .interp for pies.
3745 2017-02-24 Andrew Waterman <andrew@sifive.com>
3747 * elfnn-riscv.c (GP_NAME): New macro.
3748 (riscv_global_pointer_value): Use it.
3749 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3750 output section, consider only that section's alignment.
3752 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3754 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3755 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3756 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3757 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3759 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3761 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3762 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3765 2017-02-23 Alan Modra <amodra@gmail.com>
3768 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3770 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3771 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3774 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3777 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3778 processing ahead of the call to `elf_gc_sweep_symbol'.
3780 2017-02-22 Nick Clifton <nickc@redhat.com>
3783 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3784 created section 4-byte alignment.
3786 2017-02-22 Alan Modra <amodra@gmail.com>
3788 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3789 on .got or .plt output section being discarded by script.
3790 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3793 2017-02-21 Alan Modra <amodra@gmail.com>
3795 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3796 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3798 2017-02-20 Alan Modra <amodra@gmail.com>
3801 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3802 if DT_RELSZ/DT_RELASZ is zero.
3804 2017-02-17 Nick Clifton <nickc@redhat.com>
3806 * compress.c (bfd_get_full_section_contents): Remember to reduce
3807 compressed size by the sizeof the compression header when
3808 decompressing the contents.
3810 2017-02-17 Pedro Alves <palves@redhat.com>
3812 * srec.c (Chunk): Rename to ...
3813 (_bfd_srec_len): ... this.
3814 (S3Forced): Rename to ...
3815 (_bfd_srec_forceS3): ... this.
3816 * objcopy.c: Adjust all references.
3818 2017-02-17 Pedro Alves <palves@redhat.com>
3820 * archive.c (bsd_write_armap): Rename to ...
3821 (_bfd_bsd_write_armap): ... this.
3822 (coff_write_armap): Rename to ...
3823 (_bfd_coff_write_armap): ... this.
3824 * libbfd-in.h (bsd_write_armap): Rename to ...
3825 (_bfd_bsd_write_armap): ... this.
3826 (coff_write_armap): Rename to ...
3827 (_bfd_coff_write_armap): ... this.
3828 * aout-target.h, aout-tic30.c: Adjust all users.
3829 * libbfd.h: Regenerate.
3831 2017-02-17 Pedro Alves <palves@redhat.com>
3833 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3834 (warn_deprecated): Rename to ...
3835 (_bfd_warn_deprecated): ... this.
3836 * libbfd.c (warn_deprecated): Rename to ...
3837 (_bfd_warn_deprecated): ... this.
3838 * bfd-in2.h: Regenerate.
3840 2017-02-17 Pedro Alves <palves@redhat.com>
3842 * bfdio.c (real_ftell): Rename to ...
3843 (_bfd_real_ftell): ... this.
3844 (real_fseek): Rename to ...
3845 (_bfd_real_fseek): ... this.
3846 (real_fopen): Rename to ...
3847 (_bfd_real_fopen): ... this.
3848 * libbfd-in.h (real_ftell): Rename to ...
3849 (_bfd_real_ftell): ... this.
3850 (real_fseek): Rename to ...
3851 (_bfd_real_fseek): ... this.
3852 (real_fopen): Rename to ...
3853 (_bfd_real_fopen): ... this.
3854 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3855 * libbfd.h: Regenerate.
3857 2017-02-17 Pedro Alves <palves@redhat.com>
3859 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3860 * libbfd.c (read_unsigned_leb128): Rename to ...
3861 (_bfd_read_unsigned_leb128): ... this.
3862 (read_signed_leb128): Rename to ...
3863 (_bfd_read_signed_leb128): ... this.
3864 (safe_read_leb128): Rename to ...
3865 (_bfd_safe_read_leb128): ... this.
3866 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3867 (_bfd_read_unsigned_leb128): ... this.
3868 (read_signed_leb128): Rename to ...
3869 (_bfd_read_signed_leb128): ... this.
3870 (safe_read_leb128): Rename to ...
3871 (_bfd_safe_read_leb128): ... this.
3872 * libbfd.h: Renegerate.
3874 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3876 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3877 before trying to fine matching file and line information.
3879 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3881 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3882 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3883 not match current bfd, then reload debug information. Record bfd
3884 we're loading debug info for in the stash. If we have debug
3885 informatin in the cache then perform section placement before
3888 2017-02-16 Alan Modra <amodra@gmail.com>
3891 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3892 * elfxx-target.h (elf_backend_no_page_alias): Define.
3893 (elfNN_bed): Init new field.
3894 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3895 ensure PT_LOAD segment starts on a new page.
3896 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3898 2017-02-16 Alan Modra <amodra@gmail.com>
3901 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3904 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3906 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3907 * bfd-in2.h: Regenerated.
3909 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3912 * elf32-i386.c (elf_i386_relocate_section): Allow
3913 "lea foo@GOT, %reg" in PIC.
3915 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3918 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3919 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3920 error against local IFUNC symbol without a base register for
3923 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3925 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3926 `%P: %H:' with `info->callbacks->einfo'.
3927 (ppc_elf_relocate_section): Likewise.
3928 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3929 (ppc64_elf_edit_toc): Likewise.
3930 (ppc64_elf_relocate_section): Likewise.
3932 2017-02-14 Alan Modra <amodra@gmail.com>
3934 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3935 --gc-keep-exported, and test versioned field of sym rather than
3936 looking for @ in name.
3938 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3940 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3943 2017-02-13 Nick Clifton <nickc@redhat.com>
3946 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3949 2017-02-07 Andrew Waterman <andrew@sifive.com>
3951 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3952 entry size if PLT header is written.
3954 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3956 Fix sparc64 dynamic relocation processing to use the dynamic
3958 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3959 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3962 2017-02-03 Nick Clifton <nickc@redhat.com>
3965 * coffcode.h (coff_write_object_contents): Enlarge size of
3966 s_name_buf in order to avoid compile time warning about possible
3968 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3969 32-bits of insn value before printing into buffer.
3971 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3973 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3974 `max_local_dynindx'.
3975 (mips_elf_sort_hash_table): Handle it.
3976 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3977 symbols bump up `max_local_dynindx' rather than
3978 `max_non_got_dynindx'.
3980 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3982 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3983 `min_got_dynindx', `max_unref_got_dynindx' and
3984 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3985 (mips_elf_sort_hash_table): Adjust accordingly.
3987 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3989 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3990 to access the hash table.
3992 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3994 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3995 non-NULL `htab' to the beginning.
3997 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3999 * elflink.c (elf_gc_sweep): Wrap overlong line.
4001 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4003 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4004 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4005 * elfxx-mips.c (mips_elf_link_hash_table): Add
4006 `ignore_branch_isa' member.
4007 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4008 in branch relocation calculation as an error if
4009 `ignore_branch_isa' has been set.
4010 (_bfd_mips_elf_insn32): Rename to...
4011 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4012 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4013 Handle the new parameter.
4015 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4017 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4018 local variable dynobj.
4021 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4022 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4023 executable from read-only sections into sdynrelro.
4024 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4025 dynamic relocs in sdynrelro.
4026 (elf_backend_want_dynrelro): Define.
4028 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4030 * config.bfd (*-*-rtemsaout*): Mark as removed.
4032 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4034 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4035 (arm-*-rtems*): Move to (arm*-*-eabi*).
4036 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4037 (m68-*-rtems*): Move to (m68*-*-elf*).
4039 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4041 * config.bfd (*-*-rtemscoff*): Mark as removed.
4043 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4046 * elflink.c (bfd_elf_record_link_assignment): Revert last
4047 change and don't ever clear `forced_local'. Set `mark'
4049 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4051 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4052 (bfd_elf_size_dynamic_sections): ... here.
4053 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4054 and set `mark' instead in `__tls_get_addr_opt' processing.
4055 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4057 2017-01-24 Alan Modra <amodra@gmail.com>
4059 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4060 where dynamic relocs are preferable. Allow ifunc too.
4061 (ensure_undefweak_dynamic): New function.
4062 (allocate_dynrelocs): Use it here. Move plt handling last and
4063 don't make symbols dynamic, simplifying loop. Only make undef
4064 weak symbols with GOT entries dynamic. Correct condition
4065 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4066 comments. Remove goto.
4067 (ppc_elf_relocate_section): Correct test for using dynamic
4068 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4069 to suit. Set up explicit tls_index entries and implicit GOT
4070 tls_index entries resolvable at link time for
4071 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4072 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4073 (ensure_undefweak_dynamic): New function.
4074 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4075 with GOT entries dynamic. Remove unnecessary test of
4076 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4077 (ppc64_elf_relocate_section): Correct test for using dynamic
4078 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4079 to suit. Set up explicit tls_index entries and implicit GOT
4080 tls_index entries resolvable at link time for __tls_get_addr_opt.
4081 Simplify expression to clear mem for prelink.
4083 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4085 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4087 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4089 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4090 (elf_backend_hash_symbol): Define.
4092 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4095 * elflink.c (bfd_elf_record_link_assignment): Clear any
4096 `forced_local' marking for DSO symbols that are not being
4099 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4101 * elfnn-riscv.c (riscv_elf_object_p): New function.
4103 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4106 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4108 (elf_x86_64_check_relocs): Create .eh_frame section for the
4110 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4111 .eh_frame section for the .plt.bnd section.
4112 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4113 for the .plt.bnd section.
4115 2017-01-12 Nick Clifton <nickc@redhat.com>
4118 * opncls.c (find_separate_debug_file): Add include_dirs
4119 parameter. Only include the directory part of the bfd's filename
4120 in search paths if include_dirs is true. Add a couple of extra
4121 locations for looking for debug files.
4122 ( bfd_follow_gnu_debuglink): Update invocation of
4123 find_separate_debug_file.
4124 (bfd_follow_gnu_debugaltlink): Likewise.
4125 (get_build_id): New function: Finds the build-id of the given bfd.
4126 (get_build_id_name): New function: Computes the name of the
4127 separate debug info file for a bfd, based upon its build-id.
4128 (check_build_id_file): New function: Checks to see if a separate
4129 debug info file exists at the given location, and that its
4130 build-id matches that of the original bfd.
4131 (bfd_follow_build_id_debuglink): New function: Finds a separate
4132 debug info file for a given bfd by using the build-id method.
4133 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4134 method of locating a separate debug info file before using the
4136 * bfd-in2.h: Regenerate.
4138 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4141 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4142 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4143 elf_x86_64_eh_frame_plt_got.
4144 (elf_x86_64_size_dynamic_sections): Get unwind info from
4145 elf_x86_64_bnd_arch_bed for the BND PLT.
4147 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4149 * config.bfd: Add entries for i686-redox and x86_64-redox.
4151 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4153 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4155 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4156 .eh_frame section to 4 bytes for x32.
4157 (elf_x86_64_check_relocs): Likewise.
4159 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4162 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4163 (PLT_GOT_FDE_LENGTH): Likewise.
4164 (elf_i386_plt_layout): Add eh_frame_plt_got and
4165 eh_frame_plt_got_size.
4166 (elf_i386_plt): Updated.
4167 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4168 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4169 (elf_i386_size_dynamic_sections): Allocate and initialize
4170 .eh_frame section for .plt.got.
4171 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4173 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4174 eh_frame_plt_got_size.
4175 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4176 (PLT_GOT_FDE_LENGTH): Likewise.
4177 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4178 eh_frame_plt_got_size.
4179 (elf_x86_64_arch_bed): Updated.
4180 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4181 eh_frame_plt_got_size.
4182 (elf_x86_64_nacl_arch_bed): Likewise.
4183 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4184 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4185 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4186 .eh_frame section for .plt.got.
4187 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4190 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4192 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4193 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4195 2017-01-09 Nick Clifton <nickc@redhat.com>
4197 * dwarf2.c (lookup_address_in_function_table): Return early if
4198 there are no functions in the given comp unit, or if the high
4199 address of the last function in the comp unit is less than the
4202 2017-01-09 Nick Clifton <nickc@redhat.com>
4205 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4206 message if there are too many symbols to load.
4208 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4210 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4211 if relocs are cached.
4213 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4216 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4217 for R_MICROBLAZE_GOTOFF_64.
4219 2017-01-03 Nick Clifton <nickc@redhat.com>
4221 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4222 warning about using a possibly uninitialised variable.
4224 2017-01-02 Alan Modra <amodra@gmail.com>
4226 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4227 (allocate_plt_static, allocate_dynrelocs): Use it.
4229 2017-01-02 Alan Modra <amodra@gmail.com>
4231 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4232 .PARISC.unwind section.
4234 2017-01-02 Alan Modra <amodra@gmail.com>
4237 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4238 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4239 indirect to GOT pointer relative code edit.
4241 2017-01-02 Alan Modra <amodra@gmail.com>
4243 Update year range in copyright notice of all files.
4245 For older changes see ChangeLog-2016
4247 Copyright (C) 2017 Free Software Foundation, Inc.
4249 Copying and distribution of this file, with or without modification,
4250 are permitted in any medium without royalty provided the copyright
4251 notice and this notice are preserved.
4257 version-control: never