1 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
4 Dump dynamic relocation in read-only section with minfo if
6 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
7 (maybe_set_textrel): Likewise.
8 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
9 read-only section with minfo.
11 2017-10-05 John Baldwin <jhb@FreeBSD.org>
13 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
15 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
17 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
18 in read-only section with minfo.
19 (tilepro_elf_size_dynamic_sections): Likewise.
20 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
21 (tilegx_elf_size_dynamic_sections): Likewise.
23 2017-10-05 Pedro Alves <palves@redhat.com>
26 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
27 ellipsis parameter. Split out bfd_error_on_input code to..
28 (bfd_set_input_error): .. New function.
29 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
30 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
31 * bfd-in2.h: Regenerate.
33 2017-10-05 Alan Modra <amodra@gmail.com>
35 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
36 fini_array error value.
38 2017-10-05 Alan Modra <amodra@gmail.com>
41 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
43 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
45 (elf_fake_sections): Adjust calls. Exit immediately on failure.
46 (bfd_elf_set_group_contents): Add associated reloc section indices
49 2017-10-04 Alan Modra <amodra@gmail.com>
51 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
52 classify symbols for ELFv2.
54 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
57 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
58 undergoes default promotion.
59 * bfd-in2.h: Regenerate.
61 2017-10-02 Alan Modra <amodra@gmail.com>
63 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
64 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
66 2017-10-01 Alan Modra <amodra@gmail.com>
69 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
70 (add_line_info): Always put end_sequence last.
72 2017-10-01 Alan Modra <amodra@gmail.com>
75 * dwarf2.c (read_section): Allocate buffer with extra byte for
76 bfd_simple_get_relocated_section_contents rather than copying
79 2017-09-29 Alan Modra <amodra@gmail.com>
81 * merge.c (merge_strings): Return FALSE on malloc failure.
82 (_bfd_merge_sections): Return failures from record_section and
85 2017-09-28 Alan Modra <amodra@gmail.com>
88 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
89 a case where plugin_notice isn't called.
91 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
93 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
96 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
99 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
100 output_bfd to info->callbacks->minfo.
102 2017-09-26 Nick Clifton <nickc@redhat.com>
105 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
106 assertion failure if elf_x86_64_rtype_to_howto has already issued
109 2017-09-26 Alan Modra <amodra@gmail.com>
112 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
115 2017-09-26 Nick Clifton <nickc@redhat.com>
118 * dwarf2.c (read_formatted_entries): Fail early if we know that
119 the loop parsing data entries will overflow the end of the
122 2017-09-26 Alan Modra <amodra@gmail.com>
125 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
126 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
127 to stash->info_ptr_memory, and check die_ref is within that memory.
128 Set info_ptr_end correctly when another CU is refd. Check die_ref
129 for DW_FORM_ref4 etc. is within CU.
131 2017-09-26 Alan Modra <amodra@gmail.com>
134 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
135 (read_formatted_entries): Init "fe".
136 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
138 2017-09-26 Alan Modra <amodra@gmail.com>
141 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
142 bounds in inner loop.
144 2017-09-25 Alan Modra <amodra@gmail.com>
147 * dwarf1.c (parse_die): Sanity check pointer against section limit
148 before dereferencing.
149 (parse_line_table): Likewise.
151 2017-09-25 Alan Modra <amodra@gmail.com>
154 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
156 (parse_comp_unit): Likewise.
158 2017-09-25 Alan Modra <amodra@gmail.com>
161 * dwarf2.c (read_formatted_entries): Error on format_count zero.
163 2017-09-24 Alan Modra <amodra@gmail.com>
166 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
167 within section bounds.
169 2017-09-24 Alan Modra <amodra@gmail.com>
172 * dwarf2.c (decode_line_info): Properly free line sequences on error.
174 2017-09-24 Alan Modra <amodra@gmail.com>
177 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
178 pname param. Return status. Make name const. Don't abort,
179 return an error. Formatting. Exit if current info_ptr matches
180 orig_info_ptr. Update callers.
181 (scan_unit_for_symbols): Start at nesting_level of zero. Make
182 nested_funcs an array of structs for extensibility. Formatting.
184 2017-09-24 Alan Modra <amodra@gmail.com>
187 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
188 rather than dividing by zero.
190 2017-09-24 Alan Modra <amodra@gmail.com>
193 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
195 2017-09-24 Alan Modra <amodra@gmail.com>
198 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
200 2017-09-24 Alan Modra <amodra@gmail.com>
203 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
204 SHT_GNU_verneed section for sanity. Don't zalloc memory for
207 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
210 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
213 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
216 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
217 -1 if bfd_canonicalize_dynamic_reloc returns 0.
219 2017-09-22 Pedro Alves <palves@redhat.com>
220 Alan Modra <amodra@gmail.com>
222 * version.h: Add comment.
224 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
226 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
227 NT_S390_GS_BC, correct the previously swapped invocations of
228 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
230 2017-09-19 Alan Modra <amodra@gmail.com>
233 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
236 2017-09-19 Alan Modra <amodra@gmail.com>
239 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
240 symbols before calculating verrefs. Don't renumber dynsyms
241 after gc. Exclude .gnu.version when zero or one dynsym.
242 Localize some vars and reindent.
244 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
247 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
248 return from bfd_canonicalize_dynamic_reloc.
250 2017-09-15 Alan Modra <amodra@gmail.com>
253 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
254 overflows bfd_size_type.
256 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
259 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
260 to indicate if conversion is performed.
261 (elf_i386_check_relocs): Cache section contents and relocations
262 if conversion is performed.
263 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
264 contents and relocations if conversion is performed.
266 2017-09-14 Nick Clifton <nickc@redhat.com>
269 * peXXigen.c (pe_print_idata): Extend check for HintName vector
272 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
274 * elfxx-x86.h: Fix a typo in comments.
276 2017-09-09 Kamil Rytarowski <n54@gmx.com>
278 * elf32-nds32.c: Rename __BIT() to N32_BIT().
280 2017-09-09 Alan Modra <amodra@gmail.com>
282 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
285 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
287 * elf32-i386.c (elf_i386_relocate_section): Update usage of
288 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
289 (elf_i386_finish_dynamic_symbol): Likewise.
290 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
291 (elf_x86_64_finish_dynamic_symbol): Likewise.
292 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
293 (_bfd_x86_elf_fixup_symbol): Likewise.
295 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
297 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
298 check has_non_got_reloc.
300 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
303 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
304 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
305 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
306 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
307 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
308 and linker_def on __ehdr_start if it is referenced and not
310 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
311 and return TRUE when building executable, if a symbol has
312 non-GOT/non-PLT relocations in text section or there is no
314 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
316 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
318 * elfxx-x86.h: Update comments.
320 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
322 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
323 elf_x86_plt_layout_table with elf_x86_init_table.
324 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
326 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
328 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
329 (elf_x86_init_table): This.
330 (_bfd_x86_elf_link_setup_gnu_properties): Replace
331 elf_x86_plt_layout_table with elf_x86_init_table.
333 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
335 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
336 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
337 * configure: Regenerated.
338 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
339 and r_sym fields of plt_layout.
340 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
342 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
343 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
344 r_info nor r_sym fields.
345 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
347 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
349 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
351 * (_bfd_riscv_relax_align): Call bfd_set_error and
352 print an error message when unable to relax a .align directive.
354 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
356 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
357 (riscv_record_pcrel_hi_reloc): Add absolute argument.
358 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
359 R_RISCV_PCREL_HI20 relocs, and pass the result to
360 riscv_record_pcrel_hi_reloc.
362 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
364 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
365 r_type_p. Remove the converted argument. Replace
366 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
367 the new relocation type via r_type_p.
368 (elf_i386_relocate_section): Likewise.
369 (elf_i386_finish_dynamic_symbol): Likewise.
370 (need_convert_load): Removed.
371 (check_relocs_failed): Updated.
372 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
373 instead of setting need_convert_load.
374 (_bfd_i386_elf_convert_load): Removed.
375 * elf64-x86-64.c (need_convert_load): Removed.
376 (check_relocs_failed): Updated.
377 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
378 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
379 Return the new relocation type via r_type_p.
380 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
381 instead of setting need_convert_load.
382 (elf_x86_64_check_relocs): Don't check PIC if relocation has
384 (_bfd_x86_64_elf_convert_load): Removed.
385 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
386 with SYMBOL_REFERENCES_LOCAL_P.
387 (elf_x86_64_finish_dynamic_symbol): Likewise.
388 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
390 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
391 (_bfd_x86_elf_link_symbol_references_local): New function.
392 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
393 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
394 SYMBOL_REFERENCES_LOCAL_P.
395 (elf_x86_link_hash_entry): Add local_ref.
396 (elf_x86_link_hash_table): Remove convert_load.
397 (_bfd_i386_elf_convert_load): Removed.
398 (_bfd_x86_64_elf_convert_load): Likewise.
399 (_bfd_x86_elf_link_symbol_references_local): New.
401 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
403 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
404 (elf_x86_64_info_to_howto): Get the real relocation type by
405 masking out R_X86_64_converted_reloc_bit.
406 (elf_x86_64_check_tls_transition): Get the real relocation type
407 by masking out R_X86_64_converted_reloc_bit.
408 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
409 instead of setting converted_reloc.
410 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
411 instead of converted_reloc. Get the real relocation type by
412 masking out R_X86_64_converted_reloc_bit.
413 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
414 R_X86_64_converted_reloc_bit is valid.
415 * elfxx-x86.h (converted_reloc): Removed.
417 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
419 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
420 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
421 to get the relocation type again.
422 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
423 r_type when calling elf_x86_64_tls_transition. Don't use
424 ELF32_R_TYPE to get the relocation type again.
426 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
428 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
431 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
433 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
434 argument. Don't check relocation overflow. Avoid relocation
435 overflow if --no-relax is used. Set converted_reloc on symbol
436 if a GOTPCREL relocation is converted.
437 (elf_x86_64_relocate_section): Issue a fatal error and suggest
438 --no-relax if GOTPCREL relocation conversion leads to relocation
440 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
442 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
443 Edmar Wienskoski <edmar.wienskoski@nxp.com
445 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
446 (ppc_elf_check_relocs): Handle it.
447 (ppc_elf_vle_split20): New function.
448 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
450 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
453 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
454 for x86-64 if GOT_TLS_GDESC_P is true.
456 2017-09-03 Alan Modra <amodra@gmail.com>
459 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
461 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
463 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
464 tls_get_addr for x86-64 in one place.
466 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
468 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
469 with elfxx-x86.lo for 64-bit BFD.
470 * configure: Regenerated.
472 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
474 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
475 (_bfd_i386_elf_convert_load): This. Remove static.
476 (elf_i386_size_dynamic_sections): Removed.
477 (elf_backend_size_dynamic_sections): Likewise.
478 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
479 (_bfd_x86_64_elf_convert_load): This. Remove static.
480 (elf_x86_64_size_dynamic_sections): Removed.
481 (elf_backend_size_dynamic_sections): Likewise.
482 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
483 (elf_x86_allocate_dynrelocs): This. Make it static.
484 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
485 (elf_x86_allocate_local_dynreloc): This. Make it static.
486 (elf_i386_is_reloc_section): New function.
487 (elf_x86_64_is_reloc_section): Likewise.
488 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
489 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
490 Rearrange got_entry_size initialization.
491 (_bfd_x86_elf_size_dynamic_sections): New function.
492 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
493 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
494 (_bfd_i386_elf_convert_load): New.
495 (_bfd_x86_64_elf_convert_load): Likewise.
496 (_bfd_x86_elf_size_dynamic_sections): Likewise.
497 (elf_backend_size_dynamic_sections): Likewise.
498 (_bfd_x86_elf_allocate_dynrelocs): Removed.
499 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
501 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
503 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
506 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
508 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
509 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
511 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
513 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
514 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
515 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
516 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
517 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
518 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
520 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
522 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
523 (elf_i386_allocate_local_dynrelocs): Likewise.
524 (elf_i386_size_dynamic_sections): Replace
525 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
526 with _bfd_x86_elf_allocate_dynrelocs and
527 _bfd_x86_elf_allocate_local_dynrelocs.
528 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
529 (elf_x86_64_allocate_local_dynrelocs): Likewise.
530 (elf_x86_64_size_dynamic_sections): Replace
531 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
532 with _bfd_x86_elf_allocate_dynrelocs and
533 _bfd_x86_elf_allocate_local_dynrelocs.
534 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
535 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
536 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
537 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
539 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
541 * elf32-i386.c (is_i386_elf): Removed.
542 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
543 (elf_i386_size_dynamic_sections): Likewise.
544 (elf_i386_relocate_section): Likewise.
545 * elf64-x86-64.c (is_x86_64_elf): Removed.
546 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
548 (elf_x86_64_size_dynamic_sections): Likewise.
549 (elf_x86_64_relocate_section): Likewise.
550 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
552 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
555 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
557 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
558 (elf_i386_allocate_dynrelocs): Replace
559 elf_i386_compute_jump_table_size with
560 elf_x86_compute_jump_table_size.
561 (elf_i386_size_dynamic_sections): Likewise.
562 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
563 (elf_x86_64_allocate_dynrelocs): Replace
564 elf_x86_64_compute_jump_table_size with
565 elf_x86_compute_jump_table_size.
566 (elf_x86_64_size_dynamic_sections): Likewise.
567 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
569 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
570 (elf_x86_compute_jump_table_size): New.
572 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
574 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
576 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
577 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
579 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
581 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
582 with htab->is_vxworks.
583 (elf_i386_size_dynamic_sections): Likewise.
584 (elf_i386_relocate_section): Likewise.
585 (elf_i386_finish_dynamic_symbol): Likewise.
586 (elf_i386_finish_dynamic_sections): Likewise.
588 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
590 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
591 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
592 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
593 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
594 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
595 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
596 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
597 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
599 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
602 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
603 ELF_COMMON_DEF_P for common symbols.
605 2017-09-02 Alan Modra <amodra@gmail.com>
607 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
608 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
609 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
611 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
613 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
614 (elf_backend_gc_mark_hook): Likewise.
615 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
616 (elf_backend_gc_mark_hook): Likewise.
617 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
618 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
619 (elf_backend_gc_mark_hook): Likewise.
621 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
623 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
624 (elf_backend_adjust_dynamic_symbol): Likewise.
625 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
626 (elf_backend_adjust_dynamic_symbol): Likewise.
627 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
628 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
629 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
630 (_bfd_x86_elf_adjust_dynamic_symbol): New.
631 (elf_backend_adjust_dynamic_symbol): Likewise.
633 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
635 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
638 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
640 * elf32-i386.c (elf_i386_mkobject): Removed.
641 (bfd_elf32_mkobject): Likewise.
642 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
643 (bfd_elf64_mkobject): Likewise.
644 (bfd_elf32_mkobject): Likewise.
645 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
646 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
647 (bfd_elf64_mkobject): Likewise.
648 (bfd_elf32_mkobject): Likewise.
650 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
652 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
653 Call _bfd_x86_elf_link_setup_gnu_properties.
654 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
655 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
657 (elf_x86_64_non_lazy_plt): Likewise.
658 (elf_x86_64_lazy_bnd_plt): Likewise.
659 (elf_x86_64_non_lazy_bnd_plt): Likewise.
660 (elf_x86_64_lazy_ibt_plt): Likewise.
661 (elf_x32_lazy_ibt_plt): Likewise.
662 (elf_x86_64_non_lazy_ibt_plt): Likewise.
663 (elf_x32_non_lazy_ibt_plt): Likewise.
664 (elf_x86_64_nacl_plt): Likewise.
665 (elf_x86_64_link_setup_gnu_properties): Updated. Call
666 _bfd_x86_elf_link_setup_gnu_properties.
667 * elfxx-x86.c: Include elf-vxworks.h".
668 (_bfd_x86_elf_link_setup_gnu_properties): New function.
669 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
670 comments for pic_plt0_entry and pic_plt_entry.
671 (elf_x86_non_lazy_plt_layout): Likewise.
672 (elf_x86_plt_layout_table): New.
673 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
675 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
678 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
679 .eh_frame section for the second PLT.
680 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
681 alignment of .eh_frame section for the second PLT.
683 2017-09-01 Nick Clifton <nickc@redhat.com>
686 * dwarf2.c (decode_line_info): Fix test for an overlong line info
689 2017-09-01 Nick Clifton <nickc@redhat.com>
692 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
693 attribute buffer is NUL terminated.
695 2017-08-31 Nick Clifton <nickc@redhat.com>
698 * dwarf2.c (read_section): If necessary add a terminating NUL byte
699 to dwarf string sections.
701 2017-08-31 Alan Modra <amodra@gmail.com>
703 * po/SRC-POTFILES.in: Regenerate.
705 2017-08-31 Alan Modra <amodra@gmail.com>
707 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
708 for a section containing just a terminator. Allow multiple
709 terminators at end of section.
710 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
711 sections when not adding alignment. Assert on terminator in
714 2017-08-31 Alan Modra <amodra@gmail.com>
718 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
721 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
723 * configure.ac (bfd_backends): Add elf64.lo together with
724 elfxx-x86.lo for 64-bit BFD.
725 * configure: Regenerated.
727 2017-08-31 James Bowman <james.bowman@ftdichip.com>
729 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
732 2017-08-31 Alan Modra <amodra@gmail.com>
735 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
736 before _close_and_cleanup. Call iovec->bclose after.
737 (bfd_close): Remove code common to, and call, bfd_close_all_done.
739 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
741 * elf32-i386.c (elf_i386_plt_type): Removed.
742 (elf_i386_plt): Likewise.
743 (elf_i386_get_synthetic_symtab): Updated. Call
744 _bfd_x86_elf_get_synthetic_symtab.
745 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
746 (elf_x86_64_plt): Likewise.
747 (elf_x86_64_get_synthetic_symtab): Updated. Call
748 _bfd_x86_elf_get_synthetic_symtab.
749 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
750 (elf_x86_64_get_plt_got_vma): Likewise.
751 (elf_i386_valid_plt_reloc_p): Likewise.
752 (elf_x86_64_valid_plt_reloc_p): Likewise.
753 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
754 * elfxx-x86.h (elf_x86_plt_type): New.
755 (elf_x86_plt): Likewise.
756 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
758 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
760 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
761 target_id instead of elf_machine_code.
763 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
765 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
766 (elf_i386_lazy_plt_layout): Likewise.
767 (elf_i386_non_lazy_plt_layout): Likewise.
768 (elf_i386_plt_layout): Likewise.
769 (elf_i386_link_hash_table): Likewise.
770 (elf_i386_next_tls_desc_index): Likewise.
771 (elf_i386_srelplt2): Likewise.
772 (elf_i386_plt): Likewise.
773 (elf_i386_lazy_plt): Likewise.
774 (elf_i386_non_lazy_plt): Likewise.
775 (elf_i386_link_hash_table_create): Likewise.
776 (bfd_elf32_bfd_link_hash_table_create): Likewise.
777 (elf_i386_lazy_plt): Updated.
778 (elf_i386_non_lazy_plt): Likewise.
779 (elf_i386_lazy_ibt_plt): Likewise.
780 (elf_i386_non_lazy_ibt_plt): Likewise.
781 (elf_i386_allocate_dynrelocs): Likewise.
782 (elf_i386_size_dynamic_sections): Likewise.
783 (elf_i386_relocate_section): Likewise.
784 (elf_i386_finish_dynamic_symbol): Likewise.
785 (elf_i386_finish_dynamic_sections): Likewise.
786 (elf_i386_get_synthetic_symtab): Likewise.
787 (elf_i386_link_setup_gnu_properties): Likewise.
788 (elf_i386_nacl_plt): Likewise.
789 * elf64-x86-64.c (ABI_64_P): Removed.
790 (ELF64_DYNAMIC_INTERPRETER): Likewise.
791 (ELF32_DYNAMIC_INTERPRETER): Likewise.
792 (elf_x86_64_lazy_plt_layout): Likewise.
793 (elf_x86_64_non_lazy_plt_layout): Likewise.
794 (elf_x86_64_plt_layout): Likewise.
795 (elf_x86_64_link_hash_table): Likewise.
796 (elf_x86_64_plt): Likewise.
797 (elf_x86_64_lazy_plt): Likewise.
798 (elf_x86_64_non_lazy_plt): Likewise.
799 (elf_x86_64_link_hash_table_create): Likewise.
800 (bfd_elf64_bfd_link_hash_table_create): Likewise.
801 (bfd_elf32_bfd_link_hash_table_create): Likewise.
802 (elf_x86_64_lazy_plt): Updated.
803 (elf_x86_64_non_lazy_plt): Likewise.
804 (elf_x86_64_lazy_bnd_plt): Likewise.
805 (elf_x86_64_non_lazy_bnd_plt): Likewise.
806 (elf_x86_64_lazy_ibt_plt): Likewise.
807 (elf_x32_lazy_ibt_plt): Likewise.
808 (elf_x86_64_non_lazy_ibt_plt): Likewise.
809 (elf_x32_non_lazy_ibt_plt): Likewise.
810 (elf_x86_64_allocate_dynrelocs): Likewise.
811 (elf_x86_64_size_dynamic_sections): Likewise.
812 (elf_x86_64_relocate_section): Likewise.
813 (elf_x86_64_finish_dynamic_symbol): Likewise.
814 (elf_x86_64_finish_dynamic_sections): Likewise.
815 (elf_x86_64_get_synthetic_symtab): Likewise.
816 (elf_x86_64_link_setup_gnu_properties): Likewise.
817 (elf_x86_64_nacl_plt): Likewise.
818 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
820 (ELF32_DYNAMIC_INTERPRETER): New.
821 (ELF64_DYNAMIC_INTERPRETER): Likewise.
822 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
823 (_bfd_x86_elf_link_hash_table_create): Likewise.
824 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
825 (elf_x86_link_hash_table_free): This. Make it static.
826 * elfxx-x86.h: Don't include "objalloc.h".
828 (elf_x86_lazy_plt_layout): Likewise.
829 (elf_x86_non_lazy_plt_layout): Likewise.
830 (elf_x86_plt_layout): Likewise.
831 (_bfd_x86_elf_link_hash_table_create): Likewise.
832 (bfd_elf64_bfd_link_hash_table_create): Likewise.
833 (bfd_elf32_bfd_link_hash_table_create): Likewise.
834 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
835 srelplt2 and next_tls_desc_index.
836 (_bfd_x86_elf_link_hash_table_free): Removed.
838 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
840 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
841 branch offset interpretation.
843 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
846 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
848 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
850 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
851 (elf_x86_64_srelplt2): Likewise.
853 2017-08-30 Alan Modra <amodra@gmail.com>
855 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
856 (ppc64_elf_tls_optimize): Set it.
857 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
858 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
859 addis would add zero.
860 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
861 (ppc_elf_tls_optimize): Set it.
862 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
863 insn on TPREL16_LO relocs to use r2 when addis would add zero.
865 2017-08-30 Alan Modra <amodra@gmail.com>
867 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
868 __tls_get_addr call sequences to LE, don't move the addi down
869 to the nop. Replace the bl with addi and leave the nop alone.
871 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
873 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
875 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
877 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
879 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
881 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
882 (BFD64_BACKENDS): Likewise.
883 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
884 (BFD64_BACKENDS_CFILES): Likewise.
885 * Makefile.in: Regenerated.
886 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
887 elf32-i386.lo and elf64-x86-64.lo.
888 * configure: Regenerated.
889 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
890 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
891 "objalloc.h" and "hashtab.h".
892 (ELIMINATE_COPY_RELOCS): Removed.
893 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
894 (SYMBOL_NO_COPYRELOC): Likewise.
895 (elf_i386_link_hash_entry): Likewise.
896 (GOT_UNKNOWN): Likewise.
897 (GOT_NORMAL): Likewise.
898 (GOT_TLS_GD): Likewise.
899 (elf_i386_hash_entry): Likewise.
900 (elf_i386_obj_tdata): Likewise.
901 (elf_i386_tdata): Likewise.
902 (elf_i386_local_got_tls_type): Likewise.
903 (elf_i386_local_tlsdesc_gotent): Likewise.
904 (elf_i386_hash_table): Likewise.
905 (elf_i386_link_hash_newfunc): Likewise.
906 (elf_i386_local_htab_hash): Likewise.
907 (elf_i386_local_htab_eq): Likewise.
908 (elf_i386_get_local_sym_hash): Likewise.
909 (elf_i386_link_hash_table_free): Likewise.
910 (elf_i386_copy_indirect_symbol): Likewise.
911 (elf_i386_fixup_symbol): Likewise.
912 (elf_i386_readonly_dynrelocs): Likewise.
913 (elf_i386_always_size_sections): Likewise.
914 (elf_i386_set_tls_module_base): Likewise.
915 (elf_i386_dtpoff_base): Likewise.
916 (compare_relocs): Likewise.
917 (elf_i386_hash_symbol): Likewise.
918 (elf_i386_parse_gnu_properties): Likewise.
919 (elf_i386_merge_gnu_properties): Likewise.
920 (elf_i386_link_check_relocs): Likewise.
921 (elf_i386_merge_symbol_attribute): Likewise.
922 (bfd_elf32_bfd_link_check_relocs): Likewise.
923 (elf_backend_copy_indirect_symbol): Likewise.
924 (elf_backend_always_size_sections): Likewise.
925 (elf_backend_omit_section_dynsym): Likewise.
926 (elf_backend_hash_symbol): Likewise.
927 (elf_backend_fixup_symbol): Likewise.
928 (elf_backend_parse_gnu_properties): Likewise.
929 (elf_backend_merge_gnu_properties): Likewise.
930 (elf_backend_merge_symbol_attribute): Likewise.
931 (elf_i386_mkobject): Updated.
932 (elf_i386_link_hash_table_create): Likewise.
933 (elf_i386_check_tls_transition): Likewise.
934 (elf_i386_tls_transition): Likewise.
935 (elf_i386_convert_load_reloc): Likewise.
936 (elf_i386_check_relocs): Likewise.
937 (elf_i386_adjust_dynamic_symbol): Likewise.
938 (elf_i386_allocate_dynrelocs): Likewise.
939 (elf_i386_convert_load): Likewise.
940 (elf_i386_size_dynamic_sections): Likewise.
941 (elf_i386_relocate_section): Likewise.
942 (elf_i386_finish_dynamic_symbol ): Likewise.
943 (elf_i386_finish_dynamic_sections): Likewise.
944 (elf_i386_output_arch_local_syms): Likewise.
945 (elf_i386_get_synthetic_symtab): Likewise.
946 (elf_i386_link_setup_gnu_properties): Likewise.
947 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
948 of elf_link_hash_table, as base.
949 (elf_i386_next_tls_desc_index): New.
950 (elf_i386_srelplt2): Likewise.
951 (elf_i386_plt): Likewise.
952 (elf_i386_lazy_plt): Likewise.
953 (elf_i386_non_lazy_plt): Likewise.
954 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
955 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
956 "objalloc.h" and "hashtab.h".
957 (ELIMINATE_COPY_RELOCS): Removed.
958 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
959 (SYMBOL_NO_COPYRELOC): Likewise.
960 (elf_x86_64_link_hash_entry): Likewise.
961 (GOT_UNKNOWN): Likewise.
962 (GOT_NORMAL): Likewise.
963 (GOT_TLS_GD): Likewise.
964 (elf_x86_64_hash_entry): Likewise.
965 (elf_x86_64_obj_tdata): Likewise.
966 (elf_x86_64_tdata): Likewise.
967 (elf_x86_64_local_got_tls_type): Likewise.
968 (elf_x86_64_local_tlsdesc_gotent): Likewise.
969 (elf_x86_64_hash_table): Likewise.
970 (elf_x86_64_link_hash_newfunc): Likewise.
971 (elf_x86_64_local_htab_hash): Likewise.
972 (elf_x86_64_local_htab_eq): Likewise.
973 (elf_x86_64_get_local_sym_hash): Likewise.
974 (elf_x86_64_link_hash_table_free): Likewise.
975 (elf_x86_64_copy_indirect_symbol): Likewise.
976 (elf_x86_64_fixup_symbol): Likewise.
977 (elf_x86_64_readonly_dynrelocs): Likewise.
978 (elf_x86_64_always_size_sections): Likewise.
979 (elf_x86_64_set_tls_module_base): Likewise.
980 (elf_x86_64_dtpoff_base): Likewise.
981 (compare_relocs): Likewise.
982 (elf_x86_64_merge_symbol_attribute): Likewise.
983 (elf_x86_64_hash_symbol): Likewise.
984 (elf_x86_64_parse_gnu_properties): Likewise.
985 (elf_x86_64_merge_gnu_properties): Likewise.
986 (elf_x86_64_link_check_relocs): Likewise.
987 (elf_backend_copy_indirect_symbol): Likewise.
988 (elf_backend_always_size_sections): Likewise.
989 (bfd_elf64_bfd_link_check_relocs): Likewise.
990 (elf_backend_merge_symbol_attribute): Likewise.
991 (elf_backend_hash_symbol): Likewise.
992 (elf_backend_omit_section_dynsym): Likewise.
993 (elf_backend_fixup_symbol): Likewise.
994 (elf_backend_parse_gnu_properties): Likewise.
995 (elf_backend_merge_gnu_properties): Likewise.
996 (bfd_elf32_bfd_link_check_relocs): Likewise.
997 (elf_x86_64_mkobject): Updated.
998 (elf_x86_64_link_hash_table_create): Likewise.
999 (elf_x86_64_check_tls_transition): Likewise.
1000 (elf_x86_64_tls_transition): Likewise.
1001 (elf_x86_64_convert_load_reloc): Likewise.
1002 (elf_x86_64_check_relocs): Likewise.
1003 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1004 (elf_x86_64_allocate_dynrelocs): Likewise.
1005 (elf_x86_64_convert_load): Likewise.
1006 (elf_x86_64_size_dynamic_sections): Likewise.
1007 (elf_x86_64_relocate_section): Likewise.
1008 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1009 (elf_x86_64_finish_dynamic_sections): Likewise.
1010 (elf_x86_64_output_arch_local_syms): Likewise.
1011 (elf_x86_64_get_synthetic_symtab): Likewise.
1012 (elf_x86_64_link_setup_gnu_properties): Likewise.
1013 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1014 instead of elf_link_hash_table, as base.
1015 (elf_x86_64_next_tls_desc_index): New.
1016 (elf_x86_64_srelplt2): Likewise.
1017 (elf_x86_64_plt): Likewise.
1018 (elf_x86_64_lazy_plt): Likewise.
1019 (elf_x86_64_non_lazy_plt): Likewise.
1020 * elfxx-x86.c: New file.
1021 * elfxx-x86.h: Likewise.
1023 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1025 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1027 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1029 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1031 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1032 sections before checking dynamic relocations and free invalid
1033 PLT section contents.
1034 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1036 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1038 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1039 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1041 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1044 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1046 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1048 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1050 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1052 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1054 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1057 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1058 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1059 Add a has_no_copy_on_protected bitfield.
1060 (elf_has_no_copy_on_protected): New.
1061 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1062 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1063 (elf_merge_gnu_property_list): Likewise.
1064 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1065 to FALSE for elf_has_no_copy_on_protected.
1066 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1067 (elf_i386_link_hash_entry): Add def_protected.
1068 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1069 when checking info->nocopyreloc.
1070 (elf_i386_link_setup_gnu_properties): Don't set
1071 extern_protected_data here.
1072 (elf_i386_merge_symbol_attribute): New function.
1073 (elf_backend_merge_symbol_attribute): New.
1074 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1075 (elf_x86_64_link_hash_entry): Add def_protected.
1076 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1077 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1078 when checking info->nocopyreloc.
1079 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1080 relocation run-time overflow and unresolvable R_X86_64_32S
1081 relocation against protected data symbol defined in shared object
1082 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1083 (elf_x86_64_link_setup_gnu_properties): Don't set
1084 extern_protected_data here.
1085 (elf_x86_64_merge_symbol_attribute): New function.
1086 (elf_backend_merge_symbol_attribute): New.
1088 2017-08-26 Alan Modra <amodra@gmail.com>
1090 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1091 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1092 (ppc_elf_relocate_section): Comment fix.
1093 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1094 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1095 Support dynamic relocs for TPREL16 when non-pic too.
1096 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1097 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1100 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1102 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1103 "symbol" in comments.
1104 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1106 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1109 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1110 R_X86_64_PC32 relocation run-time overflow and unresolvable
1111 R_X86_64_32S relocation with -z nocopyreloc.
1113 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1115 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1116 Undefined symbols may not have a type.
1117 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1119 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1121 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1122 bfd_link_info. Report shared, PIE or PDE object based on
1124 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1125 (elf_x86_64_relocate_section): Likewise.
1127 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1129 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1130 for function symbols.
1131 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1133 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1135 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1136 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1137 is set on any input relocatable file.
1138 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1140 2017-08-23 Alan Modra <amodra@gmail.com>
1143 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1144 ensure_undefweak_dynamic. Handle undefined too.
1145 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1146 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1147 (allocate_dynrelocs): Discard undefined non-default visibility
1148 relocs first. Make undefined syms dynamic. Tidy goto.
1150 2017-08-21 Alan Modra <amodra@gmail.com>
1151 H.J. Lu <hongjiu.lu@intel.com>
1154 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1155 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1157 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1160 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1161 undefined weak symbols.
1163 2017-08-18 Nick Clifton <nickc@redhat.com>
1166 * tekhex.c (getsym): Fix check for source pointer walking off the
1167 end of the input buffer.
1169 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1172 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1173 relocations in debug sections, change abort to _bfd_error_handler.
1175 2017-08-14 Nick Clifton <nickc@redhat.com>
1178 * elf.c (setup_group): Check for an empty or very small group
1180 * po/bfd.pot: Regenerate.
1182 2017-08-14 Alan Modra <amodra@gmail.com>
1185 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1186 alignment padding here.
1187 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1188 in a reverse pass over sections.
1190 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1193 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1194 for @plt suffixes first.
1195 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1197 2017-08-08 Nick Clifton <nickc@redhat.com>
1200 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1201 small section lengths.
1202 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1204 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1205 there is enough data present in the note.
1207 2017-08-08 Alan Modra <amodra@gmail.com>
1210 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1211 got.refcount for GOTOFF relocs, just create .got section.
1213 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1215 * elflink.c (elf_link_add_object_symbols): Move common symbol
1216 check after bed->common_definition.
1218 2017-08-07 Alan Modra <amodra@gmail.com>
1221 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1222 needed to define various dynamic tags have been discarded.
1224 2017-08-07 Nick Clifton <nickc@redhat.com>
1227 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1228 has not been set then use the bfd returned by
1229 _bfd_elf_link_setup_gnu_properties. If that is null then search
1230 through all the input bfds selecting the first normal, ELF format
1232 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1234 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1236 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1238 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1239 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1240 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1241 (elf_i386_link_check_relocs): New function.
1242 (bfd_elf32_bfd_link_check_relocs): New.
1243 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1245 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1246 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1247 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1248 (elf_x86_64_link_check_relocs): New function.
1249 (bfd_elf64_bfd_link_check_relocs): New.
1250 (bfd_elf32_bfd_link_check_relocs): Likewise.
1252 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1255 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1256 as undefined for --no-define-common.
1258 2017-08-05 Alan Modra <amodra@gmail.com>
1260 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1261 hppa_link_hash_table.
1263 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1265 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1266 entries for sysregs with negative indices.
1268 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1270 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1271 isn't the S/390 specific elf data.
1272 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1274 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1276 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1277 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1278 [R_RISCV_ADD16]: Likewise.
1279 [R_RISCV_ADD32]: Likewise.
1280 [R_RISCV_ADD64]: Likewise.
1281 [R_RISCV_SUB6]: Likewise.
1282 [R_RISCV_SUB8]: Likewise.
1283 [R_RISCV_SUB16]: Likewise.
1284 [R_RISCV_SUB32]: Likewise.
1285 [R_RISCV_SUB64]: Likewise.
1287 2017-07-31 Alan Modra <amodra@gmail.com>
1289 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1290 without ld.so checks.
1292 2017-07-29 Alan Modra <amodra@gmail.com>
1295 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1296 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1297 (is_elfv2_localentry0): Test non_zero_localentry.
1298 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1300 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1302 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1303 pointer check for htab->elf.irelplt.
1304 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1306 2017-07-27 Nick Clifton <nickc@redhat.com>
1309 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1311 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1313 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1315 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1317 (evax_bfd_print_emh): Check for invalid string lengths.
1319 2017-07-25 Nick Clifton <nickc@redhat.com>
1321 * po/fr.po: Updated French translation.
1323 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1326 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1327 16-bit absolute branches into 10-bit pc-relative branches on the
1328 MSP430 as well as the MSP430X.
1330 2017-07-25 Alan Modra <amodra@gmail.com>
1332 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1333 (stub_eh_frame_size): New function.
1334 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1335 (group_sections): Init group tls_get_addr_opt_bctrl.
1336 (ppc64_elf_size_stubs): Update sizing and initialization of
1337 .eh_frame. Iteration over stubs via group list.
1338 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1339 (ppc64_elf_finish_dynamic_sections): Update finalization of
1342 2017-07-24 Nick Clifton <nickc@redhat.com>
1345 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1346 of the relocs to the canonicalize_one_reloc routine.
1347 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1348 for the _bfd_mach_o_canonicalize_one_reloc field.
1349 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1350 res_base parameter. Use to check for corrupt pair relocs.
1351 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1353 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1355 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1358 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1359 enough data in the record before attempting to parse it.
1360 (_bfd_vms_slurp_eeom): Likewise.
1362 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1363 (image_set_ptr): Likewise.
1364 (alpha_vms_slurp_relocs): Likewise.
1366 (alpha_vms_object_p): Check for a truncated record.
1368 2017-07-24 Nick Clifton <nickc@redhat.com>
1371 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1372 an unrecognized reloc and sets the bfd_error value.
1373 * libbfd.h: Regenerate.
1374 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1376 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1377 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1378 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1379 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1380 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1382 2017-07-23 Alan Modra <amodra@gmail.com>
1384 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1387 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1390 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1391 reloc_class_ifunc for ifunc symbols.
1393 2017-07-19 Nick Clifton <nickc@redhat.com>
1396 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1397 correct magic bytes at the start, set the error to wrong format
1398 and clear the format selector before returning NULL.
1400 2017-07-19 Nick Clifton <nickc@redhat.com>
1403 * coff-rs6000.c (_bfd_strntol): New function.
1404 (_bfd_strntoll): New function.
1405 (GET_VALUE_IN_FIELD): New macro.
1406 (EQ_VALUE_IN_FIELD): new macro.
1407 (_bfd_xcoff_slurp_armap): Use new macros.
1408 (_bfd_xcoff_archive_p): Likewise.
1409 (_bfd_xcoff_read_ar_hdr): Likewise.
1410 (_bfd_xcoff_openr_next_archived_file): Likewise.
1411 (_bfd_xcoff_stat_arch_elt): Likewise.
1412 * coff64-rs6000.c (_bfd_strntol): New function.
1413 (_bfd_strntoll): New function.
1414 (GET_VALUE_IN_FIELD): New macro.
1415 (xcoff64_slurp_armap): Use new macros.
1417 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1418 John Eric Martin <John.Martin@emmicro-us.com>
1420 * bfd-in2.h: Regenerate.
1421 * libbfd.h: Regenerate.
1422 * elf32-arc.c (JLI): Define.
1423 * reloc.c: Add JLI relocations.
1425 2017-07-18 Nick Clifton <nickc@redhat.com>
1428 * coff-sh.c: Fix spelling typos.
1429 * compress.c: Likewise.
1430 * cpu-pdp11.c: Likewise.
1431 * ecofflink.c: Likewise.
1432 * elf-m10300.c: Likewise.
1434 * elf32-arm.c: Likewise.
1435 * elf32-m68k.c: Likewise.
1436 * elf32-nds32.c: Likewise.
1437 * elf32-ppc.c: Likewise.
1438 * elf32-sh.c: Likewise.
1439 * elf32-v850.c: Likewise.
1440 * elf64-ppc.c: Likewise.
1441 * elf64-x86-64.c: Likewise.
1442 * elflink.c: Likewise.
1443 * elfnn-aarch64.c: Likewise.
1444 * elfxx-mips.c: Likewise.
1446 * sunos.c: Likewise.
1447 * vms-alpha.c: Likewise.
1448 * xcofflink.c: Likewise.
1450 2017-07-18 Nick Clifton <nickc@redhat.com>
1453 * coffcode.h (handle_COMDAT): Replace abort with an error message
1456 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1459 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1462 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1464 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1466 2017-07-16 Alan Modra <amodra@gmail.com>
1468 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1469 __tls_index GOT entries when using __tls_get_addr_opt stub.
1470 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1472 2017-07-12 Alan Modra <amodra@gmail.com>
1474 * po/es.po: Update from translationproject.org/latest/bfd/.
1475 * po/fi.po: Likewise.
1476 * po/fr.po: Likewise.
1477 * po/id.po: Likewise.
1478 * po/ja.po: Likewise.
1479 * po/ro.po: Likewise.
1480 * po/ru.po: Likewise.
1481 * po/sr.po: Likewise.
1482 * po/sv.po: Likewise.
1483 * po/tr.po: Likewise.
1484 * po/uk.po: Likewise.
1485 * po/vi.po: Likewise.
1486 * po/zh_CN.po: Likewise.
1487 * po/hr.po: New file from translationproject.org.
1488 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1489 * configure: Regenerate.
1491 2017-07-12 Nick Clifton <nickc@redhat.com>
1493 Fix compile time warnings using gcc 7.1.1.
1494 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1496 (elf_xtensa_get_gotplt_section): Increase length of got_name
1498 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1499 default return of FALSE.
1500 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1501 default return of FALSE.
1503 2017-07-12 Alan Modra <amodra@gmail.com>
1505 * binary.c (binary_set_section_contents): Don't print filepos in
1507 (coff_write_object_contents): Cast size_t for error message.
1508 (coff_slurp_line_table): Don't use bfd_vma symndx.
1509 (coff_slurp_reloc_table): Remove unneeded cast.
1510 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1512 (find_abstract_instance_name): Likewise.
1513 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1514 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1515 (elf32_arm_check_relocs): Make r_symndx an int.
1516 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1518 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1520 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1522 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1523 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1524 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1525 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1526 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1527 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1528 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1529 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1530 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1531 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1532 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1533 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1534 and use %lu for error message.
1535 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1536 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1539 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1541 (elf32_arm_final_link_relocate): Likewise.
1542 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1543 * coffcode.h (styp_to_sec_flags): Likewise.
1544 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1545 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1546 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1547 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1548 (elf32_bfin_merge_private_bfd_data): Likewise.
1549 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1550 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1551 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1552 (i370_elf_relocate_section): Likewise.
1553 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1554 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1555 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1556 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1557 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1558 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1559 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1560 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1561 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1562 * ieee.c (ieee_write_id, read_id): Likewise.
1563 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1564 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1565 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1566 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1567 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1568 * stabs.c (_bfd_link_section_stabs): Likewise.
1570 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1572 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1573 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1574 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1575 * coff-sh.c (sh_relax_section): Likewise.
1576 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1577 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1578 * coffcode.h (coff_slurp_reloc_table): Likewise.
1579 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1580 (_bfd_coff_read_string_table): Likewise.
1581 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1582 * compress.c (bfd_get_full_section_contents): Likewise.
1583 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1584 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1585 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1586 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1587 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1588 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1589 (elf32_arm_write_section): Likewise.
1590 * elf32-bfin.c (bfin_relocate_section): Likewise.
1591 (bfinfdpic_relocate_section): Likewise.
1592 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1593 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1594 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1595 (elf_i386_relocate_section): Likewise.
1596 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1597 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1598 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1599 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1600 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1601 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1602 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1603 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1604 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1605 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1606 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1607 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1608 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1609 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1610 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1611 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1612 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1613 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1614 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1615 * elf32-sh.c (sh_elf_relax_section): Likewise.
1616 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1617 (sh_elf_relocate_section): Likewise.
1618 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1619 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1620 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1621 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1622 * elf32-v850.c (v850_elf_relax_section): Likewise.
1623 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1624 (elf_vax_relocate_section): Likewise.
1625 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1626 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1627 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1628 (do_fix_for_relocatable_link): Likewise.
1629 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1630 (elf64_alpha_relax_with_lituse): Likewise.
1631 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1632 (elf_hppa_final_link_relocate): Likewise.
1633 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1634 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1635 (elf64_vms_link_add_object_symbols): Likewise.
1636 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1637 (mmix_final_link_relocate): Likewise.
1638 * elf64-s390.c (invalid_tls_insn): Likewise.
1639 (elf_s390_relocate_section): Likewise.
1640 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1641 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1642 (elf_x86_64_relocate_section): Likewise.
1643 * elfcode.h (elf_slurp_symbol_table): Likewise.
1644 * elfcore.h (elf_core_file_p): Likewise.
1645 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1646 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1647 (elfNN_aarch64_relocate_section): Likewise.
1648 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1649 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1650 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1651 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1652 (_bfd_mips_elf_relocate_section): Likewise.
1653 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1654 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1655 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1656 * ieee.c (ieee_slurp_external_symbols): Likewise.
1657 * ihex.c (ihex_write_object_content): Likewise.
1658 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1659 * merge.c (_bfd_merged_section_offset): Likewise.
1660 * mmo.c (mmo_write_loc_chunk): Likewise.
1661 (mmo_write_object_contents): Likewise.
1662 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1663 * stabs.c (_bfd_link_section_stabs): Likewise.
1664 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1666 2017-07-11 Alan Modra <amodra@gmail.com>
1668 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1670 2017-07-11 Alan Modra <amodra@gmail.com>
1672 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1673 instruction" error using _bfd_error_handler, not einfo.
1675 2017-07-10 Nick Clifton <nickc@redhat.com>
1677 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1678 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1680 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1682 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1684 2017-07-07 Alan Modra <amodra@gmail.com>
1686 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1688 2017-07-07 Alan Modra <amodra@gmail.com>
1690 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1691 as long long. Move code replacing "ll" with "I64", and simplify.
1693 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1695 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1698 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1700 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1702 (line_info_add_file_name): Likewise.
1703 (decode_line_info): Likewise.
1705 2017-07-04 Tristan Gingold <gingold@adacore.com>
1707 * version.m4: Bump version to 2.29.51
1708 * configure: Regenerate.
1710 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1712 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1713 sanity check at the head of this function.
1715 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1717 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1718 dwarf_line_str_size.
1719 (struct attr_abbrev): Add field implicit_const.
1720 (dwarf_debug_sections): Add .debug_line_str.
1721 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1722 (dwarf_debug_section_assert): Add static assertion.
1723 (read_indirect_line_string): New.
1724 (read_abbrevs): Support DW_FORM_implicit_const.
1725 (is_str_attr): Support DW_FORM_line_strp.
1726 (read_attribute_value): Support DW_FORM_line_strp and
1727 DW_FORM_implicit_const.
1728 (read_attribute): Support DW_FORM_implicit_const.
1729 (line_info_add_include_dir, line_info_add_include_dir_stub):
1730 (line_info_add_file_name, read_formatted_entries): New.
1731 (decode_line_info, parse_comp_unit): Support DWARF 5.
1732 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1734 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1736 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1737 abort statement that was put for symbols that are not dynamic.
1739 2017-07-03 Tristan Gingold <gingold@adacore.com>
1741 * po/bfd.pot: Regenerate
1743 2017-07-03 Alan Modra <amodra@gmail.com>
1745 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1746 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1747 * elf.c (setup_group): Use "Lx" to print sh_size.
1748 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1749 unknown section type in hex.
1750 (copy_special_section_fields): Style fix.
1751 (bfd_section_from_shdr): Correct format for sh_link. Use a
1752 common error message for all the variants of unrecognized
1754 (assign_file_positions_for_load_sections): Use "Lx" for lma
1755 adjust error message.
1756 (assign_file_positions_for_non_load_sections): Formatting.
1757 (rewrite_elf_program_header): Formatting. Use "Lx" for
1758 bfd_vma values in error messages.
1759 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1760 ELF_R_SYM value to type expected by format.
1761 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1763 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1764 (elf_link_input_bfd): Use "Lx" for r_info.
1765 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1767 2017-07-03 Alan Modra <amodra@gmail.com>
1769 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1770 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1771 Microsoft C library variant of long long format specifier.
1772 (PRINT20): Cast value to bfd_uint64_t not long long.
1773 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1774 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1775 long long. Don't cast to bfd_vma.
1776 * elf32-score.c (score3_bfd_getl48): Likewise.
1777 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1779 2017-07-03 Alan Modra <amodra@gmail.com>
1781 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1783 (bfd_elf_print_symbol): Don't cast symbol->flags.
1784 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1785 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1786 _bfd_error_handler argument order.
1787 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1789 2017-07-03 Alan Modra <amodra@gmail.com>
1791 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1792 AC_TYPE_LONG_DOUBLE.
1793 * configure: Regenerate.
1794 * config.in: Regenerate.
1796 2017-06-29 Andrew Waterman <andrew@sifive.com>
1798 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1801 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1803 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1804 unless it is undefined weak.
1805 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1806 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1808 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1809 is not dynamic in PIC, abort.
1811 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1814 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1815 undefined weak symbols into dynamic.
1816 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1817 relocation for non-dynamic symbols.
1818 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1820 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1822 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1823 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1824 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1825 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1826 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1829 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1831 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1832 (elfcore_write_s390_gs_bc): Likewise.
1833 * elf.c (elfcore_grok_s390_gs_cb): New function.
1834 (elfcore_grok_s390_gs_bc): New function.
1835 (elfcore_grok_note): Call them.
1836 (elfcore_write_s390_gs_cb): New function.
1837 (elfcore_write_s390_gs_bc): New function.
1838 (elfcore_write_register_note): Call them.
1840 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1842 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1843 bfd_get_file_size. Check archive element size.
1844 (_bfd_generic_get_section_contents_in_window): Likewise.
1846 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1848 * bfd-in2.h: Regenerated.
1849 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1850 (bfd_get_file_size): Likewise.
1852 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1853 Matthew Fortune <matthew.fortune@imgtec.com>
1855 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1856 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1857 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1858 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1860 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1861 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1862 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1863 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1864 `bfd_mach_mips_interaptiv_mr2' entries.
1865 * bfd-in2.h: Regenerate.
1867 2017-06-27 Nick Clifton <nickc@redhat.com>
1869 * tekhex.c (pass_over): Revert accidental conversion of a local
1870 array to a static array.
1872 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1875 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1876 reloc addend if necessary. Adjust diff only if
1877 shrinked_insn_address < end_address.
1879 2017-06-27 Alan Modra <amodra@gmail.com>
1882 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1883 (_bfd_generic_get_section_contents_in_window): Likewise.
1885 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1887 * elfnn-riscv.c (perform_relocation): Support the new
1888 R_RISCV_32_PCREL relocation.
1889 (riscv_elf_relocate_section): Likewise.
1890 * elfxx-riscv.c (howto_table): Likewise.
1891 (riscv_reloc_map): Likewise.
1892 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1893 * libbfd.h: Regenerate.
1895 2017-06-27 Alan Modra <amodra@gmail.com>
1898 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1899 Use unsigned file pointer type, and remove cast.
1900 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1901 Add "count", not "sz".
1903 2017-06-26 Pedro Alves <palves@redhat.com>
1906 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1909 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1912 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1915 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1917 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1918 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1919 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1920 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1921 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1923 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1926 * compress.c (bfd_get_full_section_contents): Don't check the
1928 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1929 reject a section whose size + offset is greater than the size
1931 (_bfd_generic_get_section_contents_in_window): Likewise.
1933 2017-06-26 Nick Clifton <nickc@redhat.com>
1936 * tekhex.c (getvalue): Check for the source pointer exceeding the
1937 end pointer before the first byte is read.
1939 2017-06-26 Nick Clifton <nickc@redhat.com>
1942 * opncls.c (get_build_id): Check that the section is big enough
1943 to contain the whole note.
1944 * compress.c (bfd_get_full_section_contents): Check for and reject
1945 a section whose size is greater than the size of the entire file.
1946 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1947 contain a notes section.
1949 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1951 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1953 (elf_s390_modify_segment_map): Likewise.
1954 (bfd_elf_s390_set_options): Lisewise.
1956 2017-06-26 Alan Modra <amodra@gmail.com>
1958 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1960 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1961 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1962 .preinit_array on --just-syms bfds.
1963 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1964 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1965 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1967 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1969 * elf.c (find_link): Bounds check "hint".
1971 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1973 * elf32-arm.c (using_thumb_only): Update list of architectures in
1974 BFD_ASSERT for which the logic is valid.
1975 (using_thumb2_bl): Likewise.
1976 (using_thumb2): Likewise and return true for ARMv8-R.
1977 (arch_has_arm_nop): Likewise.
1978 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1979 merging logic. Update commentis for value 15 of v8m_baseline,
1980 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1981 merging of value 15 of Tag_CPU_arch.
1983 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1985 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1986 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1987 * bfd-in2.h: Regenerate.
1989 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1991 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1992 the error_alignment label forward. Properly align program
1993 property note section.
1995 2017-06-22 Eric Christopher <echristo@gmail.com>
1997 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1998 abs to fix a truncation warning.
2000 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2002 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2003 local undefined weak symbol to 0.
2004 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2006 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2008 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2009 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2010 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2011 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2012 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2013 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2014 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2015 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2017 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2019 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2020 (elf_i386_lazy_ibt_plt_entry): Likewise.
2021 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2022 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2023 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2024 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2025 (elf_i386_lazy_plt_layout): Likewise.
2026 (elf_i386_non_lazy_plt_layout): Likewise.
2027 (elf_i386_link_hash_entry): Add plt_second.
2028 (elf_i386_link_hash_table): Add plt_second and
2029 plt_second_eh_frame.
2030 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2031 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2032 the second PLT. Check the second PLT.
2033 (elf_i386_relocate_section): Use the second PLT to resolve
2034 PLT reference if needed.
2035 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2037 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2038 second PLT. Generate unwind info for the second PLT.
2039 (elf_i386_plt_type): Add plt_second.
2040 (elf_i386_get_synthetic_symtab): Support the second PLT.
2041 (elf_i386_parse_gnu_properties): Support
2042 GNU_PROPERTY_X86_FEATURE_1_AND.
2043 (elf_i386_merge_gnu_properties): Support
2044 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2045 on GNU_PROPERTY_X86_FEATURE_1_IBT
2046 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2047 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2048 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2049 is set on all relocatable inputs.
2050 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2051 (elf_x32_lazy_ibt_plt_entry): Likewise.
2052 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2053 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2054 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2055 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2056 (elf_x86_64_lazy_ibt_plt): Likewise.
2057 (elf_x32_lazy_ibt_plt): Likewise.
2058 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2059 (elf_x32_non_lazy_ibt_plt): Likewise.
2060 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2061 (elf_x86_64_parse_gnu_properties): Support
2062 GNU_PROPERTY_X86_FEATURE_1_AND.
2063 (elf_x86_64_merge_gnu_properties): Support
2064 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2065 on GNU_PROPERTY_X86_FEATURE_1_IBT
2066 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2067 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2068 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2069 is set on all relocatable inputs.
2071 2017-06-22 Nick Clifton <nickc@redhat.com>
2074 * som.c (setup_sections): NUL terminate the space_strings buffer.
2075 Check that the space.name field does not index beyond the end of
2076 the space_strings buffer.
2078 2017-06-21 Nick Clifton <nickc@redhat.com>
2081 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2083 2017-06-21 Nick Clifton <nickc@redhat.com>
2086 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2087 type of the size parameter.
2088 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2089 length of the counted string.
2090 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2091 (_bfd_vms_save_counted_string): Likewise.
2092 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2093 _bfd_vms_save_counted_string.
2094 (_bfd_vms_slurp_ehdr): Likewise.
2095 (_bfd_vms_slurp_egsd): Likewise.
2096 (Parse_module): Likewise.
2098 2017-06-21 Alan Modra <amodra@gmail.com>
2100 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2101 calls before tocsave calls.
2102 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2105 2017-06-21 Nick Clifton <nickc@redhat.com>
2108 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2109 bfd_get_full_section_contents returns no contents.
2111 2017-06-21 Nick Clifton <nickc@redhat.com>
2114 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2117 2017-06-21 Nick Clifton <nickc@redhat.com>
2120 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2122 (image_set_ptr): Likewise.
2123 (alpha_vms_fix_sec_rel): Likewise.
2124 (alpha_vms_slurp_relocs): Likewise.
2126 2017-06-21 Nick Clifton <nickc@redhat.com>
2129 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2131 (ieee_archive_p): Likewise.
2132 (ieee_object_p): Likewise.
2134 2017-06-21 Nick Clifton <nickc@redhat.com>
2137 * elf.c (setup_group): Zero the group section pointer list after
2138 allocation so that loops can be caught. Check for NULL pointers
2139 when processing a group list.
2141 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2143 * elf-s390.h: New file.
2144 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2146 (elf_s390_additional_program_headers): New function.
2147 (elf_s390_modify_segment_map): New function.
2148 (bfd_elf_s390_set_options): New function.
2149 (elf_backend_additional_program_headers)
2150 (elf_backend_modify_segment_map): Add macro definitions.
2152 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2155 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2156 the DYNAMIC bit instead of bfd_count_sections.
2158 2017-06-19 Nick Clifton <nickc@redhat.com>
2161 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2163 (evax_bfd_print_eeom): Likewise.
2164 (evax_bfd_print_egsd): Check for an overlarge record length.
2165 (evax_bfd_print_etir): Likewise.
2167 2017-06-19 Nick Clifton <nickc@redhat.com>
2170 * libieee.h (struct common_header_type): Add end_p field.
2171 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2173 (read_id): Check for a length that exceeds the remaining bytes in
2175 (ieee_seek): Initialise end_p.
2176 (ieee_archive_p): Likewise.
2177 (ieee_object_p): Likewise.
2179 2017-06-19 Nick Clifton <nickc@redhat.com>
2182 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2183 before reading the EIHS structure entries.
2185 2017-06-19 Nick Clifton <nickc@redhat.com>
2188 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2189 gsd_size. Check that there are enough bytes remaining to read the
2190 type and size of the next egsd. Check that the size of the egsd
2191 does not exceed the size of the record.
2193 2017-06-19 Alan Modra <amodra@gmail.com>
2195 * config.bfd: Correct targ_underscore for cris.
2197 2017-06-18 Alan Modra <amodra@gmail.com>
2199 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2200 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2202 2017-06-16 Nick Clifton <nickc@redhat.com>
2204 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2205 bucketlist is empty because there are no symbols to add to the
2208 2017-06-16 Alan Modra <amodra@gmail.com>
2214 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2215 (BFD_JUMP_TABLE_LINK): Likewise.
2216 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2217 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2218 (bfd_elf_define_start_stop): New function.
2219 * linker.c (bfd_generic_define_start_stop): New function.
2220 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2222 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2223 * aout-target.h (MY_bfd_define_start_stop): Define.
2224 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2225 * binary.c (binary_bfd_define_start_stop): Define.
2226 * bout.c (b_out_bfd_define_start_stop): Define.
2227 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2228 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2229 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2230 * coffcode.h (coff_bfd_define_start_stop): Define.
2231 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2232 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2233 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2234 * ieee.c (ieee_bfd_define_start_stop): Define.
2235 * ihex.c (ihex_bfd_define_start_stop): Define.
2236 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2237 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2238 * mmo.c (mmo_bfd_define_start_stop): Define.
2239 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2240 * oasys.c (oasys_bfd_define_start_stop): Define.
2241 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2242 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2243 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2244 * som.c (som_bfd_define_start_stop): Define.
2245 * srec.c (srec_bfd_define_start_stop): Define.
2246 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2247 * versados.c (versados_bfd_define_start_stop): Define.
2248 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2249 (alpha_vms_bfd_define_start_stop): Define.
2250 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2251 * bfd-in2.h: Regenerate.
2252 * libbfd.h: Regenerate.
2254 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2256 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2257 SYMBOL_REFERENCES_LOCAL.
2259 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2262 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2263 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2264 runtime for if there needs copy relocation elimination.
2265 (need_copy_relocation_p): New function. Return true for symbol with
2266 pc-relative references and if it's against read-only sections.
2267 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2268 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2269 that are related with accessing external objects.
2270 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2271 in elfNN_aarch64_check_relocs.
2273 2017-06-15 Nick Clifton <nickc@redhat.com>
2276 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2279 (ieee_archive_p): Likewise.
2281 2017-06-15 Nick Clifton <nickc@redhat.com>
2284 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2286 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2288 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2289 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2290 keep both windowed and call0 ABI PLT definitions.
2291 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2292 elf_xtensa_*_plt_entry endex.
2293 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2295 2017-06-14 Nick Clifton <nickc@redhat.com>
2298 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2301 2017-06-14 Nick Clifton <nickc@redhat.com>
2304 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2305 maximum value for the ascic pointer. Check that name processing
2306 does not read beyond this value.
2307 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2310 2017-06-14 Nick Clifton <nickc@redhat.com>
2313 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2314 (process_otr): Check for an invalid offset in the otr structure.
2316 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2318 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2320 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2326 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2327 vtable field to a union.
2328 (_bfd_elf_is_start_stop): Removed.
2329 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2330 __start_SECNAME and __stop_SECNAME symbols.
2331 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2332 * elflink.c (_bfd_elf_is_start_stop): Removed.
2333 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2334 _bfd_elf_is_start_stop.
2335 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2336 __stop_SECNAME symbols. Updated.
2337 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2338 (bfd_elf_gc_record_vtinherit): Likewise.
2339 (bfd_elf_gc_record_vtentry): Likewise.
2341 2017-06-13 Nick Clifton <nickc@redhat.com>
2344 * elflink.c (elf_link_adjust_relocs): Generate an error when
2345 encountering a reloc against a symbol removed by garbage
2348 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2350 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2351 to merge_gnu_properties.
2352 * elf-properties.c (elf_merge_gnu_properties): Add struct
2353 bfd_link_info * and pass it to merge_gnu_properties.
2354 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2355 and pass it to elf_merge_gnu_properties.
2356 (_bfd_elf_link_setup_gnu_properties): Pass info to
2357 elf_merge_gnu_property_list.
2358 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2360 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2362 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2365 * binary.c (binary_set_section_contents): Scale lma by octets
2366 per byte to set filepos.
2368 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2370 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2373 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2375 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2378 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2380 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2381 patched section contents for TLS IE reloc.
2382 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2384 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2386 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2387 RELOC_FOR_GLOBAL_SYMBOL macro.
2389 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2391 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2394 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2396 * config/tc-arc.c (md_undefined_symbol): Changed.
2397 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2399 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2401 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2404 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2406 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2407 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2409 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2411 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2414 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2416 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2417 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2418 is non-zero. Add clarifying comments.
2420 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2422 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2423 name. Use local IFUNC symbol name string to report unsupported
2424 non-PIC call to IFUNC function.
2425 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2426 when generating R_386_IRELATIVE relocation.
2427 (elf_i386_finish_dynamic_symbol): Likewise.
2428 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2430 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2431 when generating R_X86_64_IRELATIVE relocation.
2432 (elf_x86_64_finish_dynamic_symbol): Likewise.
2434 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2436 * elf.c (setup_group): Make sure BFD sections are created for all
2437 group sections in the input file when processing SHF_GROUP
2439 (bfd_section_from_shdr): Avoid duplicating logic already
2440 implemented in `setup_group'.
2442 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2445 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2446 if the hint address is zero.
2448 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2451 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2452 ELF_COMMON_DEF_P for common symbols.
2454 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2456 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2457 SEC_GROUP sections as SEC_EXCLUDE.
2458 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2459 (assign_section_numbers): Use resolve_section_groups flag instead
2460 of relocatable link type.
2461 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2462 flag instead of checking the final_link flag for part of the
2463 checks in here. Fix white space as a result.
2464 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2465 instead of relocatable link type.
2466 (bfd_elf_final_link): Likewise.
2468 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2470 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2472 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2473 (s3_bfd_score_elf_check_relocs): Likewise.
2474 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2475 (score_elf_final_link_relocate): Likewise.
2476 (s7_bfd_score_elf_check_relocs): Likewise.
2478 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2480 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2483 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2485 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2486 from `reloc_count' rather than decrementing it.
2487 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2488 `reloc_count' by `int_rels_per_ext_rel'.
2489 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2490 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2491 entry determination.
2492 (s3_bfd_score_elf_check_relocs): Likewise.
2493 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2494 (s7_bfd_score_elf_relocate_section): Likewise.
2495 (s7_bfd_score_elf_check_relocs): Likewise.
2496 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2497 prototype and function.
2498 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2499 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2500 triple rather than once the sum of REL and RELA relocation entry
2502 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2503 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2504 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2505 storage allocation size determination.
2506 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2507 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2508 by `int_rels_per_ext_rel' for last relocation entry
2510 (bfd_elf_final_link): Do not multiply `reloc_count' by
2511 `int_rels_per_ext_rel' for internal relocation storage
2512 allocation size determination.
2513 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2514 `int_rels_per_ext_rel' for last relocation entry determination.
2515 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2516 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2517 (_bfd_mips_elf_relocate_section): Likewise.
2519 2017-06-05 Alan Modra <amodra@gmail.com>
2522 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2524 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2526 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2527 determine structure sizes.
2528 (elfcore_grok_freebsd_prstatus): Likewise.
2530 2017-06-01 Alan Modra <amodra@gmail.com>
2532 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2533 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2535 (is_elfv2_localentry0): New function.
2536 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2537 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2538 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2539 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2540 optimized localentry:0 stubs.
2541 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2542 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2544 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2546 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2548 2017-05-30 Casey Smith <clegg89@gmail.com>
2551 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2552 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2554 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2556 * cpu-arc.c (arc_compatible): New function.
2558 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2560 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2562 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2565 * bfdio.c (bfd_get_file_size): New function.
2566 * bfd-in2.h: Regenerated.
2568 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2570 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2573 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2575 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2576 dynobj instead of htab->elf.dynobj.
2578 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2580 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2582 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2583 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2584 actual number of internal relocations retrieved. Adjust
2585 function description.
2586 (bfd_elf64_canonicalize_reloc): Remove macro.
2587 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2589 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2591 * archures.c (bfd_mach_sparc_v9m8): Define.
2592 (bfd_mach_sparc_v8plusm8): Likewise.
2593 (bfd_mach_sparc_v9_p): Adjust to M8.
2594 (bfd_mach_sparc_64bit_p): Likewise.
2595 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2596 bfd_mach_sparc_v8plusm8.
2597 * bfd-in2.h: Regenerated.
2598 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2600 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2601 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2602 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2604 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2605 bfd_mach_sparc_v8plusm8.
2607 2017-05-19 Alan Modra <amodra@gmail.com>
2609 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2610 debug and special sections when no non-note alloc sections in an
2613 2017-05-18 Alan Modra <amodra@gmail.com>
2615 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2616 * elf-m10300.c: Likewise.
2618 * elf32-arc.c: Likewise.
2619 * elf32-bfin.c: Likewise.
2620 * elf32-m68k.c: Likewise.
2621 * elf32-nds32.c: Likewise.
2622 * elf32-tilepro.c: Likewise.
2623 * elflink.c: Likewise.
2624 * elfnn-aarch64.c: Likewise.
2625 * elfnn-riscv.c: Likewise.
2626 * elfxx-tilegx.c: Likewise.
2627 * mach-o.c: Likewise.
2628 * peXXigen.c: Likewise.
2629 * vms-alpha.c: Likewise.
2630 * vms-lib.c: Likewise.
2632 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2635 * elflink.c (elf_gc_mark_debug_section): New function.
2636 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2637 referenced by kept debug sections.
2639 2017-05-16 Alan Modra <amodra@gmail.com>
2641 * elf-m10300.c: Rename occurrences of non_ir_ref.
2642 * elf32-arm.c: Likewise.
2643 * elf32-bfin.c: Likewise.
2644 * elf32-cr16.c: Likewise.
2645 * elf32-cris.c: Likewise.
2646 * elf32-d10v.c: Likewise.
2647 * elf32-dlx.c: Likewise.
2648 * elf32-fr30.c: Likewise.
2649 * elf32-frv.c: Likewise.
2650 * elf32-hppa.c: Likewise.
2651 * elf32-i370.c: Likewise.
2652 * elf32-i386.c: Likewise.
2653 * elf32-iq2000.c: Likewise.
2654 * elf32-lm32.c: Likewise.
2655 * elf32-m32c.c: Likewise.
2656 * elf32-m32r.c: Likewise.
2657 * elf32-m68hc1x.c: Likewise.
2658 * elf32-m68k.c: Likewise.
2659 * elf32-mcore.c: Likewise.
2660 * elf32-metag.c: Likewise.
2661 * elf32-microblaze.c: Likewise.
2662 * elf32-moxie.c: Likewise.
2663 * elf32-msp430.c: Likewise.
2664 * elf32-mt.c: Likewise.
2665 * elf32-nios2.c: Likewise.
2666 * elf32-or1k.c: Likewise.
2667 * elf32-ppc.c: Likewise.
2668 * elf32-rl78.c: Likewise.
2669 * elf32-s390.c: Likewise.
2670 * elf32-score.c: Likewise.
2671 * elf32-score7.c: Likewise.
2672 * elf32-sh.c: Likewise.
2673 * elf32-tic6x.c: Likewise.
2674 * elf32-tilepro.c: Likewise.
2675 * elf32-v850.c: Likewise.
2676 * elf32-vax.c: Likewise.
2677 * elf32-xstormy16.c: Likewise.
2678 * elf32-xtensa.c: Likewise.
2679 * elf64-alpha.c: Likewise.
2680 * elf64-hppa.c: Likewise.
2681 * elf64-ia64-vms.c: Likewise.
2682 * elf64-mmix.c: Likewise.
2683 * elf64-ppc.c: Likewise.
2684 * elf64-s390.c: Likewise.
2685 * elf64-sh64.c: Likewise.
2686 * elf64-x86-64.c: Likewise.
2687 * elflink.c: Likewise.
2688 * elfnn-aarch64.c: Likewise.
2689 * elfnn-ia64.c: Likewise.
2690 * elfnn-riscv.c: Likewise.
2691 * elfxx-mips.c: Likewise.
2692 * elfxx-sparc.c: Likewise.
2693 * elfxx-tilegx.c: Likewise.
2694 * linker.c: Likewise.
2696 2017-05-16 Alan Modra <amodra@gmail.com>
2698 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2699 * elflink.c (elf_link_add_object_symbols): Update to use
2701 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2703 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2705 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2707 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2709 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2711 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2712 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2714 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2716 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2718 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2720 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2721 to plt_second/plt_second_eh_frame.
2722 (elf_x86_64_link_hash_newfunc): Updated.
2723 (elf_x86_64_allocate_dynrelocs): Likewise.
2724 (elf_x86_64_size_dynamic_sections): Likewise.
2725 (elf_x86_64_relocate_section): Likewise.
2726 (elf_x86_64_finish_dynamic_symbol): Likewise.
2727 (elf_x86_64_finish_dynamic_sections): Likewise.
2728 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2729 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2731 (elf_backend_setup_gnu_properties): Updated. Create the
2732 .plt.sec section instead of the .plt.sec section.
2734 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2736 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2737 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2738 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2740 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2742 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2743 (bfd_elf64_set_reloc): Define.
2744 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2746 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2748 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2749 (struct bfd_target): New field _bfd_set_reloc.
2750 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2751 * reloc.c (_bfd_generic_set_reloc): New function.
2752 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2753 * nlm-target.h (nlm_set_reloc): Likewise.
2754 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2755 * aout-tic30.c (MY_set_reloc): Likewise.
2756 * aout-target.h (MY_set_reloc): Likewise.
2757 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2758 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2759 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2760 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2761 * aout-adobe.c (aout_32_set_reloc): Likewise.
2762 * bout.c (b_out_set_reloc): Likewise.
2763 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2764 * i386os9k.c (aout_32_set_reloc): Likewise.
2765 * ieee.c (ieee_set_reloc): Likewise.
2766 * oasys.c (oasys_set_reloc): Likewise.
2767 * som.c (som_set_reloc): Likewise.
2768 * versados.c (versados_set_reloc): Likewise.
2769 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2770 _bfd_generic_set_reloc.
2771 (rs6000_xcoff64_aix_vec): LIkewise.
2772 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2773 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2774 * i386msdos.c (msdos_set_reloc): Define to
2775 _bfd_norelocs_set_reloc.
2776 * elfcode.h (elf_set_reloc): Define.
2777 * bfd-in2.h: Regenerated.
2779 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2782 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2783 for IFUNC function address.
2785 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2787 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2788 (CONFLICT_LIST): Likewise.
2789 (opcode/arc-attrs.h): Include.
2790 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2791 (arc_extract_features): New file.
2792 (arc_stralloc): Likewise.
2793 (arc_elf_merge_attributes): Likewise.
2794 (arc_elf_merge_private_bfd_data): Use object attributes.
2795 (bfd_arc_get_mach_from_attributes): New function.
2796 (arc_elf_object_p): Use object attributes.
2797 (arc_elf_final_write_processing): Likewise.
2798 (elf32_arc_obj_attrs_arg_type): New function.
2799 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2800 (elf32_arc_section_from_shdr): Likewise.
2801 (elf_backend_obj_attrs_vendor): Define.
2802 (elf_backend_obj_attrs_section): Likewise.
2803 (elf_backend_obj_attrs_arg_type): Likewise.
2804 (elf_backend_obj_attrs_section_type): Likewise.
2805 (elf_backend_obj_attrs_handle_unknown): Likewise.
2806 (elf_backend_section_from_shdr): Likewise.
2808 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2811 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2812 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2813 and the destination is a Thumb symbol.
2815 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2817 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2818 initializer to silence GCC 4.2.
2819 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2821 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2823 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2824 (LAZY_PLT_ENTRY_SIZE): This.
2825 (NON_LAZY_PLT_ENTRY_SIZE): New.
2826 (elf_x86_64_plt0_entry): Renamed to ...
2827 (elf_x86_64_lazy_plt0_entry): This.
2828 (elf_x86_64_plt_entry): Renamed to ...
2829 (elf_x86_64_lazy_plt_entry): This.
2830 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2831 (elf_x86_64_lazy_bnd_plt0_entry): This.
2832 (elf_x86_64_legacy_plt_entry): Removed.
2833 (elf_x86_64_bnd_plt_entry): Renamed to ...
2834 (elf_x86_64_lazy_bnd_plt_entry): This.
2835 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2836 (elf_x86_64_non_lazy_plt_entry): This.
2837 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2838 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2839 (elf_x86_64_eh_frame_plt): Renamed to ...
2840 (elf_x86_64_eh_frame_lazy_plt): This.
2841 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2842 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2843 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2844 (elf_x86_64_eh_frame_non_lazy_plt): This.
2845 (elf_x86_64_lazy_plt_layout): New.
2846 (elf_x86_64_non_lazy_plt_layout): Likewise.
2847 (elf_x86_64_plt_layout): Likewise.
2848 (elf_x86_64_backend_data): Remove PLT layout information. Add
2849 os for target system.
2850 (GET_PLT_ENTRY_SIZE): Removed.
2851 (elf_x86_64_lazy_plt): New.
2852 (elf_x86_64_non_lazy_plt): Likewise.
2853 (elf_x86_64_lazy_bnd_plt): Likewise.
2854 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2855 (elf_x86-64_arch_bed): Updated.
2856 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2857 (elf_x86_64_create_dynamic_sections): Removed.
2858 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2859 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2860 (elf_x86-64_adjust_dynamic_symbol): Updated.
2861 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2862 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2863 size for PLT0 if there is no PLT0. Get plt_entry_size from
2864 non_lazy_plt for non-lazy PLT entries.
2865 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2866 from non_lazy_plt for non-lazy PLT entries.
2867 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2868 if there is no PLT0.
2869 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2870 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2871 entries with non-lazy PLT layout. Don't fill the second and third
2872 slots in the PLT entry if there is no PLT0.
2873 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2874 if there is no PLT0. Set sh_entsize on the .plt.got section.
2875 (compare_relocs): New.
2876 (elf_x86_64_plt_type): Likewise.
2877 (elf_x86_64_plt): Likewise.
2878 (elf_x86_64_nacl_plt): New. Forward declaration.
2879 (elf_x86_64_get_plt_sym_val): Removed.
2880 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2881 against all dynamic relocations.
2882 (elf_x86_64_link_setup_gnu_properties): New function.
2883 (elf_backend_create_dynamic_sections): Updated.
2884 (elf_backend_setup_gnu_properties): New.
2885 (elf_x86_64_nacl_plt): New.
2886 (elf_x86_64_nacl_arch_bed): Updated.
2888 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2890 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2891 (LAZY_PLT_ENTRY_SIZE): This.
2892 (NON_LAZY_PLT_ENTRY_SIZE): New.
2893 (elf_i386_plt0_entry): Renamed to ...
2894 (elf_i386_lazy_plt0_entry): This.
2895 (elf_i386_plt_entry): Renamed to ...
2896 (elf_i386_lazy_plt_entry): This.
2897 (elf_i386_pic_plt0_entry): Renamed to ...
2898 (elf_i386_pic_lazy_plt0_entry): This.
2899 (elf_i386_pic_plt_entry): Renamed to ...
2900 (elf_i386_pic_lazy_plt_entry): This.
2901 (elf_i386_got_plt_entry): Renamed to ...
2902 (elf_i386_non_lazy_plt_entry): This.
2903 (elf_i386_pic_got_plt_entry): Renamed to ...
2904 (elf_i386_pic_non_lazy_plt_entry): This.
2905 (elf_i386_eh_frame_plt): Renamed to ...
2906 (elf_i386_eh_frame_lazy_plt): This.
2907 (elf_i386_eh_frame_plt_got): Renamed to ...
2908 (elf_i386_eh_frame_non_lazy_plt): This.
2909 (elf_i386_plt_layout): Renamed to ...
2910 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2911 eh_frame_plt_got_size.
2912 (elf_i386_non_lazy_plt_layout): New.
2913 (elf_i386_plt_layout): Likewise.
2914 (elf_i386_non_lazy_plt): Likewise.
2915 (GET_PLT_ENTRY_SIZE): Removed.
2916 (elf_i386_plt): Renamed to ...
2917 (elf_i386_lazy_plt): This.
2918 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2919 (elf_i386_arch_bed): Updated.
2920 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2921 (elf_i386_create_dynamic_sections): Removed.
2922 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2923 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2924 (elf_i386_adjust_dynamic_symbol): Updated.
2925 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2926 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2927 size for PLT0 if there is no PLT0.
2928 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2929 output section is discarded only if GOT isn't empty.
2930 (elf_i386_relocate_section): Updated. Properly get PLT index
2931 if there is no PLT0.
2932 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2933 second and third slots in the PLT entry if there is no PLT0.
2934 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2935 if there is no PLT0. Set sh_entsize on the .plt.got section.
2936 (elf_i386_nacl_plt): Forward declaration.
2937 (elf_i386_get_plt_sym_val): Removed.
2938 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2939 against all dynamic relocations.
2940 (elf_i386_link_setup_gnu_properties): New function.
2941 (elf_backend_create_dynamic_sections): Updated.
2942 (elf_backend_setup_gnu_properties): New.
2943 (elf_i386_nacl_plt): Updated.
2944 (elf_i386_nacl_arch_bed): Likewise.
2945 (elf_i386_vxworks_arch_bed): Likewise.
2947 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2949 * elflink.c (elf_output_implib): Remove executable flag from import
2951 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2952 library is a relocatable object file.
2954 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2957 * elf32-avr.c (avr_should_move_sym): New function.
2958 (avr_should_reduce_sym_size): Likewise.
2959 (avr_should_increase_sym_size): Likewise.
2960 (elf32_avr_relax_delete_bytes): Adjust symbol values
2961 and sizes by calling new functions.
2963 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2965 * config.bfd (riscv32-*): Enable rv64.
2967 2017-05-02 Alan Modra <amodra@gmail.com>
2970 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2971 rather than h->root.type == bfd_link_hash_new.
2972 (bfd_elf_record_link_assignment): Similarly, call
2973 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2975 2017-04-29 Alan Modra <amodra@gmail.com>
2978 * reloc.c (reloc_offset_in_range): New function.
2979 (bfd_perform_relocation, bfd_install_relocation): Use it.
2980 (_bfd_final_link_relocate): Likewise.
2982 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2984 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2985 before using .plt.got.
2986 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2988 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2990 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2991 instead of "+=" to update 0.
2993 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2995 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2996 .plt.got section here.
2997 (elf_i386_check_relocs): Don't create the .plt.got section.
2998 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2999 the .plt.got and .plt.bnd sections here.
3000 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3003 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3005 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3007 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3008 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3009 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3010 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3013 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3015 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3017 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3018 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3019 the first relocatable ELF input with GNU properties.
3021 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3023 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3024 VxWorks for non-PIC.
3026 2017-04-27 Alan Modra <amodra@gmail.com>
3028 * elf-bfd.h (struct elf_backend_data): Make asection param of
3029 elf_backend_eh_frame_address_size const.
3030 (_bfd_elf_eh_frame_address_size): Likewise.
3031 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3032 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3033 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3034 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3035 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3036 (next_cie_fde_offset): Constify params.
3037 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3039 2017-04-27 Alan Modra <amodra@gmail.com>
3041 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3042 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3043 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3045 (offset_adjust): New function.
3046 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3047 (adjust_eh_frame_local_symbols): Likewise.
3048 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3049 after changing anything. Return true if anything changed.
3050 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3051 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3053 2017-04-27 Alan Modra <amodra@gmail.com>
3055 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3058 2017-04-27 Alan Modra <amodra@gmail.com>
3060 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3061 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3062 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3063 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3064 for undef and undefweak dyn_relocs.
3065 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3066 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3067 (allocate_got, allocate_dynrelocs): Likewise.
3068 (ppc64_elf_relocate_section): Likewise.
3070 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3072 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3073 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3074 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3075 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3077 2017-04-26 Nick Clifton <nickc@redhat.com>
3080 * reloc.c (bfd_perform_relocation): Check for a negative address
3083 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3086 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3088 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3089 (elf_backend_always_renumber_dynsyms): Define.
3090 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3091 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3092 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3093 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3095 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3097 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3099 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3100 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3101 sections have been created.
3103 2017-04-26 Nick Clifton <nickc@redhat.com>
3106 * compress.c (bfd_init_section_compress_status): Check the return
3107 value from bfd_malloc.
3109 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3111 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3112 no_finish_dynamic_symbol.
3113 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3115 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3116 weak symbol, don't make it dynamic.
3117 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3118 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3119 relocation for GOT reference.
3120 (elf_x86_64_finish_dynamic_symbol): Abort if
3121 no_finish_dynamic_symbol isn't 0.
3123 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3126 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3127 undefined weak symbol, don't make it dynamic.
3128 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3129 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3130 relocation for R_386_GOT32.
3132 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3135 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3137 2017-04-23 Alan Modra <amodra@gmail.com>
3140 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3141 * elf.c (lcomm_sym): New.
3142 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3143 * bfd-in2.h: Regenerate.
3145 2017-04-23 Alan Modra <amodra@gmail.com>
3148 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3149 parameters and comment.
3150 (_bfd_elf_get_reloc_section): Delete.
3151 (_bfd_elf_plt_get_reloc_section): Declare.
3152 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3153 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3155 (_bfd_elf_get_reloc_section): ..here. Delete.
3156 (assign_section_numbers): Call elf_get_reloc_section.
3157 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3158 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3160 2017-04-23 Alan Modra <amodra@gmail.com>
3163 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3166 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3169 * elf32-i386.c (elf_i386_link_hash_entry): Add
3170 no_finish_dynamic_symbol.
3171 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3172 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3173 symbol, don't make it dynamic in PIE.
3174 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3175 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3176 relocation for R_386_GOT32
3177 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3180 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3184 * elflink.c (elf_link_add_object_symbols): Require
3185 --no-dynamic-linker with -E/--dynamic-list when creating
3188 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3190 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3193 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3195 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3196 dynamic symbol sorting.
3198 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3201 * elflink.c (elf_link_add_object_symbols): Preserve
3202 dynamic_ref_after_ir_def when restoring the symbol table for
3203 unneeded dynamic object.
3205 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3208 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3209 on on undefined IFUNC symbol in the second PLT.
3211 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3213 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3215 2017-04-19 Alan Modra <amodra@gmail.com>
3217 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3218 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3219 * elf32-ppc.c:Formatting.
3220 (ensure_undefweak_dynamic): Don't make dynamic when
3221 info->dynamic_undefined_weak is zero.
3222 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3223 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3224 not default visibility. Discard undef and undefweak
3226 (ppc_elf_relocate_section): Adjust to suit.
3227 * elf64-ppc.c: Formatting.
3228 (ensure_undefweak_dynamic): Don't make dynamic when
3229 info->dynamic_undefined_weak is zero.
3230 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3231 info->dynamic_undefined_weak. Discard them earlier.
3233 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3236 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3237 before generating the version definition section.
3239 2017-04-17 Alan Modra <amodra@gmail.com>
3241 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3242 state when a regular object file defines a symbol with
3243 incompatible type to that defined by an earlier shared lib.
3245 2017-04-13 Alan Modra <amodra@gmail.com>
3247 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3249 * elf32-arm.c: Likewise.
3250 * elf32-i386.c: Likewise.
3251 * elf32-mep.c: Likewise.
3252 * elf64-ia64-vms.c: Likewise.
3253 * elf64-x86-64.c: Likewise.
3254 * elflink.c: Likewise.
3255 * elfnn-ia64.c: Likewise.
3256 * elfxx-mips.c: Likewise.
3258 2017-04-13 Alan Modra <amodra@gmail.com>
3260 * aoutx.h: Use %B and %A in error messages throughout file.
3261 * aout-cris.c: Likewise.
3262 * archive.c: Likewise.
3263 * binary.c: Likewise.
3264 * coff-rs6000.c: Likewise.
3265 * coff-tic4x.c: Likewise.
3266 * coffcode.h: Likewise.
3267 * coffgen.c: Likewise.
3268 * cofflink.c: Likewise.
3269 * coffswap.h: Likewise.
3270 * cpu-arm.c: Likewise.
3271 * elf-eh-frame.c: Likewise.
3272 * elf-m10300.c: Likewise.
3274 * elf32-arc.c: Likewise.
3275 * elf32-arm.c: Likewise.
3276 * elf32-bfin.c: Likewise.
3277 * elf32-frv.c: Likewise.
3278 * elf32-iq2000.c: Likewise.
3279 * elf32-m32c.c: Likewise.
3280 * elf32-microblaze.c: Likewise.
3281 * elf32-nds32.c: Likewise.
3282 * elf32-rl78.c: Likewise.
3283 * elf32-rx.c: Likewise.
3284 * elf32-score.c: Likewise.
3285 * elf32-score7.c: Likewise.
3286 * elf32-sh64.c: Likewise.
3287 * elf32-v850.c: Likewise.
3288 * elf32-vax.c: Likewise.
3289 * elf32-visium.c: Likewise.
3290 * elf64-ia64-vms.c: Likewise.
3291 * elf64-mmix.c: Likewise.
3292 * elf64-sh64.c: Likewise.
3293 * elfcode.h: Likewise.
3294 * elfnn-aarch64.c: Likewise.
3295 * elfnn-ia64.c: Likewise.
3296 * elfxx-mips.c: Likewise.
3297 * hpux-core.c: Likewise.
3300 * linker.c: Likewise.
3301 * merge.c: Likewise.
3303 * oasys.c: Likewise.
3304 * pdp11.c: Likewise.
3305 * peXXigen.c: Likewise.
3306 * rs6000-core.c: Likewise.
3307 * vms-alpha.c: Likewise.
3308 * xcofflink.c: Likewise.
3310 2017-04-13 Alan Modra <amodra@gmail.com>
3312 * bfd.c (PRINT_TYPE): Define.
3313 (_doprnt): New function.
3314 (error_handler_internal): Use _doprnt.
3315 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3316 calls in their natural order, throughout file.
3317 * coff-mcore.c: Likewise.
3318 * coff-ppc.c: Likewise.
3319 * coff-tic80.c: Likewise.
3320 * cofflink.c: Likewise.
3321 * elf-s390-common.c: Likewise.
3323 * elf32-arm.c: Likewise.
3324 * elf32-i386.c: Likewise.
3325 * elf32-m32r.c: Likewise.
3326 * elf32-msp430.c: Likewise.
3327 * elf32-spu.c: Likewise.
3328 * elf64-ia64-vms.c: Likewise.
3329 * elf64-sparc.c: Likewise.
3330 * elf64-x86-64.c: Likewise.
3331 * elflink.c: Likewise.
3332 * elfnn-aarch64.c: Likewise.
3333 * elfnn-ia64.c: Likewise.
3334 * elfxx-mips.c: Likewise.
3336 2017-04-13 Alan Modra <amodra@gmail.com>
3338 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3339 branch veneers" error. Fix double space and format message.
3340 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3341 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3343 2017-04-13 Alan Modra <amodra@gmail.com>
3345 * bfd-in2.h: Regenerate.
3347 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3349 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3350 extra `\n' in warning/error messages.
3351 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3352 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3354 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3356 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3357 processor-specific properties with generic ELF target vector.
3359 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3361 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3362 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3363 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3364 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3366 (link_hash_newfunc): Initialize has_got_reloc and
3368 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3370 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3372 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3374 (_bfd_sparc_elf_fixup_symbol): New function.
3375 (allocate_dynrelocs): Don't allocate space for dynamic
3376 relocations and discard relocations against resolved undefined
3377 weak symbols in executable. Don't make resolved undefined weak
3378 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3379 relocation against undefined weak symbols in PIE.
3380 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3381 relocations against resolved undefined weak symbols in PIE
3382 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3383 without ynamic PLT/GOT relocations for resolved undefined weak
3385 Don't generate dynamic relocation against resolved undefined
3386 weak symbol in executable.
3387 (pie_finish_undefweak_symbol): New function.
3388 (_bfd_sparc_elf_finish_dynamic_sections): Call
3389 pie_finish_undefweak_symbol on all symbols in PIE.
3390 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3391 (_bfd_sparc_elf_fixup_symbol): New function.
3393 2017-04-10 Nick Clifton <nickc@redhat.com>
3395 * config.bfd: Remove ns32k from obsolete list.
3397 2017-04-10 Alan Modra <amodra@gmail.com>
3400 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3401 (special_sections_i): Likewise for .init_array.
3402 (special_sections_p): Likewise for .preinit_array.
3404 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3408 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3409 ELF_COMMON_DEF_P for common symbols.
3410 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3411 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3412 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3413 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3414 07492f668d2173da7a2bda3707ff0985e0f460b6.
3416 2017-04-07 Pedro Alves <palves@redhat.com>
3418 * opncls.c (bfd_get_debug_link_info): Rename to...
3419 (bfd_get_debug_link_info_1): ... this. Change type of second
3420 parameter to void pointer. Adjust.
3421 (bfd_get_debug_link_info): Reimplement on top of
3422 bfd_get_debug_link_info_1.
3423 (separate_debug_file_exists, separate_alt_debug_file_exists):
3424 Change type of second parameter to void pointer. Adjust.
3425 (get_func_type, check_func_type): Change type of second parameter
3427 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3428 the callback functions instead of passing the address of a local.
3429 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3430 find_separate_debug_file.
3431 (get_alt_debug_link_info_shim): Change type of second parameter to
3432 void pointer. Adjust.
3433 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3434 find_separate_debug_file.
3435 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3436 of second parameter to void pointer. Adjust.
3437 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3438 pointer local to find_separate_debug_file.
3440 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3442 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3443 external symbols with a definition.
3444 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3446 2017-04-07 Alan Modra <amodra@gmail.com>
3448 * po/SRC-POTFILES.in: Regenerate.
3450 2017-04-05 Alan Modra <amodra@gmail.com>
3452 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3455 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3457 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3458 numbers for DataDirectory entry indicies passed to
3461 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3463 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3464 each GNU_MBIND section and align GNU_MBIND section to page size.
3465 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3466 segment for each GNU_MBIND section.
3467 (_bfd_elf_init_private_section_data): Copy sh_info from input
3468 for GNU_MBIND section.
3470 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3472 * elfnn-riscv.c (GP_NAME): Delete.
3473 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3474 (_bfd_riscv_relax_lui): Likewise.
3476 2017-04-04 Nick Clifton <nickc@redhat.com>
3479 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3481 (bfd_elf_final_link): Only initialize the extended symbol index
3482 section if there are extended symbol tables to list.
3484 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3486 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3487 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3488 * configure.ac (elf): Add elf-properties.lo.
3489 * Makefile.in: Regenerated.
3490 * configure: Likewise.
3491 * elf-bfd.h (elf_property_kind): New.
3492 (elf_property): Likewise.
3493 (elf_property_list): Likewise.
3494 (elf_properties): Likewise.
3495 (_bfd_elf_parse_gnu_properties): Likewise.
3496 (_bfd_elf_get_property): Likewise.
3497 (_bfd_elf_link_setup_gnu_properties): Likewise.
3498 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3499 and setup_gnu_properties.
3500 (elf_obj_tdata): Add properties.
3501 * elf-properties.c: New file.
3502 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3503 (elf_i386_merge_gnu_properties): Likewise.
3504 (elf_backend_parse_gnu_properties): Likewise.
3505 (elf_backend_merge_gnu_properties): Likewise.
3506 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3507 (elf_x86_64_merge_gnu_properties): Likewise.
3508 (elf_backend_parse_gnu_properties): Likewise.
3509 (elf_backend_merge_gnu_properties): Likewise.
3510 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3511 (elf_backend_parse_gnu_properties): Likewise.
3512 (elf_backend_setup_gnu_properties): Likewise.
3513 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3514 elf_backend_merge_gnu_properties and
3515 elf_backend_setup_gnu_properties.
3517 2017-03-30 Pip Cet <pipcet@gmail.com>
3519 * elf32-wasm32.c: Add relocation code, two relocs.
3520 * reloc.c: Add wasm32 relocations.
3521 * libbfd.h: Regenerate.
3522 * bfd-in2.h: Regenerate.
3523 * bfd/po/bfd.pot: Regenerate.
3525 2017-03-29 Nick Clifton <nickc@redhat.com>
3528 * coff-bfd.h (struct coff_section_data): Add new fields:
3529 saved_bias and bias.
3530 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3531 computed for PE binaries.
3532 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3535 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3538 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3539 to handle a local symbol with a hash-symbol-entry; without PLT.
3540 Add BFD_ASSERT for an incidental case with GOT entry present.
3541 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3542 isn't forced-or-set local.
3544 2017-03-27 Pip Cet <pipcet@gmail.com>
3546 * wasm-module.c: New file to support WebAssembly modules.
3547 * wasm-module.h: New file to support WebAssembly modules.
3548 * doc/webassembly.texi: Start documenting wasm-module.c.
3549 * config.bfd: Add wasm_vec.
3550 * targets.c: Likewise.
3551 * configure.ac: Likewise.
3552 * Makefile.am: Add entries for wasm-module.c.
3553 * Makefile.in: Regenerate.
3554 * configure: Regenerate.
3555 * po/SRC-POTFILES.in: Regenerate.
3557 2017-03-27 Pip Cet <pipcet@gmail.com>
3559 * cpu-wasm32.c: New file to support wasm32 architecture.
3560 * elf32-wasm32.c: New file to support wasm32 architecture.
3561 * Makefile.am: Add wasm32 architecture.
3562 * archures.c: Likewise.
3563 * config.bfd: Likewise.
3564 * configure.ac: Likewise.
3565 * targets.c: Likewise.
3566 * Makefile.in: Regenerate.
3567 * bfd-in2.h: Regenerate.
3568 * configure: Regenerate.
3569 * po/SRC-POTFILES.in: Regenerate.
3571 2017-03-20 Alan Modra <amodra@gmail.com>
3574 * elf64-ppc.c (compare_symbols): Stabilize sort.
3576 2017-03-18 Alan Modra <amodra@gmail.com>
3578 * elf64-ppc.c (struct ppc_link_hash_table): Add
3579 local_ifunc_resolver and maybe_local_ifunc_resolver.
3580 (ppc_build_one_stub): Set flags on emitting dynamic
3581 relocation to ifunc.
3582 (ppc64_elf_relocate_section): Likewise.
3583 (ppc64_elf_finish_dynamic_symbol): Likewise.
3584 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3585 local dynamic relocs to ifuncs.
3586 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3587 local_ifunc_resolver and maybe_local_ifunc_resolver.
3588 (ppc_elf_relocate_section): Set flag on emitting dynamic
3589 relocation to ifuncs.
3590 (ppc_elf_finish_dynamic_symbol): Likewise.
3591 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3592 dynamic relocs to ifuncs.
3594 2017-03-13 Nick Clifton <nickc@redhat.com>
3597 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3598 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3599 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3600 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3601 * bfd-in2.h: Regenerate.
3602 * libbfd.h: Regenerate.
3603 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3605 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3606 (elfNN_aarch64_howto_table): Likewise.
3607 (aarch64_tls_transition_without_check): Likewise.
3608 (aarch64_reloc_got_type): Likewise.
3609 (elfNN_aarch64_final_link_relocate): Likewise.
3610 (elfNN_aarch64_tls_relax): Likewise.
3611 (elfNN_aarch64_relocate_section): Likewise.
3612 (elfNN_aarch64_gc_sweep_hook): Likewise.
3613 (elfNN_aarch64_check_relocs): Likewise.
3614 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3615 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3617 2017-03-11 Alan Modra <amodra@gmail.com>
3619 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3620 parameter is in fact used. Whitespace fixes.
3621 * elf64-ppc.c: Likewise.
3623 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3625 * rs6000-core.c (CORE_NEW): Simplify macro when
3626 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3628 2017-03-07 Alan Modra <amodra@gmail.com>
3632 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3635 2017-03-05 Alan Modra <amodra@gmail.com>
3637 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3638 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3639 (next_cie_fde_offset): New function.
3640 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3641 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3642 four bytes. Align CIEs to four or eight bytes depending on
3643 per_encoding_aligned8. Align FDEs according to their encoding.
3644 Pad last FDE to output section alignment.
3645 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3647 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3648 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3649 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3651 2017-03-02 Martin Bickel <binutils@ineranves.de>
3654 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3655 empty segments which have a zero filesz, but a non-zero memsz.
3657 2017-03-02 Alan Modra <amodra@gmail.com>
3659 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3661 2017-02-28 Alan Modra <amodra@gmail.com>
3663 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3664 (ppc64_elf_relocate_section): Likewise.
3666 2017-02-28 Alan Modra <amodra@gmail.com>
3669 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3670 rather than elf32_nios2_hash_table or elf_hash_table.
3671 (create_got_section): Likewise.
3672 (nios2_elf32_finish_dynamic_symbol): Likewise.
3673 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3674 (nios2_elf32_size_dynamic_sections): Likewise.
3675 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3676 vars. Use htab equivalents directly instead. Don't create
3677 all dynamic sections on needing just the GOT. Use a goto
3678 rather than a fall-through with reloc test. Ensure
3679 htab->dynobj is set when making dynamic sreloc section.
3680 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3681 equivalent directly instead. Don't segfault on looking for
3682 .dynamic when dynamic sections have not been created. Don't
3683 segfault on .got.plt being discarded.
3684 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3685 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3686 fixme and another not so relevant comment.
3687 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3688 already set, set hash table dynobj on creating .sbss.
3690 2017-02-28 Alan Modra <amodra@gmail.com>
3692 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3693 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3694 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3695 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3696 (ppc64_elf_relocate_section): Likewise.
3697 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3698 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3699 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3700 * libbfd.h: Regenerate.
3701 * bfd-in2.h: Regenerate.
3703 2017-02-28 Alan Modra <amodra@gmail.com>
3705 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3706 dynamic .data.rel.ro read-only.
3707 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3708 rather than section flags when deciding where copy reloc goes.
3709 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3710 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3711 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3712 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3713 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3714 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3715 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3716 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3717 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3718 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3719 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3720 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3721 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3722 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3723 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3724 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3725 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3726 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3727 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3729 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3731 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3732 `jalr $0, $25' instruction encoding.
3734 2017-02-27 Nick Clifton <nickc@redhat.com>
3737 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3738 generating a seg-fault when encountering a symbol that has been
3739 deleted by garbage collection.
3741 2017-02-25 Alan Modra <amodra@gmail.com>
3743 * elf32-arc.c (struct dynamic_sections): Delete.
3744 (enum dyn_section_types): Delete.
3745 (dyn_section_names): Delete.
3746 (arc_create_dynamic_sections): Delete.
3747 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3748 segfault on discarded .rela.plt section.
3749 (elf_arc_size_dynamic_sections): Formatting. Don't call
3750 arc_create_dynamic_sections. Don't allocate memory for sections
3751 handled by the generic linker. Correct code finding relocs in
3752 read-only sections. Set SEC_EXCLUDE on zero size .got,
3753 .got.plt, and .dynbss sections. Do set .interp for pies.
3755 2017-02-24 Andrew Waterman <andrew@sifive.com>
3757 * elfnn-riscv.c (GP_NAME): New macro.
3758 (riscv_global_pointer_value): Use it.
3759 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3760 output section, consider only that section's alignment.
3762 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3764 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3765 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3766 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3767 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3769 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3771 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3772 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3775 2017-02-23 Alan Modra <amodra@gmail.com>
3778 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3780 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3781 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3784 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3787 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3788 processing ahead of the call to `elf_gc_sweep_symbol'.
3790 2017-02-22 Nick Clifton <nickc@redhat.com>
3793 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3794 created section 4-byte alignment.
3796 2017-02-22 Alan Modra <amodra@gmail.com>
3798 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3799 on .got or .plt output section being discarded by script.
3800 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3803 2017-02-21 Alan Modra <amodra@gmail.com>
3805 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3806 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3808 2017-02-20 Alan Modra <amodra@gmail.com>
3811 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3812 if DT_RELSZ/DT_RELASZ is zero.
3814 2017-02-17 Nick Clifton <nickc@redhat.com>
3816 * compress.c (bfd_get_full_section_contents): Remember to reduce
3817 compressed size by the sizeof the compression header when
3818 decompressing the contents.
3820 2017-02-17 Pedro Alves <palves@redhat.com>
3822 * srec.c (Chunk): Rename to ...
3823 (_bfd_srec_len): ... this.
3824 (S3Forced): Rename to ...
3825 (_bfd_srec_forceS3): ... this.
3826 * objcopy.c: Adjust all references.
3828 2017-02-17 Pedro Alves <palves@redhat.com>
3830 * archive.c (bsd_write_armap): Rename to ...
3831 (_bfd_bsd_write_armap): ... this.
3832 (coff_write_armap): Rename to ...
3833 (_bfd_coff_write_armap): ... this.
3834 * libbfd-in.h (bsd_write_armap): Rename to ...
3835 (_bfd_bsd_write_armap): ... this.
3836 (coff_write_armap): Rename to ...
3837 (_bfd_coff_write_armap): ... this.
3838 * aout-target.h, aout-tic30.c: Adjust all users.
3839 * libbfd.h: Regenerate.
3841 2017-02-17 Pedro Alves <palves@redhat.com>
3843 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3844 (warn_deprecated): Rename to ...
3845 (_bfd_warn_deprecated): ... this.
3846 * libbfd.c (warn_deprecated): Rename to ...
3847 (_bfd_warn_deprecated): ... this.
3848 * bfd-in2.h: Regenerate.
3850 2017-02-17 Pedro Alves <palves@redhat.com>
3852 * bfdio.c (real_ftell): Rename to ...
3853 (_bfd_real_ftell): ... this.
3854 (real_fseek): Rename to ...
3855 (_bfd_real_fseek): ... this.
3856 (real_fopen): Rename to ...
3857 (_bfd_real_fopen): ... this.
3858 * libbfd-in.h (real_ftell): Rename to ...
3859 (_bfd_real_ftell): ... this.
3860 (real_fseek): Rename to ...
3861 (_bfd_real_fseek): ... this.
3862 (real_fopen): Rename to ...
3863 (_bfd_real_fopen): ... this.
3864 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3865 * libbfd.h: Regenerate.
3867 2017-02-17 Pedro Alves <palves@redhat.com>
3869 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3870 * libbfd.c (read_unsigned_leb128): Rename to ...
3871 (_bfd_read_unsigned_leb128): ... this.
3872 (read_signed_leb128): Rename to ...
3873 (_bfd_read_signed_leb128): ... this.
3874 (safe_read_leb128): Rename to ...
3875 (_bfd_safe_read_leb128): ... this.
3876 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3877 (_bfd_read_unsigned_leb128): ... this.
3878 (read_signed_leb128): Rename to ...
3879 (_bfd_read_signed_leb128): ... this.
3880 (safe_read_leb128): Rename to ...
3881 (_bfd_safe_read_leb128): ... this.
3882 * libbfd.h: Renegerate.
3884 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3886 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3887 before trying to fine matching file and line information.
3889 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3891 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3892 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3893 not match current bfd, then reload debug information. Record bfd
3894 we're loading debug info for in the stash. If we have debug
3895 informatin in the cache then perform section placement before
3898 2017-02-16 Alan Modra <amodra@gmail.com>
3901 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3902 * elfxx-target.h (elf_backend_no_page_alias): Define.
3903 (elfNN_bed): Init new field.
3904 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3905 ensure PT_LOAD segment starts on a new page.
3906 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3908 2017-02-16 Alan Modra <amodra@gmail.com>
3911 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3914 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3916 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3917 * bfd-in2.h: Regenerated.
3919 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3922 * elf32-i386.c (elf_i386_relocate_section): Allow
3923 "lea foo@GOT, %reg" in PIC.
3925 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3928 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3929 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3930 error against local IFUNC symbol without a base register for
3933 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3935 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3936 `%P: %H:' with `info->callbacks->einfo'.
3937 (ppc_elf_relocate_section): Likewise.
3938 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3939 (ppc64_elf_edit_toc): Likewise.
3940 (ppc64_elf_relocate_section): Likewise.
3942 2017-02-14 Alan Modra <amodra@gmail.com>
3944 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3945 --gc-keep-exported, and test versioned field of sym rather than
3946 looking for @ in name.
3948 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3950 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3953 2017-02-13 Nick Clifton <nickc@redhat.com>
3956 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3959 2017-02-07 Andrew Waterman <andrew@sifive.com>
3961 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3962 entry size if PLT header is written.
3964 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3966 Fix sparc64 dynamic relocation processing to use the dynamic
3968 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3969 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3972 2017-02-03 Nick Clifton <nickc@redhat.com>
3975 * coffcode.h (coff_write_object_contents): Enlarge size of
3976 s_name_buf in order to avoid compile time warning about possible
3978 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3979 32-bits of insn value before printing into buffer.
3981 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3983 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3984 `max_local_dynindx'.
3985 (mips_elf_sort_hash_table): Handle it.
3986 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3987 symbols bump up `max_local_dynindx' rather than
3988 `max_non_got_dynindx'.
3990 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3992 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3993 `min_got_dynindx', `max_unref_got_dynindx' and
3994 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3995 (mips_elf_sort_hash_table): Adjust accordingly.
3997 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3999 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4000 to access the hash table.
4002 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4004 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4005 non-NULL `htab' to the beginning.
4007 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4009 * elflink.c (elf_gc_sweep): Wrap overlong line.
4011 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4013 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4014 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4015 * elfxx-mips.c (mips_elf_link_hash_table): Add
4016 `ignore_branch_isa' member.
4017 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4018 in branch relocation calculation as an error if
4019 `ignore_branch_isa' has been set.
4020 (_bfd_mips_elf_insn32): Rename to...
4021 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4022 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4023 Handle the new parameter.
4025 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4027 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4028 local variable dynobj.
4031 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4032 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4033 executable from read-only sections into sdynrelro.
4034 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4035 dynamic relocs in sdynrelro.
4036 (elf_backend_want_dynrelro): Define.
4038 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4040 * config.bfd (*-*-rtemsaout*): Mark as removed.
4042 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4044 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4045 (arm-*-rtems*): Move to (arm*-*-eabi*).
4046 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4047 (m68-*-rtems*): Move to (m68*-*-elf*).
4049 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4051 * config.bfd (*-*-rtemscoff*): Mark as removed.
4053 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4056 * elflink.c (bfd_elf_record_link_assignment): Revert last
4057 change and don't ever clear `forced_local'. Set `mark'
4059 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4061 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4062 (bfd_elf_size_dynamic_sections): ... here.
4063 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4064 and set `mark' instead in `__tls_get_addr_opt' processing.
4065 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4067 2017-01-24 Alan Modra <amodra@gmail.com>
4069 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4070 where dynamic relocs are preferable. Allow ifunc too.
4071 (ensure_undefweak_dynamic): New function.
4072 (allocate_dynrelocs): Use it here. Move plt handling last and
4073 don't make symbols dynamic, simplifying loop. Only make undef
4074 weak symbols with GOT entries dynamic. Correct condition
4075 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4076 comments. Remove goto.
4077 (ppc_elf_relocate_section): Correct test for using dynamic
4078 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4079 to suit. Set up explicit tls_index entries and implicit GOT
4080 tls_index entries resolvable at link time for
4081 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4082 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4083 (ensure_undefweak_dynamic): New function.
4084 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4085 with GOT entries dynamic. Remove unnecessary test of
4086 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4087 (ppc64_elf_relocate_section): Correct test for using dynamic
4088 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4089 to suit. Set up explicit tls_index entries and implicit GOT
4090 tls_index entries resolvable at link time for __tls_get_addr_opt.
4091 Simplify expression to clear mem for prelink.
4093 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4095 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4097 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4099 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4100 (elf_backend_hash_symbol): Define.
4102 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4105 * elflink.c (bfd_elf_record_link_assignment): Clear any
4106 `forced_local' marking for DSO symbols that are not being
4109 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4111 * elfnn-riscv.c (riscv_elf_object_p): New function.
4113 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4116 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4118 (elf_x86_64_check_relocs): Create .eh_frame section for the
4120 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4121 .eh_frame section for the .plt.bnd section.
4122 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4123 for the .plt.bnd section.
4125 2017-01-12 Nick Clifton <nickc@redhat.com>
4128 * opncls.c (find_separate_debug_file): Add include_dirs
4129 parameter. Only include the directory part of the bfd's filename
4130 in search paths if include_dirs is true. Add a couple of extra
4131 locations for looking for debug files.
4132 ( bfd_follow_gnu_debuglink): Update invocation of
4133 find_separate_debug_file.
4134 (bfd_follow_gnu_debugaltlink): Likewise.
4135 (get_build_id): New function: Finds the build-id of the given bfd.
4136 (get_build_id_name): New function: Computes the name of the
4137 separate debug info file for a bfd, based upon its build-id.
4138 (check_build_id_file): New function: Checks to see if a separate
4139 debug info file exists at the given location, and that its
4140 build-id matches that of the original bfd.
4141 (bfd_follow_build_id_debuglink): New function: Finds a separate
4142 debug info file for a given bfd by using the build-id method.
4143 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4144 method of locating a separate debug info file before using the
4146 * bfd-in2.h: Regenerate.
4148 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4151 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4152 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4153 elf_x86_64_eh_frame_plt_got.
4154 (elf_x86_64_size_dynamic_sections): Get unwind info from
4155 elf_x86_64_bnd_arch_bed for the BND PLT.
4157 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4159 * config.bfd: Add entries for i686-redox and x86_64-redox.
4161 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4163 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4165 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4166 .eh_frame section to 4 bytes for x32.
4167 (elf_x86_64_check_relocs): Likewise.
4169 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4172 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4173 (PLT_GOT_FDE_LENGTH): Likewise.
4174 (elf_i386_plt_layout): Add eh_frame_plt_got and
4175 eh_frame_plt_got_size.
4176 (elf_i386_plt): Updated.
4177 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4178 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4179 (elf_i386_size_dynamic_sections): Allocate and initialize
4180 .eh_frame section for .plt.got.
4181 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4183 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4184 eh_frame_plt_got_size.
4185 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4186 (PLT_GOT_FDE_LENGTH): Likewise.
4187 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4188 eh_frame_plt_got_size.
4189 (elf_x86_64_arch_bed): Updated.
4190 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4191 eh_frame_plt_got_size.
4192 (elf_x86_64_nacl_arch_bed): Likewise.
4193 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4194 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4195 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4196 .eh_frame section for .plt.got.
4197 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4200 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4202 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4203 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4205 2017-01-09 Nick Clifton <nickc@redhat.com>
4207 * dwarf2.c (lookup_address_in_function_table): Return early if
4208 there are no functions in the given comp unit, or if the high
4209 address of the last function in the comp unit is less than the
4212 2017-01-09 Nick Clifton <nickc@redhat.com>
4215 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4216 message if there are too many symbols to load.
4218 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4220 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4221 if relocs are cached.
4223 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4226 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4227 for R_MICROBLAZE_GOTOFF_64.
4229 2017-01-03 Nick Clifton <nickc@redhat.com>
4231 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4232 warning about using a possibly uninitialised variable.
4234 2017-01-02 Alan Modra <amodra@gmail.com>
4236 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4237 (allocate_plt_static, allocate_dynrelocs): Use it.
4239 2017-01-02 Alan Modra <amodra@gmail.com>
4241 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4242 .PARISC.unwind section.
4244 2017-01-02 Alan Modra <amodra@gmail.com>
4247 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4248 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4249 indirect to GOT pointer relative code edit.
4251 2017-01-02 Alan Modra <amodra@gmail.com>
4253 Update year range in copyright notice of all files.
4255 For older changes see ChangeLog-2016
4257 Copyright (C) 2017 Free Software Foundation, Inc.
4259 Copying and distribution of this file, with or without modification,
4260 are permitted in any medium without royalty provided the copyright
4261 notice and this notice are preserved.
4267 version-control: never