1 2017-10-04 Alan Modra <amodra@gmail.com>
3 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
4 classify symbols for ELFv2.
6 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
9 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
10 undergoes default promotion.
11 * bfd-in2.h: Regenerate.
13 2017-10-02 Alan Modra <amodra@gmail.com>
15 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
16 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
18 2017-10-01 Alan Modra <amodra@gmail.com>
21 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
22 (add_line_info): Always put end_sequence last.
24 2017-10-01 Alan Modra <amodra@gmail.com>
27 * dwarf2.c (read_section): Allocate buffer with extra byte for
28 bfd_simple_get_relocated_section_contents rather than copying
31 2017-09-29 Alan Modra <amodra@gmail.com>
33 * merge.c (merge_strings): Return FALSE on malloc failure.
34 (_bfd_merge_sections): Return failures from record_section and
37 2017-09-28 Alan Modra <amodra@gmail.com>
40 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
41 a case where plugin_notice isn't called.
43 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
45 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
48 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
51 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
52 output_bfd to info->callbacks->minfo.
54 2017-09-26 Nick Clifton <nickc@redhat.com>
57 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
58 assertion failure if elf_x86_64_rtype_to_howto has already issued
61 2017-09-26 Alan Modra <amodra@gmail.com>
64 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
67 2017-09-26 Nick Clifton <nickc@redhat.com>
70 * dwarf2.c (read_formatted_entries): Fail early if we know that
71 the loop parsing data entries will overflow the end of the
74 2017-09-26 Alan Modra <amodra@gmail.com>
77 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
78 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
79 to stash->info_ptr_memory, and check die_ref is within that memory.
80 Set info_ptr_end correctly when another CU is refd. Check die_ref
81 for DW_FORM_ref4 etc. is within CU.
83 2017-09-26 Alan Modra <amodra@gmail.com>
86 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
87 (read_formatted_entries): Init "fe".
88 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
90 2017-09-26 Alan Modra <amodra@gmail.com>
93 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
96 2017-09-25 Alan Modra <amodra@gmail.com>
99 * dwarf1.c (parse_die): Sanity check pointer against section limit
100 before dereferencing.
101 (parse_line_table): Likewise.
103 2017-09-25 Alan Modra <amodra@gmail.com>
106 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
108 (parse_comp_unit): Likewise.
110 2017-09-25 Alan Modra <amodra@gmail.com>
113 * dwarf2.c (read_formatted_entries): Error on format_count zero.
115 2017-09-24 Alan Modra <amodra@gmail.com>
118 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
119 within section bounds.
121 2017-09-24 Alan Modra <amodra@gmail.com>
124 * dwarf2.c (decode_line_info): Properly free line sequences on error.
126 2017-09-24 Alan Modra <amodra@gmail.com>
129 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
130 pname param. Return status. Make name const. Don't abort,
131 return an error. Formatting. Exit if current info_ptr matches
132 orig_info_ptr. Update callers.
133 (scan_unit_for_symbols): Start at nesting_level of zero. Make
134 nested_funcs an array of structs for extensibility. Formatting.
136 2017-09-24 Alan Modra <amodra@gmail.com>
139 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
140 rather than dividing by zero.
142 2017-09-24 Alan Modra <amodra@gmail.com>
145 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
147 2017-09-24 Alan Modra <amodra@gmail.com>
150 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
152 2017-09-24 Alan Modra <amodra@gmail.com>
155 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
156 SHT_GNU_verneed section for sanity. Don't zalloc memory for
159 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
162 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
165 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
168 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
169 -1 if bfd_canonicalize_dynamic_reloc returns 0.
171 2017-09-22 Pedro Alves <palves@redhat.com>
172 Alan Modra <amodra@gmail.com>
174 * version.h: Add comment.
176 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
178 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
179 NT_S390_GS_BC, correct the previously swapped invocations of
180 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
182 2017-09-19 Alan Modra <amodra@gmail.com>
185 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
188 2017-09-19 Alan Modra <amodra@gmail.com>
191 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
192 symbols before calculating verrefs. Don't renumber dynsyms
193 after gc. Exclude .gnu.version when zero or one dynsym.
194 Localize some vars and reindent.
196 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
199 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
200 return from bfd_canonicalize_dynamic_reloc.
202 2017-09-15 Alan Modra <amodra@gmail.com>
205 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
206 overflows bfd_size_type.
208 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
211 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
212 to indicate if conversion is performed.
213 (elf_i386_check_relocs): Cache section contents and relocations
214 if conversion is performed.
215 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
216 contents and relocations if conversion is performed.
218 2017-09-14 Nick Clifton <nickc@redhat.com>
221 * peXXigen.c (pe_print_idata): Extend check for HintName vector
224 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
226 * elfxx-x86.h: Fix a typo in comments.
228 2017-09-09 Kamil Rytarowski <n54@gmx.com>
230 * elf32-nds32.c: Rename __BIT() to N32_BIT().
232 2017-09-09 Alan Modra <amodra@gmail.com>
234 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
237 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
239 * elf32-i386.c (elf_i386_relocate_section): Update usage of
240 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
241 (elf_i386_finish_dynamic_symbol): Likewise.
242 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
243 (elf_x86_64_finish_dynamic_symbol): Likewise.
244 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
245 (_bfd_x86_elf_fixup_symbol): Likewise.
247 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
249 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
250 check has_non_got_reloc.
252 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
255 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
256 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
257 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
258 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
259 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
260 and linker_def on __ehdr_start if it is referenced and not
262 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
263 and return TRUE when building executable, if a symbol has
264 non-GOT/non-PLT relocations in text section or there is no
266 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
268 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
270 * elfxx-x86.h: Update comments.
272 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
274 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
275 elf_x86_plt_layout_table with elf_x86_init_table.
276 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
278 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
280 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
281 (elf_x86_init_table): This.
282 (_bfd_x86_elf_link_setup_gnu_properties): Replace
283 elf_x86_plt_layout_table with elf_x86_init_table.
285 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
287 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
288 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
289 * configure: Regenerated.
290 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
291 and r_sym fields of plt_layout.
292 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
294 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
295 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
296 r_info nor r_sym fields.
297 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
299 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
301 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
303 * (_bfd_riscv_relax_align): Call bfd_set_error and
304 print an error message when unable to relax a .align directive.
306 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
308 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
309 (riscv_record_pcrel_hi_reloc): Add absolute argument.
310 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
311 R_RISCV_PCREL_HI20 relocs, and pass the result to
312 riscv_record_pcrel_hi_reloc.
314 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
316 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
317 r_type_p. Remove the converted argument. Replace
318 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
319 the new relocation type via r_type_p.
320 (elf_i386_relocate_section): Likewise.
321 (elf_i386_finish_dynamic_symbol): Likewise.
322 (need_convert_load): Removed.
323 (check_relocs_failed): Updated.
324 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
325 instead of setting need_convert_load.
326 (_bfd_i386_elf_convert_load): Removed.
327 * elf64-x86-64.c (need_convert_load): Removed.
328 (check_relocs_failed): Updated.
329 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
330 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
331 Return the new relocation type via r_type_p.
332 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
333 instead of setting need_convert_load.
334 (elf_x86_64_check_relocs): Don't check PIC if relocation has
336 (_bfd_x86_64_elf_convert_load): Removed.
337 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
338 with SYMBOL_REFERENCES_LOCAL_P.
339 (elf_x86_64_finish_dynamic_symbol): Likewise.
340 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
342 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
343 (_bfd_x86_elf_link_symbol_references_local): New function.
344 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
345 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
346 SYMBOL_REFERENCES_LOCAL_P.
347 (elf_x86_link_hash_entry): Add local_ref.
348 (elf_x86_link_hash_table): Remove convert_load.
349 (_bfd_i386_elf_convert_load): Removed.
350 (_bfd_x86_64_elf_convert_load): Likewise.
351 (_bfd_x86_elf_link_symbol_references_local): New.
353 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
355 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
356 (elf_x86_64_info_to_howto): Get the real relocation type by
357 masking out R_X86_64_converted_reloc_bit.
358 (elf_x86_64_check_tls_transition): Get the real relocation type
359 by masking out R_X86_64_converted_reloc_bit.
360 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
361 instead of setting converted_reloc.
362 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
363 instead of converted_reloc. Get the real relocation type by
364 masking out R_X86_64_converted_reloc_bit.
365 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
366 R_X86_64_converted_reloc_bit is valid.
367 * elfxx-x86.h (converted_reloc): Removed.
369 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
371 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
372 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
373 to get the relocation type again.
374 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
375 r_type when calling elf_x86_64_tls_transition. Don't use
376 ELF32_R_TYPE to get the relocation type again.
378 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
380 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
383 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
385 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
386 argument. Don't check relocation overflow. Avoid relocation
387 overflow if --no-relax is used. Set converted_reloc on symbol
388 if a GOTPCREL relocation is converted.
389 (elf_x86_64_relocate_section): Issue a fatal error and suggest
390 --no-relax if GOTPCREL relocation conversion leads to relocation
392 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
394 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
395 Edmar Wienskoski <edmar.wienskoski@nxp.com
397 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
398 (ppc_elf_check_relocs): Handle it.
399 (ppc_elf_vle_split20): New function.
400 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
402 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
405 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
406 for x86-64 if GOT_TLS_GDESC_P is true.
408 2017-09-03 Alan Modra <amodra@gmail.com>
411 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
413 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
415 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
416 tls_get_addr for x86-64 in one place.
418 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
420 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
421 with elfxx-x86.lo for 64-bit BFD.
422 * configure: Regenerated.
424 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
426 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
427 (_bfd_i386_elf_convert_load): This. Remove static.
428 (elf_i386_size_dynamic_sections): Removed.
429 (elf_backend_size_dynamic_sections): Likewise.
430 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
431 (_bfd_x86_64_elf_convert_load): This. Remove static.
432 (elf_x86_64_size_dynamic_sections): Removed.
433 (elf_backend_size_dynamic_sections): Likewise.
434 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
435 (elf_x86_allocate_dynrelocs): This. Make it static.
436 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
437 (elf_x86_allocate_local_dynreloc): This. Make it static.
438 (elf_i386_is_reloc_section): New function.
439 (elf_x86_64_is_reloc_section): Likewise.
440 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
441 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
442 Rearrange got_entry_size initialization.
443 (_bfd_x86_elf_size_dynamic_sections): New function.
444 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
445 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
446 (_bfd_i386_elf_convert_load): New.
447 (_bfd_x86_64_elf_convert_load): Likewise.
448 (_bfd_x86_elf_size_dynamic_sections): Likewise.
449 (elf_backend_size_dynamic_sections): Likewise.
450 (_bfd_x86_elf_allocate_dynrelocs): Removed.
451 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
453 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
455 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
458 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
460 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
461 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
463 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
465 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
466 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
467 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
468 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
469 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
470 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
472 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
474 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
475 (elf_i386_allocate_local_dynrelocs): Likewise.
476 (elf_i386_size_dynamic_sections): Replace
477 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
478 with _bfd_x86_elf_allocate_dynrelocs and
479 _bfd_x86_elf_allocate_local_dynrelocs.
480 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
481 (elf_x86_64_allocate_local_dynrelocs): Likewise.
482 (elf_x86_64_size_dynamic_sections): Replace
483 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
484 with _bfd_x86_elf_allocate_dynrelocs and
485 _bfd_x86_elf_allocate_local_dynrelocs.
486 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
487 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
488 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
489 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
491 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
493 * elf32-i386.c (is_i386_elf): Removed.
494 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
495 (elf_i386_size_dynamic_sections): Likewise.
496 (elf_i386_relocate_section): Likewise.
497 * elf64-x86-64.c (is_x86_64_elf): Removed.
498 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
500 (elf_x86_64_size_dynamic_sections): Likewise.
501 (elf_x86_64_relocate_section): Likewise.
502 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
504 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
507 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
509 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
510 (elf_i386_allocate_dynrelocs): Replace
511 elf_i386_compute_jump_table_size with
512 elf_x86_compute_jump_table_size.
513 (elf_i386_size_dynamic_sections): Likewise.
514 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
515 (elf_x86_64_allocate_dynrelocs): Replace
516 elf_x86_64_compute_jump_table_size with
517 elf_x86_compute_jump_table_size.
518 (elf_x86_64_size_dynamic_sections): Likewise.
519 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
521 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
522 (elf_x86_compute_jump_table_size): New.
524 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
526 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
528 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
529 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
531 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
533 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
534 with htab->is_vxworks.
535 (elf_i386_size_dynamic_sections): Likewise.
536 (elf_i386_relocate_section): Likewise.
537 (elf_i386_finish_dynamic_symbol): Likewise.
538 (elf_i386_finish_dynamic_sections): Likewise.
540 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
542 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
543 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
544 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
545 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
546 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
547 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
548 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
549 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
551 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
554 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
555 ELF_COMMON_DEF_P for common symbols.
557 2017-09-02 Alan Modra <amodra@gmail.com>
559 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
560 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
561 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
563 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
565 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
566 (elf_backend_gc_mark_hook): Likewise.
567 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
568 (elf_backend_gc_mark_hook): Likewise.
569 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
570 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
571 (elf_backend_gc_mark_hook): Likewise.
573 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
575 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
576 (elf_backend_adjust_dynamic_symbol): Likewise.
577 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
578 (elf_backend_adjust_dynamic_symbol): Likewise.
579 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
580 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
581 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
582 (_bfd_x86_elf_adjust_dynamic_symbol): New.
583 (elf_backend_adjust_dynamic_symbol): Likewise.
585 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
587 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
590 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
592 * elf32-i386.c (elf_i386_mkobject): Removed.
593 (bfd_elf32_mkobject): Likewise.
594 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
595 (bfd_elf64_mkobject): Likewise.
596 (bfd_elf32_mkobject): Likewise.
597 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
598 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
599 (bfd_elf64_mkobject): Likewise.
600 (bfd_elf32_mkobject): Likewise.
602 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
604 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
605 Call _bfd_x86_elf_link_setup_gnu_properties.
606 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
607 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
609 (elf_x86_64_non_lazy_plt): Likewise.
610 (elf_x86_64_lazy_bnd_plt): Likewise.
611 (elf_x86_64_non_lazy_bnd_plt): Likewise.
612 (elf_x86_64_lazy_ibt_plt): Likewise.
613 (elf_x32_lazy_ibt_plt): Likewise.
614 (elf_x86_64_non_lazy_ibt_plt): Likewise.
615 (elf_x32_non_lazy_ibt_plt): Likewise.
616 (elf_x86_64_nacl_plt): Likewise.
617 (elf_x86_64_link_setup_gnu_properties): Updated. Call
618 _bfd_x86_elf_link_setup_gnu_properties.
619 * elfxx-x86.c: Include elf-vxworks.h".
620 (_bfd_x86_elf_link_setup_gnu_properties): New function.
621 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
622 comments for pic_plt0_entry and pic_plt_entry.
623 (elf_x86_non_lazy_plt_layout): Likewise.
624 (elf_x86_plt_layout_table): New.
625 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
627 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
630 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
631 .eh_frame section for the second PLT.
632 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
633 alignment of .eh_frame section for the second PLT.
635 2017-09-01 Nick Clifton <nickc@redhat.com>
638 * dwarf2.c (decode_line_info): Fix test for an overlong line info
641 2017-09-01 Nick Clifton <nickc@redhat.com>
644 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
645 attribute buffer is NUL terminated.
647 2017-08-31 Nick Clifton <nickc@redhat.com>
650 * dwarf2.c (read_section): If necessary add a terminating NUL byte
651 to dwarf string sections.
653 2017-08-31 Alan Modra <amodra@gmail.com>
655 * po/SRC-POTFILES.in: Regenerate.
657 2017-08-31 Alan Modra <amodra@gmail.com>
659 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
660 for a section containing just a terminator. Allow multiple
661 terminators at end of section.
662 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
663 sections when not adding alignment. Assert on terminator in
666 2017-08-31 Alan Modra <amodra@gmail.com>
670 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
673 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
675 * configure.ac (bfd_backends): Add elf64.lo together with
676 elfxx-x86.lo for 64-bit BFD.
677 * configure: Regenerated.
679 2017-08-31 James Bowman <james.bowman@ftdichip.com>
681 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
684 2017-08-31 Alan Modra <amodra@gmail.com>
687 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
688 before _close_and_cleanup. Call iovec->bclose after.
689 (bfd_close): Remove code common to, and call, bfd_close_all_done.
691 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
693 * elf32-i386.c (elf_i386_plt_type): Removed.
694 (elf_i386_plt): Likewise.
695 (elf_i386_get_synthetic_symtab): Updated. Call
696 _bfd_x86_elf_get_synthetic_symtab.
697 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
698 (elf_x86_64_plt): Likewise.
699 (elf_x86_64_get_synthetic_symtab): Updated. Call
700 _bfd_x86_elf_get_synthetic_symtab.
701 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
702 (elf_x86_64_get_plt_got_vma): Likewise.
703 (elf_i386_valid_plt_reloc_p): Likewise.
704 (elf_x86_64_valid_plt_reloc_p): Likewise.
705 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
706 * elfxx-x86.h (elf_x86_plt_type): New.
707 (elf_x86_plt): Likewise.
708 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
710 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
712 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
713 target_id instead of elf_machine_code.
715 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
717 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
718 (elf_i386_lazy_plt_layout): Likewise.
719 (elf_i386_non_lazy_plt_layout): Likewise.
720 (elf_i386_plt_layout): Likewise.
721 (elf_i386_link_hash_table): Likewise.
722 (elf_i386_next_tls_desc_index): Likewise.
723 (elf_i386_srelplt2): Likewise.
724 (elf_i386_plt): Likewise.
725 (elf_i386_lazy_plt): Likewise.
726 (elf_i386_non_lazy_plt): Likewise.
727 (elf_i386_link_hash_table_create): Likewise.
728 (bfd_elf32_bfd_link_hash_table_create): Likewise.
729 (elf_i386_lazy_plt): Updated.
730 (elf_i386_non_lazy_plt): Likewise.
731 (elf_i386_lazy_ibt_plt): Likewise.
732 (elf_i386_non_lazy_ibt_plt): Likewise.
733 (elf_i386_allocate_dynrelocs): Likewise.
734 (elf_i386_size_dynamic_sections): Likewise.
735 (elf_i386_relocate_section): Likewise.
736 (elf_i386_finish_dynamic_symbol): Likewise.
737 (elf_i386_finish_dynamic_sections): Likewise.
738 (elf_i386_get_synthetic_symtab): Likewise.
739 (elf_i386_link_setup_gnu_properties): Likewise.
740 (elf_i386_nacl_plt): Likewise.
741 * elf64-x86-64.c (ABI_64_P): Removed.
742 (ELF64_DYNAMIC_INTERPRETER): Likewise.
743 (ELF32_DYNAMIC_INTERPRETER): Likewise.
744 (elf_x86_64_lazy_plt_layout): Likewise.
745 (elf_x86_64_non_lazy_plt_layout): Likewise.
746 (elf_x86_64_plt_layout): Likewise.
747 (elf_x86_64_link_hash_table): Likewise.
748 (elf_x86_64_plt): Likewise.
749 (elf_x86_64_lazy_plt): Likewise.
750 (elf_x86_64_non_lazy_plt): Likewise.
751 (elf_x86_64_link_hash_table_create): Likewise.
752 (bfd_elf64_bfd_link_hash_table_create): Likewise.
753 (bfd_elf32_bfd_link_hash_table_create): Likewise.
754 (elf_x86_64_lazy_plt): Updated.
755 (elf_x86_64_non_lazy_plt): Likewise.
756 (elf_x86_64_lazy_bnd_plt): Likewise.
757 (elf_x86_64_non_lazy_bnd_plt): Likewise.
758 (elf_x86_64_lazy_ibt_plt): Likewise.
759 (elf_x32_lazy_ibt_plt): Likewise.
760 (elf_x86_64_non_lazy_ibt_plt): Likewise.
761 (elf_x32_non_lazy_ibt_plt): Likewise.
762 (elf_x86_64_allocate_dynrelocs): Likewise.
763 (elf_x86_64_size_dynamic_sections): Likewise.
764 (elf_x86_64_relocate_section): Likewise.
765 (elf_x86_64_finish_dynamic_symbol): Likewise.
766 (elf_x86_64_finish_dynamic_sections): Likewise.
767 (elf_x86_64_get_synthetic_symtab): Likewise.
768 (elf_x86_64_link_setup_gnu_properties): Likewise.
769 (elf_x86_64_nacl_plt): Likewise.
770 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
772 (ELF32_DYNAMIC_INTERPRETER): New.
773 (ELF64_DYNAMIC_INTERPRETER): Likewise.
774 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
775 (_bfd_x86_elf_link_hash_table_create): Likewise.
776 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
777 (elf_x86_link_hash_table_free): This. Make it static.
778 * elfxx-x86.h: Don't include "objalloc.h".
780 (elf_x86_lazy_plt_layout): Likewise.
781 (elf_x86_non_lazy_plt_layout): Likewise.
782 (elf_x86_plt_layout): Likewise.
783 (_bfd_x86_elf_link_hash_table_create): Likewise.
784 (bfd_elf64_bfd_link_hash_table_create): Likewise.
785 (bfd_elf32_bfd_link_hash_table_create): Likewise.
786 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
787 srelplt2 and next_tls_desc_index.
788 (_bfd_x86_elf_link_hash_table_free): Removed.
790 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
792 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
793 branch offset interpretation.
795 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
798 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
800 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
802 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
803 (elf_x86_64_srelplt2): Likewise.
805 2017-08-30 Alan Modra <amodra@gmail.com>
807 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
808 (ppc64_elf_tls_optimize): Set it.
809 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
810 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
811 addis would add zero.
812 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
813 (ppc_elf_tls_optimize): Set it.
814 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
815 insn on TPREL16_LO relocs to use r2 when addis would add zero.
817 2017-08-30 Alan Modra <amodra@gmail.com>
819 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
820 __tls_get_addr call sequences to LE, don't move the addi down
821 to the nop. Replace the bl with addi and leave the nop alone.
823 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
825 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
827 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
829 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
831 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
833 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
834 (BFD64_BACKENDS): Likewise.
835 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
836 (BFD64_BACKENDS_CFILES): Likewise.
837 * Makefile.in: Regenerated.
838 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
839 elf32-i386.lo and elf64-x86-64.lo.
840 * configure: Regenerated.
841 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
842 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
843 "objalloc.h" and "hashtab.h".
844 (ELIMINATE_COPY_RELOCS): Removed.
845 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
846 (SYMBOL_NO_COPYRELOC): Likewise.
847 (elf_i386_link_hash_entry): Likewise.
848 (GOT_UNKNOWN): Likewise.
849 (GOT_NORMAL): Likewise.
850 (GOT_TLS_GD): Likewise.
851 (elf_i386_hash_entry): Likewise.
852 (elf_i386_obj_tdata): Likewise.
853 (elf_i386_tdata): Likewise.
854 (elf_i386_local_got_tls_type): Likewise.
855 (elf_i386_local_tlsdesc_gotent): Likewise.
856 (elf_i386_hash_table): Likewise.
857 (elf_i386_link_hash_newfunc): Likewise.
858 (elf_i386_local_htab_hash): Likewise.
859 (elf_i386_local_htab_eq): Likewise.
860 (elf_i386_get_local_sym_hash): Likewise.
861 (elf_i386_link_hash_table_free): Likewise.
862 (elf_i386_copy_indirect_symbol): Likewise.
863 (elf_i386_fixup_symbol): Likewise.
864 (elf_i386_readonly_dynrelocs): Likewise.
865 (elf_i386_always_size_sections): Likewise.
866 (elf_i386_set_tls_module_base): Likewise.
867 (elf_i386_dtpoff_base): Likewise.
868 (compare_relocs): Likewise.
869 (elf_i386_hash_symbol): Likewise.
870 (elf_i386_parse_gnu_properties): Likewise.
871 (elf_i386_merge_gnu_properties): Likewise.
872 (elf_i386_link_check_relocs): Likewise.
873 (elf_i386_merge_symbol_attribute): Likewise.
874 (bfd_elf32_bfd_link_check_relocs): Likewise.
875 (elf_backend_copy_indirect_symbol): Likewise.
876 (elf_backend_always_size_sections): Likewise.
877 (elf_backend_omit_section_dynsym): Likewise.
878 (elf_backend_hash_symbol): Likewise.
879 (elf_backend_fixup_symbol): Likewise.
880 (elf_backend_parse_gnu_properties): Likewise.
881 (elf_backend_merge_gnu_properties): Likewise.
882 (elf_backend_merge_symbol_attribute): Likewise.
883 (elf_i386_mkobject): Updated.
884 (elf_i386_link_hash_table_create): Likewise.
885 (elf_i386_check_tls_transition): Likewise.
886 (elf_i386_tls_transition): Likewise.
887 (elf_i386_convert_load_reloc): Likewise.
888 (elf_i386_check_relocs): Likewise.
889 (elf_i386_adjust_dynamic_symbol): Likewise.
890 (elf_i386_allocate_dynrelocs): Likewise.
891 (elf_i386_convert_load): Likewise.
892 (elf_i386_size_dynamic_sections): Likewise.
893 (elf_i386_relocate_section): Likewise.
894 (elf_i386_finish_dynamic_symbol ): Likewise.
895 (elf_i386_finish_dynamic_sections): Likewise.
896 (elf_i386_output_arch_local_syms): Likewise.
897 (elf_i386_get_synthetic_symtab): Likewise.
898 (elf_i386_link_setup_gnu_properties): Likewise.
899 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
900 of elf_link_hash_table, as base.
901 (elf_i386_next_tls_desc_index): New.
902 (elf_i386_srelplt2): Likewise.
903 (elf_i386_plt): Likewise.
904 (elf_i386_lazy_plt): Likewise.
905 (elf_i386_non_lazy_plt): Likewise.
906 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
907 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
908 "objalloc.h" and "hashtab.h".
909 (ELIMINATE_COPY_RELOCS): Removed.
910 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
911 (SYMBOL_NO_COPYRELOC): Likewise.
912 (elf_x86_64_link_hash_entry): Likewise.
913 (GOT_UNKNOWN): Likewise.
914 (GOT_NORMAL): Likewise.
915 (GOT_TLS_GD): Likewise.
916 (elf_x86_64_hash_entry): Likewise.
917 (elf_x86_64_obj_tdata): Likewise.
918 (elf_x86_64_tdata): Likewise.
919 (elf_x86_64_local_got_tls_type): Likewise.
920 (elf_x86_64_local_tlsdesc_gotent): Likewise.
921 (elf_x86_64_hash_table): Likewise.
922 (elf_x86_64_link_hash_newfunc): Likewise.
923 (elf_x86_64_local_htab_hash): Likewise.
924 (elf_x86_64_local_htab_eq): Likewise.
925 (elf_x86_64_get_local_sym_hash): Likewise.
926 (elf_x86_64_link_hash_table_free): Likewise.
927 (elf_x86_64_copy_indirect_symbol): Likewise.
928 (elf_x86_64_fixup_symbol): Likewise.
929 (elf_x86_64_readonly_dynrelocs): Likewise.
930 (elf_x86_64_always_size_sections): Likewise.
931 (elf_x86_64_set_tls_module_base): Likewise.
932 (elf_x86_64_dtpoff_base): Likewise.
933 (compare_relocs): Likewise.
934 (elf_x86_64_merge_symbol_attribute): Likewise.
935 (elf_x86_64_hash_symbol): Likewise.
936 (elf_x86_64_parse_gnu_properties): Likewise.
937 (elf_x86_64_merge_gnu_properties): Likewise.
938 (elf_x86_64_link_check_relocs): Likewise.
939 (elf_backend_copy_indirect_symbol): Likewise.
940 (elf_backend_always_size_sections): Likewise.
941 (bfd_elf64_bfd_link_check_relocs): Likewise.
942 (elf_backend_merge_symbol_attribute): Likewise.
943 (elf_backend_hash_symbol): Likewise.
944 (elf_backend_omit_section_dynsym): Likewise.
945 (elf_backend_fixup_symbol): Likewise.
946 (elf_backend_parse_gnu_properties): Likewise.
947 (elf_backend_merge_gnu_properties): Likewise.
948 (bfd_elf32_bfd_link_check_relocs): Likewise.
949 (elf_x86_64_mkobject): Updated.
950 (elf_x86_64_link_hash_table_create): Likewise.
951 (elf_x86_64_check_tls_transition): Likewise.
952 (elf_x86_64_tls_transition): Likewise.
953 (elf_x86_64_convert_load_reloc): Likewise.
954 (elf_x86_64_check_relocs): Likewise.
955 (elf_x86_64_adjust_dynamic_symbol): Likewise.
956 (elf_x86_64_allocate_dynrelocs): Likewise.
957 (elf_x86_64_convert_load): Likewise.
958 (elf_x86_64_size_dynamic_sections): Likewise.
959 (elf_x86_64_relocate_section): Likewise.
960 (elf_x86_64_finish_dynamic_symbol ): Likewise.
961 (elf_x86_64_finish_dynamic_sections): Likewise.
962 (elf_x86_64_output_arch_local_syms): Likewise.
963 (elf_x86_64_get_synthetic_symtab): Likewise.
964 (elf_x86_64_link_setup_gnu_properties): Likewise.
965 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
966 instead of elf_link_hash_table, as base.
967 (elf_x86_64_next_tls_desc_index): New.
968 (elf_x86_64_srelplt2): Likewise.
969 (elf_x86_64_plt): Likewise.
970 (elf_x86_64_lazy_plt): Likewise.
971 (elf_x86_64_non_lazy_plt): Likewise.
972 * elfxx-x86.c: New file.
973 * elfxx-x86.h: Likewise.
975 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
977 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
979 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
981 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
983 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
984 sections before checking dynamic relocations and free invalid
985 PLT section contents.
986 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
988 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
990 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
991 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
993 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
996 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
998 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1000 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1002 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1004 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1006 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1009 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1010 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1011 Add a has_no_copy_on_protected bitfield.
1012 (elf_has_no_copy_on_protected): New.
1013 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1014 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1015 (elf_merge_gnu_property_list): Likewise.
1016 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1017 to FALSE for elf_has_no_copy_on_protected.
1018 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1019 (elf_i386_link_hash_entry): Add def_protected.
1020 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1021 when checking info->nocopyreloc.
1022 (elf_i386_link_setup_gnu_properties): Don't set
1023 extern_protected_data here.
1024 (elf_i386_merge_symbol_attribute): New function.
1025 (elf_backend_merge_symbol_attribute): New.
1026 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1027 (elf_x86_64_link_hash_entry): Add def_protected.
1028 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1029 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1030 when checking info->nocopyreloc.
1031 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1032 relocation run-time overflow and unresolvable R_X86_64_32S
1033 relocation against protected data symbol defined in shared object
1034 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1035 (elf_x86_64_link_setup_gnu_properties): Don't set
1036 extern_protected_data here.
1037 (elf_x86_64_merge_symbol_attribute): New function.
1038 (elf_backend_merge_symbol_attribute): New.
1040 2017-08-26 Alan Modra <amodra@gmail.com>
1042 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1043 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1044 (ppc_elf_relocate_section): Comment fix.
1045 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1046 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1047 Support dynamic relocs for TPREL16 when non-pic too.
1048 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1049 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1052 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1054 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1055 "symbol" in comments.
1056 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1058 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1061 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1062 R_X86_64_PC32 relocation run-time overflow and unresolvable
1063 R_X86_64_32S relocation with -z nocopyreloc.
1065 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1067 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1068 Undefined symbols may not have a type.
1069 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1071 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1073 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1074 bfd_link_info. Report shared, PIE or PDE object based on
1076 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1077 (elf_x86_64_relocate_section): Likewise.
1079 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1081 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1082 for function symbols.
1083 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1085 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1087 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1088 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1089 is set on any input relocatable file.
1090 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1092 2017-08-23 Alan Modra <amodra@gmail.com>
1095 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1096 ensure_undefweak_dynamic. Handle undefined too.
1097 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1098 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1099 (allocate_dynrelocs): Discard undefined non-default visibility
1100 relocs first. Make undefined syms dynamic. Tidy goto.
1102 2017-08-21 Alan Modra <amodra@gmail.com>
1103 H.J. Lu <hongjiu.lu@intel.com>
1106 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1107 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1109 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1112 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1113 undefined weak symbols.
1115 2017-08-18 Nick Clifton <nickc@redhat.com>
1118 * tekhex.c (getsym): Fix check for source pointer walking off the
1119 end of the input buffer.
1121 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1124 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1125 relocations in debug sections, change abort to _bfd_error_handler.
1127 2017-08-14 Nick Clifton <nickc@redhat.com>
1130 * elf.c (setup_group): Check for an empty or very small group
1132 * po/bfd.pot: Regenerate.
1134 2017-08-14 Alan Modra <amodra@gmail.com>
1137 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1138 alignment padding here.
1139 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1140 in a reverse pass over sections.
1142 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1145 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1146 for @plt suffixes first.
1147 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1149 2017-08-08 Nick Clifton <nickc@redhat.com>
1152 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1153 small section lengths.
1154 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1156 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1157 there is enough data present in the note.
1159 2017-08-08 Alan Modra <amodra@gmail.com>
1162 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1163 got.refcount for GOTOFF relocs, just create .got section.
1165 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1167 * elflink.c (elf_link_add_object_symbols): Move common symbol
1168 check after bed->common_definition.
1170 2017-08-07 Alan Modra <amodra@gmail.com>
1173 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1174 needed to define various dynamic tags have been discarded.
1176 2017-08-07 Nick Clifton <nickc@redhat.com>
1179 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1180 has not been set then use the bfd returned by
1181 _bfd_elf_link_setup_gnu_properties. If that is null then search
1182 through all the input bfds selecting the first normal, ELF format
1184 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1186 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1188 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1190 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1191 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1192 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1193 (elf_i386_link_check_relocs): New function.
1194 (bfd_elf32_bfd_link_check_relocs): New.
1195 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1197 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1198 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1199 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1200 (elf_x86_64_link_check_relocs): New function.
1201 (bfd_elf64_bfd_link_check_relocs): New.
1202 (bfd_elf32_bfd_link_check_relocs): Likewise.
1204 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1207 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1208 as undefined for --no-define-common.
1210 2017-08-05 Alan Modra <amodra@gmail.com>
1212 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1213 hppa_link_hash_table.
1215 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1217 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1218 entries for sysregs with negative indices.
1220 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1222 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1223 isn't the S/390 specific elf data.
1224 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1226 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1228 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1229 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1230 [R_RISCV_ADD16]: Likewise.
1231 [R_RISCV_ADD32]: Likewise.
1232 [R_RISCV_ADD64]: Likewise.
1233 [R_RISCV_SUB6]: Likewise.
1234 [R_RISCV_SUB8]: Likewise.
1235 [R_RISCV_SUB16]: Likewise.
1236 [R_RISCV_SUB32]: Likewise.
1237 [R_RISCV_SUB64]: Likewise.
1239 2017-07-31 Alan Modra <amodra@gmail.com>
1241 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1242 without ld.so checks.
1244 2017-07-29 Alan Modra <amodra@gmail.com>
1247 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1248 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1249 (is_elfv2_localentry0): Test non_zero_localentry.
1250 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1252 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1254 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1255 pointer check for htab->elf.irelplt.
1256 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1258 2017-07-27 Nick Clifton <nickc@redhat.com>
1261 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1263 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1265 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1267 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1269 (evax_bfd_print_emh): Check for invalid string lengths.
1271 2017-07-25 Nick Clifton <nickc@redhat.com>
1273 * po/fr.po: Updated French translation.
1275 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1278 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1279 16-bit absolute branches into 10-bit pc-relative branches on the
1280 MSP430 as well as the MSP430X.
1282 2017-07-25 Alan Modra <amodra@gmail.com>
1284 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1285 (stub_eh_frame_size): New function.
1286 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1287 (group_sections): Init group tls_get_addr_opt_bctrl.
1288 (ppc64_elf_size_stubs): Update sizing and initialization of
1289 .eh_frame. Iteration over stubs via group list.
1290 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1291 (ppc64_elf_finish_dynamic_sections): Update finalization of
1294 2017-07-24 Nick Clifton <nickc@redhat.com>
1297 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1298 of the relocs to the canonicalize_one_reloc routine.
1299 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1300 for the _bfd_mach_o_canonicalize_one_reloc field.
1301 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1302 res_base parameter. Use to check for corrupt pair relocs.
1303 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1305 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1307 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1310 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1311 enough data in the record before attempting to parse it.
1312 (_bfd_vms_slurp_eeom): Likewise.
1314 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1315 (image_set_ptr): Likewise.
1316 (alpha_vms_slurp_relocs): Likewise.
1318 (alpha_vms_object_p): Check for a truncated record.
1320 2017-07-24 Nick Clifton <nickc@redhat.com>
1323 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1324 an unrecognized reloc and sets the bfd_error value.
1325 * libbfd.h: Regenerate.
1326 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1328 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1329 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1330 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1331 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1332 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1334 2017-07-23 Alan Modra <amodra@gmail.com>
1336 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1339 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1342 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1343 reloc_class_ifunc for ifunc symbols.
1345 2017-07-19 Nick Clifton <nickc@redhat.com>
1348 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1349 correct magic bytes at the start, set the error to wrong format
1350 and clear the format selector before returning NULL.
1352 2017-07-19 Nick Clifton <nickc@redhat.com>
1355 * coff-rs6000.c (_bfd_strntol): New function.
1356 (_bfd_strntoll): New function.
1357 (GET_VALUE_IN_FIELD): New macro.
1358 (EQ_VALUE_IN_FIELD): new macro.
1359 (_bfd_xcoff_slurp_armap): Use new macros.
1360 (_bfd_xcoff_archive_p): Likewise.
1361 (_bfd_xcoff_read_ar_hdr): Likewise.
1362 (_bfd_xcoff_openr_next_archived_file): Likewise.
1363 (_bfd_xcoff_stat_arch_elt): Likewise.
1364 * coff64-rs6000.c (_bfd_strntol): New function.
1365 (_bfd_strntoll): New function.
1366 (GET_VALUE_IN_FIELD): New macro.
1367 (xcoff64_slurp_armap): Use new macros.
1369 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1370 John Eric Martin <John.Martin@emmicro-us.com>
1372 * bfd-in2.h: Regenerate.
1373 * libbfd.h: Regenerate.
1374 * elf32-arc.c (JLI): Define.
1375 * reloc.c: Add JLI relocations.
1377 2017-07-18 Nick Clifton <nickc@redhat.com>
1380 * coff-sh.c: Fix spelling typos.
1381 * compress.c: Likewise.
1382 * cpu-pdp11.c: Likewise.
1383 * ecofflink.c: Likewise.
1384 * elf-m10300.c: Likewise.
1386 * elf32-arm.c: Likewise.
1387 * elf32-m68k.c: Likewise.
1388 * elf32-nds32.c: Likewise.
1389 * elf32-ppc.c: Likewise.
1390 * elf32-sh.c: Likewise.
1391 * elf32-v850.c: Likewise.
1392 * elf64-ppc.c: Likewise.
1393 * elf64-x86-64.c: Likewise.
1394 * elflink.c: Likewise.
1395 * elfnn-aarch64.c: Likewise.
1396 * elfxx-mips.c: Likewise.
1398 * sunos.c: Likewise.
1399 * vms-alpha.c: Likewise.
1400 * xcofflink.c: Likewise.
1402 2017-07-18 Nick Clifton <nickc@redhat.com>
1405 * coffcode.h (handle_COMDAT): Replace abort with an error message
1408 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1411 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1414 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1416 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1418 2017-07-16 Alan Modra <amodra@gmail.com>
1420 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1421 __tls_index GOT entries when using __tls_get_addr_opt stub.
1422 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1424 2017-07-12 Alan Modra <amodra@gmail.com>
1426 * po/es.po: Update from translationproject.org/latest/bfd/.
1427 * po/fi.po: Likewise.
1428 * po/fr.po: Likewise.
1429 * po/id.po: Likewise.
1430 * po/ja.po: Likewise.
1431 * po/ro.po: Likewise.
1432 * po/ru.po: Likewise.
1433 * po/sr.po: Likewise.
1434 * po/sv.po: Likewise.
1435 * po/tr.po: Likewise.
1436 * po/uk.po: Likewise.
1437 * po/vi.po: Likewise.
1438 * po/zh_CN.po: Likewise.
1439 * po/hr.po: New file from translationproject.org.
1440 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1441 * configure: Regenerate.
1443 2017-07-12 Nick Clifton <nickc@redhat.com>
1445 Fix compile time warnings using gcc 7.1.1.
1446 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1448 (elf_xtensa_get_gotplt_section): Increase length of got_name
1450 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1451 default return of FALSE.
1452 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1453 default return of FALSE.
1455 2017-07-12 Alan Modra <amodra@gmail.com>
1457 * binary.c (binary_set_section_contents): Don't print filepos in
1459 (coff_write_object_contents): Cast size_t for error message.
1460 (coff_slurp_line_table): Don't use bfd_vma symndx.
1461 (coff_slurp_reloc_table): Remove unneeded cast.
1462 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1464 (find_abstract_instance_name): Likewise.
1465 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1466 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1467 (elf32_arm_check_relocs): Make r_symndx an int.
1468 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1470 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1472 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1474 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1475 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1476 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1477 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1478 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1479 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1480 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1481 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1482 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1483 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1484 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1485 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1486 and use %lu for error message.
1487 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1488 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1491 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1493 (elf32_arm_final_link_relocate): Likewise.
1494 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1495 * coffcode.h (styp_to_sec_flags): Likewise.
1496 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1497 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1498 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1499 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1500 (elf32_bfin_merge_private_bfd_data): Likewise.
1501 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1502 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1503 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1504 (i370_elf_relocate_section): Likewise.
1505 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1506 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1507 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1508 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1509 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1510 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1511 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1512 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1513 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1514 * ieee.c (ieee_write_id, read_id): Likewise.
1515 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1516 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1517 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1518 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1519 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1520 * stabs.c (_bfd_link_section_stabs): Likewise.
1522 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1524 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1525 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1526 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1527 * coff-sh.c (sh_relax_section): Likewise.
1528 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1529 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1530 * coffcode.h (coff_slurp_reloc_table): Likewise.
1531 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1532 (_bfd_coff_read_string_table): Likewise.
1533 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1534 * compress.c (bfd_get_full_section_contents): Likewise.
1535 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1536 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1537 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1538 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1539 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1540 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1541 (elf32_arm_write_section): Likewise.
1542 * elf32-bfin.c (bfin_relocate_section): Likewise.
1543 (bfinfdpic_relocate_section): Likewise.
1544 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1545 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1546 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1547 (elf_i386_relocate_section): Likewise.
1548 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1549 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1550 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1551 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1552 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1553 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1554 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1555 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1556 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1557 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1558 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1559 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1560 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1561 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1562 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1563 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1564 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1565 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1566 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1567 * elf32-sh.c (sh_elf_relax_section): Likewise.
1568 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1569 (sh_elf_relocate_section): Likewise.
1570 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1571 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1572 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1573 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1574 * elf32-v850.c (v850_elf_relax_section): Likewise.
1575 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1576 (elf_vax_relocate_section): Likewise.
1577 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1578 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1579 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1580 (do_fix_for_relocatable_link): Likewise.
1581 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1582 (elf64_alpha_relax_with_lituse): Likewise.
1583 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1584 (elf_hppa_final_link_relocate): Likewise.
1585 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1586 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1587 (elf64_vms_link_add_object_symbols): Likewise.
1588 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1589 (mmix_final_link_relocate): Likewise.
1590 * elf64-s390.c (invalid_tls_insn): Likewise.
1591 (elf_s390_relocate_section): Likewise.
1592 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1593 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1594 (elf_x86_64_relocate_section): Likewise.
1595 * elfcode.h (elf_slurp_symbol_table): Likewise.
1596 * elfcore.h (elf_core_file_p): Likewise.
1597 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1598 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1599 (elfNN_aarch64_relocate_section): Likewise.
1600 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1601 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1602 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1603 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1604 (_bfd_mips_elf_relocate_section): Likewise.
1605 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1606 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1607 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1608 * ieee.c (ieee_slurp_external_symbols): Likewise.
1609 * ihex.c (ihex_write_object_content): Likewise.
1610 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1611 * merge.c (_bfd_merged_section_offset): Likewise.
1612 * mmo.c (mmo_write_loc_chunk): Likewise.
1613 (mmo_write_object_contents): Likewise.
1614 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1615 * stabs.c (_bfd_link_section_stabs): Likewise.
1616 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1618 2017-07-11 Alan Modra <amodra@gmail.com>
1620 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1622 2017-07-11 Alan Modra <amodra@gmail.com>
1624 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1625 instruction" error using _bfd_error_handler, not einfo.
1627 2017-07-10 Nick Clifton <nickc@redhat.com>
1629 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1630 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1632 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1634 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1636 2017-07-07 Alan Modra <amodra@gmail.com>
1638 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1640 2017-07-07 Alan Modra <amodra@gmail.com>
1642 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1643 as long long. Move code replacing "ll" with "I64", and simplify.
1645 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1647 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1650 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1652 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1654 (line_info_add_file_name): Likewise.
1655 (decode_line_info): Likewise.
1657 2017-07-04 Tristan Gingold <gingold@adacore.com>
1659 * version.m4: Bump version to 2.29.51
1660 * configure: Regenerate.
1662 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1664 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1665 sanity check at the head of this function.
1667 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1669 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1670 dwarf_line_str_size.
1671 (struct attr_abbrev): Add field implicit_const.
1672 (dwarf_debug_sections): Add .debug_line_str.
1673 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1674 (dwarf_debug_section_assert): Add static assertion.
1675 (read_indirect_line_string): New.
1676 (read_abbrevs): Support DW_FORM_implicit_const.
1677 (is_str_attr): Support DW_FORM_line_strp.
1678 (read_attribute_value): Support DW_FORM_line_strp and
1679 DW_FORM_implicit_const.
1680 (read_attribute): Support DW_FORM_implicit_const.
1681 (line_info_add_include_dir, line_info_add_include_dir_stub):
1682 (line_info_add_file_name, read_formatted_entries): New.
1683 (decode_line_info, parse_comp_unit): Support DWARF 5.
1684 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1686 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1688 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1689 abort statement that was put for symbols that are not dynamic.
1691 2017-07-03 Tristan Gingold <gingold@adacore.com>
1693 * po/bfd.pot: Regenerate
1695 2017-07-03 Alan Modra <amodra@gmail.com>
1697 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1698 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1699 * elf.c (setup_group): Use "Lx" to print sh_size.
1700 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1701 unknown section type in hex.
1702 (copy_special_section_fields): Style fix.
1703 (bfd_section_from_shdr): Correct format for sh_link. Use a
1704 common error message for all the variants of unrecognized
1706 (assign_file_positions_for_load_sections): Use "Lx" for lma
1707 adjust error message.
1708 (assign_file_positions_for_non_load_sections): Formatting.
1709 (rewrite_elf_program_header): Formatting. Use "Lx" for
1710 bfd_vma values in error messages.
1711 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1712 ELF_R_SYM value to type expected by format.
1713 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1715 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1716 (elf_link_input_bfd): Use "Lx" for r_info.
1717 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1719 2017-07-03 Alan Modra <amodra@gmail.com>
1721 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1722 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1723 Microsoft C library variant of long long format specifier.
1724 (PRINT20): Cast value to bfd_uint64_t not long long.
1725 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1726 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1727 long long. Don't cast to bfd_vma.
1728 * elf32-score.c (score3_bfd_getl48): Likewise.
1729 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1731 2017-07-03 Alan Modra <amodra@gmail.com>
1733 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1735 (bfd_elf_print_symbol): Don't cast symbol->flags.
1736 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1737 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1738 _bfd_error_handler argument order.
1739 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1741 2017-07-03 Alan Modra <amodra@gmail.com>
1743 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1744 AC_TYPE_LONG_DOUBLE.
1745 * configure: Regenerate.
1746 * config.in: Regenerate.
1748 2017-06-29 Andrew Waterman <andrew@sifive.com>
1750 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1753 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1755 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1756 unless it is undefined weak.
1757 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1758 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1760 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1761 is not dynamic in PIC, abort.
1763 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1766 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1767 undefined weak symbols into dynamic.
1768 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1769 relocation for non-dynamic symbols.
1770 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1772 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1774 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1775 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1776 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1777 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1778 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1781 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1783 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1784 (elfcore_write_s390_gs_bc): Likewise.
1785 * elf.c (elfcore_grok_s390_gs_cb): New function.
1786 (elfcore_grok_s390_gs_bc): New function.
1787 (elfcore_grok_note): Call them.
1788 (elfcore_write_s390_gs_cb): New function.
1789 (elfcore_write_s390_gs_bc): New function.
1790 (elfcore_write_register_note): Call them.
1792 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1794 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1795 bfd_get_file_size. Check archive element size.
1796 (_bfd_generic_get_section_contents_in_window): Likewise.
1798 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1800 * bfd-in2.h: Regenerated.
1801 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1802 (bfd_get_file_size): Likewise.
1804 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1805 Matthew Fortune <matthew.fortune@imgtec.com>
1807 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1808 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1809 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1810 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1812 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1813 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1814 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1815 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1816 `bfd_mach_mips_interaptiv_mr2' entries.
1817 * bfd-in2.h: Regenerate.
1819 2017-06-27 Nick Clifton <nickc@redhat.com>
1821 * tekhex.c (pass_over): Revert accidental conversion of a local
1822 array to a static array.
1824 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1827 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1828 reloc addend if necessary. Adjust diff only if
1829 shrinked_insn_address < end_address.
1831 2017-06-27 Alan Modra <amodra@gmail.com>
1834 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1835 (_bfd_generic_get_section_contents_in_window): Likewise.
1837 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1839 * elfnn-riscv.c (perform_relocation): Support the new
1840 R_RISCV_32_PCREL relocation.
1841 (riscv_elf_relocate_section): Likewise.
1842 * elfxx-riscv.c (howto_table): Likewise.
1843 (riscv_reloc_map): Likewise.
1844 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1845 * libbfd.h: Regenerate.
1847 2017-06-27 Alan Modra <amodra@gmail.com>
1850 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1851 Use unsigned file pointer type, and remove cast.
1852 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1853 Add "count", not "sz".
1855 2017-06-26 Pedro Alves <palves@redhat.com>
1858 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1861 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1864 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1867 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1869 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1870 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1871 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1872 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1873 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1875 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1878 * compress.c (bfd_get_full_section_contents): Don't check the
1880 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1881 reject a section whose size + offset is greater than the size
1883 (_bfd_generic_get_section_contents_in_window): Likewise.
1885 2017-06-26 Nick Clifton <nickc@redhat.com>
1888 * tekhex.c (getvalue): Check for the source pointer exceeding the
1889 end pointer before the first byte is read.
1891 2017-06-26 Nick Clifton <nickc@redhat.com>
1894 * opncls.c (get_build_id): Check that the section is big enough
1895 to contain the whole note.
1896 * compress.c (bfd_get_full_section_contents): Check for and reject
1897 a section whose size is greater than the size of the entire file.
1898 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1899 contain a notes section.
1901 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1903 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1905 (elf_s390_modify_segment_map): Likewise.
1906 (bfd_elf_s390_set_options): Lisewise.
1908 2017-06-26 Alan Modra <amodra@gmail.com>
1910 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1912 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1913 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1914 .preinit_array on --just-syms bfds.
1915 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1916 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1917 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1919 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1921 * elf.c (find_link): Bounds check "hint".
1923 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1925 * elf32-arm.c (using_thumb_only): Update list of architectures in
1926 BFD_ASSERT for which the logic is valid.
1927 (using_thumb2_bl): Likewise.
1928 (using_thumb2): Likewise and return true for ARMv8-R.
1929 (arch_has_arm_nop): Likewise.
1930 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1931 merging logic. Update commentis for value 15 of v8m_baseline,
1932 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1933 merging of value 15 of Tag_CPU_arch.
1935 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1937 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1938 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1939 * bfd-in2.h: Regenerate.
1941 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1943 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1944 the error_alignment label forward. Properly align program
1945 property note section.
1947 2017-06-22 Eric Christopher <echristo@gmail.com>
1949 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1950 abs to fix a truncation warning.
1952 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1954 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1955 local undefined weak symbol to 0.
1956 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1958 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1960 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1961 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1962 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1963 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1964 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1965 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1966 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1967 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1969 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1971 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1972 (elf_i386_lazy_ibt_plt_entry): Likewise.
1973 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1974 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1975 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1976 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1977 (elf_i386_lazy_plt_layout): Likewise.
1978 (elf_i386_non_lazy_plt_layout): Likewise.
1979 (elf_i386_link_hash_entry): Add plt_second.
1980 (elf_i386_link_hash_table): Add plt_second and
1981 plt_second_eh_frame.
1982 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1983 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1984 the second PLT. Check the second PLT.
1985 (elf_i386_relocate_section): Use the second PLT to resolve
1986 PLT reference if needed.
1987 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1989 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1990 second PLT. Generate unwind info for the second PLT.
1991 (elf_i386_plt_type): Add plt_second.
1992 (elf_i386_get_synthetic_symtab): Support the second PLT.
1993 (elf_i386_parse_gnu_properties): Support
1994 GNU_PROPERTY_X86_FEATURE_1_AND.
1995 (elf_i386_merge_gnu_properties): Support
1996 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1997 on GNU_PROPERTY_X86_FEATURE_1_IBT
1998 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1999 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2000 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2001 is set on all relocatable inputs.
2002 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2003 (elf_x32_lazy_ibt_plt_entry): Likewise.
2004 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2005 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2006 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2007 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2008 (elf_x86_64_lazy_ibt_plt): Likewise.
2009 (elf_x32_lazy_ibt_plt): Likewise.
2010 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2011 (elf_x32_non_lazy_ibt_plt): Likewise.
2012 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2013 (elf_x86_64_parse_gnu_properties): Support
2014 GNU_PROPERTY_X86_FEATURE_1_AND.
2015 (elf_x86_64_merge_gnu_properties): Support
2016 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2017 on GNU_PROPERTY_X86_FEATURE_1_IBT
2018 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2019 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2020 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2021 is set on all relocatable inputs.
2023 2017-06-22 Nick Clifton <nickc@redhat.com>
2026 * som.c (setup_sections): NUL terminate the space_strings buffer.
2027 Check that the space.name field does not index beyond the end of
2028 the space_strings buffer.
2030 2017-06-21 Nick Clifton <nickc@redhat.com>
2033 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2035 2017-06-21 Nick Clifton <nickc@redhat.com>
2038 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2039 type of the size parameter.
2040 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2041 length of the counted string.
2042 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2043 (_bfd_vms_save_counted_string): Likewise.
2044 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2045 _bfd_vms_save_counted_string.
2046 (_bfd_vms_slurp_ehdr): Likewise.
2047 (_bfd_vms_slurp_egsd): Likewise.
2048 (Parse_module): Likewise.
2050 2017-06-21 Alan Modra <amodra@gmail.com>
2052 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2053 calls before tocsave calls.
2054 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2057 2017-06-21 Nick Clifton <nickc@redhat.com>
2060 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2061 bfd_get_full_section_contents returns no contents.
2063 2017-06-21 Nick Clifton <nickc@redhat.com>
2066 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2069 2017-06-21 Nick Clifton <nickc@redhat.com>
2072 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2074 (image_set_ptr): Likewise.
2075 (alpha_vms_fix_sec_rel): Likewise.
2076 (alpha_vms_slurp_relocs): Likewise.
2078 2017-06-21 Nick Clifton <nickc@redhat.com>
2081 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2083 (ieee_archive_p): Likewise.
2084 (ieee_object_p): Likewise.
2086 2017-06-21 Nick Clifton <nickc@redhat.com>
2089 * elf.c (setup_group): Zero the group section pointer list after
2090 allocation so that loops can be caught. Check for NULL pointers
2091 when processing a group list.
2093 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2095 * elf-s390.h: New file.
2096 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2098 (elf_s390_additional_program_headers): New function.
2099 (elf_s390_modify_segment_map): New function.
2100 (bfd_elf_s390_set_options): New function.
2101 (elf_backend_additional_program_headers)
2102 (elf_backend_modify_segment_map): Add macro definitions.
2104 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2107 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2108 the DYNAMIC bit instead of bfd_count_sections.
2110 2017-06-19 Nick Clifton <nickc@redhat.com>
2113 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2115 (evax_bfd_print_eeom): Likewise.
2116 (evax_bfd_print_egsd): Check for an overlarge record length.
2117 (evax_bfd_print_etir): Likewise.
2119 2017-06-19 Nick Clifton <nickc@redhat.com>
2122 * libieee.h (struct common_header_type): Add end_p field.
2123 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2125 (read_id): Check for a length that exceeds the remaining bytes in
2127 (ieee_seek): Initialise end_p.
2128 (ieee_archive_p): Likewise.
2129 (ieee_object_p): Likewise.
2131 2017-06-19 Nick Clifton <nickc@redhat.com>
2134 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2135 before reading the EIHS structure entries.
2137 2017-06-19 Nick Clifton <nickc@redhat.com>
2140 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2141 gsd_size. Check that there are enough bytes remaining to read the
2142 type and size of the next egsd. Check that the size of the egsd
2143 does not exceed the size of the record.
2145 2017-06-19 Alan Modra <amodra@gmail.com>
2147 * config.bfd: Correct targ_underscore for cris.
2149 2017-06-18 Alan Modra <amodra@gmail.com>
2151 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2152 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2154 2017-06-16 Nick Clifton <nickc@redhat.com>
2156 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2157 bucketlist is empty because there are no symbols to add to the
2160 2017-06-16 Alan Modra <amodra@gmail.com>
2166 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2167 (BFD_JUMP_TABLE_LINK): Likewise.
2168 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2169 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2170 (bfd_elf_define_start_stop): New function.
2171 * linker.c (bfd_generic_define_start_stop): New function.
2172 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2174 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2175 * aout-target.h (MY_bfd_define_start_stop): Define.
2176 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2177 * binary.c (binary_bfd_define_start_stop): Define.
2178 * bout.c (b_out_bfd_define_start_stop): Define.
2179 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2180 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2181 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2182 * coffcode.h (coff_bfd_define_start_stop): Define.
2183 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2184 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2185 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2186 * ieee.c (ieee_bfd_define_start_stop): Define.
2187 * ihex.c (ihex_bfd_define_start_stop): Define.
2188 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2189 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2190 * mmo.c (mmo_bfd_define_start_stop): Define.
2191 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2192 * oasys.c (oasys_bfd_define_start_stop): Define.
2193 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2194 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2195 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2196 * som.c (som_bfd_define_start_stop): Define.
2197 * srec.c (srec_bfd_define_start_stop): Define.
2198 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2199 * versados.c (versados_bfd_define_start_stop): Define.
2200 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2201 (alpha_vms_bfd_define_start_stop): Define.
2202 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2203 * bfd-in2.h: Regenerate.
2204 * libbfd.h: Regenerate.
2206 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2208 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2209 SYMBOL_REFERENCES_LOCAL.
2211 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2214 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2215 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2216 runtime for if there needs copy relocation elimination.
2217 (need_copy_relocation_p): New function. Return true for symbol with
2218 pc-relative references and if it's against read-only sections.
2219 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2220 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2221 that are related with accessing external objects.
2222 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2223 in elfNN_aarch64_check_relocs.
2225 2017-06-15 Nick Clifton <nickc@redhat.com>
2228 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2231 (ieee_archive_p): Likewise.
2233 2017-06-15 Nick Clifton <nickc@redhat.com>
2236 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2238 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2240 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2241 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2242 keep both windowed and call0 ABI PLT definitions.
2243 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2244 elf_xtensa_*_plt_entry endex.
2245 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2247 2017-06-14 Nick Clifton <nickc@redhat.com>
2250 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2253 2017-06-14 Nick Clifton <nickc@redhat.com>
2256 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2257 maximum value for the ascic pointer. Check that name processing
2258 does not read beyond this value.
2259 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2262 2017-06-14 Nick Clifton <nickc@redhat.com>
2265 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2266 (process_otr): Check for an invalid offset in the otr structure.
2268 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2270 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2272 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2278 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2279 vtable field to a union.
2280 (_bfd_elf_is_start_stop): Removed.
2281 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2282 __start_SECNAME and __stop_SECNAME symbols.
2283 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2284 * elflink.c (_bfd_elf_is_start_stop): Removed.
2285 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2286 _bfd_elf_is_start_stop.
2287 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2288 __stop_SECNAME symbols. Updated.
2289 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2290 (bfd_elf_gc_record_vtinherit): Likewise.
2291 (bfd_elf_gc_record_vtentry): Likewise.
2293 2017-06-13 Nick Clifton <nickc@redhat.com>
2296 * elflink.c (elf_link_adjust_relocs): Generate an error when
2297 encountering a reloc against a symbol removed by garbage
2300 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2302 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2303 to merge_gnu_properties.
2304 * elf-properties.c (elf_merge_gnu_properties): Add struct
2305 bfd_link_info * and pass it to merge_gnu_properties.
2306 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2307 and pass it to elf_merge_gnu_properties.
2308 (_bfd_elf_link_setup_gnu_properties): Pass info to
2309 elf_merge_gnu_property_list.
2310 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2312 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2314 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2317 * binary.c (binary_set_section_contents): Scale lma by octets
2318 per byte to set filepos.
2320 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2322 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2325 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2327 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2330 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2332 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2333 patched section contents for TLS IE reloc.
2334 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2336 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2338 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2339 RELOC_FOR_GLOBAL_SYMBOL macro.
2341 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2343 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2346 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2348 * config/tc-arc.c (md_undefined_symbol): Changed.
2349 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2351 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2353 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2356 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2358 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2359 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2361 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2363 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2366 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2368 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2369 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2370 is non-zero. Add clarifying comments.
2372 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2374 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2375 name. Use local IFUNC symbol name string to report unsupported
2376 non-PIC call to IFUNC function.
2377 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2378 when generating R_386_IRELATIVE relocation.
2379 (elf_i386_finish_dynamic_symbol): Likewise.
2380 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2382 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2383 when generating R_X86_64_IRELATIVE relocation.
2384 (elf_x86_64_finish_dynamic_symbol): Likewise.
2386 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2388 * elf.c (setup_group): Make sure BFD sections are created for all
2389 group sections in the input file when processing SHF_GROUP
2391 (bfd_section_from_shdr): Avoid duplicating logic already
2392 implemented in `setup_group'.
2394 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2397 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2398 if the hint address is zero.
2400 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2403 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2404 ELF_COMMON_DEF_P for common symbols.
2406 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2408 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2409 SEC_GROUP sections as SEC_EXCLUDE.
2410 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2411 (assign_section_numbers): Use resolve_section_groups flag instead
2412 of relocatable link type.
2413 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2414 flag instead of checking the final_link flag for part of the
2415 checks in here. Fix white space as a result.
2416 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2417 instead of relocatable link type.
2418 (bfd_elf_final_link): Likewise.
2420 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2422 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2424 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2425 (s3_bfd_score_elf_check_relocs): Likewise.
2426 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2427 (score_elf_final_link_relocate): Likewise.
2428 (s7_bfd_score_elf_check_relocs): Likewise.
2430 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2432 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2435 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2437 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2438 from `reloc_count' rather than decrementing it.
2439 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2440 `reloc_count' by `int_rels_per_ext_rel'.
2441 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2442 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2443 entry determination.
2444 (s3_bfd_score_elf_check_relocs): Likewise.
2445 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2446 (s7_bfd_score_elf_relocate_section): Likewise.
2447 (s7_bfd_score_elf_check_relocs): Likewise.
2448 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2449 prototype and function.
2450 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2451 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2452 triple rather than once the sum of REL and RELA relocation entry
2454 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2455 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2456 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2457 storage allocation size determination.
2458 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2459 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2460 by `int_rels_per_ext_rel' for last relocation entry
2462 (bfd_elf_final_link): Do not multiply `reloc_count' by
2463 `int_rels_per_ext_rel' for internal relocation storage
2464 allocation size determination.
2465 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2466 `int_rels_per_ext_rel' for last relocation entry determination.
2467 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2468 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2469 (_bfd_mips_elf_relocate_section): Likewise.
2471 2017-06-05 Alan Modra <amodra@gmail.com>
2474 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2476 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2478 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2479 determine structure sizes.
2480 (elfcore_grok_freebsd_prstatus): Likewise.
2482 2017-06-01 Alan Modra <amodra@gmail.com>
2484 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2485 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2487 (is_elfv2_localentry0): New function.
2488 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2489 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2490 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2491 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2492 optimized localentry:0 stubs.
2493 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2494 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2496 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2498 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2500 2017-05-30 Casey Smith <clegg89@gmail.com>
2503 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2504 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2506 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2508 * cpu-arc.c (arc_compatible): New function.
2510 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2512 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2514 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2517 * bfdio.c (bfd_get_file_size): New function.
2518 * bfd-in2.h: Regenerated.
2520 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2522 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2525 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2527 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2528 dynobj instead of htab->elf.dynobj.
2530 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2532 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2534 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2535 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2536 actual number of internal relocations retrieved. Adjust
2537 function description.
2538 (bfd_elf64_canonicalize_reloc): Remove macro.
2539 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2541 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2543 * archures.c (bfd_mach_sparc_v9m8): Define.
2544 (bfd_mach_sparc_v8plusm8): Likewise.
2545 (bfd_mach_sparc_v9_p): Adjust to M8.
2546 (bfd_mach_sparc_64bit_p): Likewise.
2547 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2548 bfd_mach_sparc_v8plusm8.
2549 * bfd-in2.h: Regenerated.
2550 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2552 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2553 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2554 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2556 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2557 bfd_mach_sparc_v8plusm8.
2559 2017-05-19 Alan Modra <amodra@gmail.com>
2561 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2562 debug and special sections when no non-note alloc sections in an
2565 2017-05-18 Alan Modra <amodra@gmail.com>
2567 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2568 * elf-m10300.c: Likewise.
2570 * elf32-arc.c: Likewise.
2571 * elf32-bfin.c: Likewise.
2572 * elf32-m68k.c: Likewise.
2573 * elf32-nds32.c: Likewise.
2574 * elf32-tilepro.c: Likewise.
2575 * elflink.c: Likewise.
2576 * elfnn-aarch64.c: Likewise.
2577 * elfnn-riscv.c: Likewise.
2578 * elfxx-tilegx.c: Likewise.
2579 * mach-o.c: Likewise.
2580 * peXXigen.c: Likewise.
2581 * vms-alpha.c: Likewise.
2582 * vms-lib.c: Likewise.
2584 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2587 * elflink.c (elf_gc_mark_debug_section): New function.
2588 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2589 referenced by kept debug sections.
2591 2017-05-16 Alan Modra <amodra@gmail.com>
2593 * elf-m10300.c: Rename occurrences of non_ir_ref.
2594 * elf32-arm.c: Likewise.
2595 * elf32-bfin.c: Likewise.
2596 * elf32-cr16.c: Likewise.
2597 * elf32-cris.c: Likewise.
2598 * elf32-d10v.c: Likewise.
2599 * elf32-dlx.c: Likewise.
2600 * elf32-fr30.c: Likewise.
2601 * elf32-frv.c: Likewise.
2602 * elf32-hppa.c: Likewise.
2603 * elf32-i370.c: Likewise.
2604 * elf32-i386.c: Likewise.
2605 * elf32-iq2000.c: Likewise.
2606 * elf32-lm32.c: Likewise.
2607 * elf32-m32c.c: Likewise.
2608 * elf32-m32r.c: Likewise.
2609 * elf32-m68hc1x.c: Likewise.
2610 * elf32-m68k.c: Likewise.
2611 * elf32-mcore.c: Likewise.
2612 * elf32-metag.c: Likewise.
2613 * elf32-microblaze.c: Likewise.
2614 * elf32-moxie.c: Likewise.
2615 * elf32-msp430.c: Likewise.
2616 * elf32-mt.c: Likewise.
2617 * elf32-nios2.c: Likewise.
2618 * elf32-or1k.c: Likewise.
2619 * elf32-ppc.c: Likewise.
2620 * elf32-rl78.c: Likewise.
2621 * elf32-s390.c: Likewise.
2622 * elf32-score.c: Likewise.
2623 * elf32-score7.c: Likewise.
2624 * elf32-sh.c: Likewise.
2625 * elf32-tic6x.c: Likewise.
2626 * elf32-tilepro.c: Likewise.
2627 * elf32-v850.c: Likewise.
2628 * elf32-vax.c: Likewise.
2629 * elf32-xstormy16.c: Likewise.
2630 * elf32-xtensa.c: Likewise.
2631 * elf64-alpha.c: Likewise.
2632 * elf64-hppa.c: Likewise.
2633 * elf64-ia64-vms.c: Likewise.
2634 * elf64-mmix.c: Likewise.
2635 * elf64-ppc.c: Likewise.
2636 * elf64-s390.c: Likewise.
2637 * elf64-sh64.c: Likewise.
2638 * elf64-x86-64.c: Likewise.
2639 * elflink.c: Likewise.
2640 * elfnn-aarch64.c: Likewise.
2641 * elfnn-ia64.c: Likewise.
2642 * elfnn-riscv.c: Likewise.
2643 * elfxx-mips.c: Likewise.
2644 * elfxx-sparc.c: Likewise.
2645 * elfxx-tilegx.c: Likewise.
2646 * linker.c: Likewise.
2648 2017-05-16 Alan Modra <amodra@gmail.com>
2650 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2651 * elflink.c (elf_link_add_object_symbols): Update to use
2653 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2655 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2657 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2659 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2661 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2663 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2664 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2666 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2668 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2670 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2672 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2673 to plt_second/plt_second_eh_frame.
2674 (elf_x86_64_link_hash_newfunc): Updated.
2675 (elf_x86_64_allocate_dynrelocs): Likewise.
2676 (elf_x86_64_size_dynamic_sections): Likewise.
2677 (elf_x86_64_relocate_section): Likewise.
2678 (elf_x86_64_finish_dynamic_symbol): Likewise.
2679 (elf_x86_64_finish_dynamic_sections): Likewise.
2680 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2681 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2683 (elf_backend_setup_gnu_properties): Updated. Create the
2684 .plt.sec section instead of the .plt.sec section.
2686 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2688 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2689 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2690 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2692 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2694 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2695 (bfd_elf64_set_reloc): Define.
2696 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2698 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2700 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2701 (struct bfd_target): New field _bfd_set_reloc.
2702 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2703 * reloc.c (_bfd_generic_set_reloc): New function.
2704 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2705 * nlm-target.h (nlm_set_reloc): Likewise.
2706 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2707 * aout-tic30.c (MY_set_reloc): Likewise.
2708 * aout-target.h (MY_set_reloc): Likewise.
2709 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2710 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2711 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2712 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2713 * aout-adobe.c (aout_32_set_reloc): Likewise.
2714 * bout.c (b_out_set_reloc): Likewise.
2715 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2716 * i386os9k.c (aout_32_set_reloc): Likewise.
2717 * ieee.c (ieee_set_reloc): Likewise.
2718 * oasys.c (oasys_set_reloc): Likewise.
2719 * som.c (som_set_reloc): Likewise.
2720 * versados.c (versados_set_reloc): Likewise.
2721 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2722 _bfd_generic_set_reloc.
2723 (rs6000_xcoff64_aix_vec): LIkewise.
2724 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2725 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2726 * i386msdos.c (msdos_set_reloc): Define to
2727 _bfd_norelocs_set_reloc.
2728 * elfcode.h (elf_set_reloc): Define.
2729 * bfd-in2.h: Regenerated.
2731 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2734 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2735 for IFUNC function address.
2737 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2739 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2740 (CONFLICT_LIST): Likewise.
2741 (opcode/arc-attrs.h): Include.
2742 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2743 (arc_extract_features): New file.
2744 (arc_stralloc): Likewise.
2745 (arc_elf_merge_attributes): Likewise.
2746 (arc_elf_merge_private_bfd_data): Use object attributes.
2747 (bfd_arc_get_mach_from_attributes): New function.
2748 (arc_elf_object_p): Use object attributes.
2749 (arc_elf_final_write_processing): Likewise.
2750 (elf32_arc_obj_attrs_arg_type): New function.
2751 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2752 (elf32_arc_section_from_shdr): Likewise.
2753 (elf_backend_obj_attrs_vendor): Define.
2754 (elf_backend_obj_attrs_section): Likewise.
2755 (elf_backend_obj_attrs_arg_type): Likewise.
2756 (elf_backend_obj_attrs_section_type): Likewise.
2757 (elf_backend_obj_attrs_handle_unknown): Likewise.
2758 (elf_backend_section_from_shdr): Likewise.
2760 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2763 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2764 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2765 and the destination is a Thumb symbol.
2767 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2769 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2770 initializer to silence GCC 4.2.
2771 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2773 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2775 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2776 (LAZY_PLT_ENTRY_SIZE): This.
2777 (NON_LAZY_PLT_ENTRY_SIZE): New.
2778 (elf_x86_64_plt0_entry): Renamed to ...
2779 (elf_x86_64_lazy_plt0_entry): This.
2780 (elf_x86_64_plt_entry): Renamed to ...
2781 (elf_x86_64_lazy_plt_entry): This.
2782 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2783 (elf_x86_64_lazy_bnd_plt0_entry): This.
2784 (elf_x86_64_legacy_plt_entry): Removed.
2785 (elf_x86_64_bnd_plt_entry): Renamed to ...
2786 (elf_x86_64_lazy_bnd_plt_entry): This.
2787 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2788 (elf_x86_64_non_lazy_plt_entry): This.
2789 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2790 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2791 (elf_x86_64_eh_frame_plt): Renamed to ...
2792 (elf_x86_64_eh_frame_lazy_plt): This.
2793 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2794 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2795 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2796 (elf_x86_64_eh_frame_non_lazy_plt): This.
2797 (elf_x86_64_lazy_plt_layout): New.
2798 (elf_x86_64_non_lazy_plt_layout): Likewise.
2799 (elf_x86_64_plt_layout): Likewise.
2800 (elf_x86_64_backend_data): Remove PLT layout information. Add
2801 os for target system.
2802 (GET_PLT_ENTRY_SIZE): Removed.
2803 (elf_x86_64_lazy_plt): New.
2804 (elf_x86_64_non_lazy_plt): Likewise.
2805 (elf_x86_64_lazy_bnd_plt): Likewise.
2806 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2807 (elf_x86-64_arch_bed): Updated.
2808 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2809 (elf_x86_64_create_dynamic_sections): Removed.
2810 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2811 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2812 (elf_x86-64_adjust_dynamic_symbol): Updated.
2813 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2814 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2815 size for PLT0 if there is no PLT0. Get plt_entry_size from
2816 non_lazy_plt for non-lazy PLT entries.
2817 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2818 from non_lazy_plt for non-lazy PLT entries.
2819 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2820 if there is no PLT0.
2821 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2822 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2823 entries with non-lazy PLT layout. Don't fill the second and third
2824 slots in the PLT entry if there is no PLT0.
2825 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2826 if there is no PLT0. Set sh_entsize on the .plt.got section.
2827 (compare_relocs): New.
2828 (elf_x86_64_plt_type): Likewise.
2829 (elf_x86_64_plt): Likewise.
2830 (elf_x86_64_nacl_plt): New. Forward declaration.
2831 (elf_x86_64_get_plt_sym_val): Removed.
2832 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2833 against all dynamic relocations.
2834 (elf_x86_64_link_setup_gnu_properties): New function.
2835 (elf_backend_create_dynamic_sections): Updated.
2836 (elf_backend_setup_gnu_properties): New.
2837 (elf_x86_64_nacl_plt): New.
2838 (elf_x86_64_nacl_arch_bed): Updated.
2840 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2842 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2843 (LAZY_PLT_ENTRY_SIZE): This.
2844 (NON_LAZY_PLT_ENTRY_SIZE): New.
2845 (elf_i386_plt0_entry): Renamed to ...
2846 (elf_i386_lazy_plt0_entry): This.
2847 (elf_i386_plt_entry): Renamed to ...
2848 (elf_i386_lazy_plt_entry): This.
2849 (elf_i386_pic_plt0_entry): Renamed to ...
2850 (elf_i386_pic_lazy_plt0_entry): This.
2851 (elf_i386_pic_plt_entry): Renamed to ...
2852 (elf_i386_pic_lazy_plt_entry): This.
2853 (elf_i386_got_plt_entry): Renamed to ...
2854 (elf_i386_non_lazy_plt_entry): This.
2855 (elf_i386_pic_got_plt_entry): Renamed to ...
2856 (elf_i386_pic_non_lazy_plt_entry): This.
2857 (elf_i386_eh_frame_plt): Renamed to ...
2858 (elf_i386_eh_frame_lazy_plt): This.
2859 (elf_i386_eh_frame_plt_got): Renamed to ...
2860 (elf_i386_eh_frame_non_lazy_plt): This.
2861 (elf_i386_plt_layout): Renamed to ...
2862 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2863 eh_frame_plt_got_size.
2864 (elf_i386_non_lazy_plt_layout): New.
2865 (elf_i386_plt_layout): Likewise.
2866 (elf_i386_non_lazy_plt): Likewise.
2867 (GET_PLT_ENTRY_SIZE): Removed.
2868 (elf_i386_plt): Renamed to ...
2869 (elf_i386_lazy_plt): This.
2870 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2871 (elf_i386_arch_bed): Updated.
2872 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2873 (elf_i386_create_dynamic_sections): Removed.
2874 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2875 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2876 (elf_i386_adjust_dynamic_symbol): Updated.
2877 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2878 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2879 size for PLT0 if there is no PLT0.
2880 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2881 output section is discarded only if GOT isn't empty.
2882 (elf_i386_relocate_section): Updated. Properly get PLT index
2883 if there is no PLT0.
2884 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2885 second and third slots in the PLT entry if there is no PLT0.
2886 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2887 if there is no PLT0. Set sh_entsize on the .plt.got section.
2888 (elf_i386_nacl_plt): Forward declaration.
2889 (elf_i386_get_plt_sym_val): Removed.
2890 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2891 against all dynamic relocations.
2892 (elf_i386_link_setup_gnu_properties): New function.
2893 (elf_backend_create_dynamic_sections): Updated.
2894 (elf_backend_setup_gnu_properties): New.
2895 (elf_i386_nacl_plt): Updated.
2896 (elf_i386_nacl_arch_bed): Likewise.
2897 (elf_i386_vxworks_arch_bed): Likewise.
2899 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2901 * elflink.c (elf_output_implib): Remove executable flag from import
2903 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2904 library is a relocatable object file.
2906 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2909 * elf32-avr.c (avr_should_move_sym): New function.
2910 (avr_should_reduce_sym_size): Likewise.
2911 (avr_should_increase_sym_size): Likewise.
2912 (elf32_avr_relax_delete_bytes): Adjust symbol values
2913 and sizes by calling new functions.
2915 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2917 * config.bfd (riscv32-*): Enable rv64.
2919 2017-05-02 Alan Modra <amodra@gmail.com>
2922 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2923 rather than h->root.type == bfd_link_hash_new.
2924 (bfd_elf_record_link_assignment): Similarly, call
2925 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2927 2017-04-29 Alan Modra <amodra@gmail.com>
2930 * reloc.c (reloc_offset_in_range): New function.
2931 (bfd_perform_relocation, bfd_install_relocation): Use it.
2932 (_bfd_final_link_relocate): Likewise.
2934 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2936 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2937 before using .plt.got.
2938 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2940 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2942 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2943 instead of "+=" to update 0.
2945 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2947 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2948 .plt.got section here.
2949 (elf_i386_check_relocs): Don't create the .plt.got section.
2950 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2951 the .plt.got and .plt.bnd sections here.
2952 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2955 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2957 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2959 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2960 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2961 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2962 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2965 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2967 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2969 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2970 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2971 the first relocatable ELF input with GNU properties.
2973 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2975 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2976 VxWorks for non-PIC.
2978 2017-04-27 Alan Modra <amodra@gmail.com>
2980 * elf-bfd.h (struct elf_backend_data): Make asection param of
2981 elf_backend_eh_frame_address_size const.
2982 (_bfd_elf_eh_frame_address_size): Likewise.
2983 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2984 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2985 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2986 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2987 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2988 (next_cie_fde_offset): Constify params.
2989 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2991 2017-04-27 Alan Modra <amodra@gmail.com>
2993 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2994 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2995 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2997 (offset_adjust): New function.
2998 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2999 (adjust_eh_frame_local_symbols): Likewise.
3000 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3001 after changing anything. Return true if anything changed.
3002 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3003 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3005 2017-04-27 Alan Modra <amodra@gmail.com>
3007 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3010 2017-04-27 Alan Modra <amodra@gmail.com>
3012 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3013 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3014 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3015 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3016 for undef and undefweak dyn_relocs.
3017 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3018 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3019 (allocate_got, allocate_dynrelocs): Likewise.
3020 (ppc64_elf_relocate_section): Likewise.
3022 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3024 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3025 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3026 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3027 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3029 2017-04-26 Nick Clifton <nickc@redhat.com>
3032 * reloc.c (bfd_perform_relocation): Check for a negative address
3035 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3038 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3040 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3041 (elf_backend_always_renumber_dynsyms): Define.
3042 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3043 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3044 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3045 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3047 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3049 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3051 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3052 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3053 sections have been created.
3055 2017-04-26 Nick Clifton <nickc@redhat.com>
3058 * compress.c (bfd_init_section_compress_status): Check the return
3059 value from bfd_malloc.
3061 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3063 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3064 no_finish_dynamic_symbol.
3065 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3067 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3068 weak symbol, don't make it dynamic.
3069 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3070 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3071 relocation for GOT reference.
3072 (elf_x86_64_finish_dynamic_symbol): Abort if
3073 no_finish_dynamic_symbol isn't 0.
3075 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3078 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3079 undefined weak symbol, don't make it dynamic.
3080 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3081 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3082 relocation for R_386_GOT32.
3084 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3087 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3089 2017-04-23 Alan Modra <amodra@gmail.com>
3092 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3093 * elf.c (lcomm_sym): New.
3094 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3095 * bfd-in2.h: Regenerate.
3097 2017-04-23 Alan Modra <amodra@gmail.com>
3100 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3101 parameters and comment.
3102 (_bfd_elf_get_reloc_section): Delete.
3103 (_bfd_elf_plt_get_reloc_section): Declare.
3104 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3105 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3107 (_bfd_elf_get_reloc_section): ..here. Delete.
3108 (assign_section_numbers): Call elf_get_reloc_section.
3109 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3110 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3112 2017-04-23 Alan Modra <amodra@gmail.com>
3115 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3118 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3121 * elf32-i386.c (elf_i386_link_hash_entry): Add
3122 no_finish_dynamic_symbol.
3123 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3124 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3125 symbol, don't make it dynamic in PIE.
3126 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3127 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3128 relocation for R_386_GOT32
3129 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3132 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3136 * elflink.c (elf_link_add_object_symbols): Require
3137 --no-dynamic-linker with -E/--dynamic-list when creating
3140 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3142 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3145 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3147 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3148 dynamic symbol sorting.
3150 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3153 * elflink.c (elf_link_add_object_symbols): Preserve
3154 dynamic_ref_after_ir_def when restoring the symbol table for
3155 unneeded dynamic object.
3157 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3160 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3161 on on undefined IFUNC symbol in the second PLT.
3163 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3165 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3167 2017-04-19 Alan Modra <amodra@gmail.com>
3169 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3170 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3171 * elf32-ppc.c:Formatting.
3172 (ensure_undefweak_dynamic): Don't make dynamic when
3173 info->dynamic_undefined_weak is zero.
3174 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3175 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3176 not default visibility. Discard undef and undefweak
3178 (ppc_elf_relocate_section): Adjust to suit.
3179 * elf64-ppc.c: Formatting.
3180 (ensure_undefweak_dynamic): Don't make dynamic when
3181 info->dynamic_undefined_weak is zero.
3182 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3183 info->dynamic_undefined_weak. Discard them earlier.
3185 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3188 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3189 before generating the version definition section.
3191 2017-04-17 Alan Modra <amodra@gmail.com>
3193 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3194 state when a regular object file defines a symbol with
3195 incompatible type to that defined by an earlier shared lib.
3197 2017-04-13 Alan Modra <amodra@gmail.com>
3199 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3201 * elf32-arm.c: Likewise.
3202 * elf32-i386.c: Likewise.
3203 * elf32-mep.c: Likewise.
3204 * elf64-ia64-vms.c: Likewise.
3205 * elf64-x86-64.c: Likewise.
3206 * elflink.c: Likewise.
3207 * elfnn-ia64.c: Likewise.
3208 * elfxx-mips.c: Likewise.
3210 2017-04-13 Alan Modra <amodra@gmail.com>
3212 * aoutx.h: Use %B and %A in error messages throughout file.
3213 * aout-cris.c: Likewise.
3214 * archive.c: Likewise.
3215 * binary.c: Likewise.
3216 * coff-rs6000.c: Likewise.
3217 * coff-tic4x.c: Likewise.
3218 * coffcode.h: Likewise.
3219 * coffgen.c: Likewise.
3220 * cofflink.c: Likewise.
3221 * coffswap.h: Likewise.
3222 * cpu-arm.c: Likewise.
3223 * elf-eh-frame.c: Likewise.
3224 * elf-m10300.c: Likewise.
3226 * elf32-arc.c: Likewise.
3227 * elf32-arm.c: Likewise.
3228 * elf32-bfin.c: Likewise.
3229 * elf32-frv.c: Likewise.
3230 * elf32-iq2000.c: Likewise.
3231 * elf32-m32c.c: Likewise.
3232 * elf32-microblaze.c: Likewise.
3233 * elf32-nds32.c: Likewise.
3234 * elf32-rl78.c: Likewise.
3235 * elf32-rx.c: Likewise.
3236 * elf32-score.c: Likewise.
3237 * elf32-score7.c: Likewise.
3238 * elf32-sh64.c: Likewise.
3239 * elf32-v850.c: Likewise.
3240 * elf32-vax.c: Likewise.
3241 * elf32-visium.c: Likewise.
3242 * elf64-ia64-vms.c: Likewise.
3243 * elf64-mmix.c: Likewise.
3244 * elf64-sh64.c: Likewise.
3245 * elfcode.h: Likewise.
3246 * elfnn-aarch64.c: Likewise.
3247 * elfnn-ia64.c: Likewise.
3248 * elfxx-mips.c: Likewise.
3249 * hpux-core.c: Likewise.
3252 * linker.c: Likewise.
3253 * merge.c: Likewise.
3255 * oasys.c: Likewise.
3256 * pdp11.c: Likewise.
3257 * peXXigen.c: Likewise.
3258 * rs6000-core.c: Likewise.
3259 * vms-alpha.c: Likewise.
3260 * xcofflink.c: Likewise.
3262 2017-04-13 Alan Modra <amodra@gmail.com>
3264 * bfd.c (PRINT_TYPE): Define.
3265 (_doprnt): New function.
3266 (error_handler_internal): Use _doprnt.
3267 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3268 calls in their natural order, throughout file.
3269 * coff-mcore.c: Likewise.
3270 * coff-ppc.c: Likewise.
3271 * coff-tic80.c: Likewise.
3272 * cofflink.c: Likewise.
3273 * elf-s390-common.c: Likewise.
3275 * elf32-arm.c: Likewise.
3276 * elf32-i386.c: Likewise.
3277 * elf32-m32r.c: Likewise.
3278 * elf32-msp430.c: Likewise.
3279 * elf32-spu.c: Likewise.
3280 * elf64-ia64-vms.c: Likewise.
3281 * elf64-sparc.c: Likewise.
3282 * elf64-x86-64.c: Likewise.
3283 * elflink.c: Likewise.
3284 * elfnn-aarch64.c: Likewise.
3285 * elfnn-ia64.c: Likewise.
3286 * elfxx-mips.c: Likewise.
3288 2017-04-13 Alan Modra <amodra@gmail.com>
3290 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3291 branch veneers" error. Fix double space and format message.
3292 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3293 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3295 2017-04-13 Alan Modra <amodra@gmail.com>
3297 * bfd-in2.h: Regenerate.
3299 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3301 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3302 extra `\n' in warning/error messages.
3303 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3304 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3306 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3308 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3309 processor-specific properties with generic ELF target vector.
3311 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3313 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3314 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3315 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3316 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3318 (link_hash_newfunc): Initialize has_got_reloc and
3320 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3322 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3324 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3326 (_bfd_sparc_elf_fixup_symbol): New function.
3327 (allocate_dynrelocs): Don't allocate space for dynamic
3328 relocations and discard relocations against resolved undefined
3329 weak symbols in executable. Don't make resolved undefined weak
3330 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3331 relocation against undefined weak symbols in PIE.
3332 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3333 relocations against resolved undefined weak symbols in PIE
3334 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3335 without ynamic PLT/GOT relocations for resolved undefined weak
3337 Don't generate dynamic relocation against resolved undefined
3338 weak symbol in executable.
3339 (pie_finish_undefweak_symbol): New function.
3340 (_bfd_sparc_elf_finish_dynamic_sections): Call
3341 pie_finish_undefweak_symbol on all symbols in PIE.
3342 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3343 (_bfd_sparc_elf_fixup_symbol): New function.
3345 2017-04-10 Nick Clifton <nickc@redhat.com>
3347 * config.bfd: Remove ns32k from obsolete list.
3349 2017-04-10 Alan Modra <amodra@gmail.com>
3352 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3353 (special_sections_i): Likewise for .init_array.
3354 (special_sections_p): Likewise for .preinit_array.
3356 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3360 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3361 ELF_COMMON_DEF_P for common symbols.
3362 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3363 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3364 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3365 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3366 07492f668d2173da7a2bda3707ff0985e0f460b6.
3368 2017-04-07 Pedro Alves <palves@redhat.com>
3370 * opncls.c (bfd_get_debug_link_info): Rename to...
3371 (bfd_get_debug_link_info_1): ... this. Change type of second
3372 parameter to void pointer. Adjust.
3373 (bfd_get_debug_link_info): Reimplement on top of
3374 bfd_get_debug_link_info_1.
3375 (separate_debug_file_exists, separate_alt_debug_file_exists):
3376 Change type of second parameter to void pointer. Adjust.
3377 (get_func_type, check_func_type): Change type of second parameter
3379 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3380 the callback functions instead of passing the address of a local.
3381 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3382 find_separate_debug_file.
3383 (get_alt_debug_link_info_shim): Change type of second parameter to
3384 void pointer. Adjust.
3385 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3386 find_separate_debug_file.
3387 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3388 of second parameter to void pointer. Adjust.
3389 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3390 pointer local to find_separate_debug_file.
3392 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3394 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3395 external symbols with a definition.
3396 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3398 2017-04-07 Alan Modra <amodra@gmail.com>
3400 * po/SRC-POTFILES.in: Regenerate.
3402 2017-04-05 Alan Modra <amodra@gmail.com>
3404 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3407 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3409 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3410 numbers for DataDirectory entry indicies passed to
3413 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3415 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3416 each GNU_MBIND section and align GNU_MBIND section to page size.
3417 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3418 segment for each GNU_MBIND section.
3419 (_bfd_elf_init_private_section_data): Copy sh_info from input
3420 for GNU_MBIND section.
3422 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3424 * elfnn-riscv.c (GP_NAME): Delete.
3425 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3426 (_bfd_riscv_relax_lui): Likewise.
3428 2017-04-04 Nick Clifton <nickc@redhat.com>
3431 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3433 (bfd_elf_final_link): Only initialize the extended symbol index
3434 section if there are extended symbol tables to list.
3436 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3438 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3439 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3440 * configure.ac (elf): Add elf-properties.lo.
3441 * Makefile.in: Regenerated.
3442 * configure: Likewise.
3443 * elf-bfd.h (elf_property_kind): New.
3444 (elf_property): Likewise.
3445 (elf_property_list): Likewise.
3446 (elf_properties): Likewise.
3447 (_bfd_elf_parse_gnu_properties): Likewise.
3448 (_bfd_elf_get_property): Likewise.
3449 (_bfd_elf_link_setup_gnu_properties): Likewise.
3450 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3451 and setup_gnu_properties.
3452 (elf_obj_tdata): Add properties.
3453 * elf-properties.c: New file.
3454 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3455 (elf_i386_merge_gnu_properties): Likewise.
3456 (elf_backend_parse_gnu_properties): Likewise.
3457 (elf_backend_merge_gnu_properties): Likewise.
3458 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3459 (elf_x86_64_merge_gnu_properties): Likewise.
3460 (elf_backend_parse_gnu_properties): Likewise.
3461 (elf_backend_merge_gnu_properties): Likewise.
3462 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3463 (elf_backend_parse_gnu_properties): Likewise.
3464 (elf_backend_setup_gnu_properties): Likewise.
3465 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3466 elf_backend_merge_gnu_properties and
3467 elf_backend_setup_gnu_properties.
3469 2017-03-30 Pip Cet <pipcet@gmail.com>
3471 * elf32-wasm32.c: Add relocation code, two relocs.
3472 * reloc.c: Add wasm32 relocations.
3473 * libbfd.h: Regenerate.
3474 * bfd-in2.h: Regenerate.
3475 * bfd/po/bfd.pot: Regenerate.
3477 2017-03-29 Nick Clifton <nickc@redhat.com>
3480 * coff-bfd.h (struct coff_section_data): Add new fields:
3481 saved_bias and bias.
3482 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3483 computed for PE binaries.
3484 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3487 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3490 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3491 to handle a local symbol with a hash-symbol-entry; without PLT.
3492 Add BFD_ASSERT for an incidental case with GOT entry present.
3493 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3494 isn't forced-or-set local.
3496 2017-03-27 Pip Cet <pipcet@gmail.com>
3498 * wasm-module.c: New file to support WebAssembly modules.
3499 * wasm-module.h: New file to support WebAssembly modules.
3500 * doc/webassembly.texi: Start documenting wasm-module.c.
3501 * config.bfd: Add wasm_vec.
3502 * targets.c: Likewise.
3503 * configure.ac: Likewise.
3504 * Makefile.am: Add entries for wasm-module.c.
3505 * Makefile.in: Regenerate.
3506 * configure: Regenerate.
3507 * po/SRC-POTFILES.in: Regenerate.
3509 2017-03-27 Pip Cet <pipcet@gmail.com>
3511 * cpu-wasm32.c: New file to support wasm32 architecture.
3512 * elf32-wasm32.c: New file to support wasm32 architecture.
3513 * Makefile.am: Add wasm32 architecture.
3514 * archures.c: Likewise.
3515 * config.bfd: Likewise.
3516 * configure.ac: Likewise.
3517 * targets.c: Likewise.
3518 * Makefile.in: Regenerate.
3519 * bfd-in2.h: Regenerate.
3520 * configure: Regenerate.
3521 * po/SRC-POTFILES.in: Regenerate.
3523 2017-03-20 Alan Modra <amodra@gmail.com>
3526 * elf64-ppc.c (compare_symbols): Stabilize sort.
3528 2017-03-18 Alan Modra <amodra@gmail.com>
3530 * elf64-ppc.c (struct ppc_link_hash_table): Add
3531 local_ifunc_resolver and maybe_local_ifunc_resolver.
3532 (ppc_build_one_stub): Set flags on emitting dynamic
3533 relocation to ifunc.
3534 (ppc64_elf_relocate_section): Likewise.
3535 (ppc64_elf_finish_dynamic_symbol): Likewise.
3536 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3537 local dynamic relocs to ifuncs.
3538 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3539 local_ifunc_resolver and maybe_local_ifunc_resolver.
3540 (ppc_elf_relocate_section): Set flag on emitting dynamic
3541 relocation to ifuncs.
3542 (ppc_elf_finish_dynamic_symbol): Likewise.
3543 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3544 dynamic relocs to ifuncs.
3546 2017-03-13 Nick Clifton <nickc@redhat.com>
3549 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3550 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3551 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3552 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3553 * bfd-in2.h: Regenerate.
3554 * libbfd.h: Regenerate.
3555 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3557 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3558 (elfNN_aarch64_howto_table): Likewise.
3559 (aarch64_tls_transition_without_check): Likewise.
3560 (aarch64_reloc_got_type): Likewise.
3561 (elfNN_aarch64_final_link_relocate): Likewise.
3562 (elfNN_aarch64_tls_relax): Likewise.
3563 (elfNN_aarch64_relocate_section): Likewise.
3564 (elfNN_aarch64_gc_sweep_hook): Likewise.
3565 (elfNN_aarch64_check_relocs): Likewise.
3566 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3567 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3569 2017-03-11 Alan Modra <amodra@gmail.com>
3571 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3572 parameter is in fact used. Whitespace fixes.
3573 * elf64-ppc.c: Likewise.
3575 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3577 * rs6000-core.c (CORE_NEW): Simplify macro when
3578 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3580 2017-03-07 Alan Modra <amodra@gmail.com>
3584 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3587 2017-03-05 Alan Modra <amodra@gmail.com>
3589 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3590 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3591 (next_cie_fde_offset): New function.
3592 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3593 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3594 four bytes. Align CIEs to four or eight bytes depending on
3595 per_encoding_aligned8. Align FDEs according to their encoding.
3596 Pad last FDE to output section alignment.
3597 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3599 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3600 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3601 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3603 2017-03-02 Martin Bickel <binutils@ineranves.de>
3606 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3607 empty segments which have a zero filesz, but a non-zero memsz.
3609 2017-03-02 Alan Modra <amodra@gmail.com>
3611 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3613 2017-02-28 Alan Modra <amodra@gmail.com>
3615 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3616 (ppc64_elf_relocate_section): Likewise.
3618 2017-02-28 Alan Modra <amodra@gmail.com>
3621 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3622 rather than elf32_nios2_hash_table or elf_hash_table.
3623 (create_got_section): Likewise.
3624 (nios2_elf32_finish_dynamic_symbol): Likewise.
3625 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3626 (nios2_elf32_size_dynamic_sections): Likewise.
3627 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3628 vars. Use htab equivalents directly instead. Don't create
3629 all dynamic sections on needing just the GOT. Use a goto
3630 rather than a fall-through with reloc test. Ensure
3631 htab->dynobj is set when making dynamic sreloc section.
3632 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3633 equivalent directly instead. Don't segfault on looking for
3634 .dynamic when dynamic sections have not been created. Don't
3635 segfault on .got.plt being discarded.
3636 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3637 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3638 fixme and another not so relevant comment.
3639 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3640 already set, set hash table dynobj on creating .sbss.
3642 2017-02-28 Alan Modra <amodra@gmail.com>
3644 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3645 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3646 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3647 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3648 (ppc64_elf_relocate_section): Likewise.
3649 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3650 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3651 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3652 * libbfd.h: Regenerate.
3653 * bfd-in2.h: Regenerate.
3655 2017-02-28 Alan Modra <amodra@gmail.com>
3657 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3658 dynamic .data.rel.ro read-only.
3659 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3660 rather than section flags when deciding where copy reloc goes.
3661 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3662 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3663 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3664 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3665 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3666 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3667 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3668 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3669 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3670 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3671 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3672 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3673 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3674 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3675 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3676 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3677 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3678 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3679 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3681 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3683 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3684 `jalr $0, $25' instruction encoding.
3686 2017-02-27 Nick Clifton <nickc@redhat.com>
3689 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3690 generating a seg-fault when encountering a symbol that has been
3691 deleted by garbage collection.
3693 2017-02-25 Alan Modra <amodra@gmail.com>
3695 * elf32-arc.c (struct dynamic_sections): Delete.
3696 (enum dyn_section_types): Delete.
3697 (dyn_section_names): Delete.
3698 (arc_create_dynamic_sections): Delete.
3699 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3700 segfault on discarded .rela.plt section.
3701 (elf_arc_size_dynamic_sections): Formatting. Don't call
3702 arc_create_dynamic_sections. Don't allocate memory for sections
3703 handled by the generic linker. Correct code finding relocs in
3704 read-only sections. Set SEC_EXCLUDE on zero size .got,
3705 .got.plt, and .dynbss sections. Do set .interp for pies.
3707 2017-02-24 Andrew Waterman <andrew@sifive.com>
3709 * elfnn-riscv.c (GP_NAME): New macro.
3710 (riscv_global_pointer_value): Use it.
3711 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3712 output section, consider only that section's alignment.
3714 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3716 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3717 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3718 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3719 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3721 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3723 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3724 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3727 2017-02-23 Alan Modra <amodra@gmail.com>
3730 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3732 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3733 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3736 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3739 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3740 processing ahead of the call to `elf_gc_sweep_symbol'.
3742 2017-02-22 Nick Clifton <nickc@redhat.com>
3745 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3746 created section 4-byte alignment.
3748 2017-02-22 Alan Modra <amodra@gmail.com>
3750 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3751 on .got or .plt output section being discarded by script.
3752 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3755 2017-02-21 Alan Modra <amodra@gmail.com>
3757 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3758 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3760 2017-02-20 Alan Modra <amodra@gmail.com>
3763 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3764 if DT_RELSZ/DT_RELASZ is zero.
3766 2017-02-17 Nick Clifton <nickc@redhat.com>
3768 * compress.c (bfd_get_full_section_contents): Remember to reduce
3769 compressed size by the sizeof the compression header when
3770 decompressing the contents.
3772 2017-02-17 Pedro Alves <palves@redhat.com>
3774 * srec.c (Chunk): Rename to ...
3775 (_bfd_srec_len): ... this.
3776 (S3Forced): Rename to ...
3777 (_bfd_srec_forceS3): ... this.
3778 * objcopy.c: Adjust all references.
3780 2017-02-17 Pedro Alves <palves@redhat.com>
3782 * archive.c (bsd_write_armap): Rename to ...
3783 (_bfd_bsd_write_armap): ... this.
3784 (coff_write_armap): Rename to ...
3785 (_bfd_coff_write_armap): ... this.
3786 * libbfd-in.h (bsd_write_armap): Rename to ...
3787 (_bfd_bsd_write_armap): ... this.
3788 (coff_write_armap): Rename to ...
3789 (_bfd_coff_write_armap): ... this.
3790 * aout-target.h, aout-tic30.c: Adjust all users.
3791 * libbfd.h: Regenerate.
3793 2017-02-17 Pedro Alves <palves@redhat.com>
3795 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3796 (warn_deprecated): Rename to ...
3797 (_bfd_warn_deprecated): ... this.
3798 * libbfd.c (warn_deprecated): Rename to ...
3799 (_bfd_warn_deprecated): ... this.
3800 * bfd-in2.h: Regenerate.
3802 2017-02-17 Pedro Alves <palves@redhat.com>
3804 * bfdio.c (real_ftell): Rename to ...
3805 (_bfd_real_ftell): ... this.
3806 (real_fseek): Rename to ...
3807 (_bfd_real_fseek): ... this.
3808 (real_fopen): Rename to ...
3809 (_bfd_real_fopen): ... this.
3810 * libbfd-in.h (real_ftell): Rename to ...
3811 (_bfd_real_ftell): ... this.
3812 (real_fseek): Rename to ...
3813 (_bfd_real_fseek): ... this.
3814 (real_fopen): Rename to ...
3815 (_bfd_real_fopen): ... this.
3816 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3817 * libbfd.h: Regenerate.
3819 2017-02-17 Pedro Alves <palves@redhat.com>
3821 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3822 * libbfd.c (read_unsigned_leb128): Rename to ...
3823 (_bfd_read_unsigned_leb128): ... this.
3824 (read_signed_leb128): Rename to ...
3825 (_bfd_read_signed_leb128): ... this.
3826 (safe_read_leb128): Rename to ...
3827 (_bfd_safe_read_leb128): ... this.
3828 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3829 (_bfd_read_unsigned_leb128): ... this.
3830 (read_signed_leb128): Rename to ...
3831 (_bfd_read_signed_leb128): ... this.
3832 (safe_read_leb128): Rename to ...
3833 (_bfd_safe_read_leb128): ... this.
3834 * libbfd.h: Renegerate.
3836 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3838 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3839 before trying to fine matching file and line information.
3841 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3843 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3844 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3845 not match current bfd, then reload debug information. Record bfd
3846 we're loading debug info for in the stash. If we have debug
3847 informatin in the cache then perform section placement before
3850 2017-02-16 Alan Modra <amodra@gmail.com>
3853 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3854 * elfxx-target.h (elf_backend_no_page_alias): Define.
3855 (elfNN_bed): Init new field.
3856 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3857 ensure PT_LOAD segment starts on a new page.
3858 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3860 2017-02-16 Alan Modra <amodra@gmail.com>
3863 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3866 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3868 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3869 * bfd-in2.h: Regenerated.
3871 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3874 * elf32-i386.c (elf_i386_relocate_section): Allow
3875 "lea foo@GOT, %reg" in PIC.
3877 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3880 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3881 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3882 error against local IFUNC symbol without a base register for
3885 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3887 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3888 `%P: %H:' with `info->callbacks->einfo'.
3889 (ppc_elf_relocate_section): Likewise.
3890 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3891 (ppc64_elf_edit_toc): Likewise.
3892 (ppc64_elf_relocate_section): Likewise.
3894 2017-02-14 Alan Modra <amodra@gmail.com>
3896 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3897 --gc-keep-exported, and test versioned field of sym rather than
3898 looking for @ in name.
3900 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3902 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3905 2017-02-13 Nick Clifton <nickc@redhat.com>
3908 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3911 2017-02-07 Andrew Waterman <andrew@sifive.com>
3913 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3914 entry size if PLT header is written.
3916 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3918 Fix sparc64 dynamic relocation processing to use the dynamic
3920 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3921 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3924 2017-02-03 Nick Clifton <nickc@redhat.com>
3927 * coffcode.h (coff_write_object_contents): Enlarge size of
3928 s_name_buf in order to avoid compile time warning about possible
3930 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3931 32-bits of insn value before printing into buffer.
3933 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3935 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3936 `max_local_dynindx'.
3937 (mips_elf_sort_hash_table): Handle it.
3938 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3939 symbols bump up `max_local_dynindx' rather than
3940 `max_non_got_dynindx'.
3942 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3944 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3945 `min_got_dynindx', `max_unref_got_dynindx' and
3946 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3947 (mips_elf_sort_hash_table): Adjust accordingly.
3949 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3951 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3952 to access the hash table.
3954 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3956 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3957 non-NULL `htab' to the beginning.
3959 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3961 * elflink.c (elf_gc_sweep): Wrap overlong line.
3963 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3965 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3966 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3967 * elfxx-mips.c (mips_elf_link_hash_table): Add
3968 `ignore_branch_isa' member.
3969 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3970 in branch relocation calculation as an error if
3971 `ignore_branch_isa' has been set.
3972 (_bfd_mips_elf_insn32): Rename to...
3973 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3974 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3975 Handle the new parameter.
3977 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3979 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3980 local variable dynobj.
3983 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3984 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3985 executable from read-only sections into sdynrelro.
3986 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3987 dynamic relocs in sdynrelro.
3988 (elf_backend_want_dynrelro): Define.
3990 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3992 * config.bfd (*-*-rtemsaout*): Mark as removed.
3994 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3996 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3997 (arm-*-rtems*): Move to (arm*-*-eabi*).
3998 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3999 (m68-*-rtems*): Move to (m68*-*-elf*).
4001 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4003 * config.bfd (*-*-rtemscoff*): Mark as removed.
4005 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4008 * elflink.c (bfd_elf_record_link_assignment): Revert last
4009 change and don't ever clear `forced_local'. Set `mark'
4011 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4013 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4014 (bfd_elf_size_dynamic_sections): ... here.
4015 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4016 and set `mark' instead in `__tls_get_addr_opt' processing.
4017 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4019 2017-01-24 Alan Modra <amodra@gmail.com>
4021 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4022 where dynamic relocs are preferable. Allow ifunc too.
4023 (ensure_undefweak_dynamic): New function.
4024 (allocate_dynrelocs): Use it here. Move plt handling last and
4025 don't make symbols dynamic, simplifying loop. Only make undef
4026 weak symbols with GOT entries dynamic. Correct condition
4027 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4028 comments. Remove goto.
4029 (ppc_elf_relocate_section): Correct test for using dynamic
4030 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4031 to suit. Set up explicit tls_index entries and implicit GOT
4032 tls_index entries resolvable at link time for
4033 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4034 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4035 (ensure_undefweak_dynamic): New function.
4036 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4037 with GOT entries dynamic. Remove unnecessary test of
4038 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4039 (ppc64_elf_relocate_section): Correct test for using dynamic
4040 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4041 to suit. Set up explicit tls_index entries and implicit GOT
4042 tls_index entries resolvable at link time for __tls_get_addr_opt.
4043 Simplify expression to clear mem for prelink.
4045 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4047 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4049 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4051 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4052 (elf_backend_hash_symbol): Define.
4054 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4057 * elflink.c (bfd_elf_record_link_assignment): Clear any
4058 `forced_local' marking for DSO symbols that are not being
4061 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4063 * elfnn-riscv.c (riscv_elf_object_p): New function.
4065 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4068 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4070 (elf_x86_64_check_relocs): Create .eh_frame section for the
4072 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4073 .eh_frame section for the .plt.bnd section.
4074 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4075 for the .plt.bnd section.
4077 2017-01-12 Nick Clifton <nickc@redhat.com>
4080 * opncls.c (find_separate_debug_file): Add include_dirs
4081 parameter. Only include the directory part of the bfd's filename
4082 in search paths if include_dirs is true. Add a couple of extra
4083 locations for looking for debug files.
4084 ( bfd_follow_gnu_debuglink): Update invocation of
4085 find_separate_debug_file.
4086 (bfd_follow_gnu_debugaltlink): Likewise.
4087 (get_build_id): New function: Finds the build-id of the given bfd.
4088 (get_build_id_name): New function: Computes the name of the
4089 separate debug info file for a bfd, based upon its build-id.
4090 (check_build_id_file): New function: Checks to see if a separate
4091 debug info file exists at the given location, and that its
4092 build-id matches that of the original bfd.
4093 (bfd_follow_build_id_debuglink): New function: Finds a separate
4094 debug info file for a given bfd by using the build-id method.
4095 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4096 method of locating a separate debug info file before using the
4098 * bfd-in2.h: Regenerate.
4100 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4103 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4104 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4105 elf_x86_64_eh_frame_plt_got.
4106 (elf_x86_64_size_dynamic_sections): Get unwind info from
4107 elf_x86_64_bnd_arch_bed for the BND PLT.
4109 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4111 * config.bfd: Add entries for i686-redox and x86_64-redox.
4113 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4115 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4117 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4118 .eh_frame section to 4 bytes for x32.
4119 (elf_x86_64_check_relocs): Likewise.
4121 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4124 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4125 (PLT_GOT_FDE_LENGTH): Likewise.
4126 (elf_i386_plt_layout): Add eh_frame_plt_got and
4127 eh_frame_plt_got_size.
4128 (elf_i386_plt): Updated.
4129 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4130 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4131 (elf_i386_size_dynamic_sections): Allocate and initialize
4132 .eh_frame section for .plt.got.
4133 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4135 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4136 eh_frame_plt_got_size.
4137 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4138 (PLT_GOT_FDE_LENGTH): Likewise.
4139 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4140 eh_frame_plt_got_size.
4141 (elf_x86_64_arch_bed): Updated.
4142 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4143 eh_frame_plt_got_size.
4144 (elf_x86_64_nacl_arch_bed): Likewise.
4145 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4146 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4147 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4148 .eh_frame section for .plt.got.
4149 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4152 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4154 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4155 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4157 2017-01-09 Nick Clifton <nickc@redhat.com>
4159 * dwarf2.c (lookup_address_in_function_table): Return early if
4160 there are no functions in the given comp unit, or if the high
4161 address of the last function in the comp unit is less than the
4164 2017-01-09 Nick Clifton <nickc@redhat.com>
4167 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4168 message if there are too many symbols to load.
4170 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4172 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4173 if relocs are cached.
4175 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4178 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4179 for R_MICROBLAZE_GOTOFF_64.
4181 2017-01-03 Nick Clifton <nickc@redhat.com>
4183 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4184 warning about using a possibly uninitialised variable.
4186 2017-01-02 Alan Modra <amodra@gmail.com>
4188 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4189 (allocate_plt_static, allocate_dynrelocs): Use it.
4191 2017-01-02 Alan Modra <amodra@gmail.com>
4193 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4194 .PARISC.unwind section.
4196 2017-01-02 Alan Modra <amodra@gmail.com>
4199 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4200 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4201 indirect to GOT pointer relative code edit.
4203 2017-01-02 Alan Modra <amodra@gmail.com>
4205 Update year range in copyright notice of all files.
4207 For older changes see ChangeLog-2016
4209 Copyright (C) 2017 Free Software Foundation, Inc.
4211 Copying and distribution of this file, with or without modification,
4212 are permitted in any medium without royalty provided the copyright
4213 notice and this notice are preserved.
4219 version-control: never