1 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-i386.c (X86_PCREL_TYPE_P): New.
4 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
5 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
6 (X86_PCREL_TYPE_P): This.
7 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
8 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
9 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
11 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
13 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
15 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
16 * elf32-i386.c (elf_i386_tls_transition): Use it.
17 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
19 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
21 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
22 Dump dynamic relocation in read-only section with minfo if
24 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
25 (maybe_set_textrel): Likewise.
26 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
27 read-only section with minfo.
29 2017-10-05 John Baldwin <jhb@FreeBSD.org>
31 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
33 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
35 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
36 in read-only section with minfo.
37 (tilepro_elf_size_dynamic_sections): Likewise.
38 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
39 (tilegx_elf_size_dynamic_sections): Likewise.
41 2017-10-05 Pedro Alves <palves@redhat.com>
44 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
45 ellipsis parameter. Split out bfd_error_on_input code to..
46 (bfd_set_input_error): .. New function.
47 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
48 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
49 * bfd-in2.h: Regenerate.
51 2017-10-05 Alan Modra <amodra@gmail.com>
53 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
54 fini_array error value.
56 2017-10-05 Alan Modra <amodra@gmail.com>
59 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
61 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
63 (elf_fake_sections): Adjust calls. Exit immediately on failure.
64 (bfd_elf_set_group_contents): Add associated reloc section indices
67 2017-10-04 Alan Modra <amodra@gmail.com>
69 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
70 classify symbols for ELFv2.
72 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
75 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
76 undergoes default promotion.
77 * bfd-in2.h: Regenerate.
79 2017-10-02 Alan Modra <amodra@gmail.com>
81 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
82 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
84 2017-10-01 Alan Modra <amodra@gmail.com>
87 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
88 (add_line_info): Always put end_sequence last.
90 2017-10-01 Alan Modra <amodra@gmail.com>
93 * dwarf2.c (read_section): Allocate buffer with extra byte for
94 bfd_simple_get_relocated_section_contents rather than copying
97 2017-09-29 Alan Modra <amodra@gmail.com>
99 * merge.c (merge_strings): Return FALSE on malloc failure.
100 (_bfd_merge_sections): Return failures from record_section and
103 2017-09-28 Alan Modra <amodra@gmail.com>
106 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
107 a case where plugin_notice isn't called.
109 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
111 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
114 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
117 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
118 output_bfd to info->callbacks->minfo.
120 2017-09-26 Nick Clifton <nickc@redhat.com>
123 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
124 assertion failure if elf_x86_64_rtype_to_howto has already issued
127 2017-09-26 Alan Modra <amodra@gmail.com>
130 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
133 2017-09-26 Nick Clifton <nickc@redhat.com>
136 * dwarf2.c (read_formatted_entries): Fail early if we know that
137 the loop parsing data entries will overflow the end of the
140 2017-09-26 Alan Modra <amodra@gmail.com>
143 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
144 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
145 to stash->info_ptr_memory, and check die_ref is within that memory.
146 Set info_ptr_end correctly when another CU is refd. Check die_ref
147 for DW_FORM_ref4 etc. is within CU.
149 2017-09-26 Alan Modra <amodra@gmail.com>
152 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
153 (read_formatted_entries): Init "fe".
154 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
156 2017-09-26 Alan Modra <amodra@gmail.com>
159 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
160 bounds in inner loop.
162 2017-09-25 Alan Modra <amodra@gmail.com>
165 * dwarf1.c (parse_die): Sanity check pointer against section limit
166 before dereferencing.
167 (parse_line_table): Likewise.
169 2017-09-25 Alan Modra <amodra@gmail.com>
172 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
174 (parse_comp_unit): Likewise.
176 2017-09-25 Alan Modra <amodra@gmail.com>
179 * dwarf2.c (read_formatted_entries): Error on format_count zero.
181 2017-09-24 Alan Modra <amodra@gmail.com>
184 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
185 within section bounds.
187 2017-09-24 Alan Modra <amodra@gmail.com>
190 * dwarf2.c (decode_line_info): Properly free line sequences on error.
192 2017-09-24 Alan Modra <amodra@gmail.com>
195 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
196 pname param. Return status. Make name const. Don't abort,
197 return an error. Formatting. Exit if current info_ptr matches
198 orig_info_ptr. Update callers.
199 (scan_unit_for_symbols): Start at nesting_level of zero. Make
200 nested_funcs an array of structs for extensibility. Formatting.
202 2017-09-24 Alan Modra <amodra@gmail.com>
205 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
206 rather than dividing by zero.
208 2017-09-24 Alan Modra <amodra@gmail.com>
211 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
213 2017-09-24 Alan Modra <amodra@gmail.com>
216 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
218 2017-09-24 Alan Modra <amodra@gmail.com>
221 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
222 SHT_GNU_verneed section for sanity. Don't zalloc memory for
225 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
228 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
231 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
234 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
235 -1 if bfd_canonicalize_dynamic_reloc returns 0.
237 2017-09-22 Pedro Alves <palves@redhat.com>
238 Alan Modra <amodra@gmail.com>
240 * version.h: Add comment.
242 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
244 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
245 NT_S390_GS_BC, correct the previously swapped invocations of
246 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
248 2017-09-19 Alan Modra <amodra@gmail.com>
251 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
254 2017-09-19 Alan Modra <amodra@gmail.com>
257 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
258 symbols before calculating verrefs. Don't renumber dynsyms
259 after gc. Exclude .gnu.version when zero or one dynsym.
260 Localize some vars and reindent.
262 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
265 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
266 return from bfd_canonicalize_dynamic_reloc.
268 2017-09-15 Alan Modra <amodra@gmail.com>
271 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
272 overflows bfd_size_type.
274 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
277 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
278 to indicate if conversion is performed.
279 (elf_i386_check_relocs): Cache section contents and relocations
280 if conversion is performed.
281 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
282 contents and relocations if conversion is performed.
284 2017-09-14 Nick Clifton <nickc@redhat.com>
287 * peXXigen.c (pe_print_idata): Extend check for HintName vector
290 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
292 * elfxx-x86.h: Fix a typo in comments.
294 2017-09-09 Kamil Rytarowski <n54@gmx.com>
296 * elf32-nds32.c: Rename __BIT() to N32_BIT().
298 2017-09-09 Alan Modra <amodra@gmail.com>
300 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
303 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
305 * elf32-i386.c (elf_i386_relocate_section): Update usage of
306 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
307 (elf_i386_finish_dynamic_symbol): Likewise.
308 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
309 (elf_x86_64_finish_dynamic_symbol): Likewise.
310 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
311 (_bfd_x86_elf_fixup_symbol): Likewise.
313 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
315 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
316 check has_non_got_reloc.
318 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
321 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
322 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
323 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
324 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
325 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
326 and linker_def on __ehdr_start if it is referenced and not
328 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
329 and return TRUE when building executable, if a symbol has
330 non-GOT/non-PLT relocations in text section or there is no
332 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
334 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
336 * elfxx-x86.h: Update comments.
338 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
340 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
341 elf_x86_plt_layout_table with elf_x86_init_table.
342 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
344 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
346 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
347 (elf_x86_init_table): This.
348 (_bfd_x86_elf_link_setup_gnu_properties): Replace
349 elf_x86_plt_layout_table with elf_x86_init_table.
351 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
353 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
354 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
355 * configure: Regenerated.
356 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
357 and r_sym fields of plt_layout.
358 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
360 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
361 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
362 r_info nor r_sym fields.
363 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
365 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
367 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
369 * (_bfd_riscv_relax_align): Call bfd_set_error and
370 print an error message when unable to relax a .align directive.
372 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
374 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
375 (riscv_record_pcrel_hi_reloc): Add absolute argument.
376 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
377 R_RISCV_PCREL_HI20 relocs, and pass the result to
378 riscv_record_pcrel_hi_reloc.
380 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
382 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
383 r_type_p. Remove the converted argument. Replace
384 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
385 the new relocation type via r_type_p.
386 (elf_i386_relocate_section): Likewise.
387 (elf_i386_finish_dynamic_symbol): Likewise.
388 (need_convert_load): Removed.
389 (check_relocs_failed): Updated.
390 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
391 instead of setting need_convert_load.
392 (_bfd_i386_elf_convert_load): Removed.
393 * elf64-x86-64.c (need_convert_load): Removed.
394 (check_relocs_failed): Updated.
395 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
396 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
397 Return the new relocation type via r_type_p.
398 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
399 instead of setting need_convert_load.
400 (elf_x86_64_check_relocs): Don't check PIC if relocation has
402 (_bfd_x86_64_elf_convert_load): Removed.
403 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
404 with SYMBOL_REFERENCES_LOCAL_P.
405 (elf_x86_64_finish_dynamic_symbol): Likewise.
406 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
408 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
409 (_bfd_x86_elf_link_symbol_references_local): New function.
410 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
411 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
412 SYMBOL_REFERENCES_LOCAL_P.
413 (elf_x86_link_hash_entry): Add local_ref.
414 (elf_x86_link_hash_table): Remove convert_load.
415 (_bfd_i386_elf_convert_load): Removed.
416 (_bfd_x86_64_elf_convert_load): Likewise.
417 (_bfd_x86_elf_link_symbol_references_local): New.
419 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
421 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
422 (elf_x86_64_info_to_howto): Get the real relocation type by
423 masking out R_X86_64_converted_reloc_bit.
424 (elf_x86_64_check_tls_transition): Get the real relocation type
425 by masking out R_X86_64_converted_reloc_bit.
426 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
427 instead of setting converted_reloc.
428 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
429 instead of converted_reloc. Get the real relocation type by
430 masking out R_X86_64_converted_reloc_bit.
431 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
432 R_X86_64_converted_reloc_bit is valid.
433 * elfxx-x86.h (converted_reloc): Removed.
435 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
437 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
438 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
439 to get the relocation type again.
440 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
441 r_type when calling elf_x86_64_tls_transition. Don't use
442 ELF32_R_TYPE to get the relocation type again.
444 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
446 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
449 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
451 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
452 argument. Don't check relocation overflow. Avoid relocation
453 overflow if --no-relax is used. Set converted_reloc on symbol
454 if a GOTPCREL relocation is converted.
455 (elf_x86_64_relocate_section): Issue a fatal error and suggest
456 --no-relax if GOTPCREL relocation conversion leads to relocation
458 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
460 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
461 Edmar Wienskoski <edmar.wienskoski@nxp.com
463 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
464 (ppc_elf_check_relocs): Handle it.
465 (ppc_elf_vle_split20): New function.
466 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
468 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
471 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
472 for x86-64 if GOT_TLS_GDESC_P is true.
474 2017-09-03 Alan Modra <amodra@gmail.com>
477 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
479 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
481 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
482 tls_get_addr for x86-64 in one place.
484 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
486 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
487 with elfxx-x86.lo for 64-bit BFD.
488 * configure: Regenerated.
490 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
492 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
493 (_bfd_i386_elf_convert_load): This. Remove static.
494 (elf_i386_size_dynamic_sections): Removed.
495 (elf_backend_size_dynamic_sections): Likewise.
496 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
497 (_bfd_x86_64_elf_convert_load): This. Remove static.
498 (elf_x86_64_size_dynamic_sections): Removed.
499 (elf_backend_size_dynamic_sections): Likewise.
500 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
501 (elf_x86_allocate_dynrelocs): This. Make it static.
502 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
503 (elf_x86_allocate_local_dynreloc): This. Make it static.
504 (elf_i386_is_reloc_section): New function.
505 (elf_x86_64_is_reloc_section): Likewise.
506 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
507 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
508 Rearrange got_entry_size initialization.
509 (_bfd_x86_elf_size_dynamic_sections): New function.
510 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
511 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
512 (_bfd_i386_elf_convert_load): New.
513 (_bfd_x86_64_elf_convert_load): Likewise.
514 (_bfd_x86_elf_size_dynamic_sections): Likewise.
515 (elf_backend_size_dynamic_sections): Likewise.
516 (_bfd_x86_elf_allocate_dynrelocs): Removed.
517 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
519 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
521 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
524 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
526 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
527 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
529 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
531 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
532 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
533 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
534 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
535 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
536 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
538 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
540 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
541 (elf_i386_allocate_local_dynrelocs): Likewise.
542 (elf_i386_size_dynamic_sections): Replace
543 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
544 with _bfd_x86_elf_allocate_dynrelocs and
545 _bfd_x86_elf_allocate_local_dynrelocs.
546 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
547 (elf_x86_64_allocate_local_dynrelocs): Likewise.
548 (elf_x86_64_size_dynamic_sections): Replace
549 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
550 with _bfd_x86_elf_allocate_dynrelocs and
551 _bfd_x86_elf_allocate_local_dynrelocs.
552 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
553 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
554 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
555 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
557 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
559 * elf32-i386.c (is_i386_elf): Removed.
560 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
561 (elf_i386_size_dynamic_sections): Likewise.
562 (elf_i386_relocate_section): Likewise.
563 * elf64-x86-64.c (is_x86_64_elf): Removed.
564 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
566 (elf_x86_64_size_dynamic_sections): Likewise.
567 (elf_x86_64_relocate_section): Likewise.
568 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
570 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
573 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
575 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
576 (elf_i386_allocate_dynrelocs): Replace
577 elf_i386_compute_jump_table_size with
578 elf_x86_compute_jump_table_size.
579 (elf_i386_size_dynamic_sections): Likewise.
580 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
581 (elf_x86_64_allocate_dynrelocs): Replace
582 elf_x86_64_compute_jump_table_size with
583 elf_x86_compute_jump_table_size.
584 (elf_x86_64_size_dynamic_sections): Likewise.
585 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
587 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
588 (elf_x86_compute_jump_table_size): New.
590 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
592 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
594 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
595 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
597 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
599 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
600 with htab->is_vxworks.
601 (elf_i386_size_dynamic_sections): Likewise.
602 (elf_i386_relocate_section): Likewise.
603 (elf_i386_finish_dynamic_symbol): Likewise.
604 (elf_i386_finish_dynamic_sections): Likewise.
606 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
608 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
609 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
610 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
611 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
612 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
613 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
614 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
615 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
617 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
620 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
621 ELF_COMMON_DEF_P for common symbols.
623 2017-09-02 Alan Modra <amodra@gmail.com>
625 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
626 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
627 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
629 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
631 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
632 (elf_backend_gc_mark_hook): Likewise.
633 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
634 (elf_backend_gc_mark_hook): Likewise.
635 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
636 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
637 (elf_backend_gc_mark_hook): Likewise.
639 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
641 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
642 (elf_backend_adjust_dynamic_symbol): Likewise.
643 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
644 (elf_backend_adjust_dynamic_symbol): Likewise.
645 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
646 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
647 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
648 (_bfd_x86_elf_adjust_dynamic_symbol): New.
649 (elf_backend_adjust_dynamic_symbol): Likewise.
651 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
653 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
656 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
658 * elf32-i386.c (elf_i386_mkobject): Removed.
659 (bfd_elf32_mkobject): Likewise.
660 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
661 (bfd_elf64_mkobject): Likewise.
662 (bfd_elf32_mkobject): Likewise.
663 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
664 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
665 (bfd_elf64_mkobject): Likewise.
666 (bfd_elf32_mkobject): Likewise.
668 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
670 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
671 Call _bfd_x86_elf_link_setup_gnu_properties.
672 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
673 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
675 (elf_x86_64_non_lazy_plt): Likewise.
676 (elf_x86_64_lazy_bnd_plt): Likewise.
677 (elf_x86_64_non_lazy_bnd_plt): Likewise.
678 (elf_x86_64_lazy_ibt_plt): Likewise.
679 (elf_x32_lazy_ibt_plt): Likewise.
680 (elf_x86_64_non_lazy_ibt_plt): Likewise.
681 (elf_x32_non_lazy_ibt_plt): Likewise.
682 (elf_x86_64_nacl_plt): Likewise.
683 (elf_x86_64_link_setup_gnu_properties): Updated. Call
684 _bfd_x86_elf_link_setup_gnu_properties.
685 * elfxx-x86.c: Include elf-vxworks.h".
686 (_bfd_x86_elf_link_setup_gnu_properties): New function.
687 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
688 comments for pic_plt0_entry and pic_plt_entry.
689 (elf_x86_non_lazy_plt_layout): Likewise.
690 (elf_x86_plt_layout_table): New.
691 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
693 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
696 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
697 .eh_frame section for the second PLT.
698 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
699 alignment of .eh_frame section for the second PLT.
701 2017-09-01 Nick Clifton <nickc@redhat.com>
704 * dwarf2.c (decode_line_info): Fix test for an overlong line info
707 2017-09-01 Nick Clifton <nickc@redhat.com>
710 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
711 attribute buffer is NUL terminated.
713 2017-08-31 Nick Clifton <nickc@redhat.com>
716 * dwarf2.c (read_section): If necessary add a terminating NUL byte
717 to dwarf string sections.
719 2017-08-31 Alan Modra <amodra@gmail.com>
721 * po/SRC-POTFILES.in: Regenerate.
723 2017-08-31 Alan Modra <amodra@gmail.com>
725 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
726 for a section containing just a terminator. Allow multiple
727 terminators at end of section.
728 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
729 sections when not adding alignment. Assert on terminator in
732 2017-08-31 Alan Modra <amodra@gmail.com>
736 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
739 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
741 * configure.ac (bfd_backends): Add elf64.lo together with
742 elfxx-x86.lo for 64-bit BFD.
743 * configure: Regenerated.
745 2017-08-31 James Bowman <james.bowman@ftdichip.com>
747 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
750 2017-08-31 Alan Modra <amodra@gmail.com>
753 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
754 before _close_and_cleanup. Call iovec->bclose after.
755 (bfd_close): Remove code common to, and call, bfd_close_all_done.
757 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
759 * elf32-i386.c (elf_i386_plt_type): Removed.
760 (elf_i386_plt): Likewise.
761 (elf_i386_get_synthetic_symtab): Updated. Call
762 _bfd_x86_elf_get_synthetic_symtab.
763 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
764 (elf_x86_64_plt): Likewise.
765 (elf_x86_64_get_synthetic_symtab): Updated. Call
766 _bfd_x86_elf_get_synthetic_symtab.
767 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
768 (elf_x86_64_get_plt_got_vma): Likewise.
769 (elf_i386_valid_plt_reloc_p): Likewise.
770 (elf_x86_64_valid_plt_reloc_p): Likewise.
771 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
772 * elfxx-x86.h (elf_x86_plt_type): New.
773 (elf_x86_plt): Likewise.
774 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
776 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
778 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
779 target_id instead of elf_machine_code.
781 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
783 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
784 (elf_i386_lazy_plt_layout): Likewise.
785 (elf_i386_non_lazy_plt_layout): Likewise.
786 (elf_i386_plt_layout): Likewise.
787 (elf_i386_link_hash_table): Likewise.
788 (elf_i386_next_tls_desc_index): Likewise.
789 (elf_i386_srelplt2): Likewise.
790 (elf_i386_plt): Likewise.
791 (elf_i386_lazy_plt): Likewise.
792 (elf_i386_non_lazy_plt): Likewise.
793 (elf_i386_link_hash_table_create): Likewise.
794 (bfd_elf32_bfd_link_hash_table_create): Likewise.
795 (elf_i386_lazy_plt): Updated.
796 (elf_i386_non_lazy_plt): Likewise.
797 (elf_i386_lazy_ibt_plt): Likewise.
798 (elf_i386_non_lazy_ibt_plt): Likewise.
799 (elf_i386_allocate_dynrelocs): Likewise.
800 (elf_i386_size_dynamic_sections): Likewise.
801 (elf_i386_relocate_section): Likewise.
802 (elf_i386_finish_dynamic_symbol): Likewise.
803 (elf_i386_finish_dynamic_sections): Likewise.
804 (elf_i386_get_synthetic_symtab): Likewise.
805 (elf_i386_link_setup_gnu_properties): Likewise.
806 (elf_i386_nacl_plt): Likewise.
807 * elf64-x86-64.c (ABI_64_P): Removed.
808 (ELF64_DYNAMIC_INTERPRETER): Likewise.
809 (ELF32_DYNAMIC_INTERPRETER): Likewise.
810 (elf_x86_64_lazy_plt_layout): Likewise.
811 (elf_x86_64_non_lazy_plt_layout): Likewise.
812 (elf_x86_64_plt_layout): Likewise.
813 (elf_x86_64_link_hash_table): Likewise.
814 (elf_x86_64_plt): Likewise.
815 (elf_x86_64_lazy_plt): Likewise.
816 (elf_x86_64_non_lazy_plt): Likewise.
817 (elf_x86_64_link_hash_table_create): Likewise.
818 (bfd_elf64_bfd_link_hash_table_create): Likewise.
819 (bfd_elf32_bfd_link_hash_table_create): Likewise.
820 (elf_x86_64_lazy_plt): Updated.
821 (elf_x86_64_non_lazy_plt): Likewise.
822 (elf_x86_64_lazy_bnd_plt): Likewise.
823 (elf_x86_64_non_lazy_bnd_plt): Likewise.
824 (elf_x86_64_lazy_ibt_plt): Likewise.
825 (elf_x32_lazy_ibt_plt): Likewise.
826 (elf_x86_64_non_lazy_ibt_plt): Likewise.
827 (elf_x32_non_lazy_ibt_plt): Likewise.
828 (elf_x86_64_allocate_dynrelocs): Likewise.
829 (elf_x86_64_size_dynamic_sections): Likewise.
830 (elf_x86_64_relocate_section): Likewise.
831 (elf_x86_64_finish_dynamic_symbol): Likewise.
832 (elf_x86_64_finish_dynamic_sections): Likewise.
833 (elf_x86_64_get_synthetic_symtab): Likewise.
834 (elf_x86_64_link_setup_gnu_properties): Likewise.
835 (elf_x86_64_nacl_plt): Likewise.
836 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
838 (ELF32_DYNAMIC_INTERPRETER): New.
839 (ELF64_DYNAMIC_INTERPRETER): Likewise.
840 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
841 (_bfd_x86_elf_link_hash_table_create): Likewise.
842 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
843 (elf_x86_link_hash_table_free): This. Make it static.
844 * elfxx-x86.h: Don't include "objalloc.h".
846 (elf_x86_lazy_plt_layout): Likewise.
847 (elf_x86_non_lazy_plt_layout): Likewise.
848 (elf_x86_plt_layout): Likewise.
849 (_bfd_x86_elf_link_hash_table_create): Likewise.
850 (bfd_elf64_bfd_link_hash_table_create): Likewise.
851 (bfd_elf32_bfd_link_hash_table_create): Likewise.
852 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
853 srelplt2 and next_tls_desc_index.
854 (_bfd_x86_elf_link_hash_table_free): Removed.
856 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
858 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
859 branch offset interpretation.
861 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
864 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
866 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
868 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
869 (elf_x86_64_srelplt2): Likewise.
871 2017-08-30 Alan Modra <amodra@gmail.com>
873 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
874 (ppc64_elf_tls_optimize): Set it.
875 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
876 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
877 addis would add zero.
878 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
879 (ppc_elf_tls_optimize): Set it.
880 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
881 insn on TPREL16_LO relocs to use r2 when addis would add zero.
883 2017-08-30 Alan Modra <amodra@gmail.com>
885 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
886 __tls_get_addr call sequences to LE, don't move the addi down
887 to the nop. Replace the bl with addi and leave the nop alone.
889 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
891 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
893 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
895 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
897 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
899 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
900 (BFD64_BACKENDS): Likewise.
901 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
902 (BFD64_BACKENDS_CFILES): Likewise.
903 * Makefile.in: Regenerated.
904 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
905 elf32-i386.lo and elf64-x86-64.lo.
906 * configure: Regenerated.
907 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
908 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
909 "objalloc.h" and "hashtab.h".
910 (ELIMINATE_COPY_RELOCS): Removed.
911 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
912 (SYMBOL_NO_COPYRELOC): Likewise.
913 (elf_i386_link_hash_entry): Likewise.
914 (GOT_UNKNOWN): Likewise.
915 (GOT_NORMAL): Likewise.
916 (GOT_TLS_GD): Likewise.
917 (elf_i386_hash_entry): Likewise.
918 (elf_i386_obj_tdata): Likewise.
919 (elf_i386_tdata): Likewise.
920 (elf_i386_local_got_tls_type): Likewise.
921 (elf_i386_local_tlsdesc_gotent): Likewise.
922 (elf_i386_hash_table): Likewise.
923 (elf_i386_link_hash_newfunc): Likewise.
924 (elf_i386_local_htab_hash): Likewise.
925 (elf_i386_local_htab_eq): Likewise.
926 (elf_i386_get_local_sym_hash): Likewise.
927 (elf_i386_link_hash_table_free): Likewise.
928 (elf_i386_copy_indirect_symbol): Likewise.
929 (elf_i386_fixup_symbol): Likewise.
930 (elf_i386_readonly_dynrelocs): Likewise.
931 (elf_i386_always_size_sections): Likewise.
932 (elf_i386_set_tls_module_base): Likewise.
933 (elf_i386_dtpoff_base): Likewise.
934 (compare_relocs): Likewise.
935 (elf_i386_hash_symbol): Likewise.
936 (elf_i386_parse_gnu_properties): Likewise.
937 (elf_i386_merge_gnu_properties): Likewise.
938 (elf_i386_link_check_relocs): Likewise.
939 (elf_i386_merge_symbol_attribute): Likewise.
940 (bfd_elf32_bfd_link_check_relocs): Likewise.
941 (elf_backend_copy_indirect_symbol): Likewise.
942 (elf_backend_always_size_sections): Likewise.
943 (elf_backend_omit_section_dynsym): Likewise.
944 (elf_backend_hash_symbol): Likewise.
945 (elf_backend_fixup_symbol): Likewise.
946 (elf_backend_parse_gnu_properties): Likewise.
947 (elf_backend_merge_gnu_properties): Likewise.
948 (elf_backend_merge_symbol_attribute): Likewise.
949 (elf_i386_mkobject): Updated.
950 (elf_i386_link_hash_table_create): Likewise.
951 (elf_i386_check_tls_transition): Likewise.
952 (elf_i386_tls_transition): Likewise.
953 (elf_i386_convert_load_reloc): Likewise.
954 (elf_i386_check_relocs): Likewise.
955 (elf_i386_adjust_dynamic_symbol): Likewise.
956 (elf_i386_allocate_dynrelocs): Likewise.
957 (elf_i386_convert_load): Likewise.
958 (elf_i386_size_dynamic_sections): Likewise.
959 (elf_i386_relocate_section): Likewise.
960 (elf_i386_finish_dynamic_symbol ): Likewise.
961 (elf_i386_finish_dynamic_sections): Likewise.
962 (elf_i386_output_arch_local_syms): Likewise.
963 (elf_i386_get_synthetic_symtab): Likewise.
964 (elf_i386_link_setup_gnu_properties): Likewise.
965 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
966 of elf_link_hash_table, as base.
967 (elf_i386_next_tls_desc_index): New.
968 (elf_i386_srelplt2): Likewise.
969 (elf_i386_plt): Likewise.
970 (elf_i386_lazy_plt): Likewise.
971 (elf_i386_non_lazy_plt): Likewise.
972 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
973 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
974 "objalloc.h" and "hashtab.h".
975 (ELIMINATE_COPY_RELOCS): Removed.
976 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
977 (SYMBOL_NO_COPYRELOC): Likewise.
978 (elf_x86_64_link_hash_entry): Likewise.
979 (GOT_UNKNOWN): Likewise.
980 (GOT_NORMAL): Likewise.
981 (GOT_TLS_GD): Likewise.
982 (elf_x86_64_hash_entry): Likewise.
983 (elf_x86_64_obj_tdata): Likewise.
984 (elf_x86_64_tdata): Likewise.
985 (elf_x86_64_local_got_tls_type): Likewise.
986 (elf_x86_64_local_tlsdesc_gotent): Likewise.
987 (elf_x86_64_hash_table): Likewise.
988 (elf_x86_64_link_hash_newfunc): Likewise.
989 (elf_x86_64_local_htab_hash): Likewise.
990 (elf_x86_64_local_htab_eq): Likewise.
991 (elf_x86_64_get_local_sym_hash): Likewise.
992 (elf_x86_64_link_hash_table_free): Likewise.
993 (elf_x86_64_copy_indirect_symbol): Likewise.
994 (elf_x86_64_fixup_symbol): Likewise.
995 (elf_x86_64_readonly_dynrelocs): Likewise.
996 (elf_x86_64_always_size_sections): Likewise.
997 (elf_x86_64_set_tls_module_base): Likewise.
998 (elf_x86_64_dtpoff_base): Likewise.
999 (compare_relocs): Likewise.
1000 (elf_x86_64_merge_symbol_attribute): Likewise.
1001 (elf_x86_64_hash_symbol): Likewise.
1002 (elf_x86_64_parse_gnu_properties): Likewise.
1003 (elf_x86_64_merge_gnu_properties): Likewise.
1004 (elf_x86_64_link_check_relocs): Likewise.
1005 (elf_backend_copy_indirect_symbol): Likewise.
1006 (elf_backend_always_size_sections): Likewise.
1007 (bfd_elf64_bfd_link_check_relocs): Likewise.
1008 (elf_backend_merge_symbol_attribute): Likewise.
1009 (elf_backend_hash_symbol): Likewise.
1010 (elf_backend_omit_section_dynsym): Likewise.
1011 (elf_backend_fixup_symbol): Likewise.
1012 (elf_backend_parse_gnu_properties): Likewise.
1013 (elf_backend_merge_gnu_properties): Likewise.
1014 (bfd_elf32_bfd_link_check_relocs): Likewise.
1015 (elf_x86_64_mkobject): Updated.
1016 (elf_x86_64_link_hash_table_create): Likewise.
1017 (elf_x86_64_check_tls_transition): Likewise.
1018 (elf_x86_64_tls_transition): Likewise.
1019 (elf_x86_64_convert_load_reloc): Likewise.
1020 (elf_x86_64_check_relocs): Likewise.
1021 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1022 (elf_x86_64_allocate_dynrelocs): Likewise.
1023 (elf_x86_64_convert_load): Likewise.
1024 (elf_x86_64_size_dynamic_sections): Likewise.
1025 (elf_x86_64_relocate_section): Likewise.
1026 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1027 (elf_x86_64_finish_dynamic_sections): Likewise.
1028 (elf_x86_64_output_arch_local_syms): Likewise.
1029 (elf_x86_64_get_synthetic_symtab): Likewise.
1030 (elf_x86_64_link_setup_gnu_properties): Likewise.
1031 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1032 instead of elf_link_hash_table, as base.
1033 (elf_x86_64_next_tls_desc_index): New.
1034 (elf_x86_64_srelplt2): Likewise.
1035 (elf_x86_64_plt): Likewise.
1036 (elf_x86_64_lazy_plt): Likewise.
1037 (elf_x86_64_non_lazy_plt): Likewise.
1038 * elfxx-x86.c: New file.
1039 * elfxx-x86.h: Likewise.
1041 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1043 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1045 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1047 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1049 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1050 sections before checking dynamic relocations and free invalid
1051 PLT section contents.
1052 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1054 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1056 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1057 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1059 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1062 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1064 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1066 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1068 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1070 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1072 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1075 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1076 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1077 Add a has_no_copy_on_protected bitfield.
1078 (elf_has_no_copy_on_protected): New.
1079 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1080 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1081 (elf_merge_gnu_property_list): Likewise.
1082 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1083 to FALSE for elf_has_no_copy_on_protected.
1084 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1085 (elf_i386_link_hash_entry): Add def_protected.
1086 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1087 when checking info->nocopyreloc.
1088 (elf_i386_link_setup_gnu_properties): Don't set
1089 extern_protected_data here.
1090 (elf_i386_merge_symbol_attribute): New function.
1091 (elf_backend_merge_symbol_attribute): New.
1092 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1093 (elf_x86_64_link_hash_entry): Add def_protected.
1094 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1095 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1096 when checking info->nocopyreloc.
1097 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1098 relocation run-time overflow and unresolvable R_X86_64_32S
1099 relocation against protected data symbol defined in shared object
1100 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1101 (elf_x86_64_link_setup_gnu_properties): Don't set
1102 extern_protected_data here.
1103 (elf_x86_64_merge_symbol_attribute): New function.
1104 (elf_backend_merge_symbol_attribute): New.
1106 2017-08-26 Alan Modra <amodra@gmail.com>
1108 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1109 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1110 (ppc_elf_relocate_section): Comment fix.
1111 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1112 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1113 Support dynamic relocs for TPREL16 when non-pic too.
1114 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1115 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1118 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1120 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1121 "symbol" in comments.
1122 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1124 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1127 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1128 R_X86_64_PC32 relocation run-time overflow and unresolvable
1129 R_X86_64_32S relocation with -z nocopyreloc.
1131 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1133 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1134 Undefined symbols may not have a type.
1135 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1137 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1139 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1140 bfd_link_info. Report shared, PIE or PDE object based on
1142 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1143 (elf_x86_64_relocate_section): Likewise.
1145 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1147 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1148 for function symbols.
1149 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1151 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1153 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1154 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1155 is set on any input relocatable file.
1156 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1158 2017-08-23 Alan Modra <amodra@gmail.com>
1161 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1162 ensure_undefweak_dynamic. Handle undefined too.
1163 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1164 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1165 (allocate_dynrelocs): Discard undefined non-default visibility
1166 relocs first. Make undefined syms dynamic. Tidy goto.
1168 2017-08-21 Alan Modra <amodra@gmail.com>
1169 H.J. Lu <hongjiu.lu@intel.com>
1172 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1173 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1175 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1178 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1179 undefined weak symbols.
1181 2017-08-18 Nick Clifton <nickc@redhat.com>
1184 * tekhex.c (getsym): Fix check for source pointer walking off the
1185 end of the input buffer.
1187 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1190 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1191 relocations in debug sections, change abort to _bfd_error_handler.
1193 2017-08-14 Nick Clifton <nickc@redhat.com>
1196 * elf.c (setup_group): Check for an empty or very small group
1198 * po/bfd.pot: Regenerate.
1200 2017-08-14 Alan Modra <amodra@gmail.com>
1203 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1204 alignment padding here.
1205 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1206 in a reverse pass over sections.
1208 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1211 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1212 for @plt suffixes first.
1213 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1215 2017-08-08 Nick Clifton <nickc@redhat.com>
1218 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1219 small section lengths.
1220 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1222 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1223 there is enough data present in the note.
1225 2017-08-08 Alan Modra <amodra@gmail.com>
1228 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1229 got.refcount for GOTOFF relocs, just create .got section.
1231 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1233 * elflink.c (elf_link_add_object_symbols): Move common symbol
1234 check after bed->common_definition.
1236 2017-08-07 Alan Modra <amodra@gmail.com>
1239 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1240 needed to define various dynamic tags have been discarded.
1242 2017-08-07 Nick Clifton <nickc@redhat.com>
1245 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1246 has not been set then use the bfd returned by
1247 _bfd_elf_link_setup_gnu_properties. If that is null then search
1248 through all the input bfds selecting the first normal, ELF format
1250 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1252 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1254 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1256 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1257 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1258 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1259 (elf_i386_link_check_relocs): New function.
1260 (bfd_elf32_bfd_link_check_relocs): New.
1261 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1263 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1264 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1265 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1266 (elf_x86_64_link_check_relocs): New function.
1267 (bfd_elf64_bfd_link_check_relocs): New.
1268 (bfd_elf32_bfd_link_check_relocs): Likewise.
1270 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1273 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1274 as undefined for --no-define-common.
1276 2017-08-05 Alan Modra <amodra@gmail.com>
1278 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1279 hppa_link_hash_table.
1281 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1283 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1284 entries for sysregs with negative indices.
1286 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1288 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1289 isn't the S/390 specific elf data.
1290 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1292 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1294 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1295 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1296 [R_RISCV_ADD16]: Likewise.
1297 [R_RISCV_ADD32]: Likewise.
1298 [R_RISCV_ADD64]: Likewise.
1299 [R_RISCV_SUB6]: Likewise.
1300 [R_RISCV_SUB8]: Likewise.
1301 [R_RISCV_SUB16]: Likewise.
1302 [R_RISCV_SUB32]: Likewise.
1303 [R_RISCV_SUB64]: Likewise.
1305 2017-07-31 Alan Modra <amodra@gmail.com>
1307 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1308 without ld.so checks.
1310 2017-07-29 Alan Modra <amodra@gmail.com>
1313 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1314 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1315 (is_elfv2_localentry0): Test non_zero_localentry.
1316 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1318 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1320 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1321 pointer check for htab->elf.irelplt.
1322 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1324 2017-07-27 Nick Clifton <nickc@redhat.com>
1327 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1329 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1331 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1333 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1335 (evax_bfd_print_emh): Check for invalid string lengths.
1337 2017-07-25 Nick Clifton <nickc@redhat.com>
1339 * po/fr.po: Updated French translation.
1341 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1344 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1345 16-bit absolute branches into 10-bit pc-relative branches on the
1346 MSP430 as well as the MSP430X.
1348 2017-07-25 Alan Modra <amodra@gmail.com>
1350 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1351 (stub_eh_frame_size): New function.
1352 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1353 (group_sections): Init group tls_get_addr_opt_bctrl.
1354 (ppc64_elf_size_stubs): Update sizing and initialization of
1355 .eh_frame. Iteration over stubs via group list.
1356 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1357 (ppc64_elf_finish_dynamic_sections): Update finalization of
1360 2017-07-24 Nick Clifton <nickc@redhat.com>
1363 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1364 of the relocs to the canonicalize_one_reloc routine.
1365 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1366 for the _bfd_mach_o_canonicalize_one_reloc field.
1367 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1368 res_base parameter. Use to check for corrupt pair relocs.
1369 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1371 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1373 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1376 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1377 enough data in the record before attempting to parse it.
1378 (_bfd_vms_slurp_eeom): Likewise.
1380 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1381 (image_set_ptr): Likewise.
1382 (alpha_vms_slurp_relocs): Likewise.
1384 (alpha_vms_object_p): Check for a truncated record.
1386 2017-07-24 Nick Clifton <nickc@redhat.com>
1389 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1390 an unrecognized reloc and sets the bfd_error value.
1391 * libbfd.h: Regenerate.
1392 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1394 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1395 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1396 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1397 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1398 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1400 2017-07-23 Alan Modra <amodra@gmail.com>
1402 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1405 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1408 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1409 reloc_class_ifunc for ifunc symbols.
1411 2017-07-19 Nick Clifton <nickc@redhat.com>
1414 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1415 correct magic bytes at the start, set the error to wrong format
1416 and clear the format selector before returning NULL.
1418 2017-07-19 Nick Clifton <nickc@redhat.com>
1421 * coff-rs6000.c (_bfd_strntol): New function.
1422 (_bfd_strntoll): New function.
1423 (GET_VALUE_IN_FIELD): New macro.
1424 (EQ_VALUE_IN_FIELD): new macro.
1425 (_bfd_xcoff_slurp_armap): Use new macros.
1426 (_bfd_xcoff_archive_p): Likewise.
1427 (_bfd_xcoff_read_ar_hdr): Likewise.
1428 (_bfd_xcoff_openr_next_archived_file): Likewise.
1429 (_bfd_xcoff_stat_arch_elt): Likewise.
1430 * coff64-rs6000.c (_bfd_strntol): New function.
1431 (_bfd_strntoll): New function.
1432 (GET_VALUE_IN_FIELD): New macro.
1433 (xcoff64_slurp_armap): Use new macros.
1435 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1436 John Eric Martin <John.Martin@emmicro-us.com>
1438 * bfd-in2.h: Regenerate.
1439 * libbfd.h: Regenerate.
1440 * elf32-arc.c (JLI): Define.
1441 * reloc.c: Add JLI relocations.
1443 2017-07-18 Nick Clifton <nickc@redhat.com>
1446 * coff-sh.c: Fix spelling typos.
1447 * compress.c: Likewise.
1448 * cpu-pdp11.c: Likewise.
1449 * ecofflink.c: Likewise.
1450 * elf-m10300.c: Likewise.
1452 * elf32-arm.c: Likewise.
1453 * elf32-m68k.c: Likewise.
1454 * elf32-nds32.c: Likewise.
1455 * elf32-ppc.c: Likewise.
1456 * elf32-sh.c: Likewise.
1457 * elf32-v850.c: Likewise.
1458 * elf64-ppc.c: Likewise.
1459 * elf64-x86-64.c: Likewise.
1460 * elflink.c: Likewise.
1461 * elfnn-aarch64.c: Likewise.
1462 * elfxx-mips.c: Likewise.
1464 * sunos.c: Likewise.
1465 * vms-alpha.c: Likewise.
1466 * xcofflink.c: Likewise.
1468 2017-07-18 Nick Clifton <nickc@redhat.com>
1471 * coffcode.h (handle_COMDAT): Replace abort with an error message
1474 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1477 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1480 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1482 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1484 2017-07-16 Alan Modra <amodra@gmail.com>
1486 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1487 __tls_index GOT entries when using __tls_get_addr_opt stub.
1488 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1490 2017-07-12 Alan Modra <amodra@gmail.com>
1492 * po/es.po: Update from translationproject.org/latest/bfd/.
1493 * po/fi.po: Likewise.
1494 * po/fr.po: Likewise.
1495 * po/id.po: Likewise.
1496 * po/ja.po: Likewise.
1497 * po/ro.po: Likewise.
1498 * po/ru.po: Likewise.
1499 * po/sr.po: Likewise.
1500 * po/sv.po: Likewise.
1501 * po/tr.po: Likewise.
1502 * po/uk.po: Likewise.
1503 * po/vi.po: Likewise.
1504 * po/zh_CN.po: Likewise.
1505 * po/hr.po: New file from translationproject.org.
1506 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1507 * configure: Regenerate.
1509 2017-07-12 Nick Clifton <nickc@redhat.com>
1511 Fix compile time warnings using gcc 7.1.1.
1512 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1514 (elf_xtensa_get_gotplt_section): Increase length of got_name
1516 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1517 default return of FALSE.
1518 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1519 default return of FALSE.
1521 2017-07-12 Alan Modra <amodra@gmail.com>
1523 * binary.c (binary_set_section_contents): Don't print filepos in
1525 (coff_write_object_contents): Cast size_t for error message.
1526 (coff_slurp_line_table): Don't use bfd_vma symndx.
1527 (coff_slurp_reloc_table): Remove unneeded cast.
1528 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1530 (find_abstract_instance_name): Likewise.
1531 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1532 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1533 (elf32_arm_check_relocs): Make r_symndx an int.
1534 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1536 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1538 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1540 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1541 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1542 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1543 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1544 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1545 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1546 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1547 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1548 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1549 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1550 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1551 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1552 and use %lu for error message.
1553 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1554 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1557 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1559 (elf32_arm_final_link_relocate): Likewise.
1560 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1561 * coffcode.h (styp_to_sec_flags): Likewise.
1562 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1563 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1564 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1565 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1566 (elf32_bfin_merge_private_bfd_data): Likewise.
1567 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1568 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1569 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1570 (i370_elf_relocate_section): Likewise.
1571 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1572 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1573 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1574 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1575 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1576 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1577 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1578 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1579 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1580 * ieee.c (ieee_write_id, read_id): Likewise.
1581 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1582 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1583 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1584 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1585 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1586 * stabs.c (_bfd_link_section_stabs): Likewise.
1588 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1590 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1591 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1592 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1593 * coff-sh.c (sh_relax_section): Likewise.
1594 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1595 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1596 * coffcode.h (coff_slurp_reloc_table): Likewise.
1597 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1598 (_bfd_coff_read_string_table): Likewise.
1599 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1600 * compress.c (bfd_get_full_section_contents): Likewise.
1601 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1602 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1603 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1604 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1605 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1606 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1607 (elf32_arm_write_section): Likewise.
1608 * elf32-bfin.c (bfin_relocate_section): Likewise.
1609 (bfinfdpic_relocate_section): Likewise.
1610 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1611 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1612 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1613 (elf_i386_relocate_section): Likewise.
1614 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1615 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1616 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1617 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1618 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1619 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1620 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1621 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1622 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1623 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1624 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1625 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1626 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1627 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1628 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1629 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1630 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1631 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1632 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1633 * elf32-sh.c (sh_elf_relax_section): Likewise.
1634 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1635 (sh_elf_relocate_section): Likewise.
1636 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1637 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1638 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1639 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1640 * elf32-v850.c (v850_elf_relax_section): Likewise.
1641 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1642 (elf_vax_relocate_section): Likewise.
1643 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1644 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1645 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1646 (do_fix_for_relocatable_link): Likewise.
1647 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1648 (elf64_alpha_relax_with_lituse): Likewise.
1649 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1650 (elf_hppa_final_link_relocate): Likewise.
1651 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1652 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1653 (elf64_vms_link_add_object_symbols): Likewise.
1654 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1655 (mmix_final_link_relocate): Likewise.
1656 * elf64-s390.c (invalid_tls_insn): Likewise.
1657 (elf_s390_relocate_section): Likewise.
1658 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1659 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1660 (elf_x86_64_relocate_section): Likewise.
1661 * elfcode.h (elf_slurp_symbol_table): Likewise.
1662 * elfcore.h (elf_core_file_p): Likewise.
1663 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1664 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1665 (elfNN_aarch64_relocate_section): Likewise.
1666 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1667 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1668 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1669 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1670 (_bfd_mips_elf_relocate_section): Likewise.
1671 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1672 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1673 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1674 * ieee.c (ieee_slurp_external_symbols): Likewise.
1675 * ihex.c (ihex_write_object_content): Likewise.
1676 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1677 * merge.c (_bfd_merged_section_offset): Likewise.
1678 * mmo.c (mmo_write_loc_chunk): Likewise.
1679 (mmo_write_object_contents): Likewise.
1680 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1681 * stabs.c (_bfd_link_section_stabs): Likewise.
1682 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1684 2017-07-11 Alan Modra <amodra@gmail.com>
1686 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1688 2017-07-11 Alan Modra <amodra@gmail.com>
1690 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1691 instruction" error using _bfd_error_handler, not einfo.
1693 2017-07-10 Nick Clifton <nickc@redhat.com>
1695 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1696 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1698 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1700 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1702 2017-07-07 Alan Modra <amodra@gmail.com>
1704 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1706 2017-07-07 Alan Modra <amodra@gmail.com>
1708 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1709 as long long. Move code replacing "ll" with "I64", and simplify.
1711 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1713 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1716 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1718 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1720 (line_info_add_file_name): Likewise.
1721 (decode_line_info): Likewise.
1723 2017-07-04 Tristan Gingold <gingold@adacore.com>
1725 * version.m4: Bump version to 2.29.51
1726 * configure: Regenerate.
1728 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1730 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1731 sanity check at the head of this function.
1733 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1735 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1736 dwarf_line_str_size.
1737 (struct attr_abbrev): Add field implicit_const.
1738 (dwarf_debug_sections): Add .debug_line_str.
1739 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1740 (dwarf_debug_section_assert): Add static assertion.
1741 (read_indirect_line_string): New.
1742 (read_abbrevs): Support DW_FORM_implicit_const.
1743 (is_str_attr): Support DW_FORM_line_strp.
1744 (read_attribute_value): Support DW_FORM_line_strp and
1745 DW_FORM_implicit_const.
1746 (read_attribute): Support DW_FORM_implicit_const.
1747 (line_info_add_include_dir, line_info_add_include_dir_stub):
1748 (line_info_add_file_name, read_formatted_entries): New.
1749 (decode_line_info, parse_comp_unit): Support DWARF 5.
1750 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1752 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1754 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1755 abort statement that was put for symbols that are not dynamic.
1757 2017-07-03 Tristan Gingold <gingold@adacore.com>
1759 * po/bfd.pot: Regenerate
1761 2017-07-03 Alan Modra <amodra@gmail.com>
1763 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1764 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1765 * elf.c (setup_group): Use "Lx" to print sh_size.
1766 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1767 unknown section type in hex.
1768 (copy_special_section_fields): Style fix.
1769 (bfd_section_from_shdr): Correct format for sh_link. Use a
1770 common error message for all the variants of unrecognized
1772 (assign_file_positions_for_load_sections): Use "Lx" for lma
1773 adjust error message.
1774 (assign_file_positions_for_non_load_sections): Formatting.
1775 (rewrite_elf_program_header): Formatting. Use "Lx" for
1776 bfd_vma values in error messages.
1777 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1778 ELF_R_SYM value to type expected by format.
1779 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1781 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1782 (elf_link_input_bfd): Use "Lx" for r_info.
1783 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1785 2017-07-03 Alan Modra <amodra@gmail.com>
1787 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1788 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1789 Microsoft C library variant of long long format specifier.
1790 (PRINT20): Cast value to bfd_uint64_t not long long.
1791 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1792 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1793 long long. Don't cast to bfd_vma.
1794 * elf32-score.c (score3_bfd_getl48): Likewise.
1795 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1797 2017-07-03 Alan Modra <amodra@gmail.com>
1799 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1801 (bfd_elf_print_symbol): Don't cast symbol->flags.
1802 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1803 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1804 _bfd_error_handler argument order.
1805 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1807 2017-07-03 Alan Modra <amodra@gmail.com>
1809 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1810 AC_TYPE_LONG_DOUBLE.
1811 * configure: Regenerate.
1812 * config.in: Regenerate.
1814 2017-06-29 Andrew Waterman <andrew@sifive.com>
1816 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1819 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1821 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1822 unless it is undefined weak.
1823 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1824 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1826 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1827 is not dynamic in PIC, abort.
1829 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1832 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1833 undefined weak symbols into dynamic.
1834 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1835 relocation for non-dynamic symbols.
1836 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1838 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1840 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1841 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1842 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1843 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1844 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1847 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1849 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1850 (elfcore_write_s390_gs_bc): Likewise.
1851 * elf.c (elfcore_grok_s390_gs_cb): New function.
1852 (elfcore_grok_s390_gs_bc): New function.
1853 (elfcore_grok_note): Call them.
1854 (elfcore_write_s390_gs_cb): New function.
1855 (elfcore_write_s390_gs_bc): New function.
1856 (elfcore_write_register_note): Call them.
1858 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1860 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1861 bfd_get_file_size. Check archive element size.
1862 (_bfd_generic_get_section_contents_in_window): Likewise.
1864 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1866 * bfd-in2.h: Regenerated.
1867 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1868 (bfd_get_file_size): Likewise.
1870 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1871 Matthew Fortune <matthew.fortune@imgtec.com>
1873 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1874 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1875 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1876 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1878 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1879 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1880 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1881 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1882 `bfd_mach_mips_interaptiv_mr2' entries.
1883 * bfd-in2.h: Regenerate.
1885 2017-06-27 Nick Clifton <nickc@redhat.com>
1887 * tekhex.c (pass_over): Revert accidental conversion of a local
1888 array to a static array.
1890 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1893 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1894 reloc addend if necessary. Adjust diff only if
1895 shrinked_insn_address < end_address.
1897 2017-06-27 Alan Modra <amodra@gmail.com>
1900 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1901 (_bfd_generic_get_section_contents_in_window): Likewise.
1903 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1905 * elfnn-riscv.c (perform_relocation): Support the new
1906 R_RISCV_32_PCREL relocation.
1907 (riscv_elf_relocate_section): Likewise.
1908 * elfxx-riscv.c (howto_table): Likewise.
1909 (riscv_reloc_map): Likewise.
1910 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1911 * libbfd.h: Regenerate.
1913 2017-06-27 Alan Modra <amodra@gmail.com>
1916 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1917 Use unsigned file pointer type, and remove cast.
1918 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1919 Add "count", not "sz".
1921 2017-06-26 Pedro Alves <palves@redhat.com>
1924 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1927 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1930 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1933 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1935 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1936 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1937 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1938 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1939 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1941 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1944 * compress.c (bfd_get_full_section_contents): Don't check the
1946 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1947 reject a section whose size + offset is greater than the size
1949 (_bfd_generic_get_section_contents_in_window): Likewise.
1951 2017-06-26 Nick Clifton <nickc@redhat.com>
1954 * tekhex.c (getvalue): Check for the source pointer exceeding the
1955 end pointer before the first byte is read.
1957 2017-06-26 Nick Clifton <nickc@redhat.com>
1960 * opncls.c (get_build_id): Check that the section is big enough
1961 to contain the whole note.
1962 * compress.c (bfd_get_full_section_contents): Check for and reject
1963 a section whose size is greater than the size of the entire file.
1964 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1965 contain a notes section.
1967 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1969 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1971 (elf_s390_modify_segment_map): Likewise.
1972 (bfd_elf_s390_set_options): Lisewise.
1974 2017-06-26 Alan Modra <amodra@gmail.com>
1976 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1978 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1979 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1980 .preinit_array on --just-syms bfds.
1981 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1982 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1983 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1985 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1987 * elf.c (find_link): Bounds check "hint".
1989 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1991 * elf32-arm.c (using_thumb_only): Update list of architectures in
1992 BFD_ASSERT for which the logic is valid.
1993 (using_thumb2_bl): Likewise.
1994 (using_thumb2): Likewise and return true for ARMv8-R.
1995 (arch_has_arm_nop): Likewise.
1996 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1997 merging logic. Update commentis for value 15 of v8m_baseline,
1998 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1999 merging of value 15 of Tag_CPU_arch.
2001 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2003 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2004 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2005 * bfd-in2.h: Regenerate.
2007 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2009 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2010 the error_alignment label forward. Properly align program
2011 property note section.
2013 2017-06-22 Eric Christopher <echristo@gmail.com>
2015 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2016 abs to fix a truncation warning.
2018 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2020 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2021 local undefined weak symbol to 0.
2022 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2024 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2026 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2027 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2028 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2029 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2030 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2031 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2032 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2033 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2035 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2037 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2038 (elf_i386_lazy_ibt_plt_entry): Likewise.
2039 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2040 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2041 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2042 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2043 (elf_i386_lazy_plt_layout): Likewise.
2044 (elf_i386_non_lazy_plt_layout): Likewise.
2045 (elf_i386_link_hash_entry): Add plt_second.
2046 (elf_i386_link_hash_table): Add plt_second and
2047 plt_second_eh_frame.
2048 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2049 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2050 the second PLT. Check the second PLT.
2051 (elf_i386_relocate_section): Use the second PLT to resolve
2052 PLT reference if needed.
2053 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2055 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2056 second PLT. Generate unwind info for the second PLT.
2057 (elf_i386_plt_type): Add plt_second.
2058 (elf_i386_get_synthetic_symtab): Support the second PLT.
2059 (elf_i386_parse_gnu_properties): Support
2060 GNU_PROPERTY_X86_FEATURE_1_AND.
2061 (elf_i386_merge_gnu_properties): Support
2062 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2063 on GNU_PROPERTY_X86_FEATURE_1_IBT
2064 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2065 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2066 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2067 is set on all relocatable inputs.
2068 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2069 (elf_x32_lazy_ibt_plt_entry): Likewise.
2070 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2071 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2072 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2073 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2074 (elf_x86_64_lazy_ibt_plt): Likewise.
2075 (elf_x32_lazy_ibt_plt): Likewise.
2076 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2077 (elf_x32_non_lazy_ibt_plt): Likewise.
2078 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2079 (elf_x86_64_parse_gnu_properties): Support
2080 GNU_PROPERTY_X86_FEATURE_1_AND.
2081 (elf_x86_64_merge_gnu_properties): Support
2082 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2083 on GNU_PROPERTY_X86_FEATURE_1_IBT
2084 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2085 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2086 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2087 is set on all relocatable inputs.
2089 2017-06-22 Nick Clifton <nickc@redhat.com>
2092 * som.c (setup_sections): NUL terminate the space_strings buffer.
2093 Check that the space.name field does not index beyond the end of
2094 the space_strings buffer.
2096 2017-06-21 Nick Clifton <nickc@redhat.com>
2099 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2101 2017-06-21 Nick Clifton <nickc@redhat.com>
2104 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2105 type of the size parameter.
2106 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2107 length of the counted string.
2108 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2109 (_bfd_vms_save_counted_string): Likewise.
2110 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2111 _bfd_vms_save_counted_string.
2112 (_bfd_vms_slurp_ehdr): Likewise.
2113 (_bfd_vms_slurp_egsd): Likewise.
2114 (Parse_module): Likewise.
2116 2017-06-21 Alan Modra <amodra@gmail.com>
2118 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2119 calls before tocsave calls.
2120 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2123 2017-06-21 Nick Clifton <nickc@redhat.com>
2126 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2127 bfd_get_full_section_contents returns no contents.
2129 2017-06-21 Nick Clifton <nickc@redhat.com>
2132 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2135 2017-06-21 Nick Clifton <nickc@redhat.com>
2138 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2140 (image_set_ptr): Likewise.
2141 (alpha_vms_fix_sec_rel): Likewise.
2142 (alpha_vms_slurp_relocs): Likewise.
2144 2017-06-21 Nick Clifton <nickc@redhat.com>
2147 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2149 (ieee_archive_p): Likewise.
2150 (ieee_object_p): Likewise.
2152 2017-06-21 Nick Clifton <nickc@redhat.com>
2155 * elf.c (setup_group): Zero the group section pointer list after
2156 allocation so that loops can be caught. Check for NULL pointers
2157 when processing a group list.
2159 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2161 * elf-s390.h: New file.
2162 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2164 (elf_s390_additional_program_headers): New function.
2165 (elf_s390_modify_segment_map): New function.
2166 (bfd_elf_s390_set_options): New function.
2167 (elf_backend_additional_program_headers)
2168 (elf_backend_modify_segment_map): Add macro definitions.
2170 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2173 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2174 the DYNAMIC bit instead of bfd_count_sections.
2176 2017-06-19 Nick Clifton <nickc@redhat.com>
2179 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2181 (evax_bfd_print_eeom): Likewise.
2182 (evax_bfd_print_egsd): Check for an overlarge record length.
2183 (evax_bfd_print_etir): Likewise.
2185 2017-06-19 Nick Clifton <nickc@redhat.com>
2188 * libieee.h (struct common_header_type): Add end_p field.
2189 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2191 (read_id): Check for a length that exceeds the remaining bytes in
2193 (ieee_seek): Initialise end_p.
2194 (ieee_archive_p): Likewise.
2195 (ieee_object_p): Likewise.
2197 2017-06-19 Nick Clifton <nickc@redhat.com>
2200 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2201 before reading the EIHS structure entries.
2203 2017-06-19 Nick Clifton <nickc@redhat.com>
2206 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2207 gsd_size. Check that there are enough bytes remaining to read the
2208 type and size of the next egsd. Check that the size of the egsd
2209 does not exceed the size of the record.
2211 2017-06-19 Alan Modra <amodra@gmail.com>
2213 * config.bfd: Correct targ_underscore for cris.
2215 2017-06-18 Alan Modra <amodra@gmail.com>
2217 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2218 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2220 2017-06-16 Nick Clifton <nickc@redhat.com>
2222 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2223 bucketlist is empty because there are no symbols to add to the
2226 2017-06-16 Alan Modra <amodra@gmail.com>
2232 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2233 (BFD_JUMP_TABLE_LINK): Likewise.
2234 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2235 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2236 (bfd_elf_define_start_stop): New function.
2237 * linker.c (bfd_generic_define_start_stop): New function.
2238 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2240 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2241 * aout-target.h (MY_bfd_define_start_stop): Define.
2242 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2243 * binary.c (binary_bfd_define_start_stop): Define.
2244 * bout.c (b_out_bfd_define_start_stop): Define.
2245 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2246 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2247 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2248 * coffcode.h (coff_bfd_define_start_stop): Define.
2249 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2250 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2251 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2252 * ieee.c (ieee_bfd_define_start_stop): Define.
2253 * ihex.c (ihex_bfd_define_start_stop): Define.
2254 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2255 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2256 * mmo.c (mmo_bfd_define_start_stop): Define.
2257 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2258 * oasys.c (oasys_bfd_define_start_stop): Define.
2259 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2260 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2261 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2262 * som.c (som_bfd_define_start_stop): Define.
2263 * srec.c (srec_bfd_define_start_stop): Define.
2264 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2265 * versados.c (versados_bfd_define_start_stop): Define.
2266 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2267 (alpha_vms_bfd_define_start_stop): Define.
2268 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2269 * bfd-in2.h: Regenerate.
2270 * libbfd.h: Regenerate.
2272 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2274 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2275 SYMBOL_REFERENCES_LOCAL.
2277 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2280 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2281 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2282 runtime for if there needs copy relocation elimination.
2283 (need_copy_relocation_p): New function. Return true for symbol with
2284 pc-relative references and if it's against read-only sections.
2285 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2286 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2287 that are related with accessing external objects.
2288 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2289 in elfNN_aarch64_check_relocs.
2291 2017-06-15 Nick Clifton <nickc@redhat.com>
2294 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2297 (ieee_archive_p): Likewise.
2299 2017-06-15 Nick Clifton <nickc@redhat.com>
2302 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2304 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2306 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2307 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2308 keep both windowed and call0 ABI PLT definitions.
2309 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2310 elf_xtensa_*_plt_entry endex.
2311 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2313 2017-06-14 Nick Clifton <nickc@redhat.com>
2316 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2319 2017-06-14 Nick Clifton <nickc@redhat.com>
2322 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2323 maximum value for the ascic pointer. Check that name processing
2324 does not read beyond this value.
2325 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2328 2017-06-14 Nick Clifton <nickc@redhat.com>
2331 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2332 (process_otr): Check for an invalid offset in the otr structure.
2334 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2336 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2338 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2344 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2345 vtable field to a union.
2346 (_bfd_elf_is_start_stop): Removed.
2347 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2348 __start_SECNAME and __stop_SECNAME symbols.
2349 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2350 * elflink.c (_bfd_elf_is_start_stop): Removed.
2351 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2352 _bfd_elf_is_start_stop.
2353 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2354 __stop_SECNAME symbols. Updated.
2355 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2356 (bfd_elf_gc_record_vtinherit): Likewise.
2357 (bfd_elf_gc_record_vtentry): Likewise.
2359 2017-06-13 Nick Clifton <nickc@redhat.com>
2362 * elflink.c (elf_link_adjust_relocs): Generate an error when
2363 encountering a reloc against a symbol removed by garbage
2366 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2368 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2369 to merge_gnu_properties.
2370 * elf-properties.c (elf_merge_gnu_properties): Add struct
2371 bfd_link_info * and pass it to merge_gnu_properties.
2372 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2373 and pass it to elf_merge_gnu_properties.
2374 (_bfd_elf_link_setup_gnu_properties): Pass info to
2375 elf_merge_gnu_property_list.
2376 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2378 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2380 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2383 * binary.c (binary_set_section_contents): Scale lma by octets
2384 per byte to set filepos.
2386 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2388 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2391 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2393 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2396 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2398 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2399 patched section contents for TLS IE reloc.
2400 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2402 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2404 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2405 RELOC_FOR_GLOBAL_SYMBOL macro.
2407 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2409 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2412 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2414 * config/tc-arc.c (md_undefined_symbol): Changed.
2415 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2417 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2419 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2422 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2424 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2425 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2427 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2429 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2432 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2434 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2435 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2436 is non-zero. Add clarifying comments.
2438 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2440 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2441 name. Use local IFUNC symbol name string to report unsupported
2442 non-PIC call to IFUNC function.
2443 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2444 when generating R_386_IRELATIVE relocation.
2445 (elf_i386_finish_dynamic_symbol): Likewise.
2446 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2448 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2449 when generating R_X86_64_IRELATIVE relocation.
2450 (elf_x86_64_finish_dynamic_symbol): Likewise.
2452 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2454 * elf.c (setup_group): Make sure BFD sections are created for all
2455 group sections in the input file when processing SHF_GROUP
2457 (bfd_section_from_shdr): Avoid duplicating logic already
2458 implemented in `setup_group'.
2460 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2463 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2464 if the hint address is zero.
2466 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2469 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2470 ELF_COMMON_DEF_P for common symbols.
2472 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2474 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2475 SEC_GROUP sections as SEC_EXCLUDE.
2476 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2477 (assign_section_numbers): Use resolve_section_groups flag instead
2478 of relocatable link type.
2479 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2480 flag instead of checking the final_link flag for part of the
2481 checks in here. Fix white space as a result.
2482 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2483 instead of relocatable link type.
2484 (bfd_elf_final_link): Likewise.
2486 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2488 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2490 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2491 (s3_bfd_score_elf_check_relocs): Likewise.
2492 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2493 (score_elf_final_link_relocate): Likewise.
2494 (s7_bfd_score_elf_check_relocs): Likewise.
2496 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2498 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2501 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2503 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2504 from `reloc_count' rather than decrementing it.
2505 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2506 `reloc_count' by `int_rels_per_ext_rel'.
2507 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2508 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2509 entry determination.
2510 (s3_bfd_score_elf_check_relocs): Likewise.
2511 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2512 (s7_bfd_score_elf_relocate_section): Likewise.
2513 (s7_bfd_score_elf_check_relocs): Likewise.
2514 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2515 prototype and function.
2516 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2517 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2518 triple rather than once the sum of REL and RELA relocation entry
2520 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2521 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2522 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2523 storage allocation size determination.
2524 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2525 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2526 by `int_rels_per_ext_rel' for last relocation entry
2528 (bfd_elf_final_link): Do not multiply `reloc_count' by
2529 `int_rels_per_ext_rel' for internal relocation storage
2530 allocation size determination.
2531 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2532 `int_rels_per_ext_rel' for last relocation entry determination.
2533 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2534 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2535 (_bfd_mips_elf_relocate_section): Likewise.
2537 2017-06-05 Alan Modra <amodra@gmail.com>
2540 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2542 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2544 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2545 determine structure sizes.
2546 (elfcore_grok_freebsd_prstatus): Likewise.
2548 2017-06-01 Alan Modra <amodra@gmail.com>
2550 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2551 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2553 (is_elfv2_localentry0): New function.
2554 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2555 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2556 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2557 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2558 optimized localentry:0 stubs.
2559 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2560 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2562 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2564 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2566 2017-05-30 Casey Smith <clegg89@gmail.com>
2569 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2570 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2572 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2574 * cpu-arc.c (arc_compatible): New function.
2576 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2578 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2580 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2583 * bfdio.c (bfd_get_file_size): New function.
2584 * bfd-in2.h: Regenerated.
2586 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2588 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2591 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2593 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2594 dynobj instead of htab->elf.dynobj.
2596 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2598 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2600 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2601 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2602 actual number of internal relocations retrieved. Adjust
2603 function description.
2604 (bfd_elf64_canonicalize_reloc): Remove macro.
2605 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2607 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2609 * archures.c (bfd_mach_sparc_v9m8): Define.
2610 (bfd_mach_sparc_v8plusm8): Likewise.
2611 (bfd_mach_sparc_v9_p): Adjust to M8.
2612 (bfd_mach_sparc_64bit_p): Likewise.
2613 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2614 bfd_mach_sparc_v8plusm8.
2615 * bfd-in2.h: Regenerated.
2616 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2618 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2619 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2620 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2622 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2623 bfd_mach_sparc_v8plusm8.
2625 2017-05-19 Alan Modra <amodra@gmail.com>
2627 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2628 debug and special sections when no non-note alloc sections in an
2631 2017-05-18 Alan Modra <amodra@gmail.com>
2633 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2634 * elf-m10300.c: Likewise.
2636 * elf32-arc.c: Likewise.
2637 * elf32-bfin.c: Likewise.
2638 * elf32-m68k.c: Likewise.
2639 * elf32-nds32.c: Likewise.
2640 * elf32-tilepro.c: Likewise.
2641 * elflink.c: Likewise.
2642 * elfnn-aarch64.c: Likewise.
2643 * elfnn-riscv.c: Likewise.
2644 * elfxx-tilegx.c: Likewise.
2645 * mach-o.c: Likewise.
2646 * peXXigen.c: Likewise.
2647 * vms-alpha.c: Likewise.
2648 * vms-lib.c: Likewise.
2650 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2653 * elflink.c (elf_gc_mark_debug_section): New function.
2654 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2655 referenced by kept debug sections.
2657 2017-05-16 Alan Modra <amodra@gmail.com>
2659 * elf-m10300.c: Rename occurrences of non_ir_ref.
2660 * elf32-arm.c: Likewise.
2661 * elf32-bfin.c: Likewise.
2662 * elf32-cr16.c: Likewise.
2663 * elf32-cris.c: Likewise.
2664 * elf32-d10v.c: Likewise.
2665 * elf32-dlx.c: Likewise.
2666 * elf32-fr30.c: Likewise.
2667 * elf32-frv.c: Likewise.
2668 * elf32-hppa.c: Likewise.
2669 * elf32-i370.c: Likewise.
2670 * elf32-i386.c: Likewise.
2671 * elf32-iq2000.c: Likewise.
2672 * elf32-lm32.c: Likewise.
2673 * elf32-m32c.c: Likewise.
2674 * elf32-m32r.c: Likewise.
2675 * elf32-m68hc1x.c: Likewise.
2676 * elf32-m68k.c: Likewise.
2677 * elf32-mcore.c: Likewise.
2678 * elf32-metag.c: Likewise.
2679 * elf32-microblaze.c: Likewise.
2680 * elf32-moxie.c: Likewise.
2681 * elf32-msp430.c: Likewise.
2682 * elf32-mt.c: Likewise.
2683 * elf32-nios2.c: Likewise.
2684 * elf32-or1k.c: Likewise.
2685 * elf32-ppc.c: Likewise.
2686 * elf32-rl78.c: Likewise.
2687 * elf32-s390.c: Likewise.
2688 * elf32-score.c: Likewise.
2689 * elf32-score7.c: Likewise.
2690 * elf32-sh.c: Likewise.
2691 * elf32-tic6x.c: Likewise.
2692 * elf32-tilepro.c: Likewise.
2693 * elf32-v850.c: Likewise.
2694 * elf32-vax.c: Likewise.
2695 * elf32-xstormy16.c: Likewise.
2696 * elf32-xtensa.c: Likewise.
2697 * elf64-alpha.c: Likewise.
2698 * elf64-hppa.c: Likewise.
2699 * elf64-ia64-vms.c: Likewise.
2700 * elf64-mmix.c: Likewise.
2701 * elf64-ppc.c: Likewise.
2702 * elf64-s390.c: Likewise.
2703 * elf64-sh64.c: Likewise.
2704 * elf64-x86-64.c: Likewise.
2705 * elflink.c: Likewise.
2706 * elfnn-aarch64.c: Likewise.
2707 * elfnn-ia64.c: Likewise.
2708 * elfnn-riscv.c: Likewise.
2709 * elfxx-mips.c: Likewise.
2710 * elfxx-sparc.c: Likewise.
2711 * elfxx-tilegx.c: Likewise.
2712 * linker.c: Likewise.
2714 2017-05-16 Alan Modra <amodra@gmail.com>
2716 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2717 * elflink.c (elf_link_add_object_symbols): Update to use
2719 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2721 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2723 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2725 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2727 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2729 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2730 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2732 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2734 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2736 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2738 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2739 to plt_second/plt_second_eh_frame.
2740 (elf_x86_64_link_hash_newfunc): Updated.
2741 (elf_x86_64_allocate_dynrelocs): Likewise.
2742 (elf_x86_64_size_dynamic_sections): Likewise.
2743 (elf_x86_64_relocate_section): Likewise.
2744 (elf_x86_64_finish_dynamic_symbol): Likewise.
2745 (elf_x86_64_finish_dynamic_sections): Likewise.
2746 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2747 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2749 (elf_backend_setup_gnu_properties): Updated. Create the
2750 .plt.sec section instead of the .plt.sec section.
2752 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2754 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2755 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2756 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2758 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2760 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2761 (bfd_elf64_set_reloc): Define.
2762 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2764 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2766 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2767 (struct bfd_target): New field _bfd_set_reloc.
2768 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2769 * reloc.c (_bfd_generic_set_reloc): New function.
2770 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2771 * nlm-target.h (nlm_set_reloc): Likewise.
2772 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2773 * aout-tic30.c (MY_set_reloc): Likewise.
2774 * aout-target.h (MY_set_reloc): Likewise.
2775 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2776 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2777 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2778 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2779 * aout-adobe.c (aout_32_set_reloc): Likewise.
2780 * bout.c (b_out_set_reloc): Likewise.
2781 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2782 * i386os9k.c (aout_32_set_reloc): Likewise.
2783 * ieee.c (ieee_set_reloc): Likewise.
2784 * oasys.c (oasys_set_reloc): Likewise.
2785 * som.c (som_set_reloc): Likewise.
2786 * versados.c (versados_set_reloc): Likewise.
2787 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2788 _bfd_generic_set_reloc.
2789 (rs6000_xcoff64_aix_vec): LIkewise.
2790 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2791 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2792 * i386msdos.c (msdos_set_reloc): Define to
2793 _bfd_norelocs_set_reloc.
2794 * elfcode.h (elf_set_reloc): Define.
2795 * bfd-in2.h: Regenerated.
2797 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2800 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2801 for IFUNC function address.
2803 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2805 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2806 (CONFLICT_LIST): Likewise.
2807 (opcode/arc-attrs.h): Include.
2808 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2809 (arc_extract_features): New file.
2810 (arc_stralloc): Likewise.
2811 (arc_elf_merge_attributes): Likewise.
2812 (arc_elf_merge_private_bfd_data): Use object attributes.
2813 (bfd_arc_get_mach_from_attributes): New function.
2814 (arc_elf_object_p): Use object attributes.
2815 (arc_elf_final_write_processing): Likewise.
2816 (elf32_arc_obj_attrs_arg_type): New function.
2817 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2818 (elf32_arc_section_from_shdr): Likewise.
2819 (elf_backend_obj_attrs_vendor): Define.
2820 (elf_backend_obj_attrs_section): Likewise.
2821 (elf_backend_obj_attrs_arg_type): Likewise.
2822 (elf_backend_obj_attrs_section_type): Likewise.
2823 (elf_backend_obj_attrs_handle_unknown): Likewise.
2824 (elf_backend_section_from_shdr): Likewise.
2826 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2829 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2830 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2831 and the destination is a Thumb symbol.
2833 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2835 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2836 initializer to silence GCC 4.2.
2837 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2839 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2841 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2842 (LAZY_PLT_ENTRY_SIZE): This.
2843 (NON_LAZY_PLT_ENTRY_SIZE): New.
2844 (elf_x86_64_plt0_entry): Renamed to ...
2845 (elf_x86_64_lazy_plt0_entry): This.
2846 (elf_x86_64_plt_entry): Renamed to ...
2847 (elf_x86_64_lazy_plt_entry): This.
2848 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2849 (elf_x86_64_lazy_bnd_plt0_entry): This.
2850 (elf_x86_64_legacy_plt_entry): Removed.
2851 (elf_x86_64_bnd_plt_entry): Renamed to ...
2852 (elf_x86_64_lazy_bnd_plt_entry): This.
2853 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2854 (elf_x86_64_non_lazy_plt_entry): This.
2855 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2856 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2857 (elf_x86_64_eh_frame_plt): Renamed to ...
2858 (elf_x86_64_eh_frame_lazy_plt): This.
2859 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2860 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2861 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2862 (elf_x86_64_eh_frame_non_lazy_plt): This.
2863 (elf_x86_64_lazy_plt_layout): New.
2864 (elf_x86_64_non_lazy_plt_layout): Likewise.
2865 (elf_x86_64_plt_layout): Likewise.
2866 (elf_x86_64_backend_data): Remove PLT layout information. Add
2867 os for target system.
2868 (GET_PLT_ENTRY_SIZE): Removed.
2869 (elf_x86_64_lazy_plt): New.
2870 (elf_x86_64_non_lazy_plt): Likewise.
2871 (elf_x86_64_lazy_bnd_plt): Likewise.
2872 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2873 (elf_x86-64_arch_bed): Updated.
2874 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2875 (elf_x86_64_create_dynamic_sections): Removed.
2876 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2877 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2878 (elf_x86-64_adjust_dynamic_symbol): Updated.
2879 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2880 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2881 size for PLT0 if there is no PLT0. Get plt_entry_size from
2882 non_lazy_plt for non-lazy PLT entries.
2883 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2884 from non_lazy_plt for non-lazy PLT entries.
2885 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2886 if there is no PLT0.
2887 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2888 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2889 entries with non-lazy PLT layout. Don't fill the second and third
2890 slots in the PLT entry if there is no PLT0.
2891 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2892 if there is no PLT0. Set sh_entsize on the .plt.got section.
2893 (compare_relocs): New.
2894 (elf_x86_64_plt_type): Likewise.
2895 (elf_x86_64_plt): Likewise.
2896 (elf_x86_64_nacl_plt): New. Forward declaration.
2897 (elf_x86_64_get_plt_sym_val): Removed.
2898 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2899 against all dynamic relocations.
2900 (elf_x86_64_link_setup_gnu_properties): New function.
2901 (elf_backend_create_dynamic_sections): Updated.
2902 (elf_backend_setup_gnu_properties): New.
2903 (elf_x86_64_nacl_plt): New.
2904 (elf_x86_64_nacl_arch_bed): Updated.
2906 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2908 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2909 (LAZY_PLT_ENTRY_SIZE): This.
2910 (NON_LAZY_PLT_ENTRY_SIZE): New.
2911 (elf_i386_plt0_entry): Renamed to ...
2912 (elf_i386_lazy_plt0_entry): This.
2913 (elf_i386_plt_entry): Renamed to ...
2914 (elf_i386_lazy_plt_entry): This.
2915 (elf_i386_pic_plt0_entry): Renamed to ...
2916 (elf_i386_pic_lazy_plt0_entry): This.
2917 (elf_i386_pic_plt_entry): Renamed to ...
2918 (elf_i386_pic_lazy_plt_entry): This.
2919 (elf_i386_got_plt_entry): Renamed to ...
2920 (elf_i386_non_lazy_plt_entry): This.
2921 (elf_i386_pic_got_plt_entry): Renamed to ...
2922 (elf_i386_pic_non_lazy_plt_entry): This.
2923 (elf_i386_eh_frame_plt): Renamed to ...
2924 (elf_i386_eh_frame_lazy_plt): This.
2925 (elf_i386_eh_frame_plt_got): Renamed to ...
2926 (elf_i386_eh_frame_non_lazy_plt): This.
2927 (elf_i386_plt_layout): Renamed to ...
2928 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2929 eh_frame_plt_got_size.
2930 (elf_i386_non_lazy_plt_layout): New.
2931 (elf_i386_plt_layout): Likewise.
2932 (elf_i386_non_lazy_plt): Likewise.
2933 (GET_PLT_ENTRY_SIZE): Removed.
2934 (elf_i386_plt): Renamed to ...
2935 (elf_i386_lazy_plt): This.
2936 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2937 (elf_i386_arch_bed): Updated.
2938 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2939 (elf_i386_create_dynamic_sections): Removed.
2940 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2941 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2942 (elf_i386_adjust_dynamic_symbol): Updated.
2943 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2944 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2945 size for PLT0 if there is no PLT0.
2946 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2947 output section is discarded only if GOT isn't empty.
2948 (elf_i386_relocate_section): Updated. Properly get PLT index
2949 if there is no PLT0.
2950 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2951 second and third slots in the PLT entry if there is no PLT0.
2952 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2953 if there is no PLT0. Set sh_entsize on the .plt.got section.
2954 (elf_i386_nacl_plt): Forward declaration.
2955 (elf_i386_get_plt_sym_val): Removed.
2956 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2957 against all dynamic relocations.
2958 (elf_i386_link_setup_gnu_properties): New function.
2959 (elf_backend_create_dynamic_sections): Updated.
2960 (elf_backend_setup_gnu_properties): New.
2961 (elf_i386_nacl_plt): Updated.
2962 (elf_i386_nacl_arch_bed): Likewise.
2963 (elf_i386_vxworks_arch_bed): Likewise.
2965 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2967 * elflink.c (elf_output_implib): Remove executable flag from import
2969 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2970 library is a relocatable object file.
2972 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2975 * elf32-avr.c (avr_should_move_sym): New function.
2976 (avr_should_reduce_sym_size): Likewise.
2977 (avr_should_increase_sym_size): Likewise.
2978 (elf32_avr_relax_delete_bytes): Adjust symbol values
2979 and sizes by calling new functions.
2981 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2983 * config.bfd (riscv32-*): Enable rv64.
2985 2017-05-02 Alan Modra <amodra@gmail.com>
2988 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2989 rather than h->root.type == bfd_link_hash_new.
2990 (bfd_elf_record_link_assignment): Similarly, call
2991 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2993 2017-04-29 Alan Modra <amodra@gmail.com>
2996 * reloc.c (reloc_offset_in_range): New function.
2997 (bfd_perform_relocation, bfd_install_relocation): Use it.
2998 (_bfd_final_link_relocate): Likewise.
3000 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3002 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3003 before using .plt.got.
3004 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3006 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3008 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3009 instead of "+=" to update 0.
3011 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3013 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3014 .plt.got section here.
3015 (elf_i386_check_relocs): Don't create the .plt.got section.
3016 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3017 the .plt.got and .plt.bnd sections here.
3018 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3021 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3023 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3025 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3026 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3027 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3028 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3031 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3033 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3035 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3036 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3037 the first relocatable ELF input with GNU properties.
3039 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3041 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3042 VxWorks for non-PIC.
3044 2017-04-27 Alan Modra <amodra@gmail.com>
3046 * elf-bfd.h (struct elf_backend_data): Make asection param of
3047 elf_backend_eh_frame_address_size const.
3048 (_bfd_elf_eh_frame_address_size): Likewise.
3049 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3050 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3051 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3052 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3053 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3054 (next_cie_fde_offset): Constify params.
3055 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3057 2017-04-27 Alan Modra <amodra@gmail.com>
3059 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3060 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3061 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3063 (offset_adjust): New function.
3064 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3065 (adjust_eh_frame_local_symbols): Likewise.
3066 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3067 after changing anything. Return true if anything changed.
3068 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3069 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3071 2017-04-27 Alan Modra <amodra@gmail.com>
3073 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3076 2017-04-27 Alan Modra <amodra@gmail.com>
3078 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3079 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3080 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3081 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3082 for undef and undefweak dyn_relocs.
3083 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3084 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3085 (allocate_got, allocate_dynrelocs): Likewise.
3086 (ppc64_elf_relocate_section): Likewise.
3088 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3090 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3091 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3092 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3093 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3095 2017-04-26 Nick Clifton <nickc@redhat.com>
3098 * reloc.c (bfd_perform_relocation): Check for a negative address
3101 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3104 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3106 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3107 (elf_backend_always_renumber_dynsyms): Define.
3108 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3109 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3110 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3111 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3113 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3115 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3117 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3118 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3119 sections have been created.
3121 2017-04-26 Nick Clifton <nickc@redhat.com>
3124 * compress.c (bfd_init_section_compress_status): Check the return
3125 value from bfd_malloc.
3127 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3129 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3130 no_finish_dynamic_symbol.
3131 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3133 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3134 weak symbol, don't make it dynamic.
3135 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3136 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3137 relocation for GOT reference.
3138 (elf_x86_64_finish_dynamic_symbol): Abort if
3139 no_finish_dynamic_symbol isn't 0.
3141 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3144 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3145 undefined weak symbol, don't make it dynamic.
3146 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3147 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3148 relocation for R_386_GOT32.
3150 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3153 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3155 2017-04-23 Alan Modra <amodra@gmail.com>
3158 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3159 * elf.c (lcomm_sym): New.
3160 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3161 * bfd-in2.h: Regenerate.
3163 2017-04-23 Alan Modra <amodra@gmail.com>
3166 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3167 parameters and comment.
3168 (_bfd_elf_get_reloc_section): Delete.
3169 (_bfd_elf_plt_get_reloc_section): Declare.
3170 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3171 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3173 (_bfd_elf_get_reloc_section): ..here. Delete.
3174 (assign_section_numbers): Call elf_get_reloc_section.
3175 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3176 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3178 2017-04-23 Alan Modra <amodra@gmail.com>
3181 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3184 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3187 * elf32-i386.c (elf_i386_link_hash_entry): Add
3188 no_finish_dynamic_symbol.
3189 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3190 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3191 symbol, don't make it dynamic in PIE.
3192 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3193 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3194 relocation for R_386_GOT32
3195 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3198 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3202 * elflink.c (elf_link_add_object_symbols): Require
3203 --no-dynamic-linker with -E/--dynamic-list when creating
3206 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3208 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3211 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3213 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3214 dynamic symbol sorting.
3216 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3219 * elflink.c (elf_link_add_object_symbols): Preserve
3220 dynamic_ref_after_ir_def when restoring the symbol table for
3221 unneeded dynamic object.
3223 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3226 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3227 on on undefined IFUNC symbol in the second PLT.
3229 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3231 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3233 2017-04-19 Alan Modra <amodra@gmail.com>
3235 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3236 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3237 * elf32-ppc.c:Formatting.
3238 (ensure_undefweak_dynamic): Don't make dynamic when
3239 info->dynamic_undefined_weak is zero.
3240 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3241 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3242 not default visibility. Discard undef and undefweak
3244 (ppc_elf_relocate_section): Adjust to suit.
3245 * elf64-ppc.c: Formatting.
3246 (ensure_undefweak_dynamic): Don't make dynamic when
3247 info->dynamic_undefined_weak is zero.
3248 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3249 info->dynamic_undefined_weak. Discard them earlier.
3251 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3254 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3255 before generating the version definition section.
3257 2017-04-17 Alan Modra <amodra@gmail.com>
3259 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3260 state when a regular object file defines a symbol with
3261 incompatible type to that defined by an earlier shared lib.
3263 2017-04-13 Alan Modra <amodra@gmail.com>
3265 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3267 * elf32-arm.c: Likewise.
3268 * elf32-i386.c: Likewise.
3269 * elf32-mep.c: Likewise.
3270 * elf64-ia64-vms.c: Likewise.
3271 * elf64-x86-64.c: Likewise.
3272 * elflink.c: Likewise.
3273 * elfnn-ia64.c: Likewise.
3274 * elfxx-mips.c: Likewise.
3276 2017-04-13 Alan Modra <amodra@gmail.com>
3278 * aoutx.h: Use %B and %A in error messages throughout file.
3279 * aout-cris.c: Likewise.
3280 * archive.c: Likewise.
3281 * binary.c: Likewise.
3282 * coff-rs6000.c: Likewise.
3283 * coff-tic4x.c: Likewise.
3284 * coffcode.h: Likewise.
3285 * coffgen.c: Likewise.
3286 * cofflink.c: Likewise.
3287 * coffswap.h: Likewise.
3288 * cpu-arm.c: Likewise.
3289 * elf-eh-frame.c: Likewise.
3290 * elf-m10300.c: Likewise.
3292 * elf32-arc.c: Likewise.
3293 * elf32-arm.c: Likewise.
3294 * elf32-bfin.c: Likewise.
3295 * elf32-frv.c: Likewise.
3296 * elf32-iq2000.c: Likewise.
3297 * elf32-m32c.c: Likewise.
3298 * elf32-microblaze.c: Likewise.
3299 * elf32-nds32.c: Likewise.
3300 * elf32-rl78.c: Likewise.
3301 * elf32-rx.c: Likewise.
3302 * elf32-score.c: Likewise.
3303 * elf32-score7.c: Likewise.
3304 * elf32-sh64.c: Likewise.
3305 * elf32-v850.c: Likewise.
3306 * elf32-vax.c: Likewise.
3307 * elf32-visium.c: Likewise.
3308 * elf64-ia64-vms.c: Likewise.
3309 * elf64-mmix.c: Likewise.
3310 * elf64-sh64.c: Likewise.
3311 * elfcode.h: Likewise.
3312 * elfnn-aarch64.c: Likewise.
3313 * elfnn-ia64.c: Likewise.
3314 * elfxx-mips.c: Likewise.
3315 * hpux-core.c: Likewise.
3318 * linker.c: Likewise.
3319 * merge.c: Likewise.
3321 * oasys.c: Likewise.
3322 * pdp11.c: Likewise.
3323 * peXXigen.c: Likewise.
3324 * rs6000-core.c: Likewise.
3325 * vms-alpha.c: Likewise.
3326 * xcofflink.c: Likewise.
3328 2017-04-13 Alan Modra <amodra@gmail.com>
3330 * bfd.c (PRINT_TYPE): Define.
3331 (_doprnt): New function.
3332 (error_handler_internal): Use _doprnt.
3333 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3334 calls in their natural order, throughout file.
3335 * coff-mcore.c: Likewise.
3336 * coff-ppc.c: Likewise.
3337 * coff-tic80.c: Likewise.
3338 * cofflink.c: Likewise.
3339 * elf-s390-common.c: Likewise.
3341 * elf32-arm.c: Likewise.
3342 * elf32-i386.c: Likewise.
3343 * elf32-m32r.c: Likewise.
3344 * elf32-msp430.c: Likewise.
3345 * elf32-spu.c: Likewise.
3346 * elf64-ia64-vms.c: Likewise.
3347 * elf64-sparc.c: Likewise.
3348 * elf64-x86-64.c: Likewise.
3349 * elflink.c: Likewise.
3350 * elfnn-aarch64.c: Likewise.
3351 * elfnn-ia64.c: Likewise.
3352 * elfxx-mips.c: Likewise.
3354 2017-04-13 Alan Modra <amodra@gmail.com>
3356 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3357 branch veneers" error. Fix double space and format message.
3358 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3359 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3361 2017-04-13 Alan Modra <amodra@gmail.com>
3363 * bfd-in2.h: Regenerate.
3365 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3367 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3368 extra `\n' in warning/error messages.
3369 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3370 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3372 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3374 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3375 processor-specific properties with generic ELF target vector.
3377 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3379 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3380 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3381 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3382 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3384 (link_hash_newfunc): Initialize has_got_reloc and
3386 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3388 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3390 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3392 (_bfd_sparc_elf_fixup_symbol): New function.
3393 (allocate_dynrelocs): Don't allocate space for dynamic
3394 relocations and discard relocations against resolved undefined
3395 weak symbols in executable. Don't make resolved undefined weak
3396 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3397 relocation against undefined weak symbols in PIE.
3398 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3399 relocations against resolved undefined weak symbols in PIE
3400 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3401 without ynamic PLT/GOT relocations for resolved undefined weak
3403 Don't generate dynamic relocation against resolved undefined
3404 weak symbol in executable.
3405 (pie_finish_undefweak_symbol): New function.
3406 (_bfd_sparc_elf_finish_dynamic_sections): Call
3407 pie_finish_undefweak_symbol on all symbols in PIE.
3408 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3409 (_bfd_sparc_elf_fixup_symbol): New function.
3411 2017-04-10 Nick Clifton <nickc@redhat.com>
3413 * config.bfd: Remove ns32k from obsolete list.
3415 2017-04-10 Alan Modra <amodra@gmail.com>
3418 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3419 (special_sections_i): Likewise for .init_array.
3420 (special_sections_p): Likewise for .preinit_array.
3422 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3426 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3427 ELF_COMMON_DEF_P for common symbols.
3428 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3429 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3430 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3431 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3432 07492f668d2173da7a2bda3707ff0985e0f460b6.
3434 2017-04-07 Pedro Alves <palves@redhat.com>
3436 * opncls.c (bfd_get_debug_link_info): Rename to...
3437 (bfd_get_debug_link_info_1): ... this. Change type of second
3438 parameter to void pointer. Adjust.
3439 (bfd_get_debug_link_info): Reimplement on top of
3440 bfd_get_debug_link_info_1.
3441 (separate_debug_file_exists, separate_alt_debug_file_exists):
3442 Change type of second parameter to void pointer. Adjust.
3443 (get_func_type, check_func_type): Change type of second parameter
3445 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3446 the callback functions instead of passing the address of a local.
3447 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3448 find_separate_debug_file.
3449 (get_alt_debug_link_info_shim): Change type of second parameter to
3450 void pointer. Adjust.
3451 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3452 find_separate_debug_file.
3453 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3454 of second parameter to void pointer. Adjust.
3455 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3456 pointer local to find_separate_debug_file.
3458 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3460 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3461 external symbols with a definition.
3462 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3464 2017-04-07 Alan Modra <amodra@gmail.com>
3466 * po/SRC-POTFILES.in: Regenerate.
3468 2017-04-05 Alan Modra <amodra@gmail.com>
3470 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3473 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3475 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3476 numbers for DataDirectory entry indicies passed to
3479 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3481 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3482 each GNU_MBIND section and align GNU_MBIND section to page size.
3483 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3484 segment for each GNU_MBIND section.
3485 (_bfd_elf_init_private_section_data): Copy sh_info from input
3486 for GNU_MBIND section.
3488 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3490 * elfnn-riscv.c (GP_NAME): Delete.
3491 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3492 (_bfd_riscv_relax_lui): Likewise.
3494 2017-04-04 Nick Clifton <nickc@redhat.com>
3497 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3499 (bfd_elf_final_link): Only initialize the extended symbol index
3500 section if there are extended symbol tables to list.
3502 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3504 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3505 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3506 * configure.ac (elf): Add elf-properties.lo.
3507 * Makefile.in: Regenerated.
3508 * configure: Likewise.
3509 * elf-bfd.h (elf_property_kind): New.
3510 (elf_property): Likewise.
3511 (elf_property_list): Likewise.
3512 (elf_properties): Likewise.
3513 (_bfd_elf_parse_gnu_properties): Likewise.
3514 (_bfd_elf_get_property): Likewise.
3515 (_bfd_elf_link_setup_gnu_properties): Likewise.
3516 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3517 and setup_gnu_properties.
3518 (elf_obj_tdata): Add properties.
3519 * elf-properties.c: New file.
3520 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3521 (elf_i386_merge_gnu_properties): Likewise.
3522 (elf_backend_parse_gnu_properties): Likewise.
3523 (elf_backend_merge_gnu_properties): Likewise.
3524 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3525 (elf_x86_64_merge_gnu_properties): Likewise.
3526 (elf_backend_parse_gnu_properties): Likewise.
3527 (elf_backend_merge_gnu_properties): Likewise.
3528 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3529 (elf_backend_parse_gnu_properties): Likewise.
3530 (elf_backend_setup_gnu_properties): Likewise.
3531 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3532 elf_backend_merge_gnu_properties and
3533 elf_backend_setup_gnu_properties.
3535 2017-03-30 Pip Cet <pipcet@gmail.com>
3537 * elf32-wasm32.c: Add relocation code, two relocs.
3538 * reloc.c: Add wasm32 relocations.
3539 * libbfd.h: Regenerate.
3540 * bfd-in2.h: Regenerate.
3541 * bfd/po/bfd.pot: Regenerate.
3543 2017-03-29 Nick Clifton <nickc@redhat.com>
3546 * coff-bfd.h (struct coff_section_data): Add new fields:
3547 saved_bias and bias.
3548 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3549 computed for PE binaries.
3550 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3553 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3556 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3557 to handle a local symbol with a hash-symbol-entry; without PLT.
3558 Add BFD_ASSERT for an incidental case with GOT entry present.
3559 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3560 isn't forced-or-set local.
3562 2017-03-27 Pip Cet <pipcet@gmail.com>
3564 * wasm-module.c: New file to support WebAssembly modules.
3565 * wasm-module.h: New file to support WebAssembly modules.
3566 * doc/webassembly.texi: Start documenting wasm-module.c.
3567 * config.bfd: Add wasm_vec.
3568 * targets.c: Likewise.
3569 * configure.ac: Likewise.
3570 * Makefile.am: Add entries for wasm-module.c.
3571 * Makefile.in: Regenerate.
3572 * configure: Regenerate.
3573 * po/SRC-POTFILES.in: Regenerate.
3575 2017-03-27 Pip Cet <pipcet@gmail.com>
3577 * cpu-wasm32.c: New file to support wasm32 architecture.
3578 * elf32-wasm32.c: New file to support wasm32 architecture.
3579 * Makefile.am: Add wasm32 architecture.
3580 * archures.c: Likewise.
3581 * config.bfd: Likewise.
3582 * configure.ac: Likewise.
3583 * targets.c: Likewise.
3584 * Makefile.in: Regenerate.
3585 * bfd-in2.h: Regenerate.
3586 * configure: Regenerate.
3587 * po/SRC-POTFILES.in: Regenerate.
3589 2017-03-20 Alan Modra <amodra@gmail.com>
3592 * elf64-ppc.c (compare_symbols): Stabilize sort.
3594 2017-03-18 Alan Modra <amodra@gmail.com>
3596 * elf64-ppc.c (struct ppc_link_hash_table): Add
3597 local_ifunc_resolver and maybe_local_ifunc_resolver.
3598 (ppc_build_one_stub): Set flags on emitting dynamic
3599 relocation to ifunc.
3600 (ppc64_elf_relocate_section): Likewise.
3601 (ppc64_elf_finish_dynamic_symbol): Likewise.
3602 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3603 local dynamic relocs to ifuncs.
3604 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3605 local_ifunc_resolver and maybe_local_ifunc_resolver.
3606 (ppc_elf_relocate_section): Set flag on emitting dynamic
3607 relocation to ifuncs.
3608 (ppc_elf_finish_dynamic_symbol): Likewise.
3609 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3610 dynamic relocs to ifuncs.
3612 2017-03-13 Nick Clifton <nickc@redhat.com>
3615 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3616 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3617 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3618 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3619 * bfd-in2.h: Regenerate.
3620 * libbfd.h: Regenerate.
3621 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3623 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3624 (elfNN_aarch64_howto_table): Likewise.
3625 (aarch64_tls_transition_without_check): Likewise.
3626 (aarch64_reloc_got_type): Likewise.
3627 (elfNN_aarch64_final_link_relocate): Likewise.
3628 (elfNN_aarch64_tls_relax): Likewise.
3629 (elfNN_aarch64_relocate_section): Likewise.
3630 (elfNN_aarch64_gc_sweep_hook): Likewise.
3631 (elfNN_aarch64_check_relocs): Likewise.
3632 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3633 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3635 2017-03-11 Alan Modra <amodra@gmail.com>
3637 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3638 parameter is in fact used. Whitespace fixes.
3639 * elf64-ppc.c: Likewise.
3641 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3643 * rs6000-core.c (CORE_NEW): Simplify macro when
3644 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3646 2017-03-07 Alan Modra <amodra@gmail.com>
3650 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3653 2017-03-05 Alan Modra <amodra@gmail.com>
3655 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3656 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3657 (next_cie_fde_offset): New function.
3658 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3659 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3660 four bytes. Align CIEs to four or eight bytes depending on
3661 per_encoding_aligned8. Align FDEs according to their encoding.
3662 Pad last FDE to output section alignment.
3663 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3665 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3666 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3667 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3669 2017-03-02 Martin Bickel <binutils@ineranves.de>
3672 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3673 empty segments which have a zero filesz, but a non-zero memsz.
3675 2017-03-02 Alan Modra <amodra@gmail.com>
3677 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3679 2017-02-28 Alan Modra <amodra@gmail.com>
3681 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3682 (ppc64_elf_relocate_section): Likewise.
3684 2017-02-28 Alan Modra <amodra@gmail.com>
3687 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3688 rather than elf32_nios2_hash_table or elf_hash_table.
3689 (create_got_section): Likewise.
3690 (nios2_elf32_finish_dynamic_symbol): Likewise.
3691 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3692 (nios2_elf32_size_dynamic_sections): Likewise.
3693 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3694 vars. Use htab equivalents directly instead. Don't create
3695 all dynamic sections on needing just the GOT. Use a goto
3696 rather than a fall-through with reloc test. Ensure
3697 htab->dynobj is set when making dynamic sreloc section.
3698 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3699 equivalent directly instead. Don't segfault on looking for
3700 .dynamic when dynamic sections have not been created. Don't
3701 segfault on .got.plt being discarded.
3702 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3703 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3704 fixme and another not so relevant comment.
3705 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3706 already set, set hash table dynobj on creating .sbss.
3708 2017-02-28 Alan Modra <amodra@gmail.com>
3710 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3711 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3712 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3713 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3714 (ppc64_elf_relocate_section): Likewise.
3715 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3716 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3717 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3718 * libbfd.h: Regenerate.
3719 * bfd-in2.h: Regenerate.
3721 2017-02-28 Alan Modra <amodra@gmail.com>
3723 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3724 dynamic .data.rel.ro read-only.
3725 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3726 rather than section flags when deciding where copy reloc goes.
3727 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3728 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3729 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3730 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3731 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3732 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3733 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3734 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3735 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3736 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3737 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3738 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3739 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3740 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3741 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3742 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3743 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3744 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3745 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3747 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3749 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3750 `jalr $0, $25' instruction encoding.
3752 2017-02-27 Nick Clifton <nickc@redhat.com>
3755 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3756 generating a seg-fault when encountering a symbol that has been
3757 deleted by garbage collection.
3759 2017-02-25 Alan Modra <amodra@gmail.com>
3761 * elf32-arc.c (struct dynamic_sections): Delete.
3762 (enum dyn_section_types): Delete.
3763 (dyn_section_names): Delete.
3764 (arc_create_dynamic_sections): Delete.
3765 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3766 segfault on discarded .rela.plt section.
3767 (elf_arc_size_dynamic_sections): Formatting. Don't call
3768 arc_create_dynamic_sections. Don't allocate memory for sections
3769 handled by the generic linker. Correct code finding relocs in
3770 read-only sections. Set SEC_EXCLUDE on zero size .got,
3771 .got.plt, and .dynbss sections. Do set .interp for pies.
3773 2017-02-24 Andrew Waterman <andrew@sifive.com>
3775 * elfnn-riscv.c (GP_NAME): New macro.
3776 (riscv_global_pointer_value): Use it.
3777 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3778 output section, consider only that section's alignment.
3780 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3782 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3783 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3784 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3785 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3787 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3789 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3790 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3793 2017-02-23 Alan Modra <amodra@gmail.com>
3796 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3798 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3799 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3802 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3805 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3806 processing ahead of the call to `elf_gc_sweep_symbol'.
3808 2017-02-22 Nick Clifton <nickc@redhat.com>
3811 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3812 created section 4-byte alignment.
3814 2017-02-22 Alan Modra <amodra@gmail.com>
3816 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3817 on .got or .plt output section being discarded by script.
3818 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3821 2017-02-21 Alan Modra <amodra@gmail.com>
3823 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3824 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3826 2017-02-20 Alan Modra <amodra@gmail.com>
3829 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3830 if DT_RELSZ/DT_RELASZ is zero.
3832 2017-02-17 Nick Clifton <nickc@redhat.com>
3834 * compress.c (bfd_get_full_section_contents): Remember to reduce
3835 compressed size by the sizeof the compression header when
3836 decompressing the contents.
3838 2017-02-17 Pedro Alves <palves@redhat.com>
3840 * srec.c (Chunk): Rename to ...
3841 (_bfd_srec_len): ... this.
3842 (S3Forced): Rename to ...
3843 (_bfd_srec_forceS3): ... this.
3844 * objcopy.c: Adjust all references.
3846 2017-02-17 Pedro Alves <palves@redhat.com>
3848 * archive.c (bsd_write_armap): Rename to ...
3849 (_bfd_bsd_write_armap): ... this.
3850 (coff_write_armap): Rename to ...
3851 (_bfd_coff_write_armap): ... this.
3852 * libbfd-in.h (bsd_write_armap): Rename to ...
3853 (_bfd_bsd_write_armap): ... this.
3854 (coff_write_armap): Rename to ...
3855 (_bfd_coff_write_armap): ... this.
3856 * aout-target.h, aout-tic30.c: Adjust all users.
3857 * libbfd.h: Regenerate.
3859 2017-02-17 Pedro Alves <palves@redhat.com>
3861 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3862 (warn_deprecated): Rename to ...
3863 (_bfd_warn_deprecated): ... this.
3864 * libbfd.c (warn_deprecated): Rename to ...
3865 (_bfd_warn_deprecated): ... this.
3866 * bfd-in2.h: Regenerate.
3868 2017-02-17 Pedro Alves <palves@redhat.com>
3870 * bfdio.c (real_ftell): Rename to ...
3871 (_bfd_real_ftell): ... this.
3872 (real_fseek): Rename to ...
3873 (_bfd_real_fseek): ... this.
3874 (real_fopen): Rename to ...
3875 (_bfd_real_fopen): ... this.
3876 * libbfd-in.h (real_ftell): Rename to ...
3877 (_bfd_real_ftell): ... this.
3878 (real_fseek): Rename to ...
3879 (_bfd_real_fseek): ... this.
3880 (real_fopen): Rename to ...
3881 (_bfd_real_fopen): ... this.
3882 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3883 * libbfd.h: Regenerate.
3885 2017-02-17 Pedro Alves <palves@redhat.com>
3887 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3888 * libbfd.c (read_unsigned_leb128): Rename to ...
3889 (_bfd_read_unsigned_leb128): ... this.
3890 (read_signed_leb128): Rename to ...
3891 (_bfd_read_signed_leb128): ... this.
3892 (safe_read_leb128): Rename to ...
3893 (_bfd_safe_read_leb128): ... this.
3894 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3895 (_bfd_read_unsigned_leb128): ... this.
3896 (read_signed_leb128): Rename to ...
3897 (_bfd_read_signed_leb128): ... this.
3898 (safe_read_leb128): Rename to ...
3899 (_bfd_safe_read_leb128): ... this.
3900 * libbfd.h: Renegerate.
3902 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3904 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3905 before trying to fine matching file and line information.
3907 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3909 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3910 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3911 not match current bfd, then reload debug information. Record bfd
3912 we're loading debug info for in the stash. If we have debug
3913 informatin in the cache then perform section placement before
3916 2017-02-16 Alan Modra <amodra@gmail.com>
3919 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3920 * elfxx-target.h (elf_backend_no_page_alias): Define.
3921 (elfNN_bed): Init new field.
3922 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3923 ensure PT_LOAD segment starts on a new page.
3924 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3926 2017-02-16 Alan Modra <amodra@gmail.com>
3929 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3932 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3934 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3935 * bfd-in2.h: Regenerated.
3937 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3940 * elf32-i386.c (elf_i386_relocate_section): Allow
3941 "lea foo@GOT, %reg" in PIC.
3943 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3946 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3947 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3948 error against local IFUNC symbol without a base register for
3951 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3953 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3954 `%P: %H:' with `info->callbacks->einfo'.
3955 (ppc_elf_relocate_section): Likewise.
3956 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3957 (ppc64_elf_edit_toc): Likewise.
3958 (ppc64_elf_relocate_section): Likewise.
3960 2017-02-14 Alan Modra <amodra@gmail.com>
3962 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3963 --gc-keep-exported, and test versioned field of sym rather than
3964 looking for @ in name.
3966 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3968 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3971 2017-02-13 Nick Clifton <nickc@redhat.com>
3974 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3977 2017-02-07 Andrew Waterman <andrew@sifive.com>
3979 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3980 entry size if PLT header is written.
3982 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3984 Fix sparc64 dynamic relocation processing to use the dynamic
3986 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3987 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3990 2017-02-03 Nick Clifton <nickc@redhat.com>
3993 * coffcode.h (coff_write_object_contents): Enlarge size of
3994 s_name_buf in order to avoid compile time warning about possible
3996 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3997 32-bits of insn value before printing into buffer.
3999 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4001 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4002 `max_local_dynindx'.
4003 (mips_elf_sort_hash_table): Handle it.
4004 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4005 symbols bump up `max_local_dynindx' rather than
4006 `max_non_got_dynindx'.
4008 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4010 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4011 `min_got_dynindx', `max_unref_got_dynindx' and
4012 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4013 (mips_elf_sort_hash_table): Adjust accordingly.
4015 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4017 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4018 to access the hash table.
4020 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4022 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4023 non-NULL `htab' to the beginning.
4025 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4027 * elflink.c (elf_gc_sweep): Wrap overlong line.
4029 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4031 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4032 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4033 * elfxx-mips.c (mips_elf_link_hash_table): Add
4034 `ignore_branch_isa' member.
4035 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4036 in branch relocation calculation as an error if
4037 `ignore_branch_isa' has been set.
4038 (_bfd_mips_elf_insn32): Rename to...
4039 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4040 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4041 Handle the new parameter.
4043 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4045 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4046 local variable dynobj.
4049 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4050 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4051 executable from read-only sections into sdynrelro.
4052 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4053 dynamic relocs in sdynrelro.
4054 (elf_backend_want_dynrelro): Define.
4056 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4058 * config.bfd (*-*-rtemsaout*): Mark as removed.
4060 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4062 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4063 (arm-*-rtems*): Move to (arm*-*-eabi*).
4064 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4065 (m68-*-rtems*): Move to (m68*-*-elf*).
4067 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4069 * config.bfd (*-*-rtemscoff*): Mark as removed.
4071 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4074 * elflink.c (bfd_elf_record_link_assignment): Revert last
4075 change and don't ever clear `forced_local'. Set `mark'
4077 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4079 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4080 (bfd_elf_size_dynamic_sections): ... here.
4081 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4082 and set `mark' instead in `__tls_get_addr_opt' processing.
4083 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4085 2017-01-24 Alan Modra <amodra@gmail.com>
4087 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4088 where dynamic relocs are preferable. Allow ifunc too.
4089 (ensure_undefweak_dynamic): New function.
4090 (allocate_dynrelocs): Use it here. Move plt handling last and
4091 don't make symbols dynamic, simplifying loop. Only make undef
4092 weak symbols with GOT entries dynamic. Correct condition
4093 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4094 comments. Remove goto.
4095 (ppc_elf_relocate_section): Correct test for using dynamic
4096 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4097 to suit. Set up explicit tls_index entries and implicit GOT
4098 tls_index entries resolvable at link time for
4099 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4100 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4101 (ensure_undefweak_dynamic): New function.
4102 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4103 with GOT entries dynamic. Remove unnecessary test of
4104 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4105 (ppc64_elf_relocate_section): Correct test for using dynamic
4106 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4107 to suit. Set up explicit tls_index entries and implicit GOT
4108 tls_index entries resolvable at link time for __tls_get_addr_opt.
4109 Simplify expression to clear mem for prelink.
4111 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4113 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4115 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4117 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4118 (elf_backend_hash_symbol): Define.
4120 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4123 * elflink.c (bfd_elf_record_link_assignment): Clear any
4124 `forced_local' marking for DSO symbols that are not being
4127 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4129 * elfnn-riscv.c (riscv_elf_object_p): New function.
4131 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4134 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4136 (elf_x86_64_check_relocs): Create .eh_frame section for the
4138 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4139 .eh_frame section for the .plt.bnd section.
4140 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4141 for the .plt.bnd section.
4143 2017-01-12 Nick Clifton <nickc@redhat.com>
4146 * opncls.c (find_separate_debug_file): Add include_dirs
4147 parameter. Only include the directory part of the bfd's filename
4148 in search paths if include_dirs is true. Add a couple of extra
4149 locations for looking for debug files.
4150 ( bfd_follow_gnu_debuglink): Update invocation of
4151 find_separate_debug_file.
4152 (bfd_follow_gnu_debugaltlink): Likewise.
4153 (get_build_id): New function: Finds the build-id of the given bfd.
4154 (get_build_id_name): New function: Computes the name of the
4155 separate debug info file for a bfd, based upon its build-id.
4156 (check_build_id_file): New function: Checks to see if a separate
4157 debug info file exists at the given location, and that its
4158 build-id matches that of the original bfd.
4159 (bfd_follow_build_id_debuglink): New function: Finds a separate
4160 debug info file for a given bfd by using the build-id method.
4161 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4162 method of locating a separate debug info file before using the
4164 * bfd-in2.h: Regenerate.
4166 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4169 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4170 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4171 elf_x86_64_eh_frame_plt_got.
4172 (elf_x86_64_size_dynamic_sections): Get unwind info from
4173 elf_x86_64_bnd_arch_bed for the BND PLT.
4175 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4177 * config.bfd: Add entries for i686-redox and x86_64-redox.
4179 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4181 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4183 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4184 .eh_frame section to 4 bytes for x32.
4185 (elf_x86_64_check_relocs): Likewise.
4187 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4190 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4191 (PLT_GOT_FDE_LENGTH): Likewise.
4192 (elf_i386_plt_layout): Add eh_frame_plt_got and
4193 eh_frame_plt_got_size.
4194 (elf_i386_plt): Updated.
4195 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4196 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4197 (elf_i386_size_dynamic_sections): Allocate and initialize
4198 .eh_frame section for .plt.got.
4199 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4201 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4202 eh_frame_plt_got_size.
4203 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4204 (PLT_GOT_FDE_LENGTH): Likewise.
4205 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4206 eh_frame_plt_got_size.
4207 (elf_x86_64_arch_bed): Updated.
4208 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4209 eh_frame_plt_got_size.
4210 (elf_x86_64_nacl_arch_bed): Likewise.
4211 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4212 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4213 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4214 .eh_frame section for .plt.got.
4215 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4218 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4220 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4221 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4223 2017-01-09 Nick Clifton <nickc@redhat.com>
4225 * dwarf2.c (lookup_address_in_function_table): Return early if
4226 there are no functions in the given comp unit, or if the high
4227 address of the last function in the comp unit is less than the
4230 2017-01-09 Nick Clifton <nickc@redhat.com>
4233 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4234 message if there are too many symbols to load.
4236 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4238 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4239 if relocs are cached.
4241 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4244 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4245 for R_MICROBLAZE_GOTOFF_64.
4247 2017-01-03 Nick Clifton <nickc@redhat.com>
4249 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4250 warning about using a possibly uninitialised variable.
4252 2017-01-02 Alan Modra <amodra@gmail.com>
4254 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4255 (allocate_plt_static, allocate_dynrelocs): Use it.
4257 2017-01-02 Alan Modra <amodra@gmail.com>
4259 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4260 .PARISC.unwind section.
4262 2017-01-02 Alan Modra <amodra@gmail.com>
4265 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4266 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4267 indirect to GOT pointer relative code edit.
4269 2017-01-02 Alan Modra <amodra@gmail.com>
4271 Update year range in copyright notice of all files.
4273 For older changes see ChangeLog-2016
4275 Copyright (C) 2017 Free Software Foundation, Inc.
4277 Copying and distribution of this file, with or without modification,
4278 are permitted in any medium without royalty provided the copyright
4279 notice and this notice are preserved.
4285 version-control: never