1 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-i386.c (X86_SIZE_TYPE_P): New.
4 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
5 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
6 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
7 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
9 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
11 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
12 (PLT_LOCAL_IFUNC_P): Likewise.
13 * elf32-i386.c (elf_i386_relocate_section): Use them.
14 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
16 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
18 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
19 * elf32-i386.c (elf_i386_relocate_section): Use it.
20 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
22 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
24 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
25 * elf32-i386.c (elf_i386_relocate_section): Use it.
26 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
28 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
30 * elf32-i386.c (X86_PCREL_TYPE_P): New.
31 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
32 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
33 (X86_PCREL_TYPE_P): This.
34 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
35 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
36 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
38 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
40 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
42 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
43 * elf32-i386.c (elf_i386_tls_transition): Use it.
44 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
46 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
48 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
49 Dump dynamic relocation in read-only section with minfo if
51 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
52 (maybe_set_textrel): Likewise.
53 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
54 read-only section with minfo.
56 2017-10-05 John Baldwin <jhb@FreeBSD.org>
58 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
60 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
62 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
63 in read-only section with minfo.
64 (tilepro_elf_size_dynamic_sections): Likewise.
65 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
66 (tilegx_elf_size_dynamic_sections): Likewise.
68 2017-10-05 Pedro Alves <palves@redhat.com>
71 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
72 ellipsis parameter. Split out bfd_error_on_input code to..
73 (bfd_set_input_error): .. New function.
74 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
75 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
76 * bfd-in2.h: Regenerate.
78 2017-10-05 Alan Modra <amodra@gmail.com>
80 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
81 fini_array error value.
83 2017-10-05 Alan Modra <amodra@gmail.com>
86 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
88 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
90 (elf_fake_sections): Adjust calls. Exit immediately on failure.
91 (bfd_elf_set_group_contents): Add associated reloc section indices
94 2017-10-04 Alan Modra <amodra@gmail.com>
96 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
97 classify symbols for ELFv2.
99 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
102 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
103 undergoes default promotion.
104 * bfd-in2.h: Regenerate.
106 2017-10-02 Alan Modra <amodra@gmail.com>
108 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
109 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
111 2017-10-01 Alan Modra <amodra@gmail.com>
114 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
115 (add_line_info): Always put end_sequence last.
117 2017-10-01 Alan Modra <amodra@gmail.com>
120 * dwarf2.c (read_section): Allocate buffer with extra byte for
121 bfd_simple_get_relocated_section_contents rather than copying
124 2017-09-29 Alan Modra <amodra@gmail.com>
126 * merge.c (merge_strings): Return FALSE on malloc failure.
127 (_bfd_merge_sections): Return failures from record_section and
130 2017-09-28 Alan Modra <amodra@gmail.com>
133 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
134 a case where plugin_notice isn't called.
136 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
138 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
141 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
144 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
145 output_bfd to info->callbacks->minfo.
147 2017-09-26 Nick Clifton <nickc@redhat.com>
150 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
151 assertion failure if elf_x86_64_rtype_to_howto has already issued
154 2017-09-26 Alan Modra <amodra@gmail.com>
157 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
160 2017-09-26 Nick Clifton <nickc@redhat.com>
163 * dwarf2.c (read_formatted_entries): Fail early if we know that
164 the loop parsing data entries will overflow the end of the
167 2017-09-26 Alan Modra <amodra@gmail.com>
170 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
171 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
172 to stash->info_ptr_memory, and check die_ref is within that memory.
173 Set info_ptr_end correctly when another CU is refd. Check die_ref
174 for DW_FORM_ref4 etc. is within CU.
176 2017-09-26 Alan Modra <amodra@gmail.com>
179 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
180 (read_formatted_entries): Init "fe".
181 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
183 2017-09-26 Alan Modra <amodra@gmail.com>
186 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
187 bounds in inner loop.
189 2017-09-25 Alan Modra <amodra@gmail.com>
192 * dwarf1.c (parse_die): Sanity check pointer against section limit
193 before dereferencing.
194 (parse_line_table): Likewise.
196 2017-09-25 Alan Modra <amodra@gmail.com>
199 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
201 (parse_comp_unit): Likewise.
203 2017-09-25 Alan Modra <amodra@gmail.com>
206 * dwarf2.c (read_formatted_entries): Error on format_count zero.
208 2017-09-24 Alan Modra <amodra@gmail.com>
211 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
212 within section bounds.
214 2017-09-24 Alan Modra <amodra@gmail.com>
217 * dwarf2.c (decode_line_info): Properly free line sequences on error.
219 2017-09-24 Alan Modra <amodra@gmail.com>
222 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
223 pname param. Return status. Make name const. Don't abort,
224 return an error. Formatting. Exit if current info_ptr matches
225 orig_info_ptr. Update callers.
226 (scan_unit_for_symbols): Start at nesting_level of zero. Make
227 nested_funcs an array of structs for extensibility. Formatting.
229 2017-09-24 Alan Modra <amodra@gmail.com>
232 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
233 rather than dividing by zero.
235 2017-09-24 Alan Modra <amodra@gmail.com>
238 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
240 2017-09-24 Alan Modra <amodra@gmail.com>
243 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
245 2017-09-24 Alan Modra <amodra@gmail.com>
248 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
249 SHT_GNU_verneed section for sanity. Don't zalloc memory for
252 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
255 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
258 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
261 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
262 -1 if bfd_canonicalize_dynamic_reloc returns 0.
264 2017-09-22 Pedro Alves <palves@redhat.com>
265 Alan Modra <amodra@gmail.com>
267 * version.h: Add comment.
269 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
271 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
272 NT_S390_GS_BC, correct the previously swapped invocations of
273 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
275 2017-09-19 Alan Modra <amodra@gmail.com>
278 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
281 2017-09-19 Alan Modra <amodra@gmail.com>
284 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
285 symbols before calculating verrefs. Don't renumber dynsyms
286 after gc. Exclude .gnu.version when zero or one dynsym.
287 Localize some vars and reindent.
289 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
292 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
293 return from bfd_canonicalize_dynamic_reloc.
295 2017-09-15 Alan Modra <amodra@gmail.com>
298 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
299 overflows bfd_size_type.
301 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
304 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
305 to indicate if conversion is performed.
306 (elf_i386_check_relocs): Cache section contents and relocations
307 if conversion is performed.
308 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
309 contents and relocations if conversion is performed.
311 2017-09-14 Nick Clifton <nickc@redhat.com>
314 * peXXigen.c (pe_print_idata): Extend check for HintName vector
317 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
319 * elfxx-x86.h: Fix a typo in comments.
321 2017-09-09 Kamil Rytarowski <n54@gmx.com>
323 * elf32-nds32.c: Rename __BIT() to N32_BIT().
325 2017-09-09 Alan Modra <amodra@gmail.com>
327 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
330 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
332 * elf32-i386.c (elf_i386_relocate_section): Update usage of
333 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
334 (elf_i386_finish_dynamic_symbol): Likewise.
335 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
336 (elf_x86_64_finish_dynamic_symbol): Likewise.
337 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
338 (_bfd_x86_elf_fixup_symbol): Likewise.
340 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
342 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
343 check has_non_got_reloc.
345 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
348 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
349 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
350 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
351 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
352 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
353 and linker_def on __ehdr_start if it is referenced and not
355 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
356 and return TRUE when building executable, if a symbol has
357 non-GOT/non-PLT relocations in text section or there is no
359 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
361 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
363 * elfxx-x86.h: Update comments.
365 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
367 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
368 elf_x86_plt_layout_table with elf_x86_init_table.
369 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
371 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
373 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
374 (elf_x86_init_table): This.
375 (_bfd_x86_elf_link_setup_gnu_properties): Replace
376 elf_x86_plt_layout_table with elf_x86_init_table.
378 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
380 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
381 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
382 * configure: Regenerated.
383 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
384 and r_sym fields of plt_layout.
385 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
387 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
388 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
389 r_info nor r_sym fields.
390 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
392 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
394 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
396 * (_bfd_riscv_relax_align): Call bfd_set_error and
397 print an error message when unable to relax a .align directive.
399 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
401 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
402 (riscv_record_pcrel_hi_reloc): Add absolute argument.
403 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
404 R_RISCV_PCREL_HI20 relocs, and pass the result to
405 riscv_record_pcrel_hi_reloc.
407 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
409 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
410 r_type_p. Remove the converted argument. Replace
411 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
412 the new relocation type via r_type_p.
413 (elf_i386_relocate_section): Likewise.
414 (elf_i386_finish_dynamic_symbol): Likewise.
415 (need_convert_load): Removed.
416 (check_relocs_failed): Updated.
417 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
418 instead of setting need_convert_load.
419 (_bfd_i386_elf_convert_load): Removed.
420 * elf64-x86-64.c (need_convert_load): Removed.
421 (check_relocs_failed): Updated.
422 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
423 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
424 Return the new relocation type via r_type_p.
425 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
426 instead of setting need_convert_load.
427 (elf_x86_64_check_relocs): Don't check PIC if relocation has
429 (_bfd_x86_64_elf_convert_load): Removed.
430 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
431 with SYMBOL_REFERENCES_LOCAL_P.
432 (elf_x86_64_finish_dynamic_symbol): Likewise.
433 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
435 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
436 (_bfd_x86_elf_link_symbol_references_local): New function.
437 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
438 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
439 SYMBOL_REFERENCES_LOCAL_P.
440 (elf_x86_link_hash_entry): Add local_ref.
441 (elf_x86_link_hash_table): Remove convert_load.
442 (_bfd_i386_elf_convert_load): Removed.
443 (_bfd_x86_64_elf_convert_load): Likewise.
444 (_bfd_x86_elf_link_symbol_references_local): New.
446 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
448 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
449 (elf_x86_64_info_to_howto): Get the real relocation type by
450 masking out R_X86_64_converted_reloc_bit.
451 (elf_x86_64_check_tls_transition): Get the real relocation type
452 by masking out R_X86_64_converted_reloc_bit.
453 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
454 instead of setting converted_reloc.
455 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
456 instead of converted_reloc. Get the real relocation type by
457 masking out R_X86_64_converted_reloc_bit.
458 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
459 R_X86_64_converted_reloc_bit is valid.
460 * elfxx-x86.h (converted_reloc): Removed.
462 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
464 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
465 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
466 to get the relocation type again.
467 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
468 r_type when calling elf_x86_64_tls_transition. Don't use
469 ELF32_R_TYPE to get the relocation type again.
471 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
473 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
476 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
478 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
479 argument. Don't check relocation overflow. Avoid relocation
480 overflow if --no-relax is used. Set converted_reloc on symbol
481 if a GOTPCREL relocation is converted.
482 (elf_x86_64_relocate_section): Issue a fatal error and suggest
483 --no-relax if GOTPCREL relocation conversion leads to relocation
485 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
487 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
488 Edmar Wienskoski <edmar.wienskoski@nxp.com
490 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
491 (ppc_elf_check_relocs): Handle it.
492 (ppc_elf_vle_split20): New function.
493 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
495 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
498 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
499 for x86-64 if GOT_TLS_GDESC_P is true.
501 2017-09-03 Alan Modra <amodra@gmail.com>
504 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
506 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
508 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
509 tls_get_addr for x86-64 in one place.
511 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
513 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
514 with elfxx-x86.lo for 64-bit BFD.
515 * configure: Regenerated.
517 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
519 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
520 (_bfd_i386_elf_convert_load): This. Remove static.
521 (elf_i386_size_dynamic_sections): Removed.
522 (elf_backend_size_dynamic_sections): Likewise.
523 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
524 (_bfd_x86_64_elf_convert_load): This. Remove static.
525 (elf_x86_64_size_dynamic_sections): Removed.
526 (elf_backend_size_dynamic_sections): Likewise.
527 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
528 (elf_x86_allocate_dynrelocs): This. Make it static.
529 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
530 (elf_x86_allocate_local_dynreloc): This. Make it static.
531 (elf_i386_is_reloc_section): New function.
532 (elf_x86_64_is_reloc_section): Likewise.
533 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
534 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
535 Rearrange got_entry_size initialization.
536 (_bfd_x86_elf_size_dynamic_sections): New function.
537 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
538 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
539 (_bfd_i386_elf_convert_load): New.
540 (_bfd_x86_64_elf_convert_load): Likewise.
541 (_bfd_x86_elf_size_dynamic_sections): Likewise.
542 (elf_backend_size_dynamic_sections): Likewise.
543 (_bfd_x86_elf_allocate_dynrelocs): Removed.
544 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
546 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
548 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
551 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
553 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
554 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
556 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
558 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
559 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
560 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
561 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
562 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
563 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
565 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
567 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
568 (elf_i386_allocate_local_dynrelocs): Likewise.
569 (elf_i386_size_dynamic_sections): Replace
570 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
571 with _bfd_x86_elf_allocate_dynrelocs and
572 _bfd_x86_elf_allocate_local_dynrelocs.
573 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
574 (elf_x86_64_allocate_local_dynrelocs): Likewise.
575 (elf_x86_64_size_dynamic_sections): Replace
576 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
577 with _bfd_x86_elf_allocate_dynrelocs and
578 _bfd_x86_elf_allocate_local_dynrelocs.
579 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
580 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
581 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
582 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
584 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
586 * elf32-i386.c (is_i386_elf): Removed.
587 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
588 (elf_i386_size_dynamic_sections): Likewise.
589 (elf_i386_relocate_section): Likewise.
590 * elf64-x86-64.c (is_x86_64_elf): Removed.
591 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
593 (elf_x86_64_size_dynamic_sections): Likewise.
594 (elf_x86_64_relocate_section): Likewise.
595 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
597 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
600 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
602 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
603 (elf_i386_allocate_dynrelocs): Replace
604 elf_i386_compute_jump_table_size with
605 elf_x86_compute_jump_table_size.
606 (elf_i386_size_dynamic_sections): Likewise.
607 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
608 (elf_x86_64_allocate_dynrelocs): Replace
609 elf_x86_64_compute_jump_table_size with
610 elf_x86_compute_jump_table_size.
611 (elf_x86_64_size_dynamic_sections): Likewise.
612 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
614 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
615 (elf_x86_compute_jump_table_size): New.
617 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
619 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
621 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
622 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
624 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
626 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
627 with htab->is_vxworks.
628 (elf_i386_size_dynamic_sections): Likewise.
629 (elf_i386_relocate_section): Likewise.
630 (elf_i386_finish_dynamic_symbol): Likewise.
631 (elf_i386_finish_dynamic_sections): Likewise.
633 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
635 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
636 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
637 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
638 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
639 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
640 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
641 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
642 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
644 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
647 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
648 ELF_COMMON_DEF_P for common symbols.
650 2017-09-02 Alan Modra <amodra@gmail.com>
652 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
653 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
654 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
656 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
658 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
659 (elf_backend_gc_mark_hook): Likewise.
660 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
661 (elf_backend_gc_mark_hook): Likewise.
662 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
663 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
664 (elf_backend_gc_mark_hook): Likewise.
666 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
668 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
669 (elf_backend_adjust_dynamic_symbol): Likewise.
670 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
671 (elf_backend_adjust_dynamic_symbol): Likewise.
672 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
673 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
674 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
675 (_bfd_x86_elf_adjust_dynamic_symbol): New.
676 (elf_backend_adjust_dynamic_symbol): Likewise.
678 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
680 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
683 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
685 * elf32-i386.c (elf_i386_mkobject): Removed.
686 (bfd_elf32_mkobject): Likewise.
687 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
688 (bfd_elf64_mkobject): Likewise.
689 (bfd_elf32_mkobject): Likewise.
690 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
691 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
692 (bfd_elf64_mkobject): Likewise.
693 (bfd_elf32_mkobject): Likewise.
695 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
697 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
698 Call _bfd_x86_elf_link_setup_gnu_properties.
699 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
700 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
702 (elf_x86_64_non_lazy_plt): Likewise.
703 (elf_x86_64_lazy_bnd_plt): Likewise.
704 (elf_x86_64_non_lazy_bnd_plt): Likewise.
705 (elf_x86_64_lazy_ibt_plt): Likewise.
706 (elf_x32_lazy_ibt_plt): Likewise.
707 (elf_x86_64_non_lazy_ibt_plt): Likewise.
708 (elf_x32_non_lazy_ibt_plt): Likewise.
709 (elf_x86_64_nacl_plt): Likewise.
710 (elf_x86_64_link_setup_gnu_properties): Updated. Call
711 _bfd_x86_elf_link_setup_gnu_properties.
712 * elfxx-x86.c: Include elf-vxworks.h".
713 (_bfd_x86_elf_link_setup_gnu_properties): New function.
714 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
715 comments for pic_plt0_entry and pic_plt_entry.
716 (elf_x86_non_lazy_plt_layout): Likewise.
717 (elf_x86_plt_layout_table): New.
718 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
720 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
723 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
724 .eh_frame section for the second PLT.
725 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
726 alignment of .eh_frame section for the second PLT.
728 2017-09-01 Nick Clifton <nickc@redhat.com>
731 * dwarf2.c (decode_line_info): Fix test for an overlong line info
734 2017-09-01 Nick Clifton <nickc@redhat.com>
737 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
738 attribute buffer is NUL terminated.
740 2017-08-31 Nick Clifton <nickc@redhat.com>
743 * dwarf2.c (read_section): If necessary add a terminating NUL byte
744 to dwarf string sections.
746 2017-08-31 Alan Modra <amodra@gmail.com>
748 * po/SRC-POTFILES.in: Regenerate.
750 2017-08-31 Alan Modra <amodra@gmail.com>
752 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
753 for a section containing just a terminator. Allow multiple
754 terminators at end of section.
755 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
756 sections when not adding alignment. Assert on terminator in
759 2017-08-31 Alan Modra <amodra@gmail.com>
763 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
766 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
768 * configure.ac (bfd_backends): Add elf64.lo together with
769 elfxx-x86.lo for 64-bit BFD.
770 * configure: Regenerated.
772 2017-08-31 James Bowman <james.bowman@ftdichip.com>
774 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
777 2017-08-31 Alan Modra <amodra@gmail.com>
780 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
781 before _close_and_cleanup. Call iovec->bclose after.
782 (bfd_close): Remove code common to, and call, bfd_close_all_done.
784 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
786 * elf32-i386.c (elf_i386_plt_type): Removed.
787 (elf_i386_plt): Likewise.
788 (elf_i386_get_synthetic_symtab): Updated. Call
789 _bfd_x86_elf_get_synthetic_symtab.
790 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
791 (elf_x86_64_plt): Likewise.
792 (elf_x86_64_get_synthetic_symtab): Updated. Call
793 _bfd_x86_elf_get_synthetic_symtab.
794 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
795 (elf_x86_64_get_plt_got_vma): Likewise.
796 (elf_i386_valid_plt_reloc_p): Likewise.
797 (elf_x86_64_valid_plt_reloc_p): Likewise.
798 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
799 * elfxx-x86.h (elf_x86_plt_type): New.
800 (elf_x86_plt): Likewise.
801 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
803 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
805 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
806 target_id instead of elf_machine_code.
808 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
810 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
811 (elf_i386_lazy_plt_layout): Likewise.
812 (elf_i386_non_lazy_plt_layout): Likewise.
813 (elf_i386_plt_layout): Likewise.
814 (elf_i386_link_hash_table): Likewise.
815 (elf_i386_next_tls_desc_index): Likewise.
816 (elf_i386_srelplt2): Likewise.
817 (elf_i386_plt): Likewise.
818 (elf_i386_lazy_plt): Likewise.
819 (elf_i386_non_lazy_plt): Likewise.
820 (elf_i386_link_hash_table_create): Likewise.
821 (bfd_elf32_bfd_link_hash_table_create): Likewise.
822 (elf_i386_lazy_plt): Updated.
823 (elf_i386_non_lazy_plt): Likewise.
824 (elf_i386_lazy_ibt_plt): Likewise.
825 (elf_i386_non_lazy_ibt_plt): Likewise.
826 (elf_i386_allocate_dynrelocs): Likewise.
827 (elf_i386_size_dynamic_sections): Likewise.
828 (elf_i386_relocate_section): Likewise.
829 (elf_i386_finish_dynamic_symbol): Likewise.
830 (elf_i386_finish_dynamic_sections): Likewise.
831 (elf_i386_get_synthetic_symtab): Likewise.
832 (elf_i386_link_setup_gnu_properties): Likewise.
833 (elf_i386_nacl_plt): Likewise.
834 * elf64-x86-64.c (ABI_64_P): Removed.
835 (ELF64_DYNAMIC_INTERPRETER): Likewise.
836 (ELF32_DYNAMIC_INTERPRETER): Likewise.
837 (elf_x86_64_lazy_plt_layout): Likewise.
838 (elf_x86_64_non_lazy_plt_layout): Likewise.
839 (elf_x86_64_plt_layout): Likewise.
840 (elf_x86_64_link_hash_table): Likewise.
841 (elf_x86_64_plt): Likewise.
842 (elf_x86_64_lazy_plt): Likewise.
843 (elf_x86_64_non_lazy_plt): Likewise.
844 (elf_x86_64_link_hash_table_create): Likewise.
845 (bfd_elf64_bfd_link_hash_table_create): Likewise.
846 (bfd_elf32_bfd_link_hash_table_create): Likewise.
847 (elf_x86_64_lazy_plt): Updated.
848 (elf_x86_64_non_lazy_plt): Likewise.
849 (elf_x86_64_lazy_bnd_plt): Likewise.
850 (elf_x86_64_non_lazy_bnd_plt): Likewise.
851 (elf_x86_64_lazy_ibt_plt): Likewise.
852 (elf_x32_lazy_ibt_plt): Likewise.
853 (elf_x86_64_non_lazy_ibt_plt): Likewise.
854 (elf_x32_non_lazy_ibt_plt): Likewise.
855 (elf_x86_64_allocate_dynrelocs): Likewise.
856 (elf_x86_64_size_dynamic_sections): Likewise.
857 (elf_x86_64_relocate_section): Likewise.
858 (elf_x86_64_finish_dynamic_symbol): Likewise.
859 (elf_x86_64_finish_dynamic_sections): Likewise.
860 (elf_x86_64_get_synthetic_symtab): Likewise.
861 (elf_x86_64_link_setup_gnu_properties): Likewise.
862 (elf_x86_64_nacl_plt): Likewise.
863 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
865 (ELF32_DYNAMIC_INTERPRETER): New.
866 (ELF64_DYNAMIC_INTERPRETER): Likewise.
867 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
868 (_bfd_x86_elf_link_hash_table_create): Likewise.
869 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
870 (elf_x86_link_hash_table_free): This. Make it static.
871 * elfxx-x86.h: Don't include "objalloc.h".
873 (elf_x86_lazy_plt_layout): Likewise.
874 (elf_x86_non_lazy_plt_layout): Likewise.
875 (elf_x86_plt_layout): Likewise.
876 (_bfd_x86_elf_link_hash_table_create): Likewise.
877 (bfd_elf64_bfd_link_hash_table_create): Likewise.
878 (bfd_elf32_bfd_link_hash_table_create): Likewise.
879 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
880 srelplt2 and next_tls_desc_index.
881 (_bfd_x86_elf_link_hash_table_free): Removed.
883 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
885 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
886 branch offset interpretation.
888 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
891 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
893 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
895 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
896 (elf_x86_64_srelplt2): Likewise.
898 2017-08-30 Alan Modra <amodra@gmail.com>
900 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
901 (ppc64_elf_tls_optimize): Set it.
902 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
903 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
904 addis would add zero.
905 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
906 (ppc_elf_tls_optimize): Set it.
907 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
908 insn on TPREL16_LO relocs to use r2 when addis would add zero.
910 2017-08-30 Alan Modra <amodra@gmail.com>
912 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
913 __tls_get_addr call sequences to LE, don't move the addi down
914 to the nop. Replace the bl with addi and leave the nop alone.
916 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
918 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
920 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
922 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
924 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
926 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
927 (BFD64_BACKENDS): Likewise.
928 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
929 (BFD64_BACKENDS_CFILES): Likewise.
930 * Makefile.in: Regenerated.
931 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
932 elf32-i386.lo and elf64-x86-64.lo.
933 * configure: Regenerated.
934 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
935 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
936 "objalloc.h" and "hashtab.h".
937 (ELIMINATE_COPY_RELOCS): Removed.
938 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
939 (SYMBOL_NO_COPYRELOC): Likewise.
940 (elf_i386_link_hash_entry): Likewise.
941 (GOT_UNKNOWN): Likewise.
942 (GOT_NORMAL): Likewise.
943 (GOT_TLS_GD): Likewise.
944 (elf_i386_hash_entry): Likewise.
945 (elf_i386_obj_tdata): Likewise.
946 (elf_i386_tdata): Likewise.
947 (elf_i386_local_got_tls_type): Likewise.
948 (elf_i386_local_tlsdesc_gotent): Likewise.
949 (elf_i386_hash_table): Likewise.
950 (elf_i386_link_hash_newfunc): Likewise.
951 (elf_i386_local_htab_hash): Likewise.
952 (elf_i386_local_htab_eq): Likewise.
953 (elf_i386_get_local_sym_hash): Likewise.
954 (elf_i386_link_hash_table_free): Likewise.
955 (elf_i386_copy_indirect_symbol): Likewise.
956 (elf_i386_fixup_symbol): Likewise.
957 (elf_i386_readonly_dynrelocs): Likewise.
958 (elf_i386_always_size_sections): Likewise.
959 (elf_i386_set_tls_module_base): Likewise.
960 (elf_i386_dtpoff_base): Likewise.
961 (compare_relocs): Likewise.
962 (elf_i386_hash_symbol): Likewise.
963 (elf_i386_parse_gnu_properties): Likewise.
964 (elf_i386_merge_gnu_properties): Likewise.
965 (elf_i386_link_check_relocs): Likewise.
966 (elf_i386_merge_symbol_attribute): Likewise.
967 (bfd_elf32_bfd_link_check_relocs): Likewise.
968 (elf_backend_copy_indirect_symbol): Likewise.
969 (elf_backend_always_size_sections): Likewise.
970 (elf_backend_omit_section_dynsym): Likewise.
971 (elf_backend_hash_symbol): Likewise.
972 (elf_backend_fixup_symbol): Likewise.
973 (elf_backend_parse_gnu_properties): Likewise.
974 (elf_backend_merge_gnu_properties): Likewise.
975 (elf_backend_merge_symbol_attribute): Likewise.
976 (elf_i386_mkobject): Updated.
977 (elf_i386_link_hash_table_create): Likewise.
978 (elf_i386_check_tls_transition): Likewise.
979 (elf_i386_tls_transition): Likewise.
980 (elf_i386_convert_load_reloc): Likewise.
981 (elf_i386_check_relocs): Likewise.
982 (elf_i386_adjust_dynamic_symbol): Likewise.
983 (elf_i386_allocate_dynrelocs): Likewise.
984 (elf_i386_convert_load): Likewise.
985 (elf_i386_size_dynamic_sections): Likewise.
986 (elf_i386_relocate_section): Likewise.
987 (elf_i386_finish_dynamic_symbol ): Likewise.
988 (elf_i386_finish_dynamic_sections): Likewise.
989 (elf_i386_output_arch_local_syms): Likewise.
990 (elf_i386_get_synthetic_symtab): Likewise.
991 (elf_i386_link_setup_gnu_properties): Likewise.
992 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
993 of elf_link_hash_table, as base.
994 (elf_i386_next_tls_desc_index): New.
995 (elf_i386_srelplt2): Likewise.
996 (elf_i386_plt): Likewise.
997 (elf_i386_lazy_plt): Likewise.
998 (elf_i386_non_lazy_plt): Likewise.
999 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1000 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1001 "objalloc.h" and "hashtab.h".
1002 (ELIMINATE_COPY_RELOCS): Removed.
1003 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1004 (SYMBOL_NO_COPYRELOC): Likewise.
1005 (elf_x86_64_link_hash_entry): Likewise.
1006 (GOT_UNKNOWN): Likewise.
1007 (GOT_NORMAL): Likewise.
1008 (GOT_TLS_GD): Likewise.
1009 (elf_x86_64_hash_entry): Likewise.
1010 (elf_x86_64_obj_tdata): Likewise.
1011 (elf_x86_64_tdata): Likewise.
1012 (elf_x86_64_local_got_tls_type): Likewise.
1013 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1014 (elf_x86_64_hash_table): Likewise.
1015 (elf_x86_64_link_hash_newfunc): Likewise.
1016 (elf_x86_64_local_htab_hash): Likewise.
1017 (elf_x86_64_local_htab_eq): Likewise.
1018 (elf_x86_64_get_local_sym_hash): Likewise.
1019 (elf_x86_64_link_hash_table_free): Likewise.
1020 (elf_x86_64_copy_indirect_symbol): Likewise.
1021 (elf_x86_64_fixup_symbol): Likewise.
1022 (elf_x86_64_readonly_dynrelocs): Likewise.
1023 (elf_x86_64_always_size_sections): Likewise.
1024 (elf_x86_64_set_tls_module_base): Likewise.
1025 (elf_x86_64_dtpoff_base): Likewise.
1026 (compare_relocs): Likewise.
1027 (elf_x86_64_merge_symbol_attribute): Likewise.
1028 (elf_x86_64_hash_symbol): Likewise.
1029 (elf_x86_64_parse_gnu_properties): Likewise.
1030 (elf_x86_64_merge_gnu_properties): Likewise.
1031 (elf_x86_64_link_check_relocs): Likewise.
1032 (elf_backend_copy_indirect_symbol): Likewise.
1033 (elf_backend_always_size_sections): Likewise.
1034 (bfd_elf64_bfd_link_check_relocs): Likewise.
1035 (elf_backend_merge_symbol_attribute): Likewise.
1036 (elf_backend_hash_symbol): Likewise.
1037 (elf_backend_omit_section_dynsym): Likewise.
1038 (elf_backend_fixup_symbol): Likewise.
1039 (elf_backend_parse_gnu_properties): Likewise.
1040 (elf_backend_merge_gnu_properties): Likewise.
1041 (bfd_elf32_bfd_link_check_relocs): Likewise.
1042 (elf_x86_64_mkobject): Updated.
1043 (elf_x86_64_link_hash_table_create): Likewise.
1044 (elf_x86_64_check_tls_transition): Likewise.
1045 (elf_x86_64_tls_transition): Likewise.
1046 (elf_x86_64_convert_load_reloc): Likewise.
1047 (elf_x86_64_check_relocs): Likewise.
1048 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1049 (elf_x86_64_allocate_dynrelocs): Likewise.
1050 (elf_x86_64_convert_load): Likewise.
1051 (elf_x86_64_size_dynamic_sections): Likewise.
1052 (elf_x86_64_relocate_section): Likewise.
1053 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1054 (elf_x86_64_finish_dynamic_sections): Likewise.
1055 (elf_x86_64_output_arch_local_syms): Likewise.
1056 (elf_x86_64_get_synthetic_symtab): Likewise.
1057 (elf_x86_64_link_setup_gnu_properties): Likewise.
1058 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1059 instead of elf_link_hash_table, as base.
1060 (elf_x86_64_next_tls_desc_index): New.
1061 (elf_x86_64_srelplt2): Likewise.
1062 (elf_x86_64_plt): Likewise.
1063 (elf_x86_64_lazy_plt): Likewise.
1064 (elf_x86_64_non_lazy_plt): Likewise.
1065 * elfxx-x86.c: New file.
1066 * elfxx-x86.h: Likewise.
1068 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1070 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1072 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1074 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1076 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1077 sections before checking dynamic relocations and free invalid
1078 PLT section contents.
1079 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1081 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1083 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1084 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1086 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1089 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1091 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1093 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1095 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1097 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1099 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1102 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1103 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1104 Add a has_no_copy_on_protected bitfield.
1105 (elf_has_no_copy_on_protected): New.
1106 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1107 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1108 (elf_merge_gnu_property_list): Likewise.
1109 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1110 to FALSE for elf_has_no_copy_on_protected.
1111 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1112 (elf_i386_link_hash_entry): Add def_protected.
1113 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1114 when checking info->nocopyreloc.
1115 (elf_i386_link_setup_gnu_properties): Don't set
1116 extern_protected_data here.
1117 (elf_i386_merge_symbol_attribute): New function.
1118 (elf_backend_merge_symbol_attribute): New.
1119 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1120 (elf_x86_64_link_hash_entry): Add def_protected.
1121 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1122 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1123 when checking info->nocopyreloc.
1124 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1125 relocation run-time overflow and unresolvable R_X86_64_32S
1126 relocation against protected data symbol defined in shared object
1127 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1128 (elf_x86_64_link_setup_gnu_properties): Don't set
1129 extern_protected_data here.
1130 (elf_x86_64_merge_symbol_attribute): New function.
1131 (elf_backend_merge_symbol_attribute): New.
1133 2017-08-26 Alan Modra <amodra@gmail.com>
1135 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1136 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1137 (ppc_elf_relocate_section): Comment fix.
1138 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1139 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1140 Support dynamic relocs for TPREL16 when non-pic too.
1141 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1142 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1145 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1147 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1148 "symbol" in comments.
1149 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1151 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1154 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1155 R_X86_64_PC32 relocation run-time overflow and unresolvable
1156 R_X86_64_32S relocation with -z nocopyreloc.
1158 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1160 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1161 Undefined symbols may not have a type.
1162 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1164 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1166 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1167 bfd_link_info. Report shared, PIE or PDE object based on
1169 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1170 (elf_x86_64_relocate_section): Likewise.
1172 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1174 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1175 for function symbols.
1176 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1178 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1180 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1181 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1182 is set on any input relocatable file.
1183 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1185 2017-08-23 Alan Modra <amodra@gmail.com>
1188 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1189 ensure_undefweak_dynamic. Handle undefined too.
1190 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1191 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1192 (allocate_dynrelocs): Discard undefined non-default visibility
1193 relocs first. Make undefined syms dynamic. Tidy goto.
1195 2017-08-21 Alan Modra <amodra@gmail.com>
1196 H.J. Lu <hongjiu.lu@intel.com>
1199 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1200 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1202 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1205 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1206 undefined weak symbols.
1208 2017-08-18 Nick Clifton <nickc@redhat.com>
1211 * tekhex.c (getsym): Fix check for source pointer walking off the
1212 end of the input buffer.
1214 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1217 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1218 relocations in debug sections, change abort to _bfd_error_handler.
1220 2017-08-14 Nick Clifton <nickc@redhat.com>
1223 * elf.c (setup_group): Check for an empty or very small group
1225 * po/bfd.pot: Regenerate.
1227 2017-08-14 Alan Modra <amodra@gmail.com>
1230 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1231 alignment padding here.
1232 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1233 in a reverse pass over sections.
1235 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1238 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1239 for @plt suffixes first.
1240 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1242 2017-08-08 Nick Clifton <nickc@redhat.com>
1245 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1246 small section lengths.
1247 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1249 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1250 there is enough data present in the note.
1252 2017-08-08 Alan Modra <amodra@gmail.com>
1255 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1256 got.refcount for GOTOFF relocs, just create .got section.
1258 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1260 * elflink.c (elf_link_add_object_symbols): Move common symbol
1261 check after bed->common_definition.
1263 2017-08-07 Alan Modra <amodra@gmail.com>
1266 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1267 needed to define various dynamic tags have been discarded.
1269 2017-08-07 Nick Clifton <nickc@redhat.com>
1272 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1273 has not been set then use the bfd returned by
1274 _bfd_elf_link_setup_gnu_properties. If that is null then search
1275 through all the input bfds selecting the first normal, ELF format
1277 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1279 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1281 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1283 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1284 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1285 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1286 (elf_i386_link_check_relocs): New function.
1287 (bfd_elf32_bfd_link_check_relocs): New.
1288 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1290 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1291 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1292 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1293 (elf_x86_64_link_check_relocs): New function.
1294 (bfd_elf64_bfd_link_check_relocs): New.
1295 (bfd_elf32_bfd_link_check_relocs): Likewise.
1297 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1300 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1301 as undefined for --no-define-common.
1303 2017-08-05 Alan Modra <amodra@gmail.com>
1305 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1306 hppa_link_hash_table.
1308 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1310 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1311 entries for sysregs with negative indices.
1313 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1315 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1316 isn't the S/390 specific elf data.
1317 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1319 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1321 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1322 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1323 [R_RISCV_ADD16]: Likewise.
1324 [R_RISCV_ADD32]: Likewise.
1325 [R_RISCV_ADD64]: Likewise.
1326 [R_RISCV_SUB6]: Likewise.
1327 [R_RISCV_SUB8]: Likewise.
1328 [R_RISCV_SUB16]: Likewise.
1329 [R_RISCV_SUB32]: Likewise.
1330 [R_RISCV_SUB64]: Likewise.
1332 2017-07-31 Alan Modra <amodra@gmail.com>
1334 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1335 without ld.so checks.
1337 2017-07-29 Alan Modra <amodra@gmail.com>
1340 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1341 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1342 (is_elfv2_localentry0): Test non_zero_localentry.
1343 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1345 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1347 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1348 pointer check for htab->elf.irelplt.
1349 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1351 2017-07-27 Nick Clifton <nickc@redhat.com>
1354 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1356 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1358 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1360 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1362 (evax_bfd_print_emh): Check for invalid string lengths.
1364 2017-07-25 Nick Clifton <nickc@redhat.com>
1366 * po/fr.po: Updated French translation.
1368 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1371 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1372 16-bit absolute branches into 10-bit pc-relative branches on the
1373 MSP430 as well as the MSP430X.
1375 2017-07-25 Alan Modra <amodra@gmail.com>
1377 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1378 (stub_eh_frame_size): New function.
1379 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1380 (group_sections): Init group tls_get_addr_opt_bctrl.
1381 (ppc64_elf_size_stubs): Update sizing and initialization of
1382 .eh_frame. Iteration over stubs via group list.
1383 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1384 (ppc64_elf_finish_dynamic_sections): Update finalization of
1387 2017-07-24 Nick Clifton <nickc@redhat.com>
1390 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1391 of the relocs to the canonicalize_one_reloc routine.
1392 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1393 for the _bfd_mach_o_canonicalize_one_reloc field.
1394 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1395 res_base parameter. Use to check for corrupt pair relocs.
1396 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1398 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1400 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1403 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1404 enough data in the record before attempting to parse it.
1405 (_bfd_vms_slurp_eeom): Likewise.
1407 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1408 (image_set_ptr): Likewise.
1409 (alpha_vms_slurp_relocs): Likewise.
1411 (alpha_vms_object_p): Check for a truncated record.
1413 2017-07-24 Nick Clifton <nickc@redhat.com>
1416 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1417 an unrecognized reloc and sets the bfd_error value.
1418 * libbfd.h: Regenerate.
1419 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1421 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1422 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1423 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1424 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1425 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1427 2017-07-23 Alan Modra <amodra@gmail.com>
1429 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1432 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1435 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1436 reloc_class_ifunc for ifunc symbols.
1438 2017-07-19 Nick Clifton <nickc@redhat.com>
1441 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1442 correct magic bytes at the start, set the error to wrong format
1443 and clear the format selector before returning NULL.
1445 2017-07-19 Nick Clifton <nickc@redhat.com>
1448 * coff-rs6000.c (_bfd_strntol): New function.
1449 (_bfd_strntoll): New function.
1450 (GET_VALUE_IN_FIELD): New macro.
1451 (EQ_VALUE_IN_FIELD): new macro.
1452 (_bfd_xcoff_slurp_armap): Use new macros.
1453 (_bfd_xcoff_archive_p): Likewise.
1454 (_bfd_xcoff_read_ar_hdr): Likewise.
1455 (_bfd_xcoff_openr_next_archived_file): Likewise.
1456 (_bfd_xcoff_stat_arch_elt): Likewise.
1457 * coff64-rs6000.c (_bfd_strntol): New function.
1458 (_bfd_strntoll): New function.
1459 (GET_VALUE_IN_FIELD): New macro.
1460 (xcoff64_slurp_armap): Use new macros.
1462 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1463 John Eric Martin <John.Martin@emmicro-us.com>
1465 * bfd-in2.h: Regenerate.
1466 * libbfd.h: Regenerate.
1467 * elf32-arc.c (JLI): Define.
1468 * reloc.c: Add JLI relocations.
1470 2017-07-18 Nick Clifton <nickc@redhat.com>
1473 * coff-sh.c: Fix spelling typos.
1474 * compress.c: Likewise.
1475 * cpu-pdp11.c: Likewise.
1476 * ecofflink.c: Likewise.
1477 * elf-m10300.c: Likewise.
1479 * elf32-arm.c: Likewise.
1480 * elf32-m68k.c: Likewise.
1481 * elf32-nds32.c: Likewise.
1482 * elf32-ppc.c: Likewise.
1483 * elf32-sh.c: Likewise.
1484 * elf32-v850.c: Likewise.
1485 * elf64-ppc.c: Likewise.
1486 * elf64-x86-64.c: Likewise.
1487 * elflink.c: Likewise.
1488 * elfnn-aarch64.c: Likewise.
1489 * elfxx-mips.c: Likewise.
1491 * sunos.c: Likewise.
1492 * vms-alpha.c: Likewise.
1493 * xcofflink.c: Likewise.
1495 2017-07-18 Nick Clifton <nickc@redhat.com>
1498 * coffcode.h (handle_COMDAT): Replace abort with an error message
1501 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1504 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1507 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1509 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1511 2017-07-16 Alan Modra <amodra@gmail.com>
1513 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1514 __tls_index GOT entries when using __tls_get_addr_opt stub.
1515 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1517 2017-07-12 Alan Modra <amodra@gmail.com>
1519 * po/es.po: Update from translationproject.org/latest/bfd/.
1520 * po/fi.po: Likewise.
1521 * po/fr.po: Likewise.
1522 * po/id.po: Likewise.
1523 * po/ja.po: Likewise.
1524 * po/ro.po: Likewise.
1525 * po/ru.po: Likewise.
1526 * po/sr.po: Likewise.
1527 * po/sv.po: Likewise.
1528 * po/tr.po: Likewise.
1529 * po/uk.po: Likewise.
1530 * po/vi.po: Likewise.
1531 * po/zh_CN.po: Likewise.
1532 * po/hr.po: New file from translationproject.org.
1533 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1534 * configure: Regenerate.
1536 2017-07-12 Nick Clifton <nickc@redhat.com>
1538 Fix compile time warnings using gcc 7.1.1.
1539 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1541 (elf_xtensa_get_gotplt_section): Increase length of got_name
1543 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1544 default return of FALSE.
1545 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1546 default return of FALSE.
1548 2017-07-12 Alan Modra <amodra@gmail.com>
1550 * binary.c (binary_set_section_contents): Don't print filepos in
1552 (coff_write_object_contents): Cast size_t for error message.
1553 (coff_slurp_line_table): Don't use bfd_vma symndx.
1554 (coff_slurp_reloc_table): Remove unneeded cast.
1555 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1557 (find_abstract_instance_name): Likewise.
1558 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1559 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1560 (elf32_arm_check_relocs): Make r_symndx an int.
1561 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1563 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1565 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1567 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1568 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1569 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1570 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1571 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1572 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1573 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1574 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1575 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1576 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1577 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1578 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1579 and use %lu for error message.
1580 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1581 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1584 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1586 (elf32_arm_final_link_relocate): Likewise.
1587 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1588 * coffcode.h (styp_to_sec_flags): Likewise.
1589 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1590 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1591 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1592 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1593 (elf32_bfin_merge_private_bfd_data): Likewise.
1594 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1595 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1596 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1597 (i370_elf_relocate_section): Likewise.
1598 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1599 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1600 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1601 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1602 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1603 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1604 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1605 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1606 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1607 * ieee.c (ieee_write_id, read_id): Likewise.
1608 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1609 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1610 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1611 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1612 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1613 * stabs.c (_bfd_link_section_stabs): Likewise.
1615 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1617 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1618 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1619 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1620 * coff-sh.c (sh_relax_section): Likewise.
1621 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1622 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1623 * coffcode.h (coff_slurp_reloc_table): Likewise.
1624 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1625 (_bfd_coff_read_string_table): Likewise.
1626 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1627 * compress.c (bfd_get_full_section_contents): Likewise.
1628 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1629 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1630 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1631 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1632 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1633 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1634 (elf32_arm_write_section): Likewise.
1635 * elf32-bfin.c (bfin_relocate_section): Likewise.
1636 (bfinfdpic_relocate_section): Likewise.
1637 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1638 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1639 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1640 (elf_i386_relocate_section): Likewise.
1641 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1642 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1643 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1644 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1645 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1646 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1647 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1648 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1649 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1650 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1651 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1652 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1653 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1654 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1655 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1656 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1657 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1658 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1659 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1660 * elf32-sh.c (sh_elf_relax_section): Likewise.
1661 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1662 (sh_elf_relocate_section): Likewise.
1663 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1664 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1665 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1666 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1667 * elf32-v850.c (v850_elf_relax_section): Likewise.
1668 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1669 (elf_vax_relocate_section): Likewise.
1670 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1671 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1672 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1673 (do_fix_for_relocatable_link): Likewise.
1674 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1675 (elf64_alpha_relax_with_lituse): Likewise.
1676 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1677 (elf_hppa_final_link_relocate): Likewise.
1678 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1679 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1680 (elf64_vms_link_add_object_symbols): Likewise.
1681 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1682 (mmix_final_link_relocate): Likewise.
1683 * elf64-s390.c (invalid_tls_insn): Likewise.
1684 (elf_s390_relocate_section): Likewise.
1685 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1686 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1687 (elf_x86_64_relocate_section): Likewise.
1688 * elfcode.h (elf_slurp_symbol_table): Likewise.
1689 * elfcore.h (elf_core_file_p): Likewise.
1690 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1691 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1692 (elfNN_aarch64_relocate_section): Likewise.
1693 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1694 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1695 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1696 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1697 (_bfd_mips_elf_relocate_section): Likewise.
1698 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1699 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1700 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1701 * ieee.c (ieee_slurp_external_symbols): Likewise.
1702 * ihex.c (ihex_write_object_content): Likewise.
1703 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1704 * merge.c (_bfd_merged_section_offset): Likewise.
1705 * mmo.c (mmo_write_loc_chunk): Likewise.
1706 (mmo_write_object_contents): Likewise.
1707 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1708 * stabs.c (_bfd_link_section_stabs): Likewise.
1709 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1711 2017-07-11 Alan Modra <amodra@gmail.com>
1713 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1715 2017-07-11 Alan Modra <amodra@gmail.com>
1717 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1718 instruction" error using _bfd_error_handler, not einfo.
1720 2017-07-10 Nick Clifton <nickc@redhat.com>
1722 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1723 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1725 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1727 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1729 2017-07-07 Alan Modra <amodra@gmail.com>
1731 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1733 2017-07-07 Alan Modra <amodra@gmail.com>
1735 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1736 as long long. Move code replacing "ll" with "I64", and simplify.
1738 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1740 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1743 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1745 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1747 (line_info_add_file_name): Likewise.
1748 (decode_line_info): Likewise.
1750 2017-07-04 Tristan Gingold <gingold@adacore.com>
1752 * version.m4: Bump version to 2.29.51
1753 * configure: Regenerate.
1755 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1757 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1758 sanity check at the head of this function.
1760 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1762 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1763 dwarf_line_str_size.
1764 (struct attr_abbrev): Add field implicit_const.
1765 (dwarf_debug_sections): Add .debug_line_str.
1766 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1767 (dwarf_debug_section_assert): Add static assertion.
1768 (read_indirect_line_string): New.
1769 (read_abbrevs): Support DW_FORM_implicit_const.
1770 (is_str_attr): Support DW_FORM_line_strp.
1771 (read_attribute_value): Support DW_FORM_line_strp and
1772 DW_FORM_implicit_const.
1773 (read_attribute): Support DW_FORM_implicit_const.
1774 (line_info_add_include_dir, line_info_add_include_dir_stub):
1775 (line_info_add_file_name, read_formatted_entries): New.
1776 (decode_line_info, parse_comp_unit): Support DWARF 5.
1777 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1779 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1781 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1782 abort statement that was put for symbols that are not dynamic.
1784 2017-07-03 Tristan Gingold <gingold@adacore.com>
1786 * po/bfd.pot: Regenerate
1788 2017-07-03 Alan Modra <amodra@gmail.com>
1790 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1791 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1792 * elf.c (setup_group): Use "Lx" to print sh_size.
1793 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1794 unknown section type in hex.
1795 (copy_special_section_fields): Style fix.
1796 (bfd_section_from_shdr): Correct format for sh_link. Use a
1797 common error message for all the variants of unrecognized
1799 (assign_file_positions_for_load_sections): Use "Lx" for lma
1800 adjust error message.
1801 (assign_file_positions_for_non_load_sections): Formatting.
1802 (rewrite_elf_program_header): Formatting. Use "Lx" for
1803 bfd_vma values in error messages.
1804 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1805 ELF_R_SYM value to type expected by format.
1806 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1808 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1809 (elf_link_input_bfd): Use "Lx" for r_info.
1810 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1812 2017-07-03 Alan Modra <amodra@gmail.com>
1814 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1815 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1816 Microsoft C library variant of long long format specifier.
1817 (PRINT20): Cast value to bfd_uint64_t not long long.
1818 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1819 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1820 long long. Don't cast to bfd_vma.
1821 * elf32-score.c (score3_bfd_getl48): Likewise.
1822 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1824 2017-07-03 Alan Modra <amodra@gmail.com>
1826 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1828 (bfd_elf_print_symbol): Don't cast symbol->flags.
1829 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1830 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1831 _bfd_error_handler argument order.
1832 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1834 2017-07-03 Alan Modra <amodra@gmail.com>
1836 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1837 AC_TYPE_LONG_DOUBLE.
1838 * configure: Regenerate.
1839 * config.in: Regenerate.
1841 2017-06-29 Andrew Waterman <andrew@sifive.com>
1843 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1846 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1848 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1849 unless it is undefined weak.
1850 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1851 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1853 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1854 is not dynamic in PIC, abort.
1856 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1859 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1860 undefined weak symbols into dynamic.
1861 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1862 relocation for non-dynamic symbols.
1863 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1865 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1867 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1868 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1869 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1870 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1871 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1874 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1876 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1877 (elfcore_write_s390_gs_bc): Likewise.
1878 * elf.c (elfcore_grok_s390_gs_cb): New function.
1879 (elfcore_grok_s390_gs_bc): New function.
1880 (elfcore_grok_note): Call them.
1881 (elfcore_write_s390_gs_cb): New function.
1882 (elfcore_write_s390_gs_bc): New function.
1883 (elfcore_write_register_note): Call them.
1885 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1887 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1888 bfd_get_file_size. Check archive element size.
1889 (_bfd_generic_get_section_contents_in_window): Likewise.
1891 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1893 * bfd-in2.h: Regenerated.
1894 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1895 (bfd_get_file_size): Likewise.
1897 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1898 Matthew Fortune <matthew.fortune@imgtec.com>
1900 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1901 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1902 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1903 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1905 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1906 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1907 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1908 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1909 `bfd_mach_mips_interaptiv_mr2' entries.
1910 * bfd-in2.h: Regenerate.
1912 2017-06-27 Nick Clifton <nickc@redhat.com>
1914 * tekhex.c (pass_over): Revert accidental conversion of a local
1915 array to a static array.
1917 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1920 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1921 reloc addend if necessary. Adjust diff only if
1922 shrinked_insn_address < end_address.
1924 2017-06-27 Alan Modra <amodra@gmail.com>
1927 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1928 (_bfd_generic_get_section_contents_in_window): Likewise.
1930 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1932 * elfnn-riscv.c (perform_relocation): Support the new
1933 R_RISCV_32_PCREL relocation.
1934 (riscv_elf_relocate_section): Likewise.
1935 * elfxx-riscv.c (howto_table): Likewise.
1936 (riscv_reloc_map): Likewise.
1937 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1938 * libbfd.h: Regenerate.
1940 2017-06-27 Alan Modra <amodra@gmail.com>
1943 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1944 Use unsigned file pointer type, and remove cast.
1945 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1946 Add "count", not "sz".
1948 2017-06-26 Pedro Alves <palves@redhat.com>
1951 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1954 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1957 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1960 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1962 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1963 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1964 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1965 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1966 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1968 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1971 * compress.c (bfd_get_full_section_contents): Don't check the
1973 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1974 reject a section whose size + offset is greater than the size
1976 (_bfd_generic_get_section_contents_in_window): Likewise.
1978 2017-06-26 Nick Clifton <nickc@redhat.com>
1981 * tekhex.c (getvalue): Check for the source pointer exceeding the
1982 end pointer before the first byte is read.
1984 2017-06-26 Nick Clifton <nickc@redhat.com>
1987 * opncls.c (get_build_id): Check that the section is big enough
1988 to contain the whole note.
1989 * compress.c (bfd_get_full_section_contents): Check for and reject
1990 a section whose size is greater than the size of the entire file.
1991 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1992 contain a notes section.
1994 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1996 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1998 (elf_s390_modify_segment_map): Likewise.
1999 (bfd_elf_s390_set_options): Lisewise.
2001 2017-06-26 Alan Modra <amodra@gmail.com>
2003 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2005 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2006 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2007 .preinit_array on --just-syms bfds.
2008 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2009 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2010 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2012 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2014 * elf.c (find_link): Bounds check "hint".
2016 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2018 * elf32-arm.c (using_thumb_only): Update list of architectures in
2019 BFD_ASSERT for which the logic is valid.
2020 (using_thumb2_bl): Likewise.
2021 (using_thumb2): Likewise and return true for ARMv8-R.
2022 (arch_has_arm_nop): Likewise.
2023 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2024 merging logic. Update commentis for value 15 of v8m_baseline,
2025 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2026 merging of value 15 of Tag_CPU_arch.
2028 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2030 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2031 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2032 * bfd-in2.h: Regenerate.
2034 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2036 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2037 the error_alignment label forward. Properly align program
2038 property note section.
2040 2017-06-22 Eric Christopher <echristo@gmail.com>
2042 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2043 abs to fix a truncation warning.
2045 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2047 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2048 local undefined weak symbol to 0.
2049 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2051 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2053 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2054 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2055 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2056 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2057 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2058 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2059 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2060 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2062 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2064 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2065 (elf_i386_lazy_ibt_plt_entry): Likewise.
2066 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2067 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2068 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2069 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2070 (elf_i386_lazy_plt_layout): Likewise.
2071 (elf_i386_non_lazy_plt_layout): Likewise.
2072 (elf_i386_link_hash_entry): Add plt_second.
2073 (elf_i386_link_hash_table): Add plt_second and
2074 plt_second_eh_frame.
2075 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2076 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2077 the second PLT. Check the second PLT.
2078 (elf_i386_relocate_section): Use the second PLT to resolve
2079 PLT reference if needed.
2080 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2082 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2083 second PLT. Generate unwind info for the second PLT.
2084 (elf_i386_plt_type): Add plt_second.
2085 (elf_i386_get_synthetic_symtab): Support the second PLT.
2086 (elf_i386_parse_gnu_properties): Support
2087 GNU_PROPERTY_X86_FEATURE_1_AND.
2088 (elf_i386_merge_gnu_properties): Support
2089 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2090 on GNU_PROPERTY_X86_FEATURE_1_IBT
2091 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2092 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2093 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2094 is set on all relocatable inputs.
2095 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2096 (elf_x32_lazy_ibt_plt_entry): Likewise.
2097 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2098 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2099 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2100 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2101 (elf_x86_64_lazy_ibt_plt): Likewise.
2102 (elf_x32_lazy_ibt_plt): Likewise.
2103 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2104 (elf_x32_non_lazy_ibt_plt): Likewise.
2105 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2106 (elf_x86_64_parse_gnu_properties): Support
2107 GNU_PROPERTY_X86_FEATURE_1_AND.
2108 (elf_x86_64_merge_gnu_properties): Support
2109 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2110 on GNU_PROPERTY_X86_FEATURE_1_IBT
2111 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2112 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2113 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2114 is set on all relocatable inputs.
2116 2017-06-22 Nick Clifton <nickc@redhat.com>
2119 * som.c (setup_sections): NUL terminate the space_strings buffer.
2120 Check that the space.name field does not index beyond the end of
2121 the space_strings buffer.
2123 2017-06-21 Nick Clifton <nickc@redhat.com>
2126 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2128 2017-06-21 Nick Clifton <nickc@redhat.com>
2131 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2132 type of the size parameter.
2133 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2134 length of the counted string.
2135 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2136 (_bfd_vms_save_counted_string): Likewise.
2137 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2138 _bfd_vms_save_counted_string.
2139 (_bfd_vms_slurp_ehdr): Likewise.
2140 (_bfd_vms_slurp_egsd): Likewise.
2141 (Parse_module): Likewise.
2143 2017-06-21 Alan Modra <amodra@gmail.com>
2145 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2146 calls before tocsave calls.
2147 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2150 2017-06-21 Nick Clifton <nickc@redhat.com>
2153 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2154 bfd_get_full_section_contents returns no contents.
2156 2017-06-21 Nick Clifton <nickc@redhat.com>
2159 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2162 2017-06-21 Nick Clifton <nickc@redhat.com>
2165 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2167 (image_set_ptr): Likewise.
2168 (alpha_vms_fix_sec_rel): Likewise.
2169 (alpha_vms_slurp_relocs): Likewise.
2171 2017-06-21 Nick Clifton <nickc@redhat.com>
2174 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2176 (ieee_archive_p): Likewise.
2177 (ieee_object_p): Likewise.
2179 2017-06-21 Nick Clifton <nickc@redhat.com>
2182 * elf.c (setup_group): Zero the group section pointer list after
2183 allocation so that loops can be caught. Check for NULL pointers
2184 when processing a group list.
2186 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2188 * elf-s390.h: New file.
2189 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2191 (elf_s390_additional_program_headers): New function.
2192 (elf_s390_modify_segment_map): New function.
2193 (bfd_elf_s390_set_options): New function.
2194 (elf_backend_additional_program_headers)
2195 (elf_backend_modify_segment_map): Add macro definitions.
2197 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2200 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2201 the DYNAMIC bit instead of bfd_count_sections.
2203 2017-06-19 Nick Clifton <nickc@redhat.com>
2206 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2208 (evax_bfd_print_eeom): Likewise.
2209 (evax_bfd_print_egsd): Check for an overlarge record length.
2210 (evax_bfd_print_etir): Likewise.
2212 2017-06-19 Nick Clifton <nickc@redhat.com>
2215 * libieee.h (struct common_header_type): Add end_p field.
2216 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2218 (read_id): Check for a length that exceeds the remaining bytes in
2220 (ieee_seek): Initialise end_p.
2221 (ieee_archive_p): Likewise.
2222 (ieee_object_p): Likewise.
2224 2017-06-19 Nick Clifton <nickc@redhat.com>
2227 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2228 before reading the EIHS structure entries.
2230 2017-06-19 Nick Clifton <nickc@redhat.com>
2233 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2234 gsd_size. Check that there are enough bytes remaining to read the
2235 type and size of the next egsd. Check that the size of the egsd
2236 does not exceed the size of the record.
2238 2017-06-19 Alan Modra <amodra@gmail.com>
2240 * config.bfd: Correct targ_underscore for cris.
2242 2017-06-18 Alan Modra <amodra@gmail.com>
2244 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2245 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2247 2017-06-16 Nick Clifton <nickc@redhat.com>
2249 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2250 bucketlist is empty because there are no symbols to add to the
2253 2017-06-16 Alan Modra <amodra@gmail.com>
2259 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2260 (BFD_JUMP_TABLE_LINK): Likewise.
2261 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2262 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2263 (bfd_elf_define_start_stop): New function.
2264 * linker.c (bfd_generic_define_start_stop): New function.
2265 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2267 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2268 * aout-target.h (MY_bfd_define_start_stop): Define.
2269 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2270 * binary.c (binary_bfd_define_start_stop): Define.
2271 * bout.c (b_out_bfd_define_start_stop): Define.
2272 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2273 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2274 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2275 * coffcode.h (coff_bfd_define_start_stop): Define.
2276 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2277 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2278 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2279 * ieee.c (ieee_bfd_define_start_stop): Define.
2280 * ihex.c (ihex_bfd_define_start_stop): Define.
2281 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2282 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2283 * mmo.c (mmo_bfd_define_start_stop): Define.
2284 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2285 * oasys.c (oasys_bfd_define_start_stop): Define.
2286 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2287 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2288 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2289 * som.c (som_bfd_define_start_stop): Define.
2290 * srec.c (srec_bfd_define_start_stop): Define.
2291 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2292 * versados.c (versados_bfd_define_start_stop): Define.
2293 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2294 (alpha_vms_bfd_define_start_stop): Define.
2295 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2296 * bfd-in2.h: Regenerate.
2297 * libbfd.h: Regenerate.
2299 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2301 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2302 SYMBOL_REFERENCES_LOCAL.
2304 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2307 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2308 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2309 runtime for if there needs copy relocation elimination.
2310 (need_copy_relocation_p): New function. Return true for symbol with
2311 pc-relative references and if it's against read-only sections.
2312 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2313 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2314 that are related with accessing external objects.
2315 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2316 in elfNN_aarch64_check_relocs.
2318 2017-06-15 Nick Clifton <nickc@redhat.com>
2321 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2324 (ieee_archive_p): Likewise.
2326 2017-06-15 Nick Clifton <nickc@redhat.com>
2329 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2331 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2333 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2334 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2335 keep both windowed and call0 ABI PLT definitions.
2336 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2337 elf_xtensa_*_plt_entry endex.
2338 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2340 2017-06-14 Nick Clifton <nickc@redhat.com>
2343 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2346 2017-06-14 Nick Clifton <nickc@redhat.com>
2349 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2350 maximum value for the ascic pointer. Check that name processing
2351 does not read beyond this value.
2352 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2355 2017-06-14 Nick Clifton <nickc@redhat.com>
2358 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2359 (process_otr): Check for an invalid offset in the otr structure.
2361 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2363 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2365 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2371 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2372 vtable field to a union.
2373 (_bfd_elf_is_start_stop): Removed.
2374 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2375 __start_SECNAME and __stop_SECNAME symbols.
2376 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2377 * elflink.c (_bfd_elf_is_start_stop): Removed.
2378 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2379 _bfd_elf_is_start_stop.
2380 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2381 __stop_SECNAME symbols. Updated.
2382 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2383 (bfd_elf_gc_record_vtinherit): Likewise.
2384 (bfd_elf_gc_record_vtentry): Likewise.
2386 2017-06-13 Nick Clifton <nickc@redhat.com>
2389 * elflink.c (elf_link_adjust_relocs): Generate an error when
2390 encountering a reloc against a symbol removed by garbage
2393 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2395 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2396 to merge_gnu_properties.
2397 * elf-properties.c (elf_merge_gnu_properties): Add struct
2398 bfd_link_info * and pass it to merge_gnu_properties.
2399 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2400 and pass it to elf_merge_gnu_properties.
2401 (_bfd_elf_link_setup_gnu_properties): Pass info to
2402 elf_merge_gnu_property_list.
2403 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2405 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2407 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2410 * binary.c (binary_set_section_contents): Scale lma by octets
2411 per byte to set filepos.
2413 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2415 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2418 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2420 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2423 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2425 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2426 patched section contents for TLS IE reloc.
2427 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2429 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2431 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2432 RELOC_FOR_GLOBAL_SYMBOL macro.
2434 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2436 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2439 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2441 * config/tc-arc.c (md_undefined_symbol): Changed.
2442 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2444 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2446 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2449 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2451 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2452 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2454 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2456 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2459 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2461 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2462 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2463 is non-zero. Add clarifying comments.
2465 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2467 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2468 name. Use local IFUNC symbol name string to report unsupported
2469 non-PIC call to IFUNC function.
2470 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2471 when generating R_386_IRELATIVE relocation.
2472 (elf_i386_finish_dynamic_symbol): Likewise.
2473 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2475 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2476 when generating R_X86_64_IRELATIVE relocation.
2477 (elf_x86_64_finish_dynamic_symbol): Likewise.
2479 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2481 * elf.c (setup_group): Make sure BFD sections are created for all
2482 group sections in the input file when processing SHF_GROUP
2484 (bfd_section_from_shdr): Avoid duplicating logic already
2485 implemented in `setup_group'.
2487 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2490 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2491 if the hint address is zero.
2493 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2496 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2497 ELF_COMMON_DEF_P for common symbols.
2499 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2501 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2502 SEC_GROUP sections as SEC_EXCLUDE.
2503 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2504 (assign_section_numbers): Use resolve_section_groups flag instead
2505 of relocatable link type.
2506 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2507 flag instead of checking the final_link flag for part of the
2508 checks in here. Fix white space as a result.
2509 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2510 instead of relocatable link type.
2511 (bfd_elf_final_link): Likewise.
2513 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2515 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2517 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2518 (s3_bfd_score_elf_check_relocs): Likewise.
2519 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2520 (score_elf_final_link_relocate): Likewise.
2521 (s7_bfd_score_elf_check_relocs): Likewise.
2523 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2525 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2528 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2530 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2531 from `reloc_count' rather than decrementing it.
2532 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2533 `reloc_count' by `int_rels_per_ext_rel'.
2534 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2535 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2536 entry determination.
2537 (s3_bfd_score_elf_check_relocs): Likewise.
2538 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2539 (s7_bfd_score_elf_relocate_section): Likewise.
2540 (s7_bfd_score_elf_check_relocs): Likewise.
2541 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2542 prototype and function.
2543 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2544 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2545 triple rather than once the sum of REL and RELA relocation entry
2547 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2548 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2549 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2550 storage allocation size determination.
2551 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2552 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2553 by `int_rels_per_ext_rel' for last relocation entry
2555 (bfd_elf_final_link): Do not multiply `reloc_count' by
2556 `int_rels_per_ext_rel' for internal relocation storage
2557 allocation size determination.
2558 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2559 `int_rels_per_ext_rel' for last relocation entry determination.
2560 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2561 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2562 (_bfd_mips_elf_relocate_section): Likewise.
2564 2017-06-05 Alan Modra <amodra@gmail.com>
2567 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2569 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2571 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2572 determine structure sizes.
2573 (elfcore_grok_freebsd_prstatus): Likewise.
2575 2017-06-01 Alan Modra <amodra@gmail.com>
2577 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2578 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2580 (is_elfv2_localentry0): New function.
2581 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2582 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2583 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2584 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2585 optimized localentry:0 stubs.
2586 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2587 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2589 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2591 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2593 2017-05-30 Casey Smith <clegg89@gmail.com>
2596 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2597 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2599 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2601 * cpu-arc.c (arc_compatible): New function.
2603 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2605 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2607 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2610 * bfdio.c (bfd_get_file_size): New function.
2611 * bfd-in2.h: Regenerated.
2613 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2615 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2618 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2620 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2621 dynobj instead of htab->elf.dynobj.
2623 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2625 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2627 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2628 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2629 actual number of internal relocations retrieved. Adjust
2630 function description.
2631 (bfd_elf64_canonicalize_reloc): Remove macro.
2632 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2634 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2636 * archures.c (bfd_mach_sparc_v9m8): Define.
2637 (bfd_mach_sparc_v8plusm8): Likewise.
2638 (bfd_mach_sparc_v9_p): Adjust to M8.
2639 (bfd_mach_sparc_64bit_p): Likewise.
2640 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2641 bfd_mach_sparc_v8plusm8.
2642 * bfd-in2.h: Regenerated.
2643 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2645 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2646 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2647 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2649 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2650 bfd_mach_sparc_v8plusm8.
2652 2017-05-19 Alan Modra <amodra@gmail.com>
2654 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2655 debug and special sections when no non-note alloc sections in an
2658 2017-05-18 Alan Modra <amodra@gmail.com>
2660 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2661 * elf-m10300.c: Likewise.
2663 * elf32-arc.c: Likewise.
2664 * elf32-bfin.c: Likewise.
2665 * elf32-m68k.c: Likewise.
2666 * elf32-nds32.c: Likewise.
2667 * elf32-tilepro.c: Likewise.
2668 * elflink.c: Likewise.
2669 * elfnn-aarch64.c: Likewise.
2670 * elfnn-riscv.c: Likewise.
2671 * elfxx-tilegx.c: Likewise.
2672 * mach-o.c: Likewise.
2673 * peXXigen.c: Likewise.
2674 * vms-alpha.c: Likewise.
2675 * vms-lib.c: Likewise.
2677 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2680 * elflink.c (elf_gc_mark_debug_section): New function.
2681 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2682 referenced by kept debug sections.
2684 2017-05-16 Alan Modra <amodra@gmail.com>
2686 * elf-m10300.c: Rename occurrences of non_ir_ref.
2687 * elf32-arm.c: Likewise.
2688 * elf32-bfin.c: Likewise.
2689 * elf32-cr16.c: Likewise.
2690 * elf32-cris.c: Likewise.
2691 * elf32-d10v.c: Likewise.
2692 * elf32-dlx.c: Likewise.
2693 * elf32-fr30.c: Likewise.
2694 * elf32-frv.c: Likewise.
2695 * elf32-hppa.c: Likewise.
2696 * elf32-i370.c: Likewise.
2697 * elf32-i386.c: Likewise.
2698 * elf32-iq2000.c: Likewise.
2699 * elf32-lm32.c: Likewise.
2700 * elf32-m32c.c: Likewise.
2701 * elf32-m32r.c: Likewise.
2702 * elf32-m68hc1x.c: Likewise.
2703 * elf32-m68k.c: Likewise.
2704 * elf32-mcore.c: Likewise.
2705 * elf32-metag.c: Likewise.
2706 * elf32-microblaze.c: Likewise.
2707 * elf32-moxie.c: Likewise.
2708 * elf32-msp430.c: Likewise.
2709 * elf32-mt.c: Likewise.
2710 * elf32-nios2.c: Likewise.
2711 * elf32-or1k.c: Likewise.
2712 * elf32-ppc.c: Likewise.
2713 * elf32-rl78.c: Likewise.
2714 * elf32-s390.c: Likewise.
2715 * elf32-score.c: Likewise.
2716 * elf32-score7.c: Likewise.
2717 * elf32-sh.c: Likewise.
2718 * elf32-tic6x.c: Likewise.
2719 * elf32-tilepro.c: Likewise.
2720 * elf32-v850.c: Likewise.
2721 * elf32-vax.c: Likewise.
2722 * elf32-xstormy16.c: Likewise.
2723 * elf32-xtensa.c: Likewise.
2724 * elf64-alpha.c: Likewise.
2725 * elf64-hppa.c: Likewise.
2726 * elf64-ia64-vms.c: Likewise.
2727 * elf64-mmix.c: Likewise.
2728 * elf64-ppc.c: Likewise.
2729 * elf64-s390.c: Likewise.
2730 * elf64-sh64.c: Likewise.
2731 * elf64-x86-64.c: Likewise.
2732 * elflink.c: Likewise.
2733 * elfnn-aarch64.c: Likewise.
2734 * elfnn-ia64.c: Likewise.
2735 * elfnn-riscv.c: Likewise.
2736 * elfxx-mips.c: Likewise.
2737 * elfxx-sparc.c: Likewise.
2738 * elfxx-tilegx.c: Likewise.
2739 * linker.c: Likewise.
2741 2017-05-16 Alan Modra <amodra@gmail.com>
2743 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2744 * elflink.c (elf_link_add_object_symbols): Update to use
2746 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2748 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2750 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2752 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2754 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2756 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2757 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2759 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2761 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2763 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2765 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2766 to plt_second/plt_second_eh_frame.
2767 (elf_x86_64_link_hash_newfunc): Updated.
2768 (elf_x86_64_allocate_dynrelocs): Likewise.
2769 (elf_x86_64_size_dynamic_sections): Likewise.
2770 (elf_x86_64_relocate_section): Likewise.
2771 (elf_x86_64_finish_dynamic_symbol): Likewise.
2772 (elf_x86_64_finish_dynamic_sections): Likewise.
2773 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2774 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2776 (elf_backend_setup_gnu_properties): Updated. Create the
2777 .plt.sec section instead of the .plt.sec section.
2779 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2781 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2782 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2783 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2785 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2787 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2788 (bfd_elf64_set_reloc): Define.
2789 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2791 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2793 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2794 (struct bfd_target): New field _bfd_set_reloc.
2795 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2796 * reloc.c (_bfd_generic_set_reloc): New function.
2797 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2798 * nlm-target.h (nlm_set_reloc): Likewise.
2799 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2800 * aout-tic30.c (MY_set_reloc): Likewise.
2801 * aout-target.h (MY_set_reloc): Likewise.
2802 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2803 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2804 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2805 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2806 * aout-adobe.c (aout_32_set_reloc): Likewise.
2807 * bout.c (b_out_set_reloc): Likewise.
2808 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2809 * i386os9k.c (aout_32_set_reloc): Likewise.
2810 * ieee.c (ieee_set_reloc): Likewise.
2811 * oasys.c (oasys_set_reloc): Likewise.
2812 * som.c (som_set_reloc): Likewise.
2813 * versados.c (versados_set_reloc): Likewise.
2814 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2815 _bfd_generic_set_reloc.
2816 (rs6000_xcoff64_aix_vec): LIkewise.
2817 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2818 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2819 * i386msdos.c (msdos_set_reloc): Define to
2820 _bfd_norelocs_set_reloc.
2821 * elfcode.h (elf_set_reloc): Define.
2822 * bfd-in2.h: Regenerated.
2824 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2827 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2828 for IFUNC function address.
2830 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2832 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2833 (CONFLICT_LIST): Likewise.
2834 (opcode/arc-attrs.h): Include.
2835 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2836 (arc_extract_features): New file.
2837 (arc_stralloc): Likewise.
2838 (arc_elf_merge_attributes): Likewise.
2839 (arc_elf_merge_private_bfd_data): Use object attributes.
2840 (bfd_arc_get_mach_from_attributes): New function.
2841 (arc_elf_object_p): Use object attributes.
2842 (arc_elf_final_write_processing): Likewise.
2843 (elf32_arc_obj_attrs_arg_type): New function.
2844 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2845 (elf32_arc_section_from_shdr): Likewise.
2846 (elf_backend_obj_attrs_vendor): Define.
2847 (elf_backend_obj_attrs_section): Likewise.
2848 (elf_backend_obj_attrs_arg_type): Likewise.
2849 (elf_backend_obj_attrs_section_type): Likewise.
2850 (elf_backend_obj_attrs_handle_unknown): Likewise.
2851 (elf_backend_section_from_shdr): Likewise.
2853 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2856 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2857 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2858 and the destination is a Thumb symbol.
2860 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2862 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2863 initializer to silence GCC 4.2.
2864 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2866 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2868 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2869 (LAZY_PLT_ENTRY_SIZE): This.
2870 (NON_LAZY_PLT_ENTRY_SIZE): New.
2871 (elf_x86_64_plt0_entry): Renamed to ...
2872 (elf_x86_64_lazy_plt0_entry): This.
2873 (elf_x86_64_plt_entry): Renamed to ...
2874 (elf_x86_64_lazy_plt_entry): This.
2875 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2876 (elf_x86_64_lazy_bnd_plt0_entry): This.
2877 (elf_x86_64_legacy_plt_entry): Removed.
2878 (elf_x86_64_bnd_plt_entry): Renamed to ...
2879 (elf_x86_64_lazy_bnd_plt_entry): This.
2880 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2881 (elf_x86_64_non_lazy_plt_entry): This.
2882 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2883 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2884 (elf_x86_64_eh_frame_plt): Renamed to ...
2885 (elf_x86_64_eh_frame_lazy_plt): This.
2886 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2887 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2888 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2889 (elf_x86_64_eh_frame_non_lazy_plt): This.
2890 (elf_x86_64_lazy_plt_layout): New.
2891 (elf_x86_64_non_lazy_plt_layout): Likewise.
2892 (elf_x86_64_plt_layout): Likewise.
2893 (elf_x86_64_backend_data): Remove PLT layout information. Add
2894 os for target system.
2895 (GET_PLT_ENTRY_SIZE): Removed.
2896 (elf_x86_64_lazy_plt): New.
2897 (elf_x86_64_non_lazy_plt): Likewise.
2898 (elf_x86_64_lazy_bnd_plt): Likewise.
2899 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2900 (elf_x86-64_arch_bed): Updated.
2901 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2902 (elf_x86_64_create_dynamic_sections): Removed.
2903 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2904 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2905 (elf_x86-64_adjust_dynamic_symbol): Updated.
2906 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2907 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2908 size for PLT0 if there is no PLT0. Get plt_entry_size from
2909 non_lazy_plt for non-lazy PLT entries.
2910 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2911 from non_lazy_plt for non-lazy PLT entries.
2912 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2913 if there is no PLT0.
2914 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2915 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2916 entries with non-lazy PLT layout. Don't fill the second and third
2917 slots in the PLT entry if there is no PLT0.
2918 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2919 if there is no PLT0. Set sh_entsize on the .plt.got section.
2920 (compare_relocs): New.
2921 (elf_x86_64_plt_type): Likewise.
2922 (elf_x86_64_plt): Likewise.
2923 (elf_x86_64_nacl_plt): New. Forward declaration.
2924 (elf_x86_64_get_plt_sym_val): Removed.
2925 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2926 against all dynamic relocations.
2927 (elf_x86_64_link_setup_gnu_properties): New function.
2928 (elf_backend_create_dynamic_sections): Updated.
2929 (elf_backend_setup_gnu_properties): New.
2930 (elf_x86_64_nacl_plt): New.
2931 (elf_x86_64_nacl_arch_bed): Updated.
2933 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2935 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2936 (LAZY_PLT_ENTRY_SIZE): This.
2937 (NON_LAZY_PLT_ENTRY_SIZE): New.
2938 (elf_i386_plt0_entry): Renamed to ...
2939 (elf_i386_lazy_plt0_entry): This.
2940 (elf_i386_plt_entry): Renamed to ...
2941 (elf_i386_lazy_plt_entry): This.
2942 (elf_i386_pic_plt0_entry): Renamed to ...
2943 (elf_i386_pic_lazy_plt0_entry): This.
2944 (elf_i386_pic_plt_entry): Renamed to ...
2945 (elf_i386_pic_lazy_plt_entry): This.
2946 (elf_i386_got_plt_entry): Renamed to ...
2947 (elf_i386_non_lazy_plt_entry): This.
2948 (elf_i386_pic_got_plt_entry): Renamed to ...
2949 (elf_i386_pic_non_lazy_plt_entry): This.
2950 (elf_i386_eh_frame_plt): Renamed to ...
2951 (elf_i386_eh_frame_lazy_plt): This.
2952 (elf_i386_eh_frame_plt_got): Renamed to ...
2953 (elf_i386_eh_frame_non_lazy_plt): This.
2954 (elf_i386_plt_layout): Renamed to ...
2955 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2956 eh_frame_plt_got_size.
2957 (elf_i386_non_lazy_plt_layout): New.
2958 (elf_i386_plt_layout): Likewise.
2959 (elf_i386_non_lazy_plt): Likewise.
2960 (GET_PLT_ENTRY_SIZE): Removed.
2961 (elf_i386_plt): Renamed to ...
2962 (elf_i386_lazy_plt): This.
2963 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2964 (elf_i386_arch_bed): Updated.
2965 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2966 (elf_i386_create_dynamic_sections): Removed.
2967 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2968 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2969 (elf_i386_adjust_dynamic_symbol): Updated.
2970 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2971 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2972 size for PLT0 if there is no PLT0.
2973 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2974 output section is discarded only if GOT isn't empty.
2975 (elf_i386_relocate_section): Updated. Properly get PLT index
2976 if there is no PLT0.
2977 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2978 second and third slots in the PLT entry if there is no PLT0.
2979 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2980 if there is no PLT0. Set sh_entsize on the .plt.got section.
2981 (elf_i386_nacl_plt): Forward declaration.
2982 (elf_i386_get_plt_sym_val): Removed.
2983 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2984 against all dynamic relocations.
2985 (elf_i386_link_setup_gnu_properties): New function.
2986 (elf_backend_create_dynamic_sections): Updated.
2987 (elf_backend_setup_gnu_properties): New.
2988 (elf_i386_nacl_plt): Updated.
2989 (elf_i386_nacl_arch_bed): Likewise.
2990 (elf_i386_vxworks_arch_bed): Likewise.
2992 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2994 * elflink.c (elf_output_implib): Remove executable flag from import
2996 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2997 library is a relocatable object file.
2999 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3002 * elf32-avr.c (avr_should_move_sym): New function.
3003 (avr_should_reduce_sym_size): Likewise.
3004 (avr_should_increase_sym_size): Likewise.
3005 (elf32_avr_relax_delete_bytes): Adjust symbol values
3006 and sizes by calling new functions.
3008 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3010 * config.bfd (riscv32-*): Enable rv64.
3012 2017-05-02 Alan Modra <amodra@gmail.com>
3015 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3016 rather than h->root.type == bfd_link_hash_new.
3017 (bfd_elf_record_link_assignment): Similarly, call
3018 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3020 2017-04-29 Alan Modra <amodra@gmail.com>
3023 * reloc.c (reloc_offset_in_range): New function.
3024 (bfd_perform_relocation, bfd_install_relocation): Use it.
3025 (_bfd_final_link_relocate): Likewise.
3027 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3029 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3030 before using .plt.got.
3031 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3033 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3035 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3036 instead of "+=" to update 0.
3038 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3040 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3041 .plt.got section here.
3042 (elf_i386_check_relocs): Don't create the .plt.got section.
3043 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3044 the .plt.got and .plt.bnd sections here.
3045 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3048 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3050 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3052 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3053 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3054 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3055 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3058 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3060 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3062 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3063 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3064 the first relocatable ELF input with GNU properties.
3066 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3068 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3069 VxWorks for non-PIC.
3071 2017-04-27 Alan Modra <amodra@gmail.com>
3073 * elf-bfd.h (struct elf_backend_data): Make asection param of
3074 elf_backend_eh_frame_address_size const.
3075 (_bfd_elf_eh_frame_address_size): Likewise.
3076 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3077 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3078 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3079 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3080 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3081 (next_cie_fde_offset): Constify params.
3082 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3084 2017-04-27 Alan Modra <amodra@gmail.com>
3086 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3087 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3088 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3090 (offset_adjust): New function.
3091 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3092 (adjust_eh_frame_local_symbols): Likewise.
3093 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3094 after changing anything. Return true if anything changed.
3095 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3096 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3098 2017-04-27 Alan Modra <amodra@gmail.com>
3100 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3103 2017-04-27 Alan Modra <amodra@gmail.com>
3105 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3106 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3107 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3108 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3109 for undef and undefweak dyn_relocs.
3110 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3111 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3112 (allocate_got, allocate_dynrelocs): Likewise.
3113 (ppc64_elf_relocate_section): Likewise.
3115 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3117 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3118 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3119 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3120 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3122 2017-04-26 Nick Clifton <nickc@redhat.com>
3125 * reloc.c (bfd_perform_relocation): Check for a negative address
3128 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3131 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3133 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3134 (elf_backend_always_renumber_dynsyms): Define.
3135 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3136 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3137 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3138 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3140 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3142 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3144 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3145 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3146 sections have been created.
3148 2017-04-26 Nick Clifton <nickc@redhat.com>
3151 * compress.c (bfd_init_section_compress_status): Check the return
3152 value from bfd_malloc.
3154 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3156 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3157 no_finish_dynamic_symbol.
3158 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3160 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3161 weak symbol, don't make it dynamic.
3162 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3163 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3164 relocation for GOT reference.
3165 (elf_x86_64_finish_dynamic_symbol): Abort if
3166 no_finish_dynamic_symbol isn't 0.
3168 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3171 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3172 undefined weak symbol, don't make it dynamic.
3173 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3174 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3175 relocation for R_386_GOT32.
3177 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3180 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3182 2017-04-23 Alan Modra <amodra@gmail.com>
3185 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3186 * elf.c (lcomm_sym): New.
3187 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3188 * bfd-in2.h: Regenerate.
3190 2017-04-23 Alan Modra <amodra@gmail.com>
3193 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3194 parameters and comment.
3195 (_bfd_elf_get_reloc_section): Delete.
3196 (_bfd_elf_plt_get_reloc_section): Declare.
3197 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3198 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3200 (_bfd_elf_get_reloc_section): ..here. Delete.
3201 (assign_section_numbers): Call elf_get_reloc_section.
3202 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3203 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3205 2017-04-23 Alan Modra <amodra@gmail.com>
3208 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3211 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3214 * elf32-i386.c (elf_i386_link_hash_entry): Add
3215 no_finish_dynamic_symbol.
3216 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3217 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3218 symbol, don't make it dynamic in PIE.
3219 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3220 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3221 relocation for R_386_GOT32
3222 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3225 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3229 * elflink.c (elf_link_add_object_symbols): Require
3230 --no-dynamic-linker with -E/--dynamic-list when creating
3233 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3235 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3238 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3240 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3241 dynamic symbol sorting.
3243 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3246 * elflink.c (elf_link_add_object_symbols): Preserve
3247 dynamic_ref_after_ir_def when restoring the symbol table for
3248 unneeded dynamic object.
3250 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3253 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3254 on on undefined IFUNC symbol in the second PLT.
3256 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3258 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3260 2017-04-19 Alan Modra <amodra@gmail.com>
3262 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3263 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3264 * elf32-ppc.c:Formatting.
3265 (ensure_undefweak_dynamic): Don't make dynamic when
3266 info->dynamic_undefined_weak is zero.
3267 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3268 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3269 not default visibility. Discard undef and undefweak
3271 (ppc_elf_relocate_section): Adjust to suit.
3272 * elf64-ppc.c: Formatting.
3273 (ensure_undefweak_dynamic): Don't make dynamic when
3274 info->dynamic_undefined_weak is zero.
3275 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3276 info->dynamic_undefined_weak. Discard them earlier.
3278 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3281 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3282 before generating the version definition section.
3284 2017-04-17 Alan Modra <amodra@gmail.com>
3286 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3287 state when a regular object file defines a symbol with
3288 incompatible type to that defined by an earlier shared lib.
3290 2017-04-13 Alan Modra <amodra@gmail.com>
3292 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3294 * elf32-arm.c: Likewise.
3295 * elf32-i386.c: Likewise.
3296 * elf32-mep.c: Likewise.
3297 * elf64-ia64-vms.c: Likewise.
3298 * elf64-x86-64.c: Likewise.
3299 * elflink.c: Likewise.
3300 * elfnn-ia64.c: Likewise.
3301 * elfxx-mips.c: Likewise.
3303 2017-04-13 Alan Modra <amodra@gmail.com>
3305 * aoutx.h: Use %B and %A in error messages throughout file.
3306 * aout-cris.c: Likewise.
3307 * archive.c: Likewise.
3308 * binary.c: Likewise.
3309 * coff-rs6000.c: Likewise.
3310 * coff-tic4x.c: Likewise.
3311 * coffcode.h: Likewise.
3312 * coffgen.c: Likewise.
3313 * cofflink.c: Likewise.
3314 * coffswap.h: Likewise.
3315 * cpu-arm.c: Likewise.
3316 * elf-eh-frame.c: Likewise.
3317 * elf-m10300.c: Likewise.
3319 * elf32-arc.c: Likewise.
3320 * elf32-arm.c: Likewise.
3321 * elf32-bfin.c: Likewise.
3322 * elf32-frv.c: Likewise.
3323 * elf32-iq2000.c: Likewise.
3324 * elf32-m32c.c: Likewise.
3325 * elf32-microblaze.c: Likewise.
3326 * elf32-nds32.c: Likewise.
3327 * elf32-rl78.c: Likewise.
3328 * elf32-rx.c: Likewise.
3329 * elf32-score.c: Likewise.
3330 * elf32-score7.c: Likewise.
3331 * elf32-sh64.c: Likewise.
3332 * elf32-v850.c: Likewise.
3333 * elf32-vax.c: Likewise.
3334 * elf32-visium.c: Likewise.
3335 * elf64-ia64-vms.c: Likewise.
3336 * elf64-mmix.c: Likewise.
3337 * elf64-sh64.c: Likewise.
3338 * elfcode.h: Likewise.
3339 * elfnn-aarch64.c: Likewise.
3340 * elfnn-ia64.c: Likewise.
3341 * elfxx-mips.c: Likewise.
3342 * hpux-core.c: Likewise.
3345 * linker.c: Likewise.
3346 * merge.c: Likewise.
3348 * oasys.c: Likewise.
3349 * pdp11.c: Likewise.
3350 * peXXigen.c: Likewise.
3351 * rs6000-core.c: Likewise.
3352 * vms-alpha.c: Likewise.
3353 * xcofflink.c: Likewise.
3355 2017-04-13 Alan Modra <amodra@gmail.com>
3357 * bfd.c (PRINT_TYPE): Define.
3358 (_doprnt): New function.
3359 (error_handler_internal): Use _doprnt.
3360 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3361 calls in their natural order, throughout file.
3362 * coff-mcore.c: Likewise.
3363 * coff-ppc.c: Likewise.
3364 * coff-tic80.c: Likewise.
3365 * cofflink.c: Likewise.
3366 * elf-s390-common.c: Likewise.
3368 * elf32-arm.c: Likewise.
3369 * elf32-i386.c: Likewise.
3370 * elf32-m32r.c: Likewise.
3371 * elf32-msp430.c: Likewise.
3372 * elf32-spu.c: Likewise.
3373 * elf64-ia64-vms.c: Likewise.
3374 * elf64-sparc.c: Likewise.
3375 * elf64-x86-64.c: Likewise.
3376 * elflink.c: Likewise.
3377 * elfnn-aarch64.c: Likewise.
3378 * elfnn-ia64.c: Likewise.
3379 * elfxx-mips.c: Likewise.
3381 2017-04-13 Alan Modra <amodra@gmail.com>
3383 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3384 branch veneers" error. Fix double space and format message.
3385 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3386 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3388 2017-04-13 Alan Modra <amodra@gmail.com>
3390 * bfd-in2.h: Regenerate.
3392 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3394 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3395 extra `\n' in warning/error messages.
3396 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3397 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3399 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3401 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3402 processor-specific properties with generic ELF target vector.
3404 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3406 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3407 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3408 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3409 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3411 (link_hash_newfunc): Initialize has_got_reloc and
3413 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3415 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3417 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3419 (_bfd_sparc_elf_fixup_symbol): New function.
3420 (allocate_dynrelocs): Don't allocate space for dynamic
3421 relocations and discard relocations against resolved undefined
3422 weak symbols in executable. Don't make resolved undefined weak
3423 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3424 relocation against undefined weak symbols in PIE.
3425 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3426 relocations against resolved undefined weak symbols in PIE
3427 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3428 without ynamic PLT/GOT relocations for resolved undefined weak
3430 Don't generate dynamic relocation against resolved undefined
3431 weak symbol in executable.
3432 (pie_finish_undefweak_symbol): New function.
3433 (_bfd_sparc_elf_finish_dynamic_sections): Call
3434 pie_finish_undefweak_symbol on all symbols in PIE.
3435 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3436 (_bfd_sparc_elf_fixup_symbol): New function.
3438 2017-04-10 Nick Clifton <nickc@redhat.com>
3440 * config.bfd: Remove ns32k from obsolete list.
3442 2017-04-10 Alan Modra <amodra@gmail.com>
3445 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3446 (special_sections_i): Likewise for .init_array.
3447 (special_sections_p): Likewise for .preinit_array.
3449 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3453 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3454 ELF_COMMON_DEF_P for common symbols.
3455 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3456 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3457 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3458 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3459 07492f668d2173da7a2bda3707ff0985e0f460b6.
3461 2017-04-07 Pedro Alves <palves@redhat.com>
3463 * opncls.c (bfd_get_debug_link_info): Rename to...
3464 (bfd_get_debug_link_info_1): ... this. Change type of second
3465 parameter to void pointer. Adjust.
3466 (bfd_get_debug_link_info): Reimplement on top of
3467 bfd_get_debug_link_info_1.
3468 (separate_debug_file_exists, separate_alt_debug_file_exists):
3469 Change type of second parameter to void pointer. Adjust.
3470 (get_func_type, check_func_type): Change type of second parameter
3472 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3473 the callback functions instead of passing the address of a local.
3474 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3475 find_separate_debug_file.
3476 (get_alt_debug_link_info_shim): Change type of second parameter to
3477 void pointer. Adjust.
3478 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3479 find_separate_debug_file.
3480 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3481 of second parameter to void pointer. Adjust.
3482 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3483 pointer local to find_separate_debug_file.
3485 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3487 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3488 external symbols with a definition.
3489 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3491 2017-04-07 Alan Modra <amodra@gmail.com>
3493 * po/SRC-POTFILES.in: Regenerate.
3495 2017-04-05 Alan Modra <amodra@gmail.com>
3497 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3500 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3502 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3503 numbers for DataDirectory entry indicies passed to
3506 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3508 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3509 each GNU_MBIND section and align GNU_MBIND section to page size.
3510 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3511 segment for each GNU_MBIND section.
3512 (_bfd_elf_init_private_section_data): Copy sh_info from input
3513 for GNU_MBIND section.
3515 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3517 * elfnn-riscv.c (GP_NAME): Delete.
3518 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3519 (_bfd_riscv_relax_lui): Likewise.
3521 2017-04-04 Nick Clifton <nickc@redhat.com>
3524 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3526 (bfd_elf_final_link): Only initialize the extended symbol index
3527 section if there are extended symbol tables to list.
3529 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3531 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3532 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3533 * configure.ac (elf): Add elf-properties.lo.
3534 * Makefile.in: Regenerated.
3535 * configure: Likewise.
3536 * elf-bfd.h (elf_property_kind): New.
3537 (elf_property): Likewise.
3538 (elf_property_list): Likewise.
3539 (elf_properties): Likewise.
3540 (_bfd_elf_parse_gnu_properties): Likewise.
3541 (_bfd_elf_get_property): Likewise.
3542 (_bfd_elf_link_setup_gnu_properties): Likewise.
3543 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3544 and setup_gnu_properties.
3545 (elf_obj_tdata): Add properties.
3546 * elf-properties.c: New file.
3547 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3548 (elf_i386_merge_gnu_properties): Likewise.
3549 (elf_backend_parse_gnu_properties): Likewise.
3550 (elf_backend_merge_gnu_properties): Likewise.
3551 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3552 (elf_x86_64_merge_gnu_properties): Likewise.
3553 (elf_backend_parse_gnu_properties): Likewise.
3554 (elf_backend_merge_gnu_properties): Likewise.
3555 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3556 (elf_backend_parse_gnu_properties): Likewise.
3557 (elf_backend_setup_gnu_properties): Likewise.
3558 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3559 elf_backend_merge_gnu_properties and
3560 elf_backend_setup_gnu_properties.
3562 2017-03-30 Pip Cet <pipcet@gmail.com>
3564 * elf32-wasm32.c: Add relocation code, two relocs.
3565 * reloc.c: Add wasm32 relocations.
3566 * libbfd.h: Regenerate.
3567 * bfd-in2.h: Regenerate.
3568 * bfd/po/bfd.pot: Regenerate.
3570 2017-03-29 Nick Clifton <nickc@redhat.com>
3573 * coff-bfd.h (struct coff_section_data): Add new fields:
3574 saved_bias and bias.
3575 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3576 computed for PE binaries.
3577 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3580 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3583 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3584 to handle a local symbol with a hash-symbol-entry; without PLT.
3585 Add BFD_ASSERT for an incidental case with GOT entry present.
3586 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3587 isn't forced-or-set local.
3589 2017-03-27 Pip Cet <pipcet@gmail.com>
3591 * wasm-module.c: New file to support WebAssembly modules.
3592 * wasm-module.h: New file to support WebAssembly modules.
3593 * doc/webassembly.texi: Start documenting wasm-module.c.
3594 * config.bfd: Add wasm_vec.
3595 * targets.c: Likewise.
3596 * configure.ac: Likewise.
3597 * Makefile.am: Add entries for wasm-module.c.
3598 * Makefile.in: Regenerate.
3599 * configure: Regenerate.
3600 * po/SRC-POTFILES.in: Regenerate.
3602 2017-03-27 Pip Cet <pipcet@gmail.com>
3604 * cpu-wasm32.c: New file to support wasm32 architecture.
3605 * elf32-wasm32.c: New file to support wasm32 architecture.
3606 * Makefile.am: Add wasm32 architecture.
3607 * archures.c: Likewise.
3608 * config.bfd: Likewise.
3609 * configure.ac: Likewise.
3610 * targets.c: Likewise.
3611 * Makefile.in: Regenerate.
3612 * bfd-in2.h: Regenerate.
3613 * configure: Regenerate.
3614 * po/SRC-POTFILES.in: Regenerate.
3616 2017-03-20 Alan Modra <amodra@gmail.com>
3619 * elf64-ppc.c (compare_symbols): Stabilize sort.
3621 2017-03-18 Alan Modra <amodra@gmail.com>
3623 * elf64-ppc.c (struct ppc_link_hash_table): Add
3624 local_ifunc_resolver and maybe_local_ifunc_resolver.
3625 (ppc_build_one_stub): Set flags on emitting dynamic
3626 relocation to ifunc.
3627 (ppc64_elf_relocate_section): Likewise.
3628 (ppc64_elf_finish_dynamic_symbol): Likewise.
3629 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3630 local dynamic relocs to ifuncs.
3631 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3632 local_ifunc_resolver and maybe_local_ifunc_resolver.
3633 (ppc_elf_relocate_section): Set flag on emitting dynamic
3634 relocation to ifuncs.
3635 (ppc_elf_finish_dynamic_symbol): Likewise.
3636 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3637 dynamic relocs to ifuncs.
3639 2017-03-13 Nick Clifton <nickc@redhat.com>
3642 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3643 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3644 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3645 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3646 * bfd-in2.h: Regenerate.
3647 * libbfd.h: Regenerate.
3648 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3650 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3651 (elfNN_aarch64_howto_table): Likewise.
3652 (aarch64_tls_transition_without_check): Likewise.
3653 (aarch64_reloc_got_type): Likewise.
3654 (elfNN_aarch64_final_link_relocate): Likewise.
3655 (elfNN_aarch64_tls_relax): Likewise.
3656 (elfNN_aarch64_relocate_section): Likewise.
3657 (elfNN_aarch64_gc_sweep_hook): Likewise.
3658 (elfNN_aarch64_check_relocs): Likewise.
3659 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3660 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3662 2017-03-11 Alan Modra <amodra@gmail.com>
3664 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3665 parameter is in fact used. Whitespace fixes.
3666 * elf64-ppc.c: Likewise.
3668 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3670 * rs6000-core.c (CORE_NEW): Simplify macro when
3671 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3673 2017-03-07 Alan Modra <amodra@gmail.com>
3677 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3680 2017-03-05 Alan Modra <amodra@gmail.com>
3682 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3683 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3684 (next_cie_fde_offset): New function.
3685 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3686 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3687 four bytes. Align CIEs to four or eight bytes depending on
3688 per_encoding_aligned8. Align FDEs according to their encoding.
3689 Pad last FDE to output section alignment.
3690 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3692 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3693 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3694 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3696 2017-03-02 Martin Bickel <binutils@ineranves.de>
3699 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3700 empty segments which have a zero filesz, but a non-zero memsz.
3702 2017-03-02 Alan Modra <amodra@gmail.com>
3704 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3706 2017-02-28 Alan Modra <amodra@gmail.com>
3708 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3709 (ppc64_elf_relocate_section): Likewise.
3711 2017-02-28 Alan Modra <amodra@gmail.com>
3714 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3715 rather than elf32_nios2_hash_table or elf_hash_table.
3716 (create_got_section): Likewise.
3717 (nios2_elf32_finish_dynamic_symbol): Likewise.
3718 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3719 (nios2_elf32_size_dynamic_sections): Likewise.
3720 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3721 vars. Use htab equivalents directly instead. Don't create
3722 all dynamic sections on needing just the GOT. Use a goto
3723 rather than a fall-through with reloc test. Ensure
3724 htab->dynobj is set when making dynamic sreloc section.
3725 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3726 equivalent directly instead. Don't segfault on looking for
3727 .dynamic when dynamic sections have not been created. Don't
3728 segfault on .got.plt being discarded.
3729 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3730 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3731 fixme and another not so relevant comment.
3732 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3733 already set, set hash table dynobj on creating .sbss.
3735 2017-02-28 Alan Modra <amodra@gmail.com>
3737 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3738 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3739 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3740 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3741 (ppc64_elf_relocate_section): Likewise.
3742 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3743 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3744 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3745 * libbfd.h: Regenerate.
3746 * bfd-in2.h: Regenerate.
3748 2017-02-28 Alan Modra <amodra@gmail.com>
3750 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3751 dynamic .data.rel.ro read-only.
3752 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3753 rather than section flags when deciding where copy reloc goes.
3754 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3755 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3756 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3757 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3758 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3759 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3760 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3761 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3762 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3763 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3764 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3765 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3766 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3767 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3768 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3769 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3770 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3771 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3772 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3774 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3776 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3777 `jalr $0, $25' instruction encoding.
3779 2017-02-27 Nick Clifton <nickc@redhat.com>
3782 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3783 generating a seg-fault when encountering a symbol that has been
3784 deleted by garbage collection.
3786 2017-02-25 Alan Modra <amodra@gmail.com>
3788 * elf32-arc.c (struct dynamic_sections): Delete.
3789 (enum dyn_section_types): Delete.
3790 (dyn_section_names): Delete.
3791 (arc_create_dynamic_sections): Delete.
3792 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3793 segfault on discarded .rela.plt section.
3794 (elf_arc_size_dynamic_sections): Formatting. Don't call
3795 arc_create_dynamic_sections. Don't allocate memory for sections
3796 handled by the generic linker. Correct code finding relocs in
3797 read-only sections. Set SEC_EXCLUDE on zero size .got,
3798 .got.plt, and .dynbss sections. Do set .interp for pies.
3800 2017-02-24 Andrew Waterman <andrew@sifive.com>
3802 * elfnn-riscv.c (GP_NAME): New macro.
3803 (riscv_global_pointer_value): Use it.
3804 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3805 output section, consider only that section's alignment.
3807 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3809 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3810 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3811 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3812 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3814 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3816 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3817 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3820 2017-02-23 Alan Modra <amodra@gmail.com>
3823 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3825 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3826 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3829 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3832 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3833 processing ahead of the call to `elf_gc_sweep_symbol'.
3835 2017-02-22 Nick Clifton <nickc@redhat.com>
3838 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3839 created section 4-byte alignment.
3841 2017-02-22 Alan Modra <amodra@gmail.com>
3843 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3844 on .got or .plt output section being discarded by script.
3845 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3848 2017-02-21 Alan Modra <amodra@gmail.com>
3850 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3851 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3853 2017-02-20 Alan Modra <amodra@gmail.com>
3856 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3857 if DT_RELSZ/DT_RELASZ is zero.
3859 2017-02-17 Nick Clifton <nickc@redhat.com>
3861 * compress.c (bfd_get_full_section_contents): Remember to reduce
3862 compressed size by the sizeof the compression header when
3863 decompressing the contents.
3865 2017-02-17 Pedro Alves <palves@redhat.com>
3867 * srec.c (Chunk): Rename to ...
3868 (_bfd_srec_len): ... this.
3869 (S3Forced): Rename to ...
3870 (_bfd_srec_forceS3): ... this.
3871 * objcopy.c: Adjust all references.
3873 2017-02-17 Pedro Alves <palves@redhat.com>
3875 * archive.c (bsd_write_armap): Rename to ...
3876 (_bfd_bsd_write_armap): ... this.
3877 (coff_write_armap): Rename to ...
3878 (_bfd_coff_write_armap): ... this.
3879 * libbfd-in.h (bsd_write_armap): Rename to ...
3880 (_bfd_bsd_write_armap): ... this.
3881 (coff_write_armap): Rename to ...
3882 (_bfd_coff_write_armap): ... this.
3883 * aout-target.h, aout-tic30.c: Adjust all users.
3884 * libbfd.h: Regenerate.
3886 2017-02-17 Pedro Alves <palves@redhat.com>
3888 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3889 (warn_deprecated): Rename to ...
3890 (_bfd_warn_deprecated): ... this.
3891 * libbfd.c (warn_deprecated): Rename to ...
3892 (_bfd_warn_deprecated): ... this.
3893 * bfd-in2.h: Regenerate.
3895 2017-02-17 Pedro Alves <palves@redhat.com>
3897 * bfdio.c (real_ftell): Rename to ...
3898 (_bfd_real_ftell): ... this.
3899 (real_fseek): Rename to ...
3900 (_bfd_real_fseek): ... this.
3901 (real_fopen): Rename to ...
3902 (_bfd_real_fopen): ... this.
3903 * libbfd-in.h (real_ftell): Rename to ...
3904 (_bfd_real_ftell): ... this.
3905 (real_fseek): Rename to ...
3906 (_bfd_real_fseek): ... this.
3907 (real_fopen): Rename to ...
3908 (_bfd_real_fopen): ... this.
3909 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3910 * libbfd.h: Regenerate.
3912 2017-02-17 Pedro Alves <palves@redhat.com>
3914 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3915 * libbfd.c (read_unsigned_leb128): Rename to ...
3916 (_bfd_read_unsigned_leb128): ... this.
3917 (read_signed_leb128): Rename to ...
3918 (_bfd_read_signed_leb128): ... this.
3919 (safe_read_leb128): Rename to ...
3920 (_bfd_safe_read_leb128): ... this.
3921 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3922 (_bfd_read_unsigned_leb128): ... this.
3923 (read_signed_leb128): Rename to ...
3924 (_bfd_read_signed_leb128): ... this.
3925 (safe_read_leb128): Rename to ...
3926 (_bfd_safe_read_leb128): ... this.
3927 * libbfd.h: Renegerate.
3929 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3931 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3932 before trying to fine matching file and line information.
3934 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3936 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3937 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3938 not match current bfd, then reload debug information. Record bfd
3939 we're loading debug info for in the stash. If we have debug
3940 informatin in the cache then perform section placement before
3943 2017-02-16 Alan Modra <amodra@gmail.com>
3946 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3947 * elfxx-target.h (elf_backend_no_page_alias): Define.
3948 (elfNN_bed): Init new field.
3949 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3950 ensure PT_LOAD segment starts on a new page.
3951 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3953 2017-02-16 Alan Modra <amodra@gmail.com>
3956 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3959 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3961 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3962 * bfd-in2.h: Regenerated.
3964 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3967 * elf32-i386.c (elf_i386_relocate_section): Allow
3968 "lea foo@GOT, %reg" in PIC.
3970 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3973 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3974 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3975 error against local IFUNC symbol without a base register for
3978 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3980 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3981 `%P: %H:' with `info->callbacks->einfo'.
3982 (ppc_elf_relocate_section): Likewise.
3983 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3984 (ppc64_elf_edit_toc): Likewise.
3985 (ppc64_elf_relocate_section): Likewise.
3987 2017-02-14 Alan Modra <amodra@gmail.com>
3989 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3990 --gc-keep-exported, and test versioned field of sym rather than
3991 looking for @ in name.
3993 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3995 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3998 2017-02-13 Nick Clifton <nickc@redhat.com>
4001 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4004 2017-02-07 Andrew Waterman <andrew@sifive.com>
4006 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4007 entry size if PLT header is written.
4009 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4011 Fix sparc64 dynamic relocation processing to use the dynamic
4013 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4014 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4017 2017-02-03 Nick Clifton <nickc@redhat.com>
4020 * coffcode.h (coff_write_object_contents): Enlarge size of
4021 s_name_buf in order to avoid compile time warning about possible
4023 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4024 32-bits of insn value before printing into buffer.
4026 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4028 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4029 `max_local_dynindx'.
4030 (mips_elf_sort_hash_table): Handle it.
4031 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4032 symbols bump up `max_local_dynindx' rather than
4033 `max_non_got_dynindx'.
4035 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4037 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4038 `min_got_dynindx', `max_unref_got_dynindx' and
4039 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4040 (mips_elf_sort_hash_table): Adjust accordingly.
4042 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4044 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4045 to access the hash table.
4047 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4049 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4050 non-NULL `htab' to the beginning.
4052 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4054 * elflink.c (elf_gc_sweep): Wrap overlong line.
4056 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4058 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4059 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4060 * elfxx-mips.c (mips_elf_link_hash_table): Add
4061 `ignore_branch_isa' member.
4062 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4063 in branch relocation calculation as an error if
4064 `ignore_branch_isa' has been set.
4065 (_bfd_mips_elf_insn32): Rename to...
4066 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4067 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4068 Handle the new parameter.
4070 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4072 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4073 local variable dynobj.
4076 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4077 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4078 executable from read-only sections into sdynrelro.
4079 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4080 dynamic relocs in sdynrelro.
4081 (elf_backend_want_dynrelro): Define.
4083 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4085 * config.bfd (*-*-rtemsaout*): Mark as removed.
4087 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4089 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4090 (arm-*-rtems*): Move to (arm*-*-eabi*).
4091 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4092 (m68-*-rtems*): Move to (m68*-*-elf*).
4094 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4096 * config.bfd (*-*-rtemscoff*): Mark as removed.
4098 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4101 * elflink.c (bfd_elf_record_link_assignment): Revert last
4102 change and don't ever clear `forced_local'. Set `mark'
4104 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4106 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4107 (bfd_elf_size_dynamic_sections): ... here.
4108 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4109 and set `mark' instead in `__tls_get_addr_opt' processing.
4110 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4112 2017-01-24 Alan Modra <amodra@gmail.com>
4114 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4115 where dynamic relocs are preferable. Allow ifunc too.
4116 (ensure_undefweak_dynamic): New function.
4117 (allocate_dynrelocs): Use it here. Move plt handling last and
4118 don't make symbols dynamic, simplifying loop. Only make undef
4119 weak symbols with GOT entries dynamic. Correct condition
4120 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4121 comments. Remove goto.
4122 (ppc_elf_relocate_section): Correct test for using dynamic
4123 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4124 to suit. Set up explicit tls_index entries and implicit GOT
4125 tls_index entries resolvable at link time for
4126 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4127 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4128 (ensure_undefweak_dynamic): New function.
4129 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4130 with GOT entries dynamic. Remove unnecessary test of
4131 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4132 (ppc64_elf_relocate_section): Correct test for using dynamic
4133 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4134 to suit. Set up explicit tls_index entries and implicit GOT
4135 tls_index entries resolvable at link time for __tls_get_addr_opt.
4136 Simplify expression to clear mem for prelink.
4138 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4140 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4142 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4144 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4145 (elf_backend_hash_symbol): Define.
4147 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4150 * elflink.c (bfd_elf_record_link_assignment): Clear any
4151 `forced_local' marking for DSO symbols that are not being
4154 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4156 * elfnn-riscv.c (riscv_elf_object_p): New function.
4158 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4161 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4163 (elf_x86_64_check_relocs): Create .eh_frame section for the
4165 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4166 .eh_frame section for the .plt.bnd section.
4167 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4168 for the .plt.bnd section.
4170 2017-01-12 Nick Clifton <nickc@redhat.com>
4173 * opncls.c (find_separate_debug_file): Add include_dirs
4174 parameter. Only include the directory part of the bfd's filename
4175 in search paths if include_dirs is true. Add a couple of extra
4176 locations for looking for debug files.
4177 ( bfd_follow_gnu_debuglink): Update invocation of
4178 find_separate_debug_file.
4179 (bfd_follow_gnu_debugaltlink): Likewise.
4180 (get_build_id): New function: Finds the build-id of the given bfd.
4181 (get_build_id_name): New function: Computes the name of the
4182 separate debug info file for a bfd, based upon its build-id.
4183 (check_build_id_file): New function: Checks to see if a separate
4184 debug info file exists at the given location, and that its
4185 build-id matches that of the original bfd.
4186 (bfd_follow_build_id_debuglink): New function: Finds a separate
4187 debug info file for a given bfd by using the build-id method.
4188 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4189 method of locating a separate debug info file before using the
4191 * bfd-in2.h: Regenerate.
4193 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4196 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4197 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4198 elf_x86_64_eh_frame_plt_got.
4199 (elf_x86_64_size_dynamic_sections): Get unwind info from
4200 elf_x86_64_bnd_arch_bed for the BND PLT.
4202 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4204 * config.bfd: Add entries for i686-redox and x86_64-redox.
4206 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4208 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4210 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4211 .eh_frame section to 4 bytes for x32.
4212 (elf_x86_64_check_relocs): Likewise.
4214 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4217 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4218 (PLT_GOT_FDE_LENGTH): Likewise.
4219 (elf_i386_plt_layout): Add eh_frame_plt_got and
4220 eh_frame_plt_got_size.
4221 (elf_i386_plt): Updated.
4222 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4223 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4224 (elf_i386_size_dynamic_sections): Allocate and initialize
4225 .eh_frame section for .plt.got.
4226 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4228 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4229 eh_frame_plt_got_size.
4230 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4231 (PLT_GOT_FDE_LENGTH): Likewise.
4232 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4233 eh_frame_plt_got_size.
4234 (elf_x86_64_arch_bed): Updated.
4235 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4236 eh_frame_plt_got_size.
4237 (elf_x86_64_nacl_arch_bed): Likewise.
4238 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4239 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4240 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4241 .eh_frame section for .plt.got.
4242 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4245 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4247 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4248 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4250 2017-01-09 Nick Clifton <nickc@redhat.com>
4252 * dwarf2.c (lookup_address_in_function_table): Return early if
4253 there are no functions in the given comp unit, or if the high
4254 address of the last function in the comp unit is less than the
4257 2017-01-09 Nick Clifton <nickc@redhat.com>
4260 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4261 message if there are too many symbols to load.
4263 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4265 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4266 if relocs are cached.
4268 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4271 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4272 for R_MICROBLAZE_GOTOFF_64.
4274 2017-01-03 Nick Clifton <nickc@redhat.com>
4276 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4277 warning about using a possibly uninitialised variable.
4279 2017-01-02 Alan Modra <amodra@gmail.com>
4281 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4282 (allocate_plt_static, allocate_dynrelocs): Use it.
4284 2017-01-02 Alan Modra <amodra@gmail.com>
4286 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4287 .PARISC.unwind section.
4289 2017-01-02 Alan Modra <amodra@gmail.com>
4292 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4293 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4294 indirect to GOT pointer relative code edit.
4296 2017-01-02 Alan Modra <amodra@gmail.com>
4298 Update year range in copyright notice of all files.
4300 For older changes see ChangeLog-2016
4302 Copyright (C) 2017 Free Software Foundation, Inc.
4304 Copying and distribution of this file, with or without modification,
4305 are permitted in any medium without royalty provided the copyright
4306 notice and this notice are preserved.
4312 version-control: never