1 2017-10-05 Alan Modra <amodra@gmail.com>
3 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
4 fini_array error value.
6 2017-10-05 Alan Modra <amodra@gmail.com>
9 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
11 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
13 (elf_fake_sections): Adjust calls. Exit immediately on failure.
14 (bfd_elf_set_group_contents): Add associated reloc section indices
17 2017-10-04 Alan Modra <amodra@gmail.com>
19 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
20 classify symbols for ELFv2.
22 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
25 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
26 undergoes default promotion.
27 * bfd-in2.h: Regenerate.
29 2017-10-02 Alan Modra <amodra@gmail.com>
31 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
32 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
34 2017-10-01 Alan Modra <amodra@gmail.com>
37 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
38 (add_line_info): Always put end_sequence last.
40 2017-10-01 Alan Modra <amodra@gmail.com>
43 * dwarf2.c (read_section): Allocate buffer with extra byte for
44 bfd_simple_get_relocated_section_contents rather than copying
47 2017-09-29 Alan Modra <amodra@gmail.com>
49 * merge.c (merge_strings): Return FALSE on malloc failure.
50 (_bfd_merge_sections): Return failures from record_section and
53 2017-09-28 Alan Modra <amodra@gmail.com>
56 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
57 a case where plugin_notice isn't called.
59 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
61 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
64 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
67 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
68 output_bfd to info->callbacks->minfo.
70 2017-09-26 Nick Clifton <nickc@redhat.com>
73 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
74 assertion failure if elf_x86_64_rtype_to_howto has already issued
77 2017-09-26 Alan Modra <amodra@gmail.com>
80 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
83 2017-09-26 Nick Clifton <nickc@redhat.com>
86 * dwarf2.c (read_formatted_entries): Fail early if we know that
87 the loop parsing data entries will overflow the end of the
90 2017-09-26 Alan Modra <amodra@gmail.com>
93 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
94 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
95 to stash->info_ptr_memory, and check die_ref is within that memory.
96 Set info_ptr_end correctly when another CU is refd. Check die_ref
97 for DW_FORM_ref4 etc. is within CU.
99 2017-09-26 Alan Modra <amodra@gmail.com>
102 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
103 (read_formatted_entries): Init "fe".
104 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
106 2017-09-26 Alan Modra <amodra@gmail.com>
109 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
110 bounds in inner loop.
112 2017-09-25 Alan Modra <amodra@gmail.com>
115 * dwarf1.c (parse_die): Sanity check pointer against section limit
116 before dereferencing.
117 (parse_line_table): Likewise.
119 2017-09-25 Alan Modra <amodra@gmail.com>
122 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
124 (parse_comp_unit): Likewise.
126 2017-09-25 Alan Modra <amodra@gmail.com>
129 * dwarf2.c (read_formatted_entries): Error on format_count zero.
131 2017-09-24 Alan Modra <amodra@gmail.com>
134 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
135 within section bounds.
137 2017-09-24 Alan Modra <amodra@gmail.com>
140 * dwarf2.c (decode_line_info): Properly free line sequences on error.
142 2017-09-24 Alan Modra <amodra@gmail.com>
145 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
146 pname param. Return status. Make name const. Don't abort,
147 return an error. Formatting. Exit if current info_ptr matches
148 orig_info_ptr. Update callers.
149 (scan_unit_for_symbols): Start at nesting_level of zero. Make
150 nested_funcs an array of structs for extensibility. Formatting.
152 2017-09-24 Alan Modra <amodra@gmail.com>
155 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
156 rather than dividing by zero.
158 2017-09-24 Alan Modra <amodra@gmail.com>
161 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
163 2017-09-24 Alan Modra <amodra@gmail.com>
166 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
168 2017-09-24 Alan Modra <amodra@gmail.com>
171 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
172 SHT_GNU_verneed section for sanity. Don't zalloc memory for
175 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
178 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
181 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
184 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
185 -1 if bfd_canonicalize_dynamic_reloc returns 0.
187 2017-09-22 Pedro Alves <palves@redhat.com>
188 Alan Modra <amodra@gmail.com>
190 * version.h: Add comment.
192 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
194 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
195 NT_S390_GS_BC, correct the previously swapped invocations of
196 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
198 2017-09-19 Alan Modra <amodra@gmail.com>
201 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
204 2017-09-19 Alan Modra <amodra@gmail.com>
207 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
208 symbols before calculating verrefs. Don't renumber dynsyms
209 after gc. Exclude .gnu.version when zero or one dynsym.
210 Localize some vars and reindent.
212 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
215 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
216 return from bfd_canonicalize_dynamic_reloc.
218 2017-09-15 Alan Modra <amodra@gmail.com>
221 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
222 overflows bfd_size_type.
224 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
227 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
228 to indicate if conversion is performed.
229 (elf_i386_check_relocs): Cache section contents and relocations
230 if conversion is performed.
231 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
232 contents and relocations if conversion is performed.
234 2017-09-14 Nick Clifton <nickc@redhat.com>
237 * peXXigen.c (pe_print_idata): Extend check for HintName vector
240 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
242 * elfxx-x86.h: Fix a typo in comments.
244 2017-09-09 Kamil Rytarowski <n54@gmx.com>
246 * elf32-nds32.c: Rename __BIT() to N32_BIT().
248 2017-09-09 Alan Modra <amodra@gmail.com>
250 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
253 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
255 * elf32-i386.c (elf_i386_relocate_section): Update usage of
256 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
257 (elf_i386_finish_dynamic_symbol): Likewise.
258 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
259 (elf_x86_64_finish_dynamic_symbol): Likewise.
260 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
261 (_bfd_x86_elf_fixup_symbol): Likewise.
263 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
265 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
266 check has_non_got_reloc.
268 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
271 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
272 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
273 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
274 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
275 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
276 and linker_def on __ehdr_start if it is referenced and not
278 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
279 and return TRUE when building executable, if a symbol has
280 non-GOT/non-PLT relocations in text section or there is no
282 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
284 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
286 * elfxx-x86.h: Update comments.
288 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
290 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
291 elf_x86_plt_layout_table with elf_x86_init_table.
292 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
294 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
296 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
297 (elf_x86_init_table): This.
298 (_bfd_x86_elf_link_setup_gnu_properties): Replace
299 elf_x86_plt_layout_table with elf_x86_init_table.
301 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
303 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
304 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
305 * configure: Regenerated.
306 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
307 and r_sym fields of plt_layout.
308 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
310 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
311 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
312 r_info nor r_sym fields.
313 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
315 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
317 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
319 * (_bfd_riscv_relax_align): Call bfd_set_error and
320 print an error message when unable to relax a .align directive.
322 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
324 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
325 (riscv_record_pcrel_hi_reloc): Add absolute argument.
326 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
327 R_RISCV_PCREL_HI20 relocs, and pass the result to
328 riscv_record_pcrel_hi_reloc.
330 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
332 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
333 r_type_p. Remove the converted argument. Replace
334 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
335 the new relocation type via r_type_p.
336 (elf_i386_relocate_section): Likewise.
337 (elf_i386_finish_dynamic_symbol): Likewise.
338 (need_convert_load): Removed.
339 (check_relocs_failed): Updated.
340 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
341 instead of setting need_convert_load.
342 (_bfd_i386_elf_convert_load): Removed.
343 * elf64-x86-64.c (need_convert_load): Removed.
344 (check_relocs_failed): Updated.
345 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
346 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
347 Return the new relocation type via r_type_p.
348 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
349 instead of setting need_convert_load.
350 (elf_x86_64_check_relocs): Don't check PIC if relocation has
352 (_bfd_x86_64_elf_convert_load): Removed.
353 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
354 with SYMBOL_REFERENCES_LOCAL_P.
355 (elf_x86_64_finish_dynamic_symbol): Likewise.
356 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
358 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
359 (_bfd_x86_elf_link_symbol_references_local): New function.
360 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
361 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
362 SYMBOL_REFERENCES_LOCAL_P.
363 (elf_x86_link_hash_entry): Add local_ref.
364 (elf_x86_link_hash_table): Remove convert_load.
365 (_bfd_i386_elf_convert_load): Removed.
366 (_bfd_x86_64_elf_convert_load): Likewise.
367 (_bfd_x86_elf_link_symbol_references_local): New.
369 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
371 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
372 (elf_x86_64_info_to_howto): Get the real relocation type by
373 masking out R_X86_64_converted_reloc_bit.
374 (elf_x86_64_check_tls_transition): Get the real relocation type
375 by masking out R_X86_64_converted_reloc_bit.
376 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
377 instead of setting converted_reloc.
378 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
379 instead of converted_reloc. Get the real relocation type by
380 masking out R_X86_64_converted_reloc_bit.
381 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
382 R_X86_64_converted_reloc_bit is valid.
383 * elfxx-x86.h (converted_reloc): Removed.
385 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
387 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
388 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
389 to get the relocation type again.
390 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
391 r_type when calling elf_x86_64_tls_transition. Don't use
392 ELF32_R_TYPE to get the relocation type again.
394 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
396 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
399 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
401 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
402 argument. Don't check relocation overflow. Avoid relocation
403 overflow if --no-relax is used. Set converted_reloc on symbol
404 if a GOTPCREL relocation is converted.
405 (elf_x86_64_relocate_section): Issue a fatal error and suggest
406 --no-relax if GOTPCREL relocation conversion leads to relocation
408 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
410 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
411 Edmar Wienskoski <edmar.wienskoski@nxp.com
413 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
414 (ppc_elf_check_relocs): Handle it.
415 (ppc_elf_vle_split20): New function.
416 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
418 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
421 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
422 for x86-64 if GOT_TLS_GDESC_P is true.
424 2017-09-03 Alan Modra <amodra@gmail.com>
427 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
429 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
431 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
432 tls_get_addr for x86-64 in one place.
434 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
436 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
437 with elfxx-x86.lo for 64-bit BFD.
438 * configure: Regenerated.
440 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
442 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
443 (_bfd_i386_elf_convert_load): This. Remove static.
444 (elf_i386_size_dynamic_sections): Removed.
445 (elf_backend_size_dynamic_sections): Likewise.
446 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
447 (_bfd_x86_64_elf_convert_load): This. Remove static.
448 (elf_x86_64_size_dynamic_sections): Removed.
449 (elf_backend_size_dynamic_sections): Likewise.
450 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
451 (elf_x86_allocate_dynrelocs): This. Make it static.
452 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
453 (elf_x86_allocate_local_dynreloc): This. Make it static.
454 (elf_i386_is_reloc_section): New function.
455 (elf_x86_64_is_reloc_section): Likewise.
456 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
457 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
458 Rearrange got_entry_size initialization.
459 (_bfd_x86_elf_size_dynamic_sections): New function.
460 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
461 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
462 (_bfd_i386_elf_convert_load): New.
463 (_bfd_x86_64_elf_convert_load): Likewise.
464 (_bfd_x86_elf_size_dynamic_sections): Likewise.
465 (elf_backend_size_dynamic_sections): Likewise.
466 (_bfd_x86_elf_allocate_dynrelocs): Removed.
467 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
469 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
471 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
474 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
476 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
477 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
479 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
481 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
482 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
483 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
484 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
485 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
486 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
488 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
490 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
491 (elf_i386_allocate_local_dynrelocs): Likewise.
492 (elf_i386_size_dynamic_sections): Replace
493 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
494 with _bfd_x86_elf_allocate_dynrelocs and
495 _bfd_x86_elf_allocate_local_dynrelocs.
496 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
497 (elf_x86_64_allocate_local_dynrelocs): Likewise.
498 (elf_x86_64_size_dynamic_sections): Replace
499 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
500 with _bfd_x86_elf_allocate_dynrelocs and
501 _bfd_x86_elf_allocate_local_dynrelocs.
502 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
503 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
504 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
505 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
507 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
509 * elf32-i386.c (is_i386_elf): Removed.
510 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
511 (elf_i386_size_dynamic_sections): Likewise.
512 (elf_i386_relocate_section): Likewise.
513 * elf64-x86-64.c (is_x86_64_elf): Removed.
514 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
516 (elf_x86_64_size_dynamic_sections): Likewise.
517 (elf_x86_64_relocate_section): Likewise.
518 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
520 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
523 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
525 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
526 (elf_i386_allocate_dynrelocs): Replace
527 elf_i386_compute_jump_table_size with
528 elf_x86_compute_jump_table_size.
529 (elf_i386_size_dynamic_sections): Likewise.
530 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
531 (elf_x86_64_allocate_dynrelocs): Replace
532 elf_x86_64_compute_jump_table_size with
533 elf_x86_compute_jump_table_size.
534 (elf_x86_64_size_dynamic_sections): Likewise.
535 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
537 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
538 (elf_x86_compute_jump_table_size): New.
540 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
542 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
544 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
545 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
547 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
549 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
550 with htab->is_vxworks.
551 (elf_i386_size_dynamic_sections): Likewise.
552 (elf_i386_relocate_section): Likewise.
553 (elf_i386_finish_dynamic_symbol): Likewise.
554 (elf_i386_finish_dynamic_sections): Likewise.
556 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
558 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
559 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
560 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
561 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
562 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
563 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
564 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
565 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
567 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
570 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
571 ELF_COMMON_DEF_P for common symbols.
573 2017-09-02 Alan Modra <amodra@gmail.com>
575 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
576 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
577 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
579 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
581 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
582 (elf_backend_gc_mark_hook): Likewise.
583 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
584 (elf_backend_gc_mark_hook): Likewise.
585 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
586 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
587 (elf_backend_gc_mark_hook): Likewise.
589 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
591 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
592 (elf_backend_adjust_dynamic_symbol): Likewise.
593 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
594 (elf_backend_adjust_dynamic_symbol): Likewise.
595 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
596 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
597 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
598 (_bfd_x86_elf_adjust_dynamic_symbol): New.
599 (elf_backend_adjust_dynamic_symbol): Likewise.
601 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
603 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
606 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
608 * elf32-i386.c (elf_i386_mkobject): Removed.
609 (bfd_elf32_mkobject): Likewise.
610 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
611 (bfd_elf64_mkobject): Likewise.
612 (bfd_elf32_mkobject): Likewise.
613 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
614 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
615 (bfd_elf64_mkobject): Likewise.
616 (bfd_elf32_mkobject): Likewise.
618 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
620 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
621 Call _bfd_x86_elf_link_setup_gnu_properties.
622 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
623 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
625 (elf_x86_64_non_lazy_plt): Likewise.
626 (elf_x86_64_lazy_bnd_plt): Likewise.
627 (elf_x86_64_non_lazy_bnd_plt): Likewise.
628 (elf_x86_64_lazy_ibt_plt): Likewise.
629 (elf_x32_lazy_ibt_plt): Likewise.
630 (elf_x86_64_non_lazy_ibt_plt): Likewise.
631 (elf_x32_non_lazy_ibt_plt): Likewise.
632 (elf_x86_64_nacl_plt): Likewise.
633 (elf_x86_64_link_setup_gnu_properties): Updated. Call
634 _bfd_x86_elf_link_setup_gnu_properties.
635 * elfxx-x86.c: Include elf-vxworks.h".
636 (_bfd_x86_elf_link_setup_gnu_properties): New function.
637 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
638 comments for pic_plt0_entry and pic_plt_entry.
639 (elf_x86_non_lazy_plt_layout): Likewise.
640 (elf_x86_plt_layout_table): New.
641 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
643 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
646 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
647 .eh_frame section for the second PLT.
648 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
649 alignment of .eh_frame section for the second PLT.
651 2017-09-01 Nick Clifton <nickc@redhat.com>
654 * dwarf2.c (decode_line_info): Fix test for an overlong line info
657 2017-09-01 Nick Clifton <nickc@redhat.com>
660 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
661 attribute buffer is NUL terminated.
663 2017-08-31 Nick Clifton <nickc@redhat.com>
666 * dwarf2.c (read_section): If necessary add a terminating NUL byte
667 to dwarf string sections.
669 2017-08-31 Alan Modra <amodra@gmail.com>
671 * po/SRC-POTFILES.in: Regenerate.
673 2017-08-31 Alan Modra <amodra@gmail.com>
675 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
676 for a section containing just a terminator. Allow multiple
677 terminators at end of section.
678 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
679 sections when not adding alignment. Assert on terminator in
682 2017-08-31 Alan Modra <amodra@gmail.com>
686 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
689 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
691 * configure.ac (bfd_backends): Add elf64.lo together with
692 elfxx-x86.lo for 64-bit BFD.
693 * configure: Regenerated.
695 2017-08-31 James Bowman <james.bowman@ftdichip.com>
697 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
700 2017-08-31 Alan Modra <amodra@gmail.com>
703 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
704 before _close_and_cleanup. Call iovec->bclose after.
705 (bfd_close): Remove code common to, and call, bfd_close_all_done.
707 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
709 * elf32-i386.c (elf_i386_plt_type): Removed.
710 (elf_i386_plt): Likewise.
711 (elf_i386_get_synthetic_symtab): Updated. Call
712 _bfd_x86_elf_get_synthetic_symtab.
713 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
714 (elf_x86_64_plt): Likewise.
715 (elf_x86_64_get_synthetic_symtab): Updated. Call
716 _bfd_x86_elf_get_synthetic_symtab.
717 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
718 (elf_x86_64_get_plt_got_vma): Likewise.
719 (elf_i386_valid_plt_reloc_p): Likewise.
720 (elf_x86_64_valid_plt_reloc_p): Likewise.
721 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
722 * elfxx-x86.h (elf_x86_plt_type): New.
723 (elf_x86_plt): Likewise.
724 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
726 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
728 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
729 target_id instead of elf_machine_code.
731 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
733 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
734 (elf_i386_lazy_plt_layout): Likewise.
735 (elf_i386_non_lazy_plt_layout): Likewise.
736 (elf_i386_plt_layout): Likewise.
737 (elf_i386_link_hash_table): Likewise.
738 (elf_i386_next_tls_desc_index): Likewise.
739 (elf_i386_srelplt2): Likewise.
740 (elf_i386_plt): Likewise.
741 (elf_i386_lazy_plt): Likewise.
742 (elf_i386_non_lazy_plt): Likewise.
743 (elf_i386_link_hash_table_create): Likewise.
744 (bfd_elf32_bfd_link_hash_table_create): Likewise.
745 (elf_i386_lazy_plt): Updated.
746 (elf_i386_non_lazy_plt): Likewise.
747 (elf_i386_lazy_ibt_plt): Likewise.
748 (elf_i386_non_lazy_ibt_plt): Likewise.
749 (elf_i386_allocate_dynrelocs): Likewise.
750 (elf_i386_size_dynamic_sections): Likewise.
751 (elf_i386_relocate_section): Likewise.
752 (elf_i386_finish_dynamic_symbol): Likewise.
753 (elf_i386_finish_dynamic_sections): Likewise.
754 (elf_i386_get_synthetic_symtab): Likewise.
755 (elf_i386_link_setup_gnu_properties): Likewise.
756 (elf_i386_nacl_plt): Likewise.
757 * elf64-x86-64.c (ABI_64_P): Removed.
758 (ELF64_DYNAMIC_INTERPRETER): Likewise.
759 (ELF32_DYNAMIC_INTERPRETER): Likewise.
760 (elf_x86_64_lazy_plt_layout): Likewise.
761 (elf_x86_64_non_lazy_plt_layout): Likewise.
762 (elf_x86_64_plt_layout): Likewise.
763 (elf_x86_64_link_hash_table): Likewise.
764 (elf_x86_64_plt): Likewise.
765 (elf_x86_64_lazy_plt): Likewise.
766 (elf_x86_64_non_lazy_plt): Likewise.
767 (elf_x86_64_link_hash_table_create): Likewise.
768 (bfd_elf64_bfd_link_hash_table_create): Likewise.
769 (bfd_elf32_bfd_link_hash_table_create): Likewise.
770 (elf_x86_64_lazy_plt): Updated.
771 (elf_x86_64_non_lazy_plt): Likewise.
772 (elf_x86_64_lazy_bnd_plt): Likewise.
773 (elf_x86_64_non_lazy_bnd_plt): Likewise.
774 (elf_x86_64_lazy_ibt_plt): Likewise.
775 (elf_x32_lazy_ibt_plt): Likewise.
776 (elf_x86_64_non_lazy_ibt_plt): Likewise.
777 (elf_x32_non_lazy_ibt_plt): Likewise.
778 (elf_x86_64_allocate_dynrelocs): Likewise.
779 (elf_x86_64_size_dynamic_sections): Likewise.
780 (elf_x86_64_relocate_section): Likewise.
781 (elf_x86_64_finish_dynamic_symbol): Likewise.
782 (elf_x86_64_finish_dynamic_sections): Likewise.
783 (elf_x86_64_get_synthetic_symtab): Likewise.
784 (elf_x86_64_link_setup_gnu_properties): Likewise.
785 (elf_x86_64_nacl_plt): Likewise.
786 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
788 (ELF32_DYNAMIC_INTERPRETER): New.
789 (ELF64_DYNAMIC_INTERPRETER): Likewise.
790 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
791 (_bfd_x86_elf_link_hash_table_create): Likewise.
792 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
793 (elf_x86_link_hash_table_free): This. Make it static.
794 * elfxx-x86.h: Don't include "objalloc.h".
796 (elf_x86_lazy_plt_layout): Likewise.
797 (elf_x86_non_lazy_plt_layout): Likewise.
798 (elf_x86_plt_layout): Likewise.
799 (_bfd_x86_elf_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_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
803 srelplt2 and next_tls_desc_index.
804 (_bfd_x86_elf_link_hash_table_free): Removed.
806 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
808 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
809 branch offset interpretation.
811 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
814 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
816 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
818 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
819 (elf_x86_64_srelplt2): Likewise.
821 2017-08-30 Alan Modra <amodra@gmail.com>
823 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
824 (ppc64_elf_tls_optimize): Set it.
825 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
826 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
827 addis would add zero.
828 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
829 (ppc_elf_tls_optimize): Set it.
830 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
831 insn on TPREL16_LO relocs to use r2 when addis would add zero.
833 2017-08-30 Alan Modra <amodra@gmail.com>
835 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
836 __tls_get_addr call sequences to LE, don't move the addi down
837 to the nop. Replace the bl with addi and leave the nop alone.
839 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
841 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
843 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
845 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
847 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
849 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
850 (BFD64_BACKENDS): Likewise.
851 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
852 (BFD64_BACKENDS_CFILES): Likewise.
853 * Makefile.in: Regenerated.
854 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
855 elf32-i386.lo and elf64-x86-64.lo.
856 * configure: Regenerated.
857 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
858 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
859 "objalloc.h" and "hashtab.h".
860 (ELIMINATE_COPY_RELOCS): Removed.
861 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
862 (SYMBOL_NO_COPYRELOC): Likewise.
863 (elf_i386_link_hash_entry): Likewise.
864 (GOT_UNKNOWN): Likewise.
865 (GOT_NORMAL): Likewise.
866 (GOT_TLS_GD): Likewise.
867 (elf_i386_hash_entry): Likewise.
868 (elf_i386_obj_tdata): Likewise.
869 (elf_i386_tdata): Likewise.
870 (elf_i386_local_got_tls_type): Likewise.
871 (elf_i386_local_tlsdesc_gotent): Likewise.
872 (elf_i386_hash_table): Likewise.
873 (elf_i386_link_hash_newfunc): Likewise.
874 (elf_i386_local_htab_hash): Likewise.
875 (elf_i386_local_htab_eq): Likewise.
876 (elf_i386_get_local_sym_hash): Likewise.
877 (elf_i386_link_hash_table_free): Likewise.
878 (elf_i386_copy_indirect_symbol): Likewise.
879 (elf_i386_fixup_symbol): Likewise.
880 (elf_i386_readonly_dynrelocs): Likewise.
881 (elf_i386_always_size_sections): Likewise.
882 (elf_i386_set_tls_module_base): Likewise.
883 (elf_i386_dtpoff_base): Likewise.
884 (compare_relocs): Likewise.
885 (elf_i386_hash_symbol): Likewise.
886 (elf_i386_parse_gnu_properties): Likewise.
887 (elf_i386_merge_gnu_properties): Likewise.
888 (elf_i386_link_check_relocs): Likewise.
889 (elf_i386_merge_symbol_attribute): Likewise.
890 (bfd_elf32_bfd_link_check_relocs): Likewise.
891 (elf_backend_copy_indirect_symbol): Likewise.
892 (elf_backend_always_size_sections): Likewise.
893 (elf_backend_omit_section_dynsym): Likewise.
894 (elf_backend_hash_symbol): Likewise.
895 (elf_backend_fixup_symbol): Likewise.
896 (elf_backend_parse_gnu_properties): Likewise.
897 (elf_backend_merge_gnu_properties): Likewise.
898 (elf_backend_merge_symbol_attribute): Likewise.
899 (elf_i386_mkobject): Updated.
900 (elf_i386_link_hash_table_create): Likewise.
901 (elf_i386_check_tls_transition): Likewise.
902 (elf_i386_tls_transition): Likewise.
903 (elf_i386_convert_load_reloc): Likewise.
904 (elf_i386_check_relocs): Likewise.
905 (elf_i386_adjust_dynamic_symbol): Likewise.
906 (elf_i386_allocate_dynrelocs): Likewise.
907 (elf_i386_convert_load): Likewise.
908 (elf_i386_size_dynamic_sections): Likewise.
909 (elf_i386_relocate_section): Likewise.
910 (elf_i386_finish_dynamic_symbol ): Likewise.
911 (elf_i386_finish_dynamic_sections): Likewise.
912 (elf_i386_output_arch_local_syms): Likewise.
913 (elf_i386_get_synthetic_symtab): Likewise.
914 (elf_i386_link_setup_gnu_properties): Likewise.
915 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
916 of elf_link_hash_table, as base.
917 (elf_i386_next_tls_desc_index): New.
918 (elf_i386_srelplt2): Likewise.
919 (elf_i386_plt): Likewise.
920 (elf_i386_lazy_plt): Likewise.
921 (elf_i386_non_lazy_plt): Likewise.
922 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
923 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
924 "objalloc.h" and "hashtab.h".
925 (ELIMINATE_COPY_RELOCS): Removed.
926 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
927 (SYMBOL_NO_COPYRELOC): Likewise.
928 (elf_x86_64_link_hash_entry): Likewise.
929 (GOT_UNKNOWN): Likewise.
930 (GOT_NORMAL): Likewise.
931 (GOT_TLS_GD): Likewise.
932 (elf_x86_64_hash_entry): Likewise.
933 (elf_x86_64_obj_tdata): Likewise.
934 (elf_x86_64_tdata): Likewise.
935 (elf_x86_64_local_got_tls_type): Likewise.
936 (elf_x86_64_local_tlsdesc_gotent): Likewise.
937 (elf_x86_64_hash_table): Likewise.
938 (elf_x86_64_link_hash_newfunc): Likewise.
939 (elf_x86_64_local_htab_hash): Likewise.
940 (elf_x86_64_local_htab_eq): Likewise.
941 (elf_x86_64_get_local_sym_hash): Likewise.
942 (elf_x86_64_link_hash_table_free): Likewise.
943 (elf_x86_64_copy_indirect_symbol): Likewise.
944 (elf_x86_64_fixup_symbol): Likewise.
945 (elf_x86_64_readonly_dynrelocs): Likewise.
946 (elf_x86_64_always_size_sections): Likewise.
947 (elf_x86_64_set_tls_module_base): Likewise.
948 (elf_x86_64_dtpoff_base): Likewise.
949 (compare_relocs): Likewise.
950 (elf_x86_64_merge_symbol_attribute): Likewise.
951 (elf_x86_64_hash_symbol): Likewise.
952 (elf_x86_64_parse_gnu_properties): Likewise.
953 (elf_x86_64_merge_gnu_properties): Likewise.
954 (elf_x86_64_link_check_relocs): Likewise.
955 (elf_backend_copy_indirect_symbol): Likewise.
956 (elf_backend_always_size_sections): Likewise.
957 (bfd_elf64_bfd_link_check_relocs): Likewise.
958 (elf_backend_merge_symbol_attribute): Likewise.
959 (elf_backend_hash_symbol): Likewise.
960 (elf_backend_omit_section_dynsym): Likewise.
961 (elf_backend_fixup_symbol): Likewise.
962 (elf_backend_parse_gnu_properties): Likewise.
963 (elf_backend_merge_gnu_properties): Likewise.
964 (bfd_elf32_bfd_link_check_relocs): Likewise.
965 (elf_x86_64_mkobject): Updated.
966 (elf_x86_64_link_hash_table_create): Likewise.
967 (elf_x86_64_check_tls_transition): Likewise.
968 (elf_x86_64_tls_transition): Likewise.
969 (elf_x86_64_convert_load_reloc): Likewise.
970 (elf_x86_64_check_relocs): Likewise.
971 (elf_x86_64_adjust_dynamic_symbol): Likewise.
972 (elf_x86_64_allocate_dynrelocs): Likewise.
973 (elf_x86_64_convert_load): Likewise.
974 (elf_x86_64_size_dynamic_sections): Likewise.
975 (elf_x86_64_relocate_section): Likewise.
976 (elf_x86_64_finish_dynamic_symbol ): Likewise.
977 (elf_x86_64_finish_dynamic_sections): Likewise.
978 (elf_x86_64_output_arch_local_syms): Likewise.
979 (elf_x86_64_get_synthetic_symtab): Likewise.
980 (elf_x86_64_link_setup_gnu_properties): Likewise.
981 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
982 instead of elf_link_hash_table, as base.
983 (elf_x86_64_next_tls_desc_index): New.
984 (elf_x86_64_srelplt2): Likewise.
985 (elf_x86_64_plt): Likewise.
986 (elf_x86_64_lazy_plt): Likewise.
987 (elf_x86_64_non_lazy_plt): Likewise.
988 * elfxx-x86.c: New file.
989 * elfxx-x86.h: Likewise.
991 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
993 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
995 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
997 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
999 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1000 sections before checking dynamic relocations and free invalid
1001 PLT section contents.
1002 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1004 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1006 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1007 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1009 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1012 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1014 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1016 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1018 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1020 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1022 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1025 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1026 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1027 Add a has_no_copy_on_protected bitfield.
1028 (elf_has_no_copy_on_protected): New.
1029 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1030 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1031 (elf_merge_gnu_property_list): Likewise.
1032 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1033 to FALSE for elf_has_no_copy_on_protected.
1034 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1035 (elf_i386_link_hash_entry): Add def_protected.
1036 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1037 when checking info->nocopyreloc.
1038 (elf_i386_link_setup_gnu_properties): Don't set
1039 extern_protected_data here.
1040 (elf_i386_merge_symbol_attribute): New function.
1041 (elf_backend_merge_symbol_attribute): New.
1042 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1043 (elf_x86_64_link_hash_entry): Add def_protected.
1044 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1045 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1046 when checking info->nocopyreloc.
1047 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1048 relocation run-time overflow and unresolvable R_X86_64_32S
1049 relocation against protected data symbol defined in shared object
1050 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1051 (elf_x86_64_link_setup_gnu_properties): Don't set
1052 extern_protected_data here.
1053 (elf_x86_64_merge_symbol_attribute): New function.
1054 (elf_backend_merge_symbol_attribute): New.
1056 2017-08-26 Alan Modra <amodra@gmail.com>
1058 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1059 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1060 (ppc_elf_relocate_section): Comment fix.
1061 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1062 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1063 Support dynamic relocs for TPREL16 when non-pic too.
1064 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1065 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1068 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1070 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1071 "symbol" in comments.
1072 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1074 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1077 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1078 R_X86_64_PC32 relocation run-time overflow and unresolvable
1079 R_X86_64_32S relocation with -z nocopyreloc.
1081 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1083 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1084 Undefined symbols may not have a type.
1085 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1087 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1089 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1090 bfd_link_info. Report shared, PIE or PDE object based on
1092 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1093 (elf_x86_64_relocate_section): Likewise.
1095 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1097 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1098 for function symbols.
1099 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1101 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1103 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1104 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1105 is set on any input relocatable file.
1106 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1108 2017-08-23 Alan Modra <amodra@gmail.com>
1111 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1112 ensure_undefweak_dynamic. Handle undefined too.
1113 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1114 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1115 (allocate_dynrelocs): Discard undefined non-default visibility
1116 relocs first. Make undefined syms dynamic. Tidy goto.
1118 2017-08-21 Alan Modra <amodra@gmail.com>
1119 H.J. Lu <hongjiu.lu@intel.com>
1122 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1123 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1125 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1128 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1129 undefined weak symbols.
1131 2017-08-18 Nick Clifton <nickc@redhat.com>
1134 * tekhex.c (getsym): Fix check for source pointer walking off the
1135 end of the input buffer.
1137 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1140 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1141 relocations in debug sections, change abort to _bfd_error_handler.
1143 2017-08-14 Nick Clifton <nickc@redhat.com>
1146 * elf.c (setup_group): Check for an empty or very small group
1148 * po/bfd.pot: Regenerate.
1150 2017-08-14 Alan Modra <amodra@gmail.com>
1153 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1154 alignment padding here.
1155 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1156 in a reverse pass over sections.
1158 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1161 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1162 for @plt suffixes first.
1163 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1165 2017-08-08 Nick Clifton <nickc@redhat.com>
1168 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1169 small section lengths.
1170 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1172 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1173 there is enough data present in the note.
1175 2017-08-08 Alan Modra <amodra@gmail.com>
1178 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1179 got.refcount for GOTOFF relocs, just create .got section.
1181 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1183 * elflink.c (elf_link_add_object_symbols): Move common symbol
1184 check after bed->common_definition.
1186 2017-08-07 Alan Modra <amodra@gmail.com>
1189 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1190 needed to define various dynamic tags have been discarded.
1192 2017-08-07 Nick Clifton <nickc@redhat.com>
1195 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1196 has not been set then use the bfd returned by
1197 _bfd_elf_link_setup_gnu_properties. If that is null then search
1198 through all the input bfds selecting the first normal, ELF format
1200 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1202 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1204 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1206 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1207 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1208 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1209 (elf_i386_link_check_relocs): New function.
1210 (bfd_elf32_bfd_link_check_relocs): New.
1211 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1213 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1214 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1215 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1216 (elf_x86_64_link_check_relocs): New function.
1217 (bfd_elf64_bfd_link_check_relocs): New.
1218 (bfd_elf32_bfd_link_check_relocs): Likewise.
1220 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1223 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1224 as undefined for --no-define-common.
1226 2017-08-05 Alan Modra <amodra@gmail.com>
1228 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1229 hppa_link_hash_table.
1231 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1233 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1234 entries for sysregs with negative indices.
1236 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1238 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1239 isn't the S/390 specific elf data.
1240 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1242 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1244 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1245 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1246 [R_RISCV_ADD16]: Likewise.
1247 [R_RISCV_ADD32]: Likewise.
1248 [R_RISCV_ADD64]: Likewise.
1249 [R_RISCV_SUB6]: Likewise.
1250 [R_RISCV_SUB8]: Likewise.
1251 [R_RISCV_SUB16]: Likewise.
1252 [R_RISCV_SUB32]: Likewise.
1253 [R_RISCV_SUB64]: Likewise.
1255 2017-07-31 Alan Modra <amodra@gmail.com>
1257 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1258 without ld.so checks.
1260 2017-07-29 Alan Modra <amodra@gmail.com>
1263 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1264 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1265 (is_elfv2_localentry0): Test non_zero_localentry.
1266 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1268 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1270 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1271 pointer check for htab->elf.irelplt.
1272 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1274 2017-07-27 Nick Clifton <nickc@redhat.com>
1277 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1279 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1281 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1283 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1285 (evax_bfd_print_emh): Check for invalid string lengths.
1287 2017-07-25 Nick Clifton <nickc@redhat.com>
1289 * po/fr.po: Updated French translation.
1291 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1294 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1295 16-bit absolute branches into 10-bit pc-relative branches on the
1296 MSP430 as well as the MSP430X.
1298 2017-07-25 Alan Modra <amodra@gmail.com>
1300 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1301 (stub_eh_frame_size): New function.
1302 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1303 (group_sections): Init group tls_get_addr_opt_bctrl.
1304 (ppc64_elf_size_stubs): Update sizing and initialization of
1305 .eh_frame. Iteration over stubs via group list.
1306 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1307 (ppc64_elf_finish_dynamic_sections): Update finalization of
1310 2017-07-24 Nick Clifton <nickc@redhat.com>
1313 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1314 of the relocs to the canonicalize_one_reloc routine.
1315 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1316 for the _bfd_mach_o_canonicalize_one_reloc field.
1317 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1318 res_base parameter. Use to check for corrupt pair relocs.
1319 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1321 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1323 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1326 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1327 enough data in the record before attempting to parse it.
1328 (_bfd_vms_slurp_eeom): Likewise.
1330 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1331 (image_set_ptr): Likewise.
1332 (alpha_vms_slurp_relocs): Likewise.
1334 (alpha_vms_object_p): Check for a truncated record.
1336 2017-07-24 Nick Clifton <nickc@redhat.com>
1339 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1340 an unrecognized reloc and sets the bfd_error value.
1341 * libbfd.h: Regenerate.
1342 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1344 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1345 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1346 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1347 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1348 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1350 2017-07-23 Alan Modra <amodra@gmail.com>
1352 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1355 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1358 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1359 reloc_class_ifunc for ifunc symbols.
1361 2017-07-19 Nick Clifton <nickc@redhat.com>
1364 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1365 correct magic bytes at the start, set the error to wrong format
1366 and clear the format selector before returning NULL.
1368 2017-07-19 Nick Clifton <nickc@redhat.com>
1371 * coff-rs6000.c (_bfd_strntol): New function.
1372 (_bfd_strntoll): New function.
1373 (GET_VALUE_IN_FIELD): New macro.
1374 (EQ_VALUE_IN_FIELD): new macro.
1375 (_bfd_xcoff_slurp_armap): Use new macros.
1376 (_bfd_xcoff_archive_p): Likewise.
1377 (_bfd_xcoff_read_ar_hdr): Likewise.
1378 (_bfd_xcoff_openr_next_archived_file): Likewise.
1379 (_bfd_xcoff_stat_arch_elt): Likewise.
1380 * coff64-rs6000.c (_bfd_strntol): New function.
1381 (_bfd_strntoll): New function.
1382 (GET_VALUE_IN_FIELD): New macro.
1383 (xcoff64_slurp_armap): Use new macros.
1385 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1386 John Eric Martin <John.Martin@emmicro-us.com>
1388 * bfd-in2.h: Regenerate.
1389 * libbfd.h: Regenerate.
1390 * elf32-arc.c (JLI): Define.
1391 * reloc.c: Add JLI relocations.
1393 2017-07-18 Nick Clifton <nickc@redhat.com>
1396 * coff-sh.c: Fix spelling typos.
1397 * compress.c: Likewise.
1398 * cpu-pdp11.c: Likewise.
1399 * ecofflink.c: Likewise.
1400 * elf-m10300.c: Likewise.
1402 * elf32-arm.c: Likewise.
1403 * elf32-m68k.c: Likewise.
1404 * elf32-nds32.c: Likewise.
1405 * elf32-ppc.c: Likewise.
1406 * elf32-sh.c: Likewise.
1407 * elf32-v850.c: Likewise.
1408 * elf64-ppc.c: Likewise.
1409 * elf64-x86-64.c: Likewise.
1410 * elflink.c: Likewise.
1411 * elfnn-aarch64.c: Likewise.
1412 * elfxx-mips.c: Likewise.
1414 * sunos.c: Likewise.
1415 * vms-alpha.c: Likewise.
1416 * xcofflink.c: Likewise.
1418 2017-07-18 Nick Clifton <nickc@redhat.com>
1421 * coffcode.h (handle_COMDAT): Replace abort with an error message
1424 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1427 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1430 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1432 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1434 2017-07-16 Alan Modra <amodra@gmail.com>
1436 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1437 __tls_index GOT entries when using __tls_get_addr_opt stub.
1438 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1440 2017-07-12 Alan Modra <amodra@gmail.com>
1442 * po/es.po: Update from translationproject.org/latest/bfd/.
1443 * po/fi.po: Likewise.
1444 * po/fr.po: Likewise.
1445 * po/id.po: Likewise.
1446 * po/ja.po: Likewise.
1447 * po/ro.po: Likewise.
1448 * po/ru.po: Likewise.
1449 * po/sr.po: Likewise.
1450 * po/sv.po: Likewise.
1451 * po/tr.po: Likewise.
1452 * po/uk.po: Likewise.
1453 * po/vi.po: Likewise.
1454 * po/zh_CN.po: Likewise.
1455 * po/hr.po: New file from translationproject.org.
1456 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1457 * configure: Regenerate.
1459 2017-07-12 Nick Clifton <nickc@redhat.com>
1461 Fix compile time warnings using gcc 7.1.1.
1462 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1464 (elf_xtensa_get_gotplt_section): Increase length of got_name
1466 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1467 default return of FALSE.
1468 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1469 default return of FALSE.
1471 2017-07-12 Alan Modra <amodra@gmail.com>
1473 * binary.c (binary_set_section_contents): Don't print filepos in
1475 (coff_write_object_contents): Cast size_t for error message.
1476 (coff_slurp_line_table): Don't use bfd_vma symndx.
1477 (coff_slurp_reloc_table): Remove unneeded cast.
1478 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1480 (find_abstract_instance_name): Likewise.
1481 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1482 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1483 (elf32_arm_check_relocs): Make r_symndx an int.
1484 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1486 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1488 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1490 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1491 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1492 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1493 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1494 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1495 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1496 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1497 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1498 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1499 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1500 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1501 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1502 and use %lu for error message.
1503 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1504 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1507 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1509 (elf32_arm_final_link_relocate): Likewise.
1510 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1511 * coffcode.h (styp_to_sec_flags): Likewise.
1512 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1513 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1514 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1515 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1516 (elf32_bfin_merge_private_bfd_data): Likewise.
1517 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1518 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1519 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1520 (i370_elf_relocate_section): Likewise.
1521 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1522 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1523 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1524 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1525 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1526 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1527 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1528 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1529 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1530 * ieee.c (ieee_write_id, read_id): Likewise.
1531 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1532 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1533 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1534 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1535 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1536 * stabs.c (_bfd_link_section_stabs): Likewise.
1538 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1540 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1541 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1542 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1543 * coff-sh.c (sh_relax_section): Likewise.
1544 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1545 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1546 * coffcode.h (coff_slurp_reloc_table): Likewise.
1547 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1548 (_bfd_coff_read_string_table): Likewise.
1549 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1550 * compress.c (bfd_get_full_section_contents): Likewise.
1551 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1552 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1553 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1554 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1555 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1556 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1557 (elf32_arm_write_section): Likewise.
1558 * elf32-bfin.c (bfin_relocate_section): Likewise.
1559 (bfinfdpic_relocate_section): Likewise.
1560 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1561 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1562 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1563 (elf_i386_relocate_section): Likewise.
1564 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1565 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1566 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1567 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1568 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1569 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1570 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1571 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1572 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1573 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1574 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1575 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1576 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1577 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1578 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1579 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1580 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1581 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1582 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1583 * elf32-sh.c (sh_elf_relax_section): Likewise.
1584 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1585 (sh_elf_relocate_section): Likewise.
1586 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1587 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1588 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1589 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1590 * elf32-v850.c (v850_elf_relax_section): Likewise.
1591 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1592 (elf_vax_relocate_section): Likewise.
1593 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1594 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1595 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1596 (do_fix_for_relocatable_link): Likewise.
1597 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1598 (elf64_alpha_relax_with_lituse): Likewise.
1599 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1600 (elf_hppa_final_link_relocate): Likewise.
1601 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1602 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1603 (elf64_vms_link_add_object_symbols): Likewise.
1604 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1605 (mmix_final_link_relocate): Likewise.
1606 * elf64-s390.c (invalid_tls_insn): Likewise.
1607 (elf_s390_relocate_section): Likewise.
1608 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1609 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1610 (elf_x86_64_relocate_section): Likewise.
1611 * elfcode.h (elf_slurp_symbol_table): Likewise.
1612 * elfcore.h (elf_core_file_p): Likewise.
1613 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1614 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1615 (elfNN_aarch64_relocate_section): Likewise.
1616 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1617 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1618 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1619 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1620 (_bfd_mips_elf_relocate_section): Likewise.
1621 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1622 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1623 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1624 * ieee.c (ieee_slurp_external_symbols): Likewise.
1625 * ihex.c (ihex_write_object_content): Likewise.
1626 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1627 * merge.c (_bfd_merged_section_offset): Likewise.
1628 * mmo.c (mmo_write_loc_chunk): Likewise.
1629 (mmo_write_object_contents): Likewise.
1630 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1631 * stabs.c (_bfd_link_section_stabs): Likewise.
1632 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1634 2017-07-11 Alan Modra <amodra@gmail.com>
1636 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1638 2017-07-11 Alan Modra <amodra@gmail.com>
1640 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1641 instruction" error using _bfd_error_handler, not einfo.
1643 2017-07-10 Nick Clifton <nickc@redhat.com>
1645 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1646 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1648 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1650 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1652 2017-07-07 Alan Modra <amodra@gmail.com>
1654 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1656 2017-07-07 Alan Modra <amodra@gmail.com>
1658 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1659 as long long. Move code replacing "ll" with "I64", and simplify.
1661 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1663 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1666 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1668 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1670 (line_info_add_file_name): Likewise.
1671 (decode_line_info): Likewise.
1673 2017-07-04 Tristan Gingold <gingold@adacore.com>
1675 * version.m4: Bump version to 2.29.51
1676 * configure: Regenerate.
1678 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1680 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1681 sanity check at the head of this function.
1683 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1685 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1686 dwarf_line_str_size.
1687 (struct attr_abbrev): Add field implicit_const.
1688 (dwarf_debug_sections): Add .debug_line_str.
1689 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1690 (dwarf_debug_section_assert): Add static assertion.
1691 (read_indirect_line_string): New.
1692 (read_abbrevs): Support DW_FORM_implicit_const.
1693 (is_str_attr): Support DW_FORM_line_strp.
1694 (read_attribute_value): Support DW_FORM_line_strp and
1695 DW_FORM_implicit_const.
1696 (read_attribute): Support DW_FORM_implicit_const.
1697 (line_info_add_include_dir, line_info_add_include_dir_stub):
1698 (line_info_add_file_name, read_formatted_entries): New.
1699 (decode_line_info, parse_comp_unit): Support DWARF 5.
1700 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1702 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1704 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1705 abort statement that was put for symbols that are not dynamic.
1707 2017-07-03 Tristan Gingold <gingold@adacore.com>
1709 * po/bfd.pot: Regenerate
1711 2017-07-03 Alan Modra <amodra@gmail.com>
1713 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1714 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1715 * elf.c (setup_group): Use "Lx" to print sh_size.
1716 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1717 unknown section type in hex.
1718 (copy_special_section_fields): Style fix.
1719 (bfd_section_from_shdr): Correct format for sh_link. Use a
1720 common error message for all the variants of unrecognized
1722 (assign_file_positions_for_load_sections): Use "Lx" for lma
1723 adjust error message.
1724 (assign_file_positions_for_non_load_sections): Formatting.
1725 (rewrite_elf_program_header): Formatting. Use "Lx" for
1726 bfd_vma values in error messages.
1727 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1728 ELF_R_SYM value to type expected by format.
1729 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1731 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1732 (elf_link_input_bfd): Use "Lx" for r_info.
1733 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1735 2017-07-03 Alan Modra <amodra@gmail.com>
1737 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1738 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1739 Microsoft C library variant of long long format specifier.
1740 (PRINT20): Cast value to bfd_uint64_t not long long.
1741 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1742 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1743 long long. Don't cast to bfd_vma.
1744 * elf32-score.c (score3_bfd_getl48): Likewise.
1745 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1747 2017-07-03 Alan Modra <amodra@gmail.com>
1749 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1751 (bfd_elf_print_symbol): Don't cast symbol->flags.
1752 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1753 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1754 _bfd_error_handler argument order.
1755 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1757 2017-07-03 Alan Modra <amodra@gmail.com>
1759 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1760 AC_TYPE_LONG_DOUBLE.
1761 * configure: Regenerate.
1762 * config.in: Regenerate.
1764 2017-06-29 Andrew Waterman <andrew@sifive.com>
1766 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1769 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1771 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1772 unless it is undefined weak.
1773 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1774 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1776 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1777 is not dynamic in PIC, abort.
1779 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1782 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1783 undefined weak symbols into dynamic.
1784 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1785 relocation for non-dynamic symbols.
1786 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1788 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1790 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1791 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1792 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1793 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1794 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1797 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1799 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1800 (elfcore_write_s390_gs_bc): Likewise.
1801 * elf.c (elfcore_grok_s390_gs_cb): New function.
1802 (elfcore_grok_s390_gs_bc): New function.
1803 (elfcore_grok_note): Call them.
1804 (elfcore_write_s390_gs_cb): New function.
1805 (elfcore_write_s390_gs_bc): New function.
1806 (elfcore_write_register_note): Call them.
1808 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1810 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1811 bfd_get_file_size. Check archive element size.
1812 (_bfd_generic_get_section_contents_in_window): Likewise.
1814 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1816 * bfd-in2.h: Regenerated.
1817 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1818 (bfd_get_file_size): Likewise.
1820 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1821 Matthew Fortune <matthew.fortune@imgtec.com>
1823 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1824 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1825 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1826 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1828 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1829 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1830 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1831 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1832 `bfd_mach_mips_interaptiv_mr2' entries.
1833 * bfd-in2.h: Regenerate.
1835 2017-06-27 Nick Clifton <nickc@redhat.com>
1837 * tekhex.c (pass_over): Revert accidental conversion of a local
1838 array to a static array.
1840 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1843 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1844 reloc addend if necessary. Adjust diff only if
1845 shrinked_insn_address < end_address.
1847 2017-06-27 Alan Modra <amodra@gmail.com>
1850 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1851 (_bfd_generic_get_section_contents_in_window): Likewise.
1853 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1855 * elfnn-riscv.c (perform_relocation): Support the new
1856 R_RISCV_32_PCREL relocation.
1857 (riscv_elf_relocate_section): Likewise.
1858 * elfxx-riscv.c (howto_table): Likewise.
1859 (riscv_reloc_map): Likewise.
1860 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1861 * libbfd.h: Regenerate.
1863 2017-06-27 Alan Modra <amodra@gmail.com>
1866 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1867 Use unsigned file pointer type, and remove cast.
1868 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1869 Add "count", not "sz".
1871 2017-06-26 Pedro Alves <palves@redhat.com>
1874 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1877 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1880 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1883 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1885 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1886 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1887 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1888 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1889 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1891 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1894 * compress.c (bfd_get_full_section_contents): Don't check the
1896 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1897 reject a section whose size + offset is greater than the size
1899 (_bfd_generic_get_section_contents_in_window): Likewise.
1901 2017-06-26 Nick Clifton <nickc@redhat.com>
1904 * tekhex.c (getvalue): Check for the source pointer exceeding the
1905 end pointer before the first byte is read.
1907 2017-06-26 Nick Clifton <nickc@redhat.com>
1910 * opncls.c (get_build_id): Check that the section is big enough
1911 to contain the whole note.
1912 * compress.c (bfd_get_full_section_contents): Check for and reject
1913 a section whose size is greater than the size of the entire file.
1914 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1915 contain a notes section.
1917 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1919 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1921 (elf_s390_modify_segment_map): Likewise.
1922 (bfd_elf_s390_set_options): Lisewise.
1924 2017-06-26 Alan Modra <amodra@gmail.com>
1926 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1928 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1929 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1930 .preinit_array on --just-syms bfds.
1931 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1932 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1933 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1935 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1937 * elf.c (find_link): Bounds check "hint".
1939 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1941 * elf32-arm.c (using_thumb_only): Update list of architectures in
1942 BFD_ASSERT for which the logic is valid.
1943 (using_thumb2_bl): Likewise.
1944 (using_thumb2): Likewise and return true for ARMv8-R.
1945 (arch_has_arm_nop): Likewise.
1946 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1947 merging logic. Update commentis for value 15 of v8m_baseline,
1948 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1949 merging of value 15 of Tag_CPU_arch.
1951 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1953 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1954 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1955 * bfd-in2.h: Regenerate.
1957 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1959 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1960 the error_alignment label forward. Properly align program
1961 property note section.
1963 2017-06-22 Eric Christopher <echristo@gmail.com>
1965 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1966 abs to fix a truncation warning.
1968 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1970 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1971 local undefined weak symbol to 0.
1972 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1974 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1976 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1977 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1978 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1979 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1980 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1981 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1982 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1983 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1985 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1987 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1988 (elf_i386_lazy_ibt_plt_entry): Likewise.
1989 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1990 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1991 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1992 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1993 (elf_i386_lazy_plt_layout): Likewise.
1994 (elf_i386_non_lazy_plt_layout): Likewise.
1995 (elf_i386_link_hash_entry): Add plt_second.
1996 (elf_i386_link_hash_table): Add plt_second and
1997 plt_second_eh_frame.
1998 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1999 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2000 the second PLT. Check the second PLT.
2001 (elf_i386_relocate_section): Use the second PLT to resolve
2002 PLT reference if needed.
2003 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2005 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2006 second PLT. Generate unwind info for the second PLT.
2007 (elf_i386_plt_type): Add plt_second.
2008 (elf_i386_get_synthetic_symtab): Support the second PLT.
2009 (elf_i386_parse_gnu_properties): Support
2010 GNU_PROPERTY_X86_FEATURE_1_AND.
2011 (elf_i386_merge_gnu_properties): Support
2012 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2013 on GNU_PROPERTY_X86_FEATURE_1_IBT
2014 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2015 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2016 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2017 is set on all relocatable inputs.
2018 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2019 (elf_x32_lazy_ibt_plt_entry): Likewise.
2020 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2021 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2022 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2023 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2024 (elf_x86_64_lazy_ibt_plt): Likewise.
2025 (elf_x32_lazy_ibt_plt): Likewise.
2026 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2027 (elf_x32_non_lazy_ibt_plt): Likewise.
2028 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2029 (elf_x86_64_parse_gnu_properties): Support
2030 GNU_PROPERTY_X86_FEATURE_1_AND.
2031 (elf_x86_64_merge_gnu_properties): Support
2032 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2033 on GNU_PROPERTY_X86_FEATURE_1_IBT
2034 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2035 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2036 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2037 is set on all relocatable inputs.
2039 2017-06-22 Nick Clifton <nickc@redhat.com>
2042 * som.c (setup_sections): NUL terminate the space_strings buffer.
2043 Check that the space.name field does not index beyond the end of
2044 the space_strings buffer.
2046 2017-06-21 Nick Clifton <nickc@redhat.com>
2049 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2051 2017-06-21 Nick Clifton <nickc@redhat.com>
2054 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2055 type of the size parameter.
2056 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2057 length of the counted string.
2058 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2059 (_bfd_vms_save_counted_string): Likewise.
2060 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2061 _bfd_vms_save_counted_string.
2062 (_bfd_vms_slurp_ehdr): Likewise.
2063 (_bfd_vms_slurp_egsd): Likewise.
2064 (Parse_module): Likewise.
2066 2017-06-21 Alan Modra <amodra@gmail.com>
2068 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2069 calls before tocsave calls.
2070 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2073 2017-06-21 Nick Clifton <nickc@redhat.com>
2076 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2077 bfd_get_full_section_contents returns no contents.
2079 2017-06-21 Nick Clifton <nickc@redhat.com>
2082 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2085 2017-06-21 Nick Clifton <nickc@redhat.com>
2088 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2090 (image_set_ptr): Likewise.
2091 (alpha_vms_fix_sec_rel): Likewise.
2092 (alpha_vms_slurp_relocs): Likewise.
2094 2017-06-21 Nick Clifton <nickc@redhat.com>
2097 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2099 (ieee_archive_p): Likewise.
2100 (ieee_object_p): Likewise.
2102 2017-06-21 Nick Clifton <nickc@redhat.com>
2105 * elf.c (setup_group): Zero the group section pointer list after
2106 allocation so that loops can be caught. Check for NULL pointers
2107 when processing a group list.
2109 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2111 * elf-s390.h: New file.
2112 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2114 (elf_s390_additional_program_headers): New function.
2115 (elf_s390_modify_segment_map): New function.
2116 (bfd_elf_s390_set_options): New function.
2117 (elf_backend_additional_program_headers)
2118 (elf_backend_modify_segment_map): Add macro definitions.
2120 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2123 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2124 the DYNAMIC bit instead of bfd_count_sections.
2126 2017-06-19 Nick Clifton <nickc@redhat.com>
2129 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2131 (evax_bfd_print_eeom): Likewise.
2132 (evax_bfd_print_egsd): Check for an overlarge record length.
2133 (evax_bfd_print_etir): Likewise.
2135 2017-06-19 Nick Clifton <nickc@redhat.com>
2138 * libieee.h (struct common_header_type): Add end_p field.
2139 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2141 (read_id): Check for a length that exceeds the remaining bytes in
2143 (ieee_seek): Initialise end_p.
2144 (ieee_archive_p): Likewise.
2145 (ieee_object_p): Likewise.
2147 2017-06-19 Nick Clifton <nickc@redhat.com>
2150 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2151 before reading the EIHS structure entries.
2153 2017-06-19 Nick Clifton <nickc@redhat.com>
2156 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2157 gsd_size. Check that there are enough bytes remaining to read the
2158 type and size of the next egsd. Check that the size of the egsd
2159 does not exceed the size of the record.
2161 2017-06-19 Alan Modra <amodra@gmail.com>
2163 * config.bfd: Correct targ_underscore for cris.
2165 2017-06-18 Alan Modra <amodra@gmail.com>
2167 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2168 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2170 2017-06-16 Nick Clifton <nickc@redhat.com>
2172 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2173 bucketlist is empty because there are no symbols to add to the
2176 2017-06-16 Alan Modra <amodra@gmail.com>
2182 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2183 (BFD_JUMP_TABLE_LINK): Likewise.
2184 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2185 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2186 (bfd_elf_define_start_stop): New function.
2187 * linker.c (bfd_generic_define_start_stop): New function.
2188 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2190 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2191 * aout-target.h (MY_bfd_define_start_stop): Define.
2192 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2193 * binary.c (binary_bfd_define_start_stop): Define.
2194 * bout.c (b_out_bfd_define_start_stop): Define.
2195 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2196 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2197 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2198 * coffcode.h (coff_bfd_define_start_stop): Define.
2199 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2200 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2201 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2202 * ieee.c (ieee_bfd_define_start_stop): Define.
2203 * ihex.c (ihex_bfd_define_start_stop): Define.
2204 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2205 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2206 * mmo.c (mmo_bfd_define_start_stop): Define.
2207 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2208 * oasys.c (oasys_bfd_define_start_stop): Define.
2209 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2210 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2211 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2212 * som.c (som_bfd_define_start_stop): Define.
2213 * srec.c (srec_bfd_define_start_stop): Define.
2214 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2215 * versados.c (versados_bfd_define_start_stop): Define.
2216 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2217 (alpha_vms_bfd_define_start_stop): Define.
2218 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2219 * bfd-in2.h: Regenerate.
2220 * libbfd.h: Regenerate.
2222 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2224 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2225 SYMBOL_REFERENCES_LOCAL.
2227 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2230 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2231 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2232 runtime for if there needs copy relocation elimination.
2233 (need_copy_relocation_p): New function. Return true for symbol with
2234 pc-relative references and if it's against read-only sections.
2235 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2236 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2237 that are related with accessing external objects.
2238 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2239 in elfNN_aarch64_check_relocs.
2241 2017-06-15 Nick Clifton <nickc@redhat.com>
2244 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2247 (ieee_archive_p): Likewise.
2249 2017-06-15 Nick Clifton <nickc@redhat.com>
2252 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2254 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2256 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2257 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2258 keep both windowed and call0 ABI PLT definitions.
2259 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2260 elf_xtensa_*_plt_entry endex.
2261 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2263 2017-06-14 Nick Clifton <nickc@redhat.com>
2266 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2269 2017-06-14 Nick Clifton <nickc@redhat.com>
2272 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2273 maximum value for the ascic pointer. Check that name processing
2274 does not read beyond this value.
2275 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2278 2017-06-14 Nick Clifton <nickc@redhat.com>
2281 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2282 (process_otr): Check for an invalid offset in the otr structure.
2284 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2286 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2288 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2294 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2295 vtable field to a union.
2296 (_bfd_elf_is_start_stop): Removed.
2297 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2298 __start_SECNAME and __stop_SECNAME symbols.
2299 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2300 * elflink.c (_bfd_elf_is_start_stop): Removed.
2301 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2302 _bfd_elf_is_start_stop.
2303 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2304 __stop_SECNAME symbols. Updated.
2305 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2306 (bfd_elf_gc_record_vtinherit): Likewise.
2307 (bfd_elf_gc_record_vtentry): Likewise.
2309 2017-06-13 Nick Clifton <nickc@redhat.com>
2312 * elflink.c (elf_link_adjust_relocs): Generate an error when
2313 encountering a reloc against a symbol removed by garbage
2316 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2318 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2319 to merge_gnu_properties.
2320 * elf-properties.c (elf_merge_gnu_properties): Add struct
2321 bfd_link_info * and pass it to merge_gnu_properties.
2322 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2323 and pass it to elf_merge_gnu_properties.
2324 (_bfd_elf_link_setup_gnu_properties): Pass info to
2325 elf_merge_gnu_property_list.
2326 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2328 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2330 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2333 * binary.c (binary_set_section_contents): Scale lma by octets
2334 per byte to set filepos.
2336 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2338 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2341 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2343 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2346 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2348 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2349 patched section contents for TLS IE reloc.
2350 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2352 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2354 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2355 RELOC_FOR_GLOBAL_SYMBOL macro.
2357 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2359 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2362 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2364 * config/tc-arc.c (md_undefined_symbol): Changed.
2365 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2367 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2369 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2372 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2374 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2375 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2377 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2379 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2382 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2384 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2385 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2386 is non-zero. Add clarifying comments.
2388 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2390 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2391 name. Use local IFUNC symbol name string to report unsupported
2392 non-PIC call to IFUNC function.
2393 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2394 when generating R_386_IRELATIVE relocation.
2395 (elf_i386_finish_dynamic_symbol): Likewise.
2396 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2398 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2399 when generating R_X86_64_IRELATIVE relocation.
2400 (elf_x86_64_finish_dynamic_symbol): Likewise.
2402 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2404 * elf.c (setup_group): Make sure BFD sections are created for all
2405 group sections in the input file when processing SHF_GROUP
2407 (bfd_section_from_shdr): Avoid duplicating logic already
2408 implemented in `setup_group'.
2410 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2413 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2414 if the hint address is zero.
2416 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2419 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2420 ELF_COMMON_DEF_P for common symbols.
2422 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2424 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2425 SEC_GROUP sections as SEC_EXCLUDE.
2426 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2427 (assign_section_numbers): Use resolve_section_groups flag instead
2428 of relocatable link type.
2429 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2430 flag instead of checking the final_link flag for part of the
2431 checks in here. Fix white space as a result.
2432 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2433 instead of relocatable link type.
2434 (bfd_elf_final_link): Likewise.
2436 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2438 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2440 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2441 (s3_bfd_score_elf_check_relocs): Likewise.
2442 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2443 (score_elf_final_link_relocate): Likewise.
2444 (s7_bfd_score_elf_check_relocs): Likewise.
2446 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2448 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2451 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2453 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2454 from `reloc_count' rather than decrementing it.
2455 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2456 `reloc_count' by `int_rels_per_ext_rel'.
2457 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2458 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2459 entry determination.
2460 (s3_bfd_score_elf_check_relocs): Likewise.
2461 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2462 (s7_bfd_score_elf_relocate_section): Likewise.
2463 (s7_bfd_score_elf_check_relocs): Likewise.
2464 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2465 prototype and function.
2466 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2467 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2468 triple rather than once the sum of REL and RELA relocation entry
2470 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2471 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2472 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2473 storage allocation size determination.
2474 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2475 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2476 by `int_rels_per_ext_rel' for last relocation entry
2478 (bfd_elf_final_link): Do not multiply `reloc_count' by
2479 `int_rels_per_ext_rel' for internal relocation storage
2480 allocation size determination.
2481 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2482 `int_rels_per_ext_rel' for last relocation entry determination.
2483 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2484 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2485 (_bfd_mips_elf_relocate_section): Likewise.
2487 2017-06-05 Alan Modra <amodra@gmail.com>
2490 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2492 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2494 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2495 determine structure sizes.
2496 (elfcore_grok_freebsd_prstatus): Likewise.
2498 2017-06-01 Alan Modra <amodra@gmail.com>
2500 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2501 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2503 (is_elfv2_localentry0): New function.
2504 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2505 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2506 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2507 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2508 optimized localentry:0 stubs.
2509 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2510 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2512 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2514 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2516 2017-05-30 Casey Smith <clegg89@gmail.com>
2519 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2520 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2522 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2524 * cpu-arc.c (arc_compatible): New function.
2526 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2528 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2530 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2533 * bfdio.c (bfd_get_file_size): New function.
2534 * bfd-in2.h: Regenerated.
2536 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2538 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2541 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2543 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2544 dynobj instead of htab->elf.dynobj.
2546 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2548 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2550 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2551 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2552 actual number of internal relocations retrieved. Adjust
2553 function description.
2554 (bfd_elf64_canonicalize_reloc): Remove macro.
2555 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2557 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2559 * archures.c (bfd_mach_sparc_v9m8): Define.
2560 (bfd_mach_sparc_v8plusm8): Likewise.
2561 (bfd_mach_sparc_v9_p): Adjust to M8.
2562 (bfd_mach_sparc_64bit_p): Likewise.
2563 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2564 bfd_mach_sparc_v8plusm8.
2565 * bfd-in2.h: Regenerated.
2566 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2568 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2569 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2570 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2572 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2573 bfd_mach_sparc_v8plusm8.
2575 2017-05-19 Alan Modra <amodra@gmail.com>
2577 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2578 debug and special sections when no non-note alloc sections in an
2581 2017-05-18 Alan Modra <amodra@gmail.com>
2583 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2584 * elf-m10300.c: Likewise.
2586 * elf32-arc.c: Likewise.
2587 * elf32-bfin.c: Likewise.
2588 * elf32-m68k.c: Likewise.
2589 * elf32-nds32.c: Likewise.
2590 * elf32-tilepro.c: Likewise.
2591 * elflink.c: Likewise.
2592 * elfnn-aarch64.c: Likewise.
2593 * elfnn-riscv.c: Likewise.
2594 * elfxx-tilegx.c: Likewise.
2595 * mach-o.c: Likewise.
2596 * peXXigen.c: Likewise.
2597 * vms-alpha.c: Likewise.
2598 * vms-lib.c: Likewise.
2600 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2603 * elflink.c (elf_gc_mark_debug_section): New function.
2604 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2605 referenced by kept debug sections.
2607 2017-05-16 Alan Modra <amodra@gmail.com>
2609 * elf-m10300.c: Rename occurrences of non_ir_ref.
2610 * elf32-arm.c: Likewise.
2611 * elf32-bfin.c: Likewise.
2612 * elf32-cr16.c: Likewise.
2613 * elf32-cris.c: Likewise.
2614 * elf32-d10v.c: Likewise.
2615 * elf32-dlx.c: Likewise.
2616 * elf32-fr30.c: Likewise.
2617 * elf32-frv.c: Likewise.
2618 * elf32-hppa.c: Likewise.
2619 * elf32-i370.c: Likewise.
2620 * elf32-i386.c: Likewise.
2621 * elf32-iq2000.c: Likewise.
2622 * elf32-lm32.c: Likewise.
2623 * elf32-m32c.c: Likewise.
2624 * elf32-m32r.c: Likewise.
2625 * elf32-m68hc1x.c: Likewise.
2626 * elf32-m68k.c: Likewise.
2627 * elf32-mcore.c: Likewise.
2628 * elf32-metag.c: Likewise.
2629 * elf32-microblaze.c: Likewise.
2630 * elf32-moxie.c: Likewise.
2631 * elf32-msp430.c: Likewise.
2632 * elf32-mt.c: Likewise.
2633 * elf32-nios2.c: Likewise.
2634 * elf32-or1k.c: Likewise.
2635 * elf32-ppc.c: Likewise.
2636 * elf32-rl78.c: Likewise.
2637 * elf32-s390.c: Likewise.
2638 * elf32-score.c: Likewise.
2639 * elf32-score7.c: Likewise.
2640 * elf32-sh.c: Likewise.
2641 * elf32-tic6x.c: Likewise.
2642 * elf32-tilepro.c: Likewise.
2643 * elf32-v850.c: Likewise.
2644 * elf32-vax.c: Likewise.
2645 * elf32-xstormy16.c: Likewise.
2646 * elf32-xtensa.c: Likewise.
2647 * elf64-alpha.c: Likewise.
2648 * elf64-hppa.c: Likewise.
2649 * elf64-ia64-vms.c: Likewise.
2650 * elf64-mmix.c: Likewise.
2651 * elf64-ppc.c: Likewise.
2652 * elf64-s390.c: Likewise.
2653 * elf64-sh64.c: Likewise.
2654 * elf64-x86-64.c: Likewise.
2655 * elflink.c: Likewise.
2656 * elfnn-aarch64.c: Likewise.
2657 * elfnn-ia64.c: Likewise.
2658 * elfnn-riscv.c: Likewise.
2659 * elfxx-mips.c: Likewise.
2660 * elfxx-sparc.c: Likewise.
2661 * elfxx-tilegx.c: Likewise.
2662 * linker.c: Likewise.
2664 2017-05-16 Alan Modra <amodra@gmail.com>
2666 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2667 * elflink.c (elf_link_add_object_symbols): Update to use
2669 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2671 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2673 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2675 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2677 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2679 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2680 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2682 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2684 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2686 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2688 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2689 to plt_second/plt_second_eh_frame.
2690 (elf_x86_64_link_hash_newfunc): Updated.
2691 (elf_x86_64_allocate_dynrelocs): Likewise.
2692 (elf_x86_64_size_dynamic_sections): Likewise.
2693 (elf_x86_64_relocate_section): Likewise.
2694 (elf_x86_64_finish_dynamic_symbol): Likewise.
2695 (elf_x86_64_finish_dynamic_sections): Likewise.
2696 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2697 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2699 (elf_backend_setup_gnu_properties): Updated. Create the
2700 .plt.sec section instead of the .plt.sec section.
2702 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2704 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2705 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2706 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2708 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2710 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2711 (bfd_elf64_set_reloc): Define.
2712 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2714 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2716 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2717 (struct bfd_target): New field _bfd_set_reloc.
2718 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2719 * reloc.c (_bfd_generic_set_reloc): New function.
2720 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2721 * nlm-target.h (nlm_set_reloc): Likewise.
2722 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2723 * aout-tic30.c (MY_set_reloc): Likewise.
2724 * aout-target.h (MY_set_reloc): Likewise.
2725 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2726 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2727 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2728 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2729 * aout-adobe.c (aout_32_set_reloc): Likewise.
2730 * bout.c (b_out_set_reloc): Likewise.
2731 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2732 * i386os9k.c (aout_32_set_reloc): Likewise.
2733 * ieee.c (ieee_set_reloc): Likewise.
2734 * oasys.c (oasys_set_reloc): Likewise.
2735 * som.c (som_set_reloc): Likewise.
2736 * versados.c (versados_set_reloc): Likewise.
2737 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2738 _bfd_generic_set_reloc.
2739 (rs6000_xcoff64_aix_vec): LIkewise.
2740 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2741 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2742 * i386msdos.c (msdos_set_reloc): Define to
2743 _bfd_norelocs_set_reloc.
2744 * elfcode.h (elf_set_reloc): Define.
2745 * bfd-in2.h: Regenerated.
2747 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2750 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2751 for IFUNC function address.
2753 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2755 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2756 (CONFLICT_LIST): Likewise.
2757 (opcode/arc-attrs.h): Include.
2758 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2759 (arc_extract_features): New file.
2760 (arc_stralloc): Likewise.
2761 (arc_elf_merge_attributes): Likewise.
2762 (arc_elf_merge_private_bfd_data): Use object attributes.
2763 (bfd_arc_get_mach_from_attributes): New function.
2764 (arc_elf_object_p): Use object attributes.
2765 (arc_elf_final_write_processing): Likewise.
2766 (elf32_arc_obj_attrs_arg_type): New function.
2767 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2768 (elf32_arc_section_from_shdr): Likewise.
2769 (elf_backend_obj_attrs_vendor): Define.
2770 (elf_backend_obj_attrs_section): Likewise.
2771 (elf_backend_obj_attrs_arg_type): Likewise.
2772 (elf_backend_obj_attrs_section_type): Likewise.
2773 (elf_backend_obj_attrs_handle_unknown): Likewise.
2774 (elf_backend_section_from_shdr): Likewise.
2776 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2779 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2780 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2781 and the destination is a Thumb symbol.
2783 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2785 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2786 initializer to silence GCC 4.2.
2787 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2789 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2791 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2792 (LAZY_PLT_ENTRY_SIZE): This.
2793 (NON_LAZY_PLT_ENTRY_SIZE): New.
2794 (elf_x86_64_plt0_entry): Renamed to ...
2795 (elf_x86_64_lazy_plt0_entry): This.
2796 (elf_x86_64_plt_entry): Renamed to ...
2797 (elf_x86_64_lazy_plt_entry): This.
2798 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2799 (elf_x86_64_lazy_bnd_plt0_entry): This.
2800 (elf_x86_64_legacy_plt_entry): Removed.
2801 (elf_x86_64_bnd_plt_entry): Renamed to ...
2802 (elf_x86_64_lazy_bnd_plt_entry): This.
2803 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2804 (elf_x86_64_non_lazy_plt_entry): This.
2805 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2806 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2807 (elf_x86_64_eh_frame_plt): Renamed to ...
2808 (elf_x86_64_eh_frame_lazy_plt): This.
2809 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2810 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2811 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2812 (elf_x86_64_eh_frame_non_lazy_plt): This.
2813 (elf_x86_64_lazy_plt_layout): New.
2814 (elf_x86_64_non_lazy_plt_layout): Likewise.
2815 (elf_x86_64_plt_layout): Likewise.
2816 (elf_x86_64_backend_data): Remove PLT layout information. Add
2817 os for target system.
2818 (GET_PLT_ENTRY_SIZE): Removed.
2819 (elf_x86_64_lazy_plt): New.
2820 (elf_x86_64_non_lazy_plt): Likewise.
2821 (elf_x86_64_lazy_bnd_plt): Likewise.
2822 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2823 (elf_x86-64_arch_bed): Updated.
2824 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2825 (elf_x86_64_create_dynamic_sections): Removed.
2826 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2827 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2828 (elf_x86-64_adjust_dynamic_symbol): Updated.
2829 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2830 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2831 size for PLT0 if there is no PLT0. Get plt_entry_size from
2832 non_lazy_plt for non-lazy PLT entries.
2833 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2834 from non_lazy_plt for non-lazy PLT entries.
2835 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2836 if there is no PLT0.
2837 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2838 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2839 entries with non-lazy PLT layout. Don't fill the second and third
2840 slots in the PLT entry if there is no PLT0.
2841 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2842 if there is no PLT0. Set sh_entsize on the .plt.got section.
2843 (compare_relocs): New.
2844 (elf_x86_64_plt_type): Likewise.
2845 (elf_x86_64_plt): Likewise.
2846 (elf_x86_64_nacl_plt): New. Forward declaration.
2847 (elf_x86_64_get_plt_sym_val): Removed.
2848 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2849 against all dynamic relocations.
2850 (elf_x86_64_link_setup_gnu_properties): New function.
2851 (elf_backend_create_dynamic_sections): Updated.
2852 (elf_backend_setup_gnu_properties): New.
2853 (elf_x86_64_nacl_plt): New.
2854 (elf_x86_64_nacl_arch_bed): Updated.
2856 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2858 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2859 (LAZY_PLT_ENTRY_SIZE): This.
2860 (NON_LAZY_PLT_ENTRY_SIZE): New.
2861 (elf_i386_plt0_entry): Renamed to ...
2862 (elf_i386_lazy_plt0_entry): This.
2863 (elf_i386_plt_entry): Renamed to ...
2864 (elf_i386_lazy_plt_entry): This.
2865 (elf_i386_pic_plt0_entry): Renamed to ...
2866 (elf_i386_pic_lazy_plt0_entry): This.
2867 (elf_i386_pic_plt_entry): Renamed to ...
2868 (elf_i386_pic_lazy_plt_entry): This.
2869 (elf_i386_got_plt_entry): Renamed to ...
2870 (elf_i386_non_lazy_plt_entry): This.
2871 (elf_i386_pic_got_plt_entry): Renamed to ...
2872 (elf_i386_pic_non_lazy_plt_entry): This.
2873 (elf_i386_eh_frame_plt): Renamed to ...
2874 (elf_i386_eh_frame_lazy_plt): This.
2875 (elf_i386_eh_frame_plt_got): Renamed to ...
2876 (elf_i386_eh_frame_non_lazy_plt): This.
2877 (elf_i386_plt_layout): Renamed to ...
2878 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2879 eh_frame_plt_got_size.
2880 (elf_i386_non_lazy_plt_layout): New.
2881 (elf_i386_plt_layout): Likewise.
2882 (elf_i386_non_lazy_plt): Likewise.
2883 (GET_PLT_ENTRY_SIZE): Removed.
2884 (elf_i386_plt): Renamed to ...
2885 (elf_i386_lazy_plt): This.
2886 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2887 (elf_i386_arch_bed): Updated.
2888 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2889 (elf_i386_create_dynamic_sections): Removed.
2890 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2891 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2892 (elf_i386_adjust_dynamic_symbol): Updated.
2893 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2894 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2895 size for PLT0 if there is no PLT0.
2896 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2897 output section is discarded only if GOT isn't empty.
2898 (elf_i386_relocate_section): Updated. Properly get PLT index
2899 if there is no PLT0.
2900 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2901 second and third slots in the PLT entry if there is no PLT0.
2902 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2903 if there is no PLT0. Set sh_entsize on the .plt.got section.
2904 (elf_i386_nacl_plt): Forward declaration.
2905 (elf_i386_get_plt_sym_val): Removed.
2906 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2907 against all dynamic relocations.
2908 (elf_i386_link_setup_gnu_properties): New function.
2909 (elf_backend_create_dynamic_sections): Updated.
2910 (elf_backend_setup_gnu_properties): New.
2911 (elf_i386_nacl_plt): Updated.
2912 (elf_i386_nacl_arch_bed): Likewise.
2913 (elf_i386_vxworks_arch_bed): Likewise.
2915 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2917 * elflink.c (elf_output_implib): Remove executable flag from import
2919 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2920 library is a relocatable object file.
2922 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2925 * elf32-avr.c (avr_should_move_sym): New function.
2926 (avr_should_reduce_sym_size): Likewise.
2927 (avr_should_increase_sym_size): Likewise.
2928 (elf32_avr_relax_delete_bytes): Adjust symbol values
2929 and sizes by calling new functions.
2931 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2933 * config.bfd (riscv32-*): Enable rv64.
2935 2017-05-02 Alan Modra <amodra@gmail.com>
2938 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2939 rather than h->root.type == bfd_link_hash_new.
2940 (bfd_elf_record_link_assignment): Similarly, call
2941 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2943 2017-04-29 Alan Modra <amodra@gmail.com>
2946 * reloc.c (reloc_offset_in_range): New function.
2947 (bfd_perform_relocation, bfd_install_relocation): Use it.
2948 (_bfd_final_link_relocate): Likewise.
2950 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2952 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2953 before using .plt.got.
2954 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2956 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2958 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2959 instead of "+=" to update 0.
2961 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2963 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2964 .plt.got section here.
2965 (elf_i386_check_relocs): Don't create the .plt.got section.
2966 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2967 the .plt.got and .plt.bnd sections here.
2968 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2971 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2973 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2975 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2976 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2977 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2978 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2981 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2983 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2985 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2986 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2987 the first relocatable ELF input with GNU properties.
2989 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2991 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2992 VxWorks for non-PIC.
2994 2017-04-27 Alan Modra <amodra@gmail.com>
2996 * elf-bfd.h (struct elf_backend_data): Make asection param of
2997 elf_backend_eh_frame_address_size const.
2998 (_bfd_elf_eh_frame_address_size): Likewise.
2999 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3000 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3001 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3002 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3003 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3004 (next_cie_fde_offset): Constify params.
3005 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3007 2017-04-27 Alan Modra <amodra@gmail.com>
3009 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3010 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3011 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3013 (offset_adjust): New function.
3014 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3015 (adjust_eh_frame_local_symbols): Likewise.
3016 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3017 after changing anything. Return true if anything changed.
3018 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3019 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3021 2017-04-27 Alan Modra <amodra@gmail.com>
3023 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3026 2017-04-27 Alan Modra <amodra@gmail.com>
3028 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3029 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3030 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3031 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3032 for undef and undefweak dyn_relocs.
3033 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3034 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3035 (allocate_got, allocate_dynrelocs): Likewise.
3036 (ppc64_elf_relocate_section): Likewise.
3038 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3040 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3041 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3042 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3043 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3045 2017-04-26 Nick Clifton <nickc@redhat.com>
3048 * reloc.c (bfd_perform_relocation): Check for a negative address
3051 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3054 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3056 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3057 (elf_backend_always_renumber_dynsyms): Define.
3058 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3059 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3060 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3061 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3063 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3065 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3067 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3068 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3069 sections have been created.
3071 2017-04-26 Nick Clifton <nickc@redhat.com>
3074 * compress.c (bfd_init_section_compress_status): Check the return
3075 value from bfd_malloc.
3077 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3079 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3080 no_finish_dynamic_symbol.
3081 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3083 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3084 weak symbol, don't make it dynamic.
3085 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3086 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3087 relocation for GOT reference.
3088 (elf_x86_64_finish_dynamic_symbol): Abort if
3089 no_finish_dynamic_symbol isn't 0.
3091 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3094 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3095 undefined weak symbol, don't make it dynamic.
3096 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3097 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3098 relocation for R_386_GOT32.
3100 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3103 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3105 2017-04-23 Alan Modra <amodra@gmail.com>
3108 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3109 * elf.c (lcomm_sym): New.
3110 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3111 * bfd-in2.h: Regenerate.
3113 2017-04-23 Alan Modra <amodra@gmail.com>
3116 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3117 parameters and comment.
3118 (_bfd_elf_get_reloc_section): Delete.
3119 (_bfd_elf_plt_get_reloc_section): Declare.
3120 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3121 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3123 (_bfd_elf_get_reloc_section): ..here. Delete.
3124 (assign_section_numbers): Call elf_get_reloc_section.
3125 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3126 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3128 2017-04-23 Alan Modra <amodra@gmail.com>
3131 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3134 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3137 * elf32-i386.c (elf_i386_link_hash_entry): Add
3138 no_finish_dynamic_symbol.
3139 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3140 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3141 symbol, don't make it dynamic in PIE.
3142 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3143 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3144 relocation for R_386_GOT32
3145 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3148 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3152 * elflink.c (elf_link_add_object_symbols): Require
3153 --no-dynamic-linker with -E/--dynamic-list when creating
3156 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3158 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3161 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3163 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3164 dynamic symbol sorting.
3166 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3169 * elflink.c (elf_link_add_object_symbols): Preserve
3170 dynamic_ref_after_ir_def when restoring the symbol table for
3171 unneeded dynamic object.
3173 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3176 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3177 on on undefined IFUNC symbol in the second PLT.
3179 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3181 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3183 2017-04-19 Alan Modra <amodra@gmail.com>
3185 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3186 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3187 * elf32-ppc.c:Formatting.
3188 (ensure_undefweak_dynamic): Don't make dynamic when
3189 info->dynamic_undefined_weak is zero.
3190 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3191 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3192 not default visibility. Discard undef and undefweak
3194 (ppc_elf_relocate_section): Adjust to suit.
3195 * elf64-ppc.c: Formatting.
3196 (ensure_undefweak_dynamic): Don't make dynamic when
3197 info->dynamic_undefined_weak is zero.
3198 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3199 info->dynamic_undefined_weak. Discard them earlier.
3201 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3204 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3205 before generating the version definition section.
3207 2017-04-17 Alan Modra <amodra@gmail.com>
3209 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3210 state when a regular object file defines a symbol with
3211 incompatible type to that defined by an earlier shared lib.
3213 2017-04-13 Alan Modra <amodra@gmail.com>
3215 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3217 * elf32-arm.c: Likewise.
3218 * elf32-i386.c: Likewise.
3219 * elf32-mep.c: Likewise.
3220 * elf64-ia64-vms.c: Likewise.
3221 * elf64-x86-64.c: Likewise.
3222 * elflink.c: Likewise.
3223 * elfnn-ia64.c: Likewise.
3224 * elfxx-mips.c: Likewise.
3226 2017-04-13 Alan Modra <amodra@gmail.com>
3228 * aoutx.h: Use %B and %A in error messages throughout file.
3229 * aout-cris.c: Likewise.
3230 * archive.c: Likewise.
3231 * binary.c: Likewise.
3232 * coff-rs6000.c: Likewise.
3233 * coff-tic4x.c: Likewise.
3234 * coffcode.h: Likewise.
3235 * coffgen.c: Likewise.
3236 * cofflink.c: Likewise.
3237 * coffswap.h: Likewise.
3238 * cpu-arm.c: Likewise.
3239 * elf-eh-frame.c: Likewise.
3240 * elf-m10300.c: Likewise.
3242 * elf32-arc.c: Likewise.
3243 * elf32-arm.c: Likewise.
3244 * elf32-bfin.c: Likewise.
3245 * elf32-frv.c: Likewise.
3246 * elf32-iq2000.c: Likewise.
3247 * elf32-m32c.c: Likewise.
3248 * elf32-microblaze.c: Likewise.
3249 * elf32-nds32.c: Likewise.
3250 * elf32-rl78.c: Likewise.
3251 * elf32-rx.c: Likewise.
3252 * elf32-score.c: Likewise.
3253 * elf32-score7.c: Likewise.
3254 * elf32-sh64.c: Likewise.
3255 * elf32-v850.c: Likewise.
3256 * elf32-vax.c: Likewise.
3257 * elf32-visium.c: Likewise.
3258 * elf64-ia64-vms.c: Likewise.
3259 * elf64-mmix.c: Likewise.
3260 * elf64-sh64.c: Likewise.
3261 * elfcode.h: Likewise.
3262 * elfnn-aarch64.c: Likewise.
3263 * elfnn-ia64.c: Likewise.
3264 * elfxx-mips.c: Likewise.
3265 * hpux-core.c: Likewise.
3268 * linker.c: Likewise.
3269 * merge.c: Likewise.
3271 * oasys.c: Likewise.
3272 * pdp11.c: Likewise.
3273 * peXXigen.c: Likewise.
3274 * rs6000-core.c: Likewise.
3275 * vms-alpha.c: Likewise.
3276 * xcofflink.c: Likewise.
3278 2017-04-13 Alan Modra <amodra@gmail.com>
3280 * bfd.c (PRINT_TYPE): Define.
3281 (_doprnt): New function.
3282 (error_handler_internal): Use _doprnt.
3283 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3284 calls in their natural order, throughout file.
3285 * coff-mcore.c: Likewise.
3286 * coff-ppc.c: Likewise.
3287 * coff-tic80.c: Likewise.
3288 * cofflink.c: Likewise.
3289 * elf-s390-common.c: Likewise.
3291 * elf32-arm.c: Likewise.
3292 * elf32-i386.c: Likewise.
3293 * elf32-m32r.c: Likewise.
3294 * elf32-msp430.c: Likewise.
3295 * elf32-spu.c: Likewise.
3296 * elf64-ia64-vms.c: Likewise.
3297 * elf64-sparc.c: Likewise.
3298 * elf64-x86-64.c: Likewise.
3299 * elflink.c: Likewise.
3300 * elfnn-aarch64.c: Likewise.
3301 * elfnn-ia64.c: Likewise.
3302 * elfxx-mips.c: Likewise.
3304 2017-04-13 Alan Modra <amodra@gmail.com>
3306 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3307 branch veneers" error. Fix double space and format message.
3308 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3309 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3311 2017-04-13 Alan Modra <amodra@gmail.com>
3313 * bfd-in2.h: Regenerate.
3315 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3317 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3318 extra `\n' in warning/error messages.
3319 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3320 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3322 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3324 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3325 processor-specific properties with generic ELF target vector.
3327 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3329 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3330 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3331 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3332 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3334 (link_hash_newfunc): Initialize has_got_reloc and
3336 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3338 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3340 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3342 (_bfd_sparc_elf_fixup_symbol): New function.
3343 (allocate_dynrelocs): Don't allocate space for dynamic
3344 relocations and discard relocations against resolved undefined
3345 weak symbols in executable. Don't make resolved undefined weak
3346 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3347 relocation against undefined weak symbols in PIE.
3348 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3349 relocations against resolved undefined weak symbols in PIE
3350 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3351 without ynamic PLT/GOT relocations for resolved undefined weak
3353 Don't generate dynamic relocation against resolved undefined
3354 weak symbol in executable.
3355 (pie_finish_undefweak_symbol): New function.
3356 (_bfd_sparc_elf_finish_dynamic_sections): Call
3357 pie_finish_undefweak_symbol on all symbols in PIE.
3358 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3359 (_bfd_sparc_elf_fixup_symbol): New function.
3361 2017-04-10 Nick Clifton <nickc@redhat.com>
3363 * config.bfd: Remove ns32k from obsolete list.
3365 2017-04-10 Alan Modra <amodra@gmail.com>
3368 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3369 (special_sections_i): Likewise for .init_array.
3370 (special_sections_p): Likewise for .preinit_array.
3372 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3376 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3377 ELF_COMMON_DEF_P for common symbols.
3378 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3379 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3380 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3381 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3382 07492f668d2173da7a2bda3707ff0985e0f460b6.
3384 2017-04-07 Pedro Alves <palves@redhat.com>
3386 * opncls.c (bfd_get_debug_link_info): Rename to...
3387 (bfd_get_debug_link_info_1): ... this. Change type of second
3388 parameter to void pointer. Adjust.
3389 (bfd_get_debug_link_info): Reimplement on top of
3390 bfd_get_debug_link_info_1.
3391 (separate_debug_file_exists, separate_alt_debug_file_exists):
3392 Change type of second parameter to void pointer. Adjust.
3393 (get_func_type, check_func_type): Change type of second parameter
3395 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3396 the callback functions instead of passing the address of a local.
3397 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3398 find_separate_debug_file.
3399 (get_alt_debug_link_info_shim): Change type of second parameter to
3400 void pointer. Adjust.
3401 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3402 find_separate_debug_file.
3403 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3404 of second parameter to void pointer. Adjust.
3405 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3406 pointer local to find_separate_debug_file.
3408 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3410 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3411 external symbols with a definition.
3412 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3414 2017-04-07 Alan Modra <amodra@gmail.com>
3416 * po/SRC-POTFILES.in: Regenerate.
3418 2017-04-05 Alan Modra <amodra@gmail.com>
3420 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3423 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3425 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3426 numbers for DataDirectory entry indicies passed to
3429 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3431 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3432 each GNU_MBIND section and align GNU_MBIND section to page size.
3433 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3434 segment for each GNU_MBIND section.
3435 (_bfd_elf_init_private_section_data): Copy sh_info from input
3436 for GNU_MBIND section.
3438 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3440 * elfnn-riscv.c (GP_NAME): Delete.
3441 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3442 (_bfd_riscv_relax_lui): Likewise.
3444 2017-04-04 Nick Clifton <nickc@redhat.com>
3447 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3449 (bfd_elf_final_link): Only initialize the extended symbol index
3450 section if there are extended symbol tables to list.
3452 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3454 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3455 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3456 * configure.ac (elf): Add elf-properties.lo.
3457 * Makefile.in: Regenerated.
3458 * configure: Likewise.
3459 * elf-bfd.h (elf_property_kind): New.
3460 (elf_property): Likewise.
3461 (elf_property_list): Likewise.
3462 (elf_properties): Likewise.
3463 (_bfd_elf_parse_gnu_properties): Likewise.
3464 (_bfd_elf_get_property): Likewise.
3465 (_bfd_elf_link_setup_gnu_properties): Likewise.
3466 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3467 and setup_gnu_properties.
3468 (elf_obj_tdata): Add properties.
3469 * elf-properties.c: New file.
3470 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3471 (elf_i386_merge_gnu_properties): Likewise.
3472 (elf_backend_parse_gnu_properties): Likewise.
3473 (elf_backend_merge_gnu_properties): Likewise.
3474 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3475 (elf_x86_64_merge_gnu_properties): Likewise.
3476 (elf_backend_parse_gnu_properties): Likewise.
3477 (elf_backend_merge_gnu_properties): Likewise.
3478 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3479 (elf_backend_parse_gnu_properties): Likewise.
3480 (elf_backend_setup_gnu_properties): Likewise.
3481 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3482 elf_backend_merge_gnu_properties and
3483 elf_backend_setup_gnu_properties.
3485 2017-03-30 Pip Cet <pipcet@gmail.com>
3487 * elf32-wasm32.c: Add relocation code, two relocs.
3488 * reloc.c: Add wasm32 relocations.
3489 * libbfd.h: Regenerate.
3490 * bfd-in2.h: Regenerate.
3491 * bfd/po/bfd.pot: Regenerate.
3493 2017-03-29 Nick Clifton <nickc@redhat.com>
3496 * coff-bfd.h (struct coff_section_data): Add new fields:
3497 saved_bias and bias.
3498 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3499 computed for PE binaries.
3500 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3503 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3506 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3507 to handle a local symbol with a hash-symbol-entry; without PLT.
3508 Add BFD_ASSERT for an incidental case with GOT entry present.
3509 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3510 isn't forced-or-set local.
3512 2017-03-27 Pip Cet <pipcet@gmail.com>
3514 * wasm-module.c: New file to support WebAssembly modules.
3515 * wasm-module.h: New file to support WebAssembly modules.
3516 * doc/webassembly.texi: Start documenting wasm-module.c.
3517 * config.bfd: Add wasm_vec.
3518 * targets.c: Likewise.
3519 * configure.ac: Likewise.
3520 * Makefile.am: Add entries for wasm-module.c.
3521 * Makefile.in: Regenerate.
3522 * configure: Regenerate.
3523 * po/SRC-POTFILES.in: Regenerate.
3525 2017-03-27 Pip Cet <pipcet@gmail.com>
3527 * cpu-wasm32.c: New file to support wasm32 architecture.
3528 * elf32-wasm32.c: New file to support wasm32 architecture.
3529 * Makefile.am: Add wasm32 architecture.
3530 * archures.c: Likewise.
3531 * config.bfd: Likewise.
3532 * configure.ac: Likewise.
3533 * targets.c: Likewise.
3534 * Makefile.in: Regenerate.
3535 * bfd-in2.h: Regenerate.
3536 * configure: Regenerate.
3537 * po/SRC-POTFILES.in: Regenerate.
3539 2017-03-20 Alan Modra <amodra@gmail.com>
3542 * elf64-ppc.c (compare_symbols): Stabilize sort.
3544 2017-03-18 Alan Modra <amodra@gmail.com>
3546 * elf64-ppc.c (struct ppc_link_hash_table): Add
3547 local_ifunc_resolver and maybe_local_ifunc_resolver.
3548 (ppc_build_one_stub): Set flags on emitting dynamic
3549 relocation to ifunc.
3550 (ppc64_elf_relocate_section): Likewise.
3551 (ppc64_elf_finish_dynamic_symbol): Likewise.
3552 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3553 local dynamic relocs to ifuncs.
3554 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3555 local_ifunc_resolver and maybe_local_ifunc_resolver.
3556 (ppc_elf_relocate_section): Set flag on emitting dynamic
3557 relocation to ifuncs.
3558 (ppc_elf_finish_dynamic_symbol): Likewise.
3559 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3560 dynamic relocs to ifuncs.
3562 2017-03-13 Nick Clifton <nickc@redhat.com>
3565 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3566 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3567 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3568 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3569 * bfd-in2.h: Regenerate.
3570 * libbfd.h: Regenerate.
3571 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3573 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3574 (elfNN_aarch64_howto_table): Likewise.
3575 (aarch64_tls_transition_without_check): Likewise.
3576 (aarch64_reloc_got_type): Likewise.
3577 (elfNN_aarch64_final_link_relocate): Likewise.
3578 (elfNN_aarch64_tls_relax): Likewise.
3579 (elfNN_aarch64_relocate_section): Likewise.
3580 (elfNN_aarch64_gc_sweep_hook): Likewise.
3581 (elfNN_aarch64_check_relocs): Likewise.
3582 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3583 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3585 2017-03-11 Alan Modra <amodra@gmail.com>
3587 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3588 parameter is in fact used. Whitespace fixes.
3589 * elf64-ppc.c: Likewise.
3591 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3593 * rs6000-core.c (CORE_NEW): Simplify macro when
3594 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3596 2017-03-07 Alan Modra <amodra@gmail.com>
3600 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3603 2017-03-05 Alan Modra <amodra@gmail.com>
3605 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3606 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3607 (next_cie_fde_offset): New function.
3608 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3609 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3610 four bytes. Align CIEs to four or eight bytes depending on
3611 per_encoding_aligned8. Align FDEs according to their encoding.
3612 Pad last FDE to output section alignment.
3613 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3615 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3616 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3617 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3619 2017-03-02 Martin Bickel <binutils@ineranves.de>
3622 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3623 empty segments which have a zero filesz, but a non-zero memsz.
3625 2017-03-02 Alan Modra <amodra@gmail.com>
3627 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3629 2017-02-28 Alan Modra <amodra@gmail.com>
3631 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3632 (ppc64_elf_relocate_section): Likewise.
3634 2017-02-28 Alan Modra <amodra@gmail.com>
3637 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3638 rather than elf32_nios2_hash_table or elf_hash_table.
3639 (create_got_section): Likewise.
3640 (nios2_elf32_finish_dynamic_symbol): Likewise.
3641 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3642 (nios2_elf32_size_dynamic_sections): Likewise.
3643 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3644 vars. Use htab equivalents directly instead. Don't create
3645 all dynamic sections on needing just the GOT. Use a goto
3646 rather than a fall-through with reloc test. Ensure
3647 htab->dynobj is set when making dynamic sreloc section.
3648 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3649 equivalent directly instead. Don't segfault on looking for
3650 .dynamic when dynamic sections have not been created. Don't
3651 segfault on .got.plt being discarded.
3652 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3653 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3654 fixme and another not so relevant comment.
3655 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3656 already set, set hash table dynobj on creating .sbss.
3658 2017-02-28 Alan Modra <amodra@gmail.com>
3660 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3661 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3662 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3663 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3664 (ppc64_elf_relocate_section): Likewise.
3665 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3666 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3667 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3668 * libbfd.h: Regenerate.
3669 * bfd-in2.h: Regenerate.
3671 2017-02-28 Alan Modra <amodra@gmail.com>
3673 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3674 dynamic .data.rel.ro read-only.
3675 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3676 rather than section flags when deciding where copy reloc goes.
3677 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3678 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3679 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3680 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3681 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3682 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3683 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3684 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3685 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3686 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3687 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3688 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3689 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3690 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3691 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3692 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3693 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3694 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3695 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3697 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3699 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3700 `jalr $0, $25' instruction encoding.
3702 2017-02-27 Nick Clifton <nickc@redhat.com>
3705 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3706 generating a seg-fault when encountering a symbol that has been
3707 deleted by garbage collection.
3709 2017-02-25 Alan Modra <amodra@gmail.com>
3711 * elf32-arc.c (struct dynamic_sections): Delete.
3712 (enum dyn_section_types): Delete.
3713 (dyn_section_names): Delete.
3714 (arc_create_dynamic_sections): Delete.
3715 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3716 segfault on discarded .rela.plt section.
3717 (elf_arc_size_dynamic_sections): Formatting. Don't call
3718 arc_create_dynamic_sections. Don't allocate memory for sections
3719 handled by the generic linker. Correct code finding relocs in
3720 read-only sections. Set SEC_EXCLUDE on zero size .got,
3721 .got.plt, and .dynbss sections. Do set .interp for pies.
3723 2017-02-24 Andrew Waterman <andrew@sifive.com>
3725 * elfnn-riscv.c (GP_NAME): New macro.
3726 (riscv_global_pointer_value): Use it.
3727 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3728 output section, consider only that section's alignment.
3730 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3732 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3733 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3734 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3735 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3737 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3739 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3740 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3743 2017-02-23 Alan Modra <amodra@gmail.com>
3746 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3748 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3749 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3752 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3755 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3756 processing ahead of the call to `elf_gc_sweep_symbol'.
3758 2017-02-22 Nick Clifton <nickc@redhat.com>
3761 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3762 created section 4-byte alignment.
3764 2017-02-22 Alan Modra <amodra@gmail.com>
3766 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3767 on .got or .plt output section being discarded by script.
3768 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3771 2017-02-21 Alan Modra <amodra@gmail.com>
3773 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3774 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3776 2017-02-20 Alan Modra <amodra@gmail.com>
3779 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3780 if DT_RELSZ/DT_RELASZ is zero.
3782 2017-02-17 Nick Clifton <nickc@redhat.com>
3784 * compress.c (bfd_get_full_section_contents): Remember to reduce
3785 compressed size by the sizeof the compression header when
3786 decompressing the contents.
3788 2017-02-17 Pedro Alves <palves@redhat.com>
3790 * srec.c (Chunk): Rename to ...
3791 (_bfd_srec_len): ... this.
3792 (S3Forced): Rename to ...
3793 (_bfd_srec_forceS3): ... this.
3794 * objcopy.c: Adjust all references.
3796 2017-02-17 Pedro Alves <palves@redhat.com>
3798 * archive.c (bsd_write_armap): Rename to ...
3799 (_bfd_bsd_write_armap): ... this.
3800 (coff_write_armap): Rename to ...
3801 (_bfd_coff_write_armap): ... this.
3802 * libbfd-in.h (bsd_write_armap): Rename to ...
3803 (_bfd_bsd_write_armap): ... this.
3804 (coff_write_armap): Rename to ...
3805 (_bfd_coff_write_armap): ... this.
3806 * aout-target.h, aout-tic30.c: Adjust all users.
3807 * libbfd.h: Regenerate.
3809 2017-02-17 Pedro Alves <palves@redhat.com>
3811 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3812 (warn_deprecated): Rename to ...
3813 (_bfd_warn_deprecated): ... this.
3814 * libbfd.c (warn_deprecated): Rename to ...
3815 (_bfd_warn_deprecated): ... this.
3816 * bfd-in2.h: Regenerate.
3818 2017-02-17 Pedro Alves <palves@redhat.com>
3820 * bfdio.c (real_ftell): Rename to ...
3821 (_bfd_real_ftell): ... this.
3822 (real_fseek): Rename to ...
3823 (_bfd_real_fseek): ... this.
3824 (real_fopen): Rename to ...
3825 (_bfd_real_fopen): ... this.
3826 * libbfd-in.h (real_ftell): Rename to ...
3827 (_bfd_real_ftell): ... this.
3828 (real_fseek): Rename to ...
3829 (_bfd_real_fseek): ... this.
3830 (real_fopen): Rename to ...
3831 (_bfd_real_fopen): ... this.
3832 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3833 * libbfd.h: Regenerate.
3835 2017-02-17 Pedro Alves <palves@redhat.com>
3837 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3838 * libbfd.c (read_unsigned_leb128): Rename to ...
3839 (_bfd_read_unsigned_leb128): ... this.
3840 (read_signed_leb128): Rename to ...
3841 (_bfd_read_signed_leb128): ... this.
3842 (safe_read_leb128): Rename to ...
3843 (_bfd_safe_read_leb128): ... this.
3844 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3845 (_bfd_read_unsigned_leb128): ... this.
3846 (read_signed_leb128): Rename to ...
3847 (_bfd_read_signed_leb128): ... this.
3848 (safe_read_leb128): Rename to ...
3849 (_bfd_safe_read_leb128): ... this.
3850 * libbfd.h: Renegerate.
3852 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3854 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3855 before trying to fine matching file and line information.
3857 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3859 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3860 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3861 not match current bfd, then reload debug information. Record bfd
3862 we're loading debug info for in the stash. If we have debug
3863 informatin in the cache then perform section placement before
3866 2017-02-16 Alan Modra <amodra@gmail.com>
3869 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3870 * elfxx-target.h (elf_backend_no_page_alias): Define.
3871 (elfNN_bed): Init new field.
3872 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3873 ensure PT_LOAD segment starts on a new page.
3874 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3876 2017-02-16 Alan Modra <amodra@gmail.com>
3879 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3882 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3884 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3885 * bfd-in2.h: Regenerated.
3887 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3890 * elf32-i386.c (elf_i386_relocate_section): Allow
3891 "lea foo@GOT, %reg" in PIC.
3893 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3896 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3897 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3898 error against local IFUNC symbol without a base register for
3901 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3903 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3904 `%P: %H:' with `info->callbacks->einfo'.
3905 (ppc_elf_relocate_section): Likewise.
3906 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3907 (ppc64_elf_edit_toc): Likewise.
3908 (ppc64_elf_relocate_section): Likewise.
3910 2017-02-14 Alan Modra <amodra@gmail.com>
3912 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3913 --gc-keep-exported, and test versioned field of sym rather than
3914 looking for @ in name.
3916 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3918 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3921 2017-02-13 Nick Clifton <nickc@redhat.com>
3924 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3927 2017-02-07 Andrew Waterman <andrew@sifive.com>
3929 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3930 entry size if PLT header is written.
3932 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3934 Fix sparc64 dynamic relocation processing to use the dynamic
3936 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3937 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3940 2017-02-03 Nick Clifton <nickc@redhat.com>
3943 * coffcode.h (coff_write_object_contents): Enlarge size of
3944 s_name_buf in order to avoid compile time warning about possible
3946 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3947 32-bits of insn value before printing into buffer.
3949 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3951 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3952 `max_local_dynindx'.
3953 (mips_elf_sort_hash_table): Handle it.
3954 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3955 symbols bump up `max_local_dynindx' rather than
3956 `max_non_got_dynindx'.
3958 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3960 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3961 `min_got_dynindx', `max_unref_got_dynindx' and
3962 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3963 (mips_elf_sort_hash_table): Adjust accordingly.
3965 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3967 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3968 to access the hash table.
3970 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3972 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3973 non-NULL `htab' to the beginning.
3975 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3977 * elflink.c (elf_gc_sweep): Wrap overlong line.
3979 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3981 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3982 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3983 * elfxx-mips.c (mips_elf_link_hash_table): Add
3984 `ignore_branch_isa' member.
3985 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3986 in branch relocation calculation as an error if
3987 `ignore_branch_isa' has been set.
3988 (_bfd_mips_elf_insn32): Rename to...
3989 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3990 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3991 Handle the new parameter.
3993 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3995 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3996 local variable dynobj.
3999 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4000 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4001 executable from read-only sections into sdynrelro.
4002 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4003 dynamic relocs in sdynrelro.
4004 (elf_backend_want_dynrelro): Define.
4006 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4008 * config.bfd (*-*-rtemsaout*): Mark as removed.
4010 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4012 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4013 (arm-*-rtems*): Move to (arm*-*-eabi*).
4014 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4015 (m68-*-rtems*): Move to (m68*-*-elf*).
4017 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4019 * config.bfd (*-*-rtemscoff*): Mark as removed.
4021 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4024 * elflink.c (bfd_elf_record_link_assignment): Revert last
4025 change and don't ever clear `forced_local'. Set `mark'
4027 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4029 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4030 (bfd_elf_size_dynamic_sections): ... here.
4031 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4032 and set `mark' instead in `__tls_get_addr_opt' processing.
4033 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4035 2017-01-24 Alan Modra <amodra@gmail.com>
4037 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4038 where dynamic relocs are preferable. Allow ifunc too.
4039 (ensure_undefweak_dynamic): New function.
4040 (allocate_dynrelocs): Use it here. Move plt handling last and
4041 don't make symbols dynamic, simplifying loop. Only make undef
4042 weak symbols with GOT entries dynamic. Correct condition
4043 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4044 comments. Remove goto.
4045 (ppc_elf_relocate_section): Correct test for using dynamic
4046 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4047 to suit. Set up explicit tls_index entries and implicit GOT
4048 tls_index entries resolvable at link time for
4049 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4050 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4051 (ensure_undefweak_dynamic): New function.
4052 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4053 with GOT entries dynamic. Remove unnecessary test of
4054 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4055 (ppc64_elf_relocate_section): Correct test for using dynamic
4056 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4057 to suit. Set up explicit tls_index entries and implicit GOT
4058 tls_index entries resolvable at link time for __tls_get_addr_opt.
4059 Simplify expression to clear mem for prelink.
4061 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4063 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4065 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4067 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4068 (elf_backend_hash_symbol): Define.
4070 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4073 * elflink.c (bfd_elf_record_link_assignment): Clear any
4074 `forced_local' marking for DSO symbols that are not being
4077 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4079 * elfnn-riscv.c (riscv_elf_object_p): New function.
4081 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4084 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4086 (elf_x86_64_check_relocs): Create .eh_frame section for the
4088 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4089 .eh_frame section for the .plt.bnd section.
4090 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4091 for the .plt.bnd section.
4093 2017-01-12 Nick Clifton <nickc@redhat.com>
4096 * opncls.c (find_separate_debug_file): Add include_dirs
4097 parameter. Only include the directory part of the bfd's filename
4098 in search paths if include_dirs is true. Add a couple of extra
4099 locations for looking for debug files.
4100 ( bfd_follow_gnu_debuglink): Update invocation of
4101 find_separate_debug_file.
4102 (bfd_follow_gnu_debugaltlink): Likewise.
4103 (get_build_id): New function: Finds the build-id of the given bfd.
4104 (get_build_id_name): New function: Computes the name of the
4105 separate debug info file for a bfd, based upon its build-id.
4106 (check_build_id_file): New function: Checks to see if a separate
4107 debug info file exists at the given location, and that its
4108 build-id matches that of the original bfd.
4109 (bfd_follow_build_id_debuglink): New function: Finds a separate
4110 debug info file for a given bfd by using the build-id method.
4111 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4112 method of locating a separate debug info file before using the
4114 * bfd-in2.h: Regenerate.
4116 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4119 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4120 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4121 elf_x86_64_eh_frame_plt_got.
4122 (elf_x86_64_size_dynamic_sections): Get unwind info from
4123 elf_x86_64_bnd_arch_bed for the BND PLT.
4125 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4127 * config.bfd: Add entries for i686-redox and x86_64-redox.
4129 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4131 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4133 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4134 .eh_frame section to 4 bytes for x32.
4135 (elf_x86_64_check_relocs): Likewise.
4137 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4140 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4141 (PLT_GOT_FDE_LENGTH): Likewise.
4142 (elf_i386_plt_layout): Add eh_frame_plt_got and
4143 eh_frame_plt_got_size.
4144 (elf_i386_plt): Updated.
4145 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4146 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4147 (elf_i386_size_dynamic_sections): Allocate and initialize
4148 .eh_frame section for .plt.got.
4149 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4151 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4152 eh_frame_plt_got_size.
4153 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4154 (PLT_GOT_FDE_LENGTH): Likewise.
4155 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4156 eh_frame_plt_got_size.
4157 (elf_x86_64_arch_bed): Updated.
4158 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4159 eh_frame_plt_got_size.
4160 (elf_x86_64_nacl_arch_bed): Likewise.
4161 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4162 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4163 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4164 .eh_frame section for .plt.got.
4165 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4168 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4170 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4171 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4173 2017-01-09 Nick Clifton <nickc@redhat.com>
4175 * dwarf2.c (lookup_address_in_function_table): Return early if
4176 there are no functions in the given comp unit, or if the high
4177 address of the last function in the comp unit is less than the
4180 2017-01-09 Nick Clifton <nickc@redhat.com>
4183 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4184 message if there are too many symbols to load.
4186 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4188 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4189 if relocs are cached.
4191 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4194 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4195 for R_MICROBLAZE_GOTOFF_64.
4197 2017-01-03 Nick Clifton <nickc@redhat.com>
4199 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4200 warning about using a possibly uninitialised variable.
4202 2017-01-02 Alan Modra <amodra@gmail.com>
4204 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4205 (allocate_plt_static, allocate_dynrelocs): Use it.
4207 2017-01-02 Alan Modra <amodra@gmail.com>
4209 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4210 .PARISC.unwind section.
4212 2017-01-02 Alan Modra <amodra@gmail.com>
4215 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4216 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4217 indirect to GOT pointer relative code edit.
4219 2017-01-02 Alan Modra <amodra@gmail.com>
4221 Update year range in copyright notice of all files.
4223 For older changes see ChangeLog-2016
4225 Copyright (C) 2017 Free Software Foundation, Inc.
4227 Copying and distribution of this file, with or without modification,
4228 are permitted in any medium without royalty provided the copyright
4229 notice and this notice are preserved.
4235 version-control: never