1 2017-10-05 Alan Modra <amodra@gmail.com>
4 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
6 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
8 (elf_fake_sections): Adjust calls. Exit immediately on failure.
9 (bfd_elf_set_group_contents): Add associated reloc section indices
12 2017-10-04 Alan Modra <amodra@gmail.com>
14 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
15 classify symbols for ELFv2.
17 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
20 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
21 undergoes default promotion.
22 * bfd-in2.h: Regenerate.
24 2017-10-02 Alan Modra <amodra@gmail.com>
26 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
27 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
29 2017-10-01 Alan Modra <amodra@gmail.com>
32 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
33 (add_line_info): Always put end_sequence last.
35 2017-10-01 Alan Modra <amodra@gmail.com>
38 * dwarf2.c (read_section): Allocate buffer with extra byte for
39 bfd_simple_get_relocated_section_contents rather than copying
42 2017-09-29 Alan Modra <amodra@gmail.com>
44 * merge.c (merge_strings): Return FALSE on malloc failure.
45 (_bfd_merge_sections): Return failures from record_section and
48 2017-09-28 Alan Modra <amodra@gmail.com>
51 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
52 a case where plugin_notice isn't called.
54 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
56 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
59 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
62 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
63 output_bfd to info->callbacks->minfo.
65 2017-09-26 Nick Clifton <nickc@redhat.com>
68 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
69 assertion failure if elf_x86_64_rtype_to_howto has already issued
72 2017-09-26 Alan Modra <amodra@gmail.com>
75 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
78 2017-09-26 Nick Clifton <nickc@redhat.com>
81 * dwarf2.c (read_formatted_entries): Fail early if we know that
82 the loop parsing data entries will overflow the end of the
85 2017-09-26 Alan Modra <amodra@gmail.com>
88 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
89 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
90 to stash->info_ptr_memory, and check die_ref is within that memory.
91 Set info_ptr_end correctly when another CU is refd. Check die_ref
92 for DW_FORM_ref4 etc. is within CU.
94 2017-09-26 Alan Modra <amodra@gmail.com>
97 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
98 (read_formatted_entries): Init "fe".
99 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
101 2017-09-26 Alan Modra <amodra@gmail.com>
104 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
105 bounds in inner loop.
107 2017-09-25 Alan Modra <amodra@gmail.com>
110 * dwarf1.c (parse_die): Sanity check pointer against section limit
111 before dereferencing.
112 (parse_line_table): Likewise.
114 2017-09-25 Alan Modra <amodra@gmail.com>
117 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
119 (parse_comp_unit): Likewise.
121 2017-09-25 Alan Modra <amodra@gmail.com>
124 * dwarf2.c (read_formatted_entries): Error on format_count zero.
126 2017-09-24 Alan Modra <amodra@gmail.com>
129 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
130 within section bounds.
132 2017-09-24 Alan Modra <amodra@gmail.com>
135 * dwarf2.c (decode_line_info): Properly free line sequences on error.
137 2017-09-24 Alan Modra <amodra@gmail.com>
140 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
141 pname param. Return status. Make name const. Don't abort,
142 return an error. Formatting. Exit if current info_ptr matches
143 orig_info_ptr. Update callers.
144 (scan_unit_for_symbols): Start at nesting_level of zero. Make
145 nested_funcs an array of structs for extensibility. Formatting.
147 2017-09-24 Alan Modra <amodra@gmail.com>
150 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
151 rather than dividing by zero.
153 2017-09-24 Alan Modra <amodra@gmail.com>
156 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
158 2017-09-24 Alan Modra <amodra@gmail.com>
161 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
163 2017-09-24 Alan Modra <amodra@gmail.com>
166 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
167 SHT_GNU_verneed section for sanity. Don't zalloc memory for
170 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
173 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
176 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
179 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
180 -1 if bfd_canonicalize_dynamic_reloc returns 0.
182 2017-09-22 Pedro Alves <palves@redhat.com>
183 Alan Modra <amodra@gmail.com>
185 * version.h: Add comment.
187 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
189 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
190 NT_S390_GS_BC, correct the previously swapped invocations of
191 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
193 2017-09-19 Alan Modra <amodra@gmail.com>
196 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
199 2017-09-19 Alan Modra <amodra@gmail.com>
202 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
203 symbols before calculating verrefs. Don't renumber dynsyms
204 after gc. Exclude .gnu.version when zero or one dynsym.
205 Localize some vars and reindent.
207 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
210 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
211 return from bfd_canonicalize_dynamic_reloc.
213 2017-09-15 Alan Modra <amodra@gmail.com>
216 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
217 overflows bfd_size_type.
219 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
222 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
223 to indicate if conversion is performed.
224 (elf_i386_check_relocs): Cache section contents and relocations
225 if conversion is performed.
226 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
227 contents and relocations if conversion is performed.
229 2017-09-14 Nick Clifton <nickc@redhat.com>
232 * peXXigen.c (pe_print_idata): Extend check for HintName vector
235 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
237 * elfxx-x86.h: Fix a typo in comments.
239 2017-09-09 Kamil Rytarowski <n54@gmx.com>
241 * elf32-nds32.c: Rename __BIT() to N32_BIT().
243 2017-09-09 Alan Modra <amodra@gmail.com>
245 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
248 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
250 * elf32-i386.c (elf_i386_relocate_section): Update usage of
251 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
252 (elf_i386_finish_dynamic_symbol): Likewise.
253 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
254 (elf_x86_64_finish_dynamic_symbol): Likewise.
255 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
256 (_bfd_x86_elf_fixup_symbol): Likewise.
258 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
260 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
261 check has_non_got_reloc.
263 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
266 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
267 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
268 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
269 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
270 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
271 and linker_def on __ehdr_start if it is referenced and not
273 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
274 and return TRUE when building executable, if a symbol has
275 non-GOT/non-PLT relocations in text section or there is no
277 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
279 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
281 * elfxx-x86.h: Update comments.
283 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
285 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
286 elf_x86_plt_layout_table with elf_x86_init_table.
287 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
289 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
291 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
292 (elf_x86_init_table): This.
293 (_bfd_x86_elf_link_setup_gnu_properties): Replace
294 elf_x86_plt_layout_table with elf_x86_init_table.
296 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
298 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
299 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
300 * configure: Regenerated.
301 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
302 and r_sym fields of plt_layout.
303 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
305 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
306 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
307 r_info nor r_sym fields.
308 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
310 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
312 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
314 * (_bfd_riscv_relax_align): Call bfd_set_error and
315 print an error message when unable to relax a .align directive.
317 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
319 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
320 (riscv_record_pcrel_hi_reloc): Add absolute argument.
321 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
322 R_RISCV_PCREL_HI20 relocs, and pass the result to
323 riscv_record_pcrel_hi_reloc.
325 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
327 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
328 r_type_p. Remove the converted argument. Replace
329 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
330 the new relocation type via r_type_p.
331 (elf_i386_relocate_section): Likewise.
332 (elf_i386_finish_dynamic_symbol): Likewise.
333 (need_convert_load): Removed.
334 (check_relocs_failed): Updated.
335 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
336 instead of setting need_convert_load.
337 (_bfd_i386_elf_convert_load): Removed.
338 * elf64-x86-64.c (need_convert_load): Removed.
339 (check_relocs_failed): Updated.
340 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
341 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
342 Return the new relocation type via r_type_p.
343 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
344 instead of setting need_convert_load.
345 (elf_x86_64_check_relocs): Don't check PIC if relocation has
347 (_bfd_x86_64_elf_convert_load): Removed.
348 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
349 with SYMBOL_REFERENCES_LOCAL_P.
350 (elf_x86_64_finish_dynamic_symbol): Likewise.
351 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
353 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
354 (_bfd_x86_elf_link_symbol_references_local): New function.
355 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
356 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
357 SYMBOL_REFERENCES_LOCAL_P.
358 (elf_x86_link_hash_entry): Add local_ref.
359 (elf_x86_link_hash_table): Remove convert_load.
360 (_bfd_i386_elf_convert_load): Removed.
361 (_bfd_x86_64_elf_convert_load): Likewise.
362 (_bfd_x86_elf_link_symbol_references_local): New.
364 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
366 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
367 (elf_x86_64_info_to_howto): Get the real relocation type by
368 masking out R_X86_64_converted_reloc_bit.
369 (elf_x86_64_check_tls_transition): Get the real relocation type
370 by masking out R_X86_64_converted_reloc_bit.
371 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
372 instead of setting converted_reloc.
373 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
374 instead of converted_reloc. Get the real relocation type by
375 masking out R_X86_64_converted_reloc_bit.
376 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
377 R_X86_64_converted_reloc_bit is valid.
378 * elfxx-x86.h (converted_reloc): Removed.
380 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
382 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
383 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
384 to get the relocation type again.
385 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
386 r_type when calling elf_x86_64_tls_transition. Don't use
387 ELF32_R_TYPE to get the relocation type again.
389 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
391 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
394 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
396 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
397 argument. Don't check relocation overflow. Avoid relocation
398 overflow if --no-relax is used. Set converted_reloc on symbol
399 if a GOTPCREL relocation is converted.
400 (elf_x86_64_relocate_section): Issue a fatal error and suggest
401 --no-relax if GOTPCREL relocation conversion leads to relocation
403 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
405 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
406 Edmar Wienskoski <edmar.wienskoski@nxp.com
408 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
409 (ppc_elf_check_relocs): Handle it.
410 (ppc_elf_vle_split20): New function.
411 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
413 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
416 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
417 for x86-64 if GOT_TLS_GDESC_P is true.
419 2017-09-03 Alan Modra <amodra@gmail.com>
422 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
424 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
426 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
427 tls_get_addr for x86-64 in one place.
429 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
431 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
432 with elfxx-x86.lo for 64-bit BFD.
433 * configure: Regenerated.
435 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
437 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
438 (_bfd_i386_elf_convert_load): This. Remove static.
439 (elf_i386_size_dynamic_sections): Removed.
440 (elf_backend_size_dynamic_sections): Likewise.
441 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
442 (_bfd_x86_64_elf_convert_load): This. Remove static.
443 (elf_x86_64_size_dynamic_sections): Removed.
444 (elf_backend_size_dynamic_sections): Likewise.
445 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
446 (elf_x86_allocate_dynrelocs): This. Make it static.
447 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
448 (elf_x86_allocate_local_dynreloc): This. Make it static.
449 (elf_i386_is_reloc_section): New function.
450 (elf_x86_64_is_reloc_section): Likewise.
451 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
452 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
453 Rearrange got_entry_size initialization.
454 (_bfd_x86_elf_size_dynamic_sections): New function.
455 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
456 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
457 (_bfd_i386_elf_convert_load): New.
458 (_bfd_x86_64_elf_convert_load): Likewise.
459 (_bfd_x86_elf_size_dynamic_sections): Likewise.
460 (elf_backend_size_dynamic_sections): Likewise.
461 (_bfd_x86_elf_allocate_dynrelocs): Removed.
462 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
464 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
466 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
469 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
471 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
472 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
474 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
476 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
477 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
478 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
479 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
480 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
481 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
483 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
485 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
486 (elf_i386_allocate_local_dynrelocs): Likewise.
487 (elf_i386_size_dynamic_sections): Replace
488 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
489 with _bfd_x86_elf_allocate_dynrelocs and
490 _bfd_x86_elf_allocate_local_dynrelocs.
491 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
492 (elf_x86_64_allocate_local_dynrelocs): Likewise.
493 (elf_x86_64_size_dynamic_sections): Replace
494 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
495 with _bfd_x86_elf_allocate_dynrelocs and
496 _bfd_x86_elf_allocate_local_dynrelocs.
497 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
498 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
499 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
500 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
502 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
504 * elf32-i386.c (is_i386_elf): Removed.
505 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
506 (elf_i386_size_dynamic_sections): Likewise.
507 (elf_i386_relocate_section): Likewise.
508 * elf64-x86-64.c (is_x86_64_elf): Removed.
509 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
511 (elf_x86_64_size_dynamic_sections): Likewise.
512 (elf_x86_64_relocate_section): Likewise.
513 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
515 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
518 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
520 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
521 (elf_i386_allocate_dynrelocs): Replace
522 elf_i386_compute_jump_table_size with
523 elf_x86_compute_jump_table_size.
524 (elf_i386_size_dynamic_sections): Likewise.
525 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
526 (elf_x86_64_allocate_dynrelocs): Replace
527 elf_x86_64_compute_jump_table_size with
528 elf_x86_compute_jump_table_size.
529 (elf_x86_64_size_dynamic_sections): Likewise.
530 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
532 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
533 (elf_x86_compute_jump_table_size): New.
535 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
537 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
539 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
540 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
542 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
544 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
545 with htab->is_vxworks.
546 (elf_i386_size_dynamic_sections): Likewise.
547 (elf_i386_relocate_section): Likewise.
548 (elf_i386_finish_dynamic_symbol): Likewise.
549 (elf_i386_finish_dynamic_sections): Likewise.
551 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
553 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
554 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
555 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
556 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
557 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
558 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
559 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
560 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
562 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
565 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
566 ELF_COMMON_DEF_P for common symbols.
568 2017-09-02 Alan Modra <amodra@gmail.com>
570 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
571 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
572 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
574 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
576 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
577 (elf_backend_gc_mark_hook): Likewise.
578 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
579 (elf_backend_gc_mark_hook): Likewise.
580 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
581 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
582 (elf_backend_gc_mark_hook): Likewise.
584 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
586 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
587 (elf_backend_adjust_dynamic_symbol): Likewise.
588 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
589 (elf_backend_adjust_dynamic_symbol): Likewise.
590 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
591 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
592 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
593 (_bfd_x86_elf_adjust_dynamic_symbol): New.
594 (elf_backend_adjust_dynamic_symbol): Likewise.
596 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
598 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
601 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
603 * elf32-i386.c (elf_i386_mkobject): Removed.
604 (bfd_elf32_mkobject): Likewise.
605 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
606 (bfd_elf64_mkobject): Likewise.
607 (bfd_elf32_mkobject): Likewise.
608 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
609 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
610 (bfd_elf64_mkobject): Likewise.
611 (bfd_elf32_mkobject): Likewise.
613 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
615 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
616 Call _bfd_x86_elf_link_setup_gnu_properties.
617 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
618 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
620 (elf_x86_64_non_lazy_plt): Likewise.
621 (elf_x86_64_lazy_bnd_plt): Likewise.
622 (elf_x86_64_non_lazy_bnd_plt): Likewise.
623 (elf_x86_64_lazy_ibt_plt): Likewise.
624 (elf_x32_lazy_ibt_plt): Likewise.
625 (elf_x86_64_non_lazy_ibt_plt): Likewise.
626 (elf_x32_non_lazy_ibt_plt): Likewise.
627 (elf_x86_64_nacl_plt): Likewise.
628 (elf_x86_64_link_setup_gnu_properties): Updated. Call
629 _bfd_x86_elf_link_setup_gnu_properties.
630 * elfxx-x86.c: Include elf-vxworks.h".
631 (_bfd_x86_elf_link_setup_gnu_properties): New function.
632 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
633 comments for pic_plt0_entry and pic_plt_entry.
634 (elf_x86_non_lazy_plt_layout): Likewise.
635 (elf_x86_plt_layout_table): New.
636 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
638 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
641 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
642 .eh_frame section for the second PLT.
643 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
644 alignment of .eh_frame section for the second PLT.
646 2017-09-01 Nick Clifton <nickc@redhat.com>
649 * dwarf2.c (decode_line_info): Fix test for an overlong line info
652 2017-09-01 Nick Clifton <nickc@redhat.com>
655 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
656 attribute buffer is NUL terminated.
658 2017-08-31 Nick Clifton <nickc@redhat.com>
661 * dwarf2.c (read_section): If necessary add a terminating NUL byte
662 to dwarf string sections.
664 2017-08-31 Alan Modra <amodra@gmail.com>
666 * po/SRC-POTFILES.in: Regenerate.
668 2017-08-31 Alan Modra <amodra@gmail.com>
670 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
671 for a section containing just a terminator. Allow multiple
672 terminators at end of section.
673 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
674 sections when not adding alignment. Assert on terminator in
677 2017-08-31 Alan Modra <amodra@gmail.com>
681 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
684 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
686 * configure.ac (bfd_backends): Add elf64.lo together with
687 elfxx-x86.lo for 64-bit BFD.
688 * configure: Regenerated.
690 2017-08-31 James Bowman <james.bowman@ftdichip.com>
692 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
695 2017-08-31 Alan Modra <amodra@gmail.com>
698 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
699 before _close_and_cleanup. Call iovec->bclose after.
700 (bfd_close): Remove code common to, and call, bfd_close_all_done.
702 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
704 * elf32-i386.c (elf_i386_plt_type): Removed.
705 (elf_i386_plt): Likewise.
706 (elf_i386_get_synthetic_symtab): Updated. Call
707 _bfd_x86_elf_get_synthetic_symtab.
708 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
709 (elf_x86_64_plt): Likewise.
710 (elf_x86_64_get_synthetic_symtab): Updated. Call
711 _bfd_x86_elf_get_synthetic_symtab.
712 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
713 (elf_x86_64_get_plt_got_vma): Likewise.
714 (elf_i386_valid_plt_reloc_p): Likewise.
715 (elf_x86_64_valid_plt_reloc_p): Likewise.
716 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
717 * elfxx-x86.h (elf_x86_plt_type): New.
718 (elf_x86_plt): Likewise.
719 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
721 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
723 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
724 target_id instead of elf_machine_code.
726 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
728 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
729 (elf_i386_lazy_plt_layout): Likewise.
730 (elf_i386_non_lazy_plt_layout): Likewise.
731 (elf_i386_plt_layout): Likewise.
732 (elf_i386_link_hash_table): Likewise.
733 (elf_i386_next_tls_desc_index): Likewise.
734 (elf_i386_srelplt2): Likewise.
735 (elf_i386_plt): Likewise.
736 (elf_i386_lazy_plt): Likewise.
737 (elf_i386_non_lazy_plt): Likewise.
738 (elf_i386_link_hash_table_create): Likewise.
739 (bfd_elf32_bfd_link_hash_table_create): Likewise.
740 (elf_i386_lazy_plt): Updated.
741 (elf_i386_non_lazy_plt): Likewise.
742 (elf_i386_lazy_ibt_plt): Likewise.
743 (elf_i386_non_lazy_ibt_plt): Likewise.
744 (elf_i386_allocate_dynrelocs): Likewise.
745 (elf_i386_size_dynamic_sections): Likewise.
746 (elf_i386_relocate_section): Likewise.
747 (elf_i386_finish_dynamic_symbol): Likewise.
748 (elf_i386_finish_dynamic_sections): Likewise.
749 (elf_i386_get_synthetic_symtab): Likewise.
750 (elf_i386_link_setup_gnu_properties): Likewise.
751 (elf_i386_nacl_plt): Likewise.
752 * elf64-x86-64.c (ABI_64_P): Removed.
753 (ELF64_DYNAMIC_INTERPRETER): Likewise.
754 (ELF32_DYNAMIC_INTERPRETER): Likewise.
755 (elf_x86_64_lazy_plt_layout): Likewise.
756 (elf_x86_64_non_lazy_plt_layout): Likewise.
757 (elf_x86_64_plt_layout): Likewise.
758 (elf_x86_64_link_hash_table): Likewise.
759 (elf_x86_64_plt): Likewise.
760 (elf_x86_64_lazy_plt): Likewise.
761 (elf_x86_64_non_lazy_plt): Likewise.
762 (elf_x86_64_link_hash_table_create): Likewise.
763 (bfd_elf64_bfd_link_hash_table_create): Likewise.
764 (bfd_elf32_bfd_link_hash_table_create): Likewise.
765 (elf_x86_64_lazy_plt): Updated.
766 (elf_x86_64_non_lazy_plt): Likewise.
767 (elf_x86_64_lazy_bnd_plt): Likewise.
768 (elf_x86_64_non_lazy_bnd_plt): Likewise.
769 (elf_x86_64_lazy_ibt_plt): Likewise.
770 (elf_x32_lazy_ibt_plt): Likewise.
771 (elf_x86_64_non_lazy_ibt_plt): Likewise.
772 (elf_x32_non_lazy_ibt_plt): Likewise.
773 (elf_x86_64_allocate_dynrelocs): Likewise.
774 (elf_x86_64_size_dynamic_sections): Likewise.
775 (elf_x86_64_relocate_section): Likewise.
776 (elf_x86_64_finish_dynamic_symbol): Likewise.
777 (elf_x86_64_finish_dynamic_sections): Likewise.
778 (elf_x86_64_get_synthetic_symtab): Likewise.
779 (elf_x86_64_link_setup_gnu_properties): Likewise.
780 (elf_x86_64_nacl_plt): Likewise.
781 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
783 (ELF32_DYNAMIC_INTERPRETER): New.
784 (ELF64_DYNAMIC_INTERPRETER): Likewise.
785 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
786 (_bfd_x86_elf_link_hash_table_create): Likewise.
787 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
788 (elf_x86_link_hash_table_free): This. Make it static.
789 * elfxx-x86.h: Don't include "objalloc.h".
791 (elf_x86_lazy_plt_layout): Likewise.
792 (elf_x86_non_lazy_plt_layout): Likewise.
793 (elf_x86_plt_layout): Likewise.
794 (_bfd_x86_elf_link_hash_table_create): Likewise.
795 (bfd_elf64_bfd_link_hash_table_create): Likewise.
796 (bfd_elf32_bfd_link_hash_table_create): Likewise.
797 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
798 srelplt2 and next_tls_desc_index.
799 (_bfd_x86_elf_link_hash_table_free): Removed.
801 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
803 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
804 branch offset interpretation.
806 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
809 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
811 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
813 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
814 (elf_x86_64_srelplt2): Likewise.
816 2017-08-30 Alan Modra <amodra@gmail.com>
818 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
819 (ppc64_elf_tls_optimize): Set it.
820 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
821 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
822 addis would add zero.
823 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
824 (ppc_elf_tls_optimize): Set it.
825 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
826 insn on TPREL16_LO relocs to use r2 when addis would add zero.
828 2017-08-30 Alan Modra <amodra@gmail.com>
830 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
831 __tls_get_addr call sequences to LE, don't move the addi down
832 to the nop. Replace the bl with addi and leave the nop alone.
834 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
836 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
838 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
840 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
842 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
844 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
845 (BFD64_BACKENDS): Likewise.
846 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
847 (BFD64_BACKENDS_CFILES): Likewise.
848 * Makefile.in: Regenerated.
849 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
850 elf32-i386.lo and elf64-x86-64.lo.
851 * configure: Regenerated.
852 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
853 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
854 "objalloc.h" and "hashtab.h".
855 (ELIMINATE_COPY_RELOCS): Removed.
856 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
857 (SYMBOL_NO_COPYRELOC): Likewise.
858 (elf_i386_link_hash_entry): Likewise.
859 (GOT_UNKNOWN): Likewise.
860 (GOT_NORMAL): Likewise.
861 (GOT_TLS_GD): Likewise.
862 (elf_i386_hash_entry): Likewise.
863 (elf_i386_obj_tdata): Likewise.
864 (elf_i386_tdata): Likewise.
865 (elf_i386_local_got_tls_type): Likewise.
866 (elf_i386_local_tlsdesc_gotent): Likewise.
867 (elf_i386_hash_table): Likewise.
868 (elf_i386_link_hash_newfunc): Likewise.
869 (elf_i386_local_htab_hash): Likewise.
870 (elf_i386_local_htab_eq): Likewise.
871 (elf_i386_get_local_sym_hash): Likewise.
872 (elf_i386_link_hash_table_free): Likewise.
873 (elf_i386_copy_indirect_symbol): Likewise.
874 (elf_i386_fixup_symbol): Likewise.
875 (elf_i386_readonly_dynrelocs): Likewise.
876 (elf_i386_always_size_sections): Likewise.
877 (elf_i386_set_tls_module_base): Likewise.
878 (elf_i386_dtpoff_base): Likewise.
879 (compare_relocs): Likewise.
880 (elf_i386_hash_symbol): Likewise.
881 (elf_i386_parse_gnu_properties): Likewise.
882 (elf_i386_merge_gnu_properties): Likewise.
883 (elf_i386_link_check_relocs): Likewise.
884 (elf_i386_merge_symbol_attribute): Likewise.
885 (bfd_elf32_bfd_link_check_relocs): Likewise.
886 (elf_backend_copy_indirect_symbol): Likewise.
887 (elf_backend_always_size_sections): Likewise.
888 (elf_backend_omit_section_dynsym): Likewise.
889 (elf_backend_hash_symbol): Likewise.
890 (elf_backend_fixup_symbol): Likewise.
891 (elf_backend_parse_gnu_properties): Likewise.
892 (elf_backend_merge_gnu_properties): Likewise.
893 (elf_backend_merge_symbol_attribute): Likewise.
894 (elf_i386_mkobject): Updated.
895 (elf_i386_link_hash_table_create): Likewise.
896 (elf_i386_check_tls_transition): Likewise.
897 (elf_i386_tls_transition): Likewise.
898 (elf_i386_convert_load_reloc): Likewise.
899 (elf_i386_check_relocs): Likewise.
900 (elf_i386_adjust_dynamic_symbol): Likewise.
901 (elf_i386_allocate_dynrelocs): Likewise.
902 (elf_i386_convert_load): Likewise.
903 (elf_i386_size_dynamic_sections): Likewise.
904 (elf_i386_relocate_section): Likewise.
905 (elf_i386_finish_dynamic_symbol ): Likewise.
906 (elf_i386_finish_dynamic_sections): Likewise.
907 (elf_i386_output_arch_local_syms): Likewise.
908 (elf_i386_get_synthetic_symtab): Likewise.
909 (elf_i386_link_setup_gnu_properties): Likewise.
910 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
911 of elf_link_hash_table, as base.
912 (elf_i386_next_tls_desc_index): New.
913 (elf_i386_srelplt2): Likewise.
914 (elf_i386_plt): Likewise.
915 (elf_i386_lazy_plt): Likewise.
916 (elf_i386_non_lazy_plt): Likewise.
917 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
918 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
919 "objalloc.h" and "hashtab.h".
920 (ELIMINATE_COPY_RELOCS): Removed.
921 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
922 (SYMBOL_NO_COPYRELOC): Likewise.
923 (elf_x86_64_link_hash_entry): Likewise.
924 (GOT_UNKNOWN): Likewise.
925 (GOT_NORMAL): Likewise.
926 (GOT_TLS_GD): Likewise.
927 (elf_x86_64_hash_entry): Likewise.
928 (elf_x86_64_obj_tdata): Likewise.
929 (elf_x86_64_tdata): Likewise.
930 (elf_x86_64_local_got_tls_type): Likewise.
931 (elf_x86_64_local_tlsdesc_gotent): Likewise.
932 (elf_x86_64_hash_table): Likewise.
933 (elf_x86_64_link_hash_newfunc): Likewise.
934 (elf_x86_64_local_htab_hash): Likewise.
935 (elf_x86_64_local_htab_eq): Likewise.
936 (elf_x86_64_get_local_sym_hash): Likewise.
937 (elf_x86_64_link_hash_table_free): Likewise.
938 (elf_x86_64_copy_indirect_symbol): Likewise.
939 (elf_x86_64_fixup_symbol): Likewise.
940 (elf_x86_64_readonly_dynrelocs): Likewise.
941 (elf_x86_64_always_size_sections): Likewise.
942 (elf_x86_64_set_tls_module_base): Likewise.
943 (elf_x86_64_dtpoff_base): Likewise.
944 (compare_relocs): Likewise.
945 (elf_x86_64_merge_symbol_attribute): Likewise.
946 (elf_x86_64_hash_symbol): Likewise.
947 (elf_x86_64_parse_gnu_properties): Likewise.
948 (elf_x86_64_merge_gnu_properties): Likewise.
949 (elf_x86_64_link_check_relocs): Likewise.
950 (elf_backend_copy_indirect_symbol): Likewise.
951 (elf_backend_always_size_sections): Likewise.
952 (bfd_elf64_bfd_link_check_relocs): Likewise.
953 (elf_backend_merge_symbol_attribute): Likewise.
954 (elf_backend_hash_symbol): Likewise.
955 (elf_backend_omit_section_dynsym): Likewise.
956 (elf_backend_fixup_symbol): Likewise.
957 (elf_backend_parse_gnu_properties): Likewise.
958 (elf_backend_merge_gnu_properties): Likewise.
959 (bfd_elf32_bfd_link_check_relocs): Likewise.
960 (elf_x86_64_mkobject): Updated.
961 (elf_x86_64_link_hash_table_create): Likewise.
962 (elf_x86_64_check_tls_transition): Likewise.
963 (elf_x86_64_tls_transition): Likewise.
964 (elf_x86_64_convert_load_reloc): Likewise.
965 (elf_x86_64_check_relocs): Likewise.
966 (elf_x86_64_adjust_dynamic_symbol): Likewise.
967 (elf_x86_64_allocate_dynrelocs): Likewise.
968 (elf_x86_64_convert_load): Likewise.
969 (elf_x86_64_size_dynamic_sections): Likewise.
970 (elf_x86_64_relocate_section): Likewise.
971 (elf_x86_64_finish_dynamic_symbol ): Likewise.
972 (elf_x86_64_finish_dynamic_sections): Likewise.
973 (elf_x86_64_output_arch_local_syms): Likewise.
974 (elf_x86_64_get_synthetic_symtab): Likewise.
975 (elf_x86_64_link_setup_gnu_properties): Likewise.
976 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
977 instead of elf_link_hash_table, as base.
978 (elf_x86_64_next_tls_desc_index): New.
979 (elf_x86_64_srelplt2): Likewise.
980 (elf_x86_64_plt): Likewise.
981 (elf_x86_64_lazy_plt): Likewise.
982 (elf_x86_64_non_lazy_plt): Likewise.
983 * elfxx-x86.c: New file.
984 * elfxx-x86.h: Likewise.
986 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
988 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
990 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
992 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
994 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
995 sections before checking dynamic relocations and free invalid
996 PLT section contents.
997 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
999 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1001 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1002 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1004 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1007 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1009 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1011 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1013 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1015 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1017 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1020 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1021 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1022 Add a has_no_copy_on_protected bitfield.
1023 (elf_has_no_copy_on_protected): New.
1024 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1025 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1026 (elf_merge_gnu_property_list): Likewise.
1027 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1028 to FALSE for elf_has_no_copy_on_protected.
1029 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1030 (elf_i386_link_hash_entry): Add def_protected.
1031 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1032 when checking info->nocopyreloc.
1033 (elf_i386_link_setup_gnu_properties): Don't set
1034 extern_protected_data here.
1035 (elf_i386_merge_symbol_attribute): New function.
1036 (elf_backend_merge_symbol_attribute): New.
1037 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1038 (elf_x86_64_link_hash_entry): Add def_protected.
1039 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1040 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1041 when checking info->nocopyreloc.
1042 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1043 relocation run-time overflow and unresolvable R_X86_64_32S
1044 relocation against protected data symbol defined in shared object
1045 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1046 (elf_x86_64_link_setup_gnu_properties): Don't set
1047 extern_protected_data here.
1048 (elf_x86_64_merge_symbol_attribute): New function.
1049 (elf_backend_merge_symbol_attribute): New.
1051 2017-08-26 Alan Modra <amodra@gmail.com>
1053 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1054 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1055 (ppc_elf_relocate_section): Comment fix.
1056 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1057 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1058 Support dynamic relocs for TPREL16 when non-pic too.
1059 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1060 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1063 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1065 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1066 "symbol" in comments.
1067 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1069 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1072 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1073 R_X86_64_PC32 relocation run-time overflow and unresolvable
1074 R_X86_64_32S relocation with -z nocopyreloc.
1076 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1078 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1079 Undefined symbols may not have a type.
1080 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1082 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1084 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1085 bfd_link_info. Report shared, PIE or PDE object based on
1087 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1088 (elf_x86_64_relocate_section): Likewise.
1090 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1092 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1093 for function symbols.
1094 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1096 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1098 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1099 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1100 is set on any input relocatable file.
1101 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1103 2017-08-23 Alan Modra <amodra@gmail.com>
1106 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1107 ensure_undefweak_dynamic. Handle undefined too.
1108 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1109 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1110 (allocate_dynrelocs): Discard undefined non-default visibility
1111 relocs first. Make undefined syms dynamic. Tidy goto.
1113 2017-08-21 Alan Modra <amodra@gmail.com>
1114 H.J. Lu <hongjiu.lu@intel.com>
1117 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1118 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1120 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1123 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1124 undefined weak symbols.
1126 2017-08-18 Nick Clifton <nickc@redhat.com>
1129 * tekhex.c (getsym): Fix check for source pointer walking off the
1130 end of the input buffer.
1132 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1135 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1136 relocations in debug sections, change abort to _bfd_error_handler.
1138 2017-08-14 Nick Clifton <nickc@redhat.com>
1141 * elf.c (setup_group): Check for an empty or very small group
1143 * po/bfd.pot: Regenerate.
1145 2017-08-14 Alan Modra <amodra@gmail.com>
1148 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1149 alignment padding here.
1150 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1151 in a reverse pass over sections.
1153 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1156 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1157 for @plt suffixes first.
1158 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1160 2017-08-08 Nick Clifton <nickc@redhat.com>
1163 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1164 small section lengths.
1165 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1167 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1168 there is enough data present in the note.
1170 2017-08-08 Alan Modra <amodra@gmail.com>
1173 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1174 got.refcount for GOTOFF relocs, just create .got section.
1176 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1178 * elflink.c (elf_link_add_object_symbols): Move common symbol
1179 check after bed->common_definition.
1181 2017-08-07 Alan Modra <amodra@gmail.com>
1184 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1185 needed to define various dynamic tags have been discarded.
1187 2017-08-07 Nick Clifton <nickc@redhat.com>
1190 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1191 has not been set then use the bfd returned by
1192 _bfd_elf_link_setup_gnu_properties. If that is null then search
1193 through all the input bfds selecting the first normal, ELF format
1195 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1197 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1199 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1201 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1202 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1203 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1204 (elf_i386_link_check_relocs): New function.
1205 (bfd_elf32_bfd_link_check_relocs): New.
1206 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1208 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1209 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1210 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1211 (elf_x86_64_link_check_relocs): New function.
1212 (bfd_elf64_bfd_link_check_relocs): New.
1213 (bfd_elf32_bfd_link_check_relocs): Likewise.
1215 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1218 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1219 as undefined for --no-define-common.
1221 2017-08-05 Alan Modra <amodra@gmail.com>
1223 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1224 hppa_link_hash_table.
1226 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1228 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1229 entries for sysregs with negative indices.
1231 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1233 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1234 isn't the S/390 specific elf data.
1235 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1237 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1239 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1240 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1241 [R_RISCV_ADD16]: Likewise.
1242 [R_RISCV_ADD32]: Likewise.
1243 [R_RISCV_ADD64]: Likewise.
1244 [R_RISCV_SUB6]: Likewise.
1245 [R_RISCV_SUB8]: Likewise.
1246 [R_RISCV_SUB16]: Likewise.
1247 [R_RISCV_SUB32]: Likewise.
1248 [R_RISCV_SUB64]: Likewise.
1250 2017-07-31 Alan Modra <amodra@gmail.com>
1252 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1253 without ld.so checks.
1255 2017-07-29 Alan Modra <amodra@gmail.com>
1258 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1259 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1260 (is_elfv2_localentry0): Test non_zero_localentry.
1261 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1263 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1265 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1266 pointer check for htab->elf.irelplt.
1267 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1269 2017-07-27 Nick Clifton <nickc@redhat.com>
1272 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1274 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1276 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1278 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1280 (evax_bfd_print_emh): Check for invalid string lengths.
1282 2017-07-25 Nick Clifton <nickc@redhat.com>
1284 * po/fr.po: Updated French translation.
1286 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1289 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1290 16-bit absolute branches into 10-bit pc-relative branches on the
1291 MSP430 as well as the MSP430X.
1293 2017-07-25 Alan Modra <amodra@gmail.com>
1295 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1296 (stub_eh_frame_size): New function.
1297 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1298 (group_sections): Init group tls_get_addr_opt_bctrl.
1299 (ppc64_elf_size_stubs): Update sizing and initialization of
1300 .eh_frame. Iteration over stubs via group list.
1301 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1302 (ppc64_elf_finish_dynamic_sections): Update finalization of
1305 2017-07-24 Nick Clifton <nickc@redhat.com>
1308 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1309 of the relocs to the canonicalize_one_reloc routine.
1310 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1311 for the _bfd_mach_o_canonicalize_one_reloc field.
1312 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1313 res_base parameter. Use to check for corrupt pair relocs.
1314 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1316 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1318 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1321 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1322 enough data in the record before attempting to parse it.
1323 (_bfd_vms_slurp_eeom): Likewise.
1325 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1326 (image_set_ptr): Likewise.
1327 (alpha_vms_slurp_relocs): Likewise.
1329 (alpha_vms_object_p): Check for a truncated record.
1331 2017-07-24 Nick Clifton <nickc@redhat.com>
1334 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1335 an unrecognized reloc and sets the bfd_error value.
1336 * libbfd.h: Regenerate.
1337 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1339 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1340 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1341 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1342 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1343 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1345 2017-07-23 Alan Modra <amodra@gmail.com>
1347 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1350 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1353 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1354 reloc_class_ifunc for ifunc symbols.
1356 2017-07-19 Nick Clifton <nickc@redhat.com>
1359 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1360 correct magic bytes at the start, set the error to wrong format
1361 and clear the format selector before returning NULL.
1363 2017-07-19 Nick Clifton <nickc@redhat.com>
1366 * coff-rs6000.c (_bfd_strntol): New function.
1367 (_bfd_strntoll): New function.
1368 (GET_VALUE_IN_FIELD): New macro.
1369 (EQ_VALUE_IN_FIELD): new macro.
1370 (_bfd_xcoff_slurp_armap): Use new macros.
1371 (_bfd_xcoff_archive_p): Likewise.
1372 (_bfd_xcoff_read_ar_hdr): Likewise.
1373 (_bfd_xcoff_openr_next_archived_file): Likewise.
1374 (_bfd_xcoff_stat_arch_elt): Likewise.
1375 * coff64-rs6000.c (_bfd_strntol): New function.
1376 (_bfd_strntoll): New function.
1377 (GET_VALUE_IN_FIELD): New macro.
1378 (xcoff64_slurp_armap): Use new macros.
1380 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1381 John Eric Martin <John.Martin@emmicro-us.com>
1383 * bfd-in2.h: Regenerate.
1384 * libbfd.h: Regenerate.
1385 * elf32-arc.c (JLI): Define.
1386 * reloc.c: Add JLI relocations.
1388 2017-07-18 Nick Clifton <nickc@redhat.com>
1391 * coff-sh.c: Fix spelling typos.
1392 * compress.c: Likewise.
1393 * cpu-pdp11.c: Likewise.
1394 * ecofflink.c: Likewise.
1395 * elf-m10300.c: Likewise.
1397 * elf32-arm.c: Likewise.
1398 * elf32-m68k.c: Likewise.
1399 * elf32-nds32.c: Likewise.
1400 * elf32-ppc.c: Likewise.
1401 * elf32-sh.c: Likewise.
1402 * elf32-v850.c: Likewise.
1403 * elf64-ppc.c: Likewise.
1404 * elf64-x86-64.c: Likewise.
1405 * elflink.c: Likewise.
1406 * elfnn-aarch64.c: Likewise.
1407 * elfxx-mips.c: Likewise.
1409 * sunos.c: Likewise.
1410 * vms-alpha.c: Likewise.
1411 * xcofflink.c: Likewise.
1413 2017-07-18 Nick Clifton <nickc@redhat.com>
1416 * coffcode.h (handle_COMDAT): Replace abort with an error message
1419 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1422 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1425 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1427 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1429 2017-07-16 Alan Modra <amodra@gmail.com>
1431 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1432 __tls_index GOT entries when using __tls_get_addr_opt stub.
1433 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1435 2017-07-12 Alan Modra <amodra@gmail.com>
1437 * po/es.po: Update from translationproject.org/latest/bfd/.
1438 * po/fi.po: Likewise.
1439 * po/fr.po: Likewise.
1440 * po/id.po: Likewise.
1441 * po/ja.po: Likewise.
1442 * po/ro.po: Likewise.
1443 * po/ru.po: Likewise.
1444 * po/sr.po: Likewise.
1445 * po/sv.po: Likewise.
1446 * po/tr.po: Likewise.
1447 * po/uk.po: Likewise.
1448 * po/vi.po: Likewise.
1449 * po/zh_CN.po: Likewise.
1450 * po/hr.po: New file from translationproject.org.
1451 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1452 * configure: Regenerate.
1454 2017-07-12 Nick Clifton <nickc@redhat.com>
1456 Fix compile time warnings using gcc 7.1.1.
1457 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1459 (elf_xtensa_get_gotplt_section): Increase length of got_name
1461 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1462 default return of FALSE.
1463 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1464 default return of FALSE.
1466 2017-07-12 Alan Modra <amodra@gmail.com>
1468 * binary.c (binary_set_section_contents): Don't print filepos in
1470 (coff_write_object_contents): Cast size_t for error message.
1471 (coff_slurp_line_table): Don't use bfd_vma symndx.
1472 (coff_slurp_reloc_table): Remove unneeded cast.
1473 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1475 (find_abstract_instance_name): Likewise.
1476 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1477 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1478 (elf32_arm_check_relocs): Make r_symndx an int.
1479 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1481 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1483 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1485 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1486 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1487 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1488 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1489 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1490 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1491 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1492 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1493 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1494 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1495 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1496 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1497 and use %lu for error message.
1498 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1499 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1502 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1504 (elf32_arm_final_link_relocate): Likewise.
1505 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1506 * coffcode.h (styp_to_sec_flags): Likewise.
1507 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1508 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1509 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1510 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1511 (elf32_bfin_merge_private_bfd_data): Likewise.
1512 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1513 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1514 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1515 (i370_elf_relocate_section): Likewise.
1516 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1517 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1518 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1519 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1520 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1521 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1522 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1523 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1524 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1525 * ieee.c (ieee_write_id, read_id): Likewise.
1526 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1527 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1528 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1529 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1530 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1531 * stabs.c (_bfd_link_section_stabs): Likewise.
1533 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1535 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1536 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1537 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1538 * coff-sh.c (sh_relax_section): Likewise.
1539 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1540 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1541 * coffcode.h (coff_slurp_reloc_table): Likewise.
1542 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1543 (_bfd_coff_read_string_table): Likewise.
1544 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1545 * compress.c (bfd_get_full_section_contents): Likewise.
1546 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1547 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1548 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1549 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1550 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1551 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1552 (elf32_arm_write_section): Likewise.
1553 * elf32-bfin.c (bfin_relocate_section): Likewise.
1554 (bfinfdpic_relocate_section): Likewise.
1555 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1556 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1557 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1558 (elf_i386_relocate_section): Likewise.
1559 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1560 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1561 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1562 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1563 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1564 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1565 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1566 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1567 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1568 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1569 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1570 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1571 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1572 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1573 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1574 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1575 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1576 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1577 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1578 * elf32-sh.c (sh_elf_relax_section): Likewise.
1579 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1580 (sh_elf_relocate_section): Likewise.
1581 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1582 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1583 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1584 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1585 * elf32-v850.c (v850_elf_relax_section): Likewise.
1586 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1587 (elf_vax_relocate_section): Likewise.
1588 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1589 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1590 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1591 (do_fix_for_relocatable_link): Likewise.
1592 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1593 (elf64_alpha_relax_with_lituse): Likewise.
1594 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1595 (elf_hppa_final_link_relocate): Likewise.
1596 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1597 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1598 (elf64_vms_link_add_object_symbols): Likewise.
1599 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1600 (mmix_final_link_relocate): Likewise.
1601 * elf64-s390.c (invalid_tls_insn): Likewise.
1602 (elf_s390_relocate_section): Likewise.
1603 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1604 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1605 (elf_x86_64_relocate_section): Likewise.
1606 * elfcode.h (elf_slurp_symbol_table): Likewise.
1607 * elfcore.h (elf_core_file_p): Likewise.
1608 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1609 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1610 (elfNN_aarch64_relocate_section): Likewise.
1611 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1612 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1613 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1614 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1615 (_bfd_mips_elf_relocate_section): Likewise.
1616 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1617 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1618 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1619 * ieee.c (ieee_slurp_external_symbols): Likewise.
1620 * ihex.c (ihex_write_object_content): Likewise.
1621 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1622 * merge.c (_bfd_merged_section_offset): Likewise.
1623 * mmo.c (mmo_write_loc_chunk): Likewise.
1624 (mmo_write_object_contents): Likewise.
1625 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1626 * stabs.c (_bfd_link_section_stabs): Likewise.
1627 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1629 2017-07-11 Alan Modra <amodra@gmail.com>
1631 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1633 2017-07-11 Alan Modra <amodra@gmail.com>
1635 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1636 instruction" error using _bfd_error_handler, not einfo.
1638 2017-07-10 Nick Clifton <nickc@redhat.com>
1640 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1641 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1643 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1645 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1647 2017-07-07 Alan Modra <amodra@gmail.com>
1649 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1651 2017-07-07 Alan Modra <amodra@gmail.com>
1653 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1654 as long long. Move code replacing "ll" with "I64", and simplify.
1656 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1658 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1661 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1663 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1665 (line_info_add_file_name): Likewise.
1666 (decode_line_info): Likewise.
1668 2017-07-04 Tristan Gingold <gingold@adacore.com>
1670 * version.m4: Bump version to 2.29.51
1671 * configure: Regenerate.
1673 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1675 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1676 sanity check at the head of this function.
1678 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1680 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1681 dwarf_line_str_size.
1682 (struct attr_abbrev): Add field implicit_const.
1683 (dwarf_debug_sections): Add .debug_line_str.
1684 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1685 (dwarf_debug_section_assert): Add static assertion.
1686 (read_indirect_line_string): New.
1687 (read_abbrevs): Support DW_FORM_implicit_const.
1688 (is_str_attr): Support DW_FORM_line_strp.
1689 (read_attribute_value): Support DW_FORM_line_strp and
1690 DW_FORM_implicit_const.
1691 (read_attribute): Support DW_FORM_implicit_const.
1692 (line_info_add_include_dir, line_info_add_include_dir_stub):
1693 (line_info_add_file_name, read_formatted_entries): New.
1694 (decode_line_info, parse_comp_unit): Support DWARF 5.
1695 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1697 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1699 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1700 abort statement that was put for symbols that are not dynamic.
1702 2017-07-03 Tristan Gingold <gingold@adacore.com>
1704 * po/bfd.pot: Regenerate
1706 2017-07-03 Alan Modra <amodra@gmail.com>
1708 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1709 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1710 * elf.c (setup_group): Use "Lx" to print sh_size.
1711 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1712 unknown section type in hex.
1713 (copy_special_section_fields): Style fix.
1714 (bfd_section_from_shdr): Correct format for sh_link. Use a
1715 common error message for all the variants of unrecognized
1717 (assign_file_positions_for_load_sections): Use "Lx" for lma
1718 adjust error message.
1719 (assign_file_positions_for_non_load_sections): Formatting.
1720 (rewrite_elf_program_header): Formatting. Use "Lx" for
1721 bfd_vma values in error messages.
1722 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1723 ELF_R_SYM value to type expected by format.
1724 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1726 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1727 (elf_link_input_bfd): Use "Lx" for r_info.
1728 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1730 2017-07-03 Alan Modra <amodra@gmail.com>
1732 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1733 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1734 Microsoft C library variant of long long format specifier.
1735 (PRINT20): Cast value to bfd_uint64_t not long long.
1736 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1737 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1738 long long. Don't cast to bfd_vma.
1739 * elf32-score.c (score3_bfd_getl48): Likewise.
1740 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1742 2017-07-03 Alan Modra <amodra@gmail.com>
1744 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1746 (bfd_elf_print_symbol): Don't cast symbol->flags.
1747 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1748 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1749 _bfd_error_handler argument order.
1750 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1752 2017-07-03 Alan Modra <amodra@gmail.com>
1754 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1755 AC_TYPE_LONG_DOUBLE.
1756 * configure: Regenerate.
1757 * config.in: Regenerate.
1759 2017-06-29 Andrew Waterman <andrew@sifive.com>
1761 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1764 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1766 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1767 unless it is undefined weak.
1768 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1769 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1771 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1772 is not dynamic in PIC, abort.
1774 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1777 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1778 undefined weak symbols into dynamic.
1779 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1780 relocation for non-dynamic symbols.
1781 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1783 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1785 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1786 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1787 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1788 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1789 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1792 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1794 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1795 (elfcore_write_s390_gs_bc): Likewise.
1796 * elf.c (elfcore_grok_s390_gs_cb): New function.
1797 (elfcore_grok_s390_gs_bc): New function.
1798 (elfcore_grok_note): Call them.
1799 (elfcore_write_s390_gs_cb): New function.
1800 (elfcore_write_s390_gs_bc): New function.
1801 (elfcore_write_register_note): Call them.
1803 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1805 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1806 bfd_get_file_size. Check archive element size.
1807 (_bfd_generic_get_section_contents_in_window): Likewise.
1809 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1811 * bfd-in2.h: Regenerated.
1812 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1813 (bfd_get_file_size): Likewise.
1815 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1816 Matthew Fortune <matthew.fortune@imgtec.com>
1818 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1819 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1820 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1821 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1823 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1824 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1825 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1826 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1827 `bfd_mach_mips_interaptiv_mr2' entries.
1828 * bfd-in2.h: Regenerate.
1830 2017-06-27 Nick Clifton <nickc@redhat.com>
1832 * tekhex.c (pass_over): Revert accidental conversion of a local
1833 array to a static array.
1835 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1838 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1839 reloc addend if necessary. Adjust diff only if
1840 shrinked_insn_address < end_address.
1842 2017-06-27 Alan Modra <amodra@gmail.com>
1845 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1846 (_bfd_generic_get_section_contents_in_window): Likewise.
1848 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1850 * elfnn-riscv.c (perform_relocation): Support the new
1851 R_RISCV_32_PCREL relocation.
1852 (riscv_elf_relocate_section): Likewise.
1853 * elfxx-riscv.c (howto_table): Likewise.
1854 (riscv_reloc_map): Likewise.
1855 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1856 * libbfd.h: Regenerate.
1858 2017-06-27 Alan Modra <amodra@gmail.com>
1861 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1862 Use unsigned file pointer type, and remove cast.
1863 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1864 Add "count", not "sz".
1866 2017-06-26 Pedro Alves <palves@redhat.com>
1869 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1872 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1875 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1878 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1880 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1881 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1882 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1883 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1884 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1886 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1889 * compress.c (bfd_get_full_section_contents): Don't check the
1891 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1892 reject a section whose size + offset is greater than the size
1894 (_bfd_generic_get_section_contents_in_window): Likewise.
1896 2017-06-26 Nick Clifton <nickc@redhat.com>
1899 * tekhex.c (getvalue): Check for the source pointer exceeding the
1900 end pointer before the first byte is read.
1902 2017-06-26 Nick Clifton <nickc@redhat.com>
1905 * opncls.c (get_build_id): Check that the section is big enough
1906 to contain the whole note.
1907 * compress.c (bfd_get_full_section_contents): Check for and reject
1908 a section whose size is greater than the size of the entire file.
1909 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1910 contain a notes section.
1912 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1914 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1916 (elf_s390_modify_segment_map): Likewise.
1917 (bfd_elf_s390_set_options): Lisewise.
1919 2017-06-26 Alan Modra <amodra@gmail.com>
1921 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1923 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1924 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1925 .preinit_array on --just-syms bfds.
1926 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1927 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1928 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1930 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1932 * elf.c (find_link): Bounds check "hint".
1934 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1936 * elf32-arm.c (using_thumb_only): Update list of architectures in
1937 BFD_ASSERT for which the logic is valid.
1938 (using_thumb2_bl): Likewise.
1939 (using_thumb2): Likewise and return true for ARMv8-R.
1940 (arch_has_arm_nop): Likewise.
1941 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1942 merging logic. Update commentis for value 15 of v8m_baseline,
1943 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1944 merging of value 15 of Tag_CPU_arch.
1946 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1948 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1949 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1950 * bfd-in2.h: Regenerate.
1952 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1954 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1955 the error_alignment label forward. Properly align program
1956 property note section.
1958 2017-06-22 Eric Christopher <echristo@gmail.com>
1960 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1961 abs to fix a truncation warning.
1963 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1965 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1966 local undefined weak symbol to 0.
1967 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1969 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1971 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1972 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1973 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1974 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1975 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1976 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1977 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1978 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1980 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1982 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1983 (elf_i386_lazy_ibt_plt_entry): Likewise.
1984 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1985 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1986 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1987 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1988 (elf_i386_lazy_plt_layout): Likewise.
1989 (elf_i386_non_lazy_plt_layout): Likewise.
1990 (elf_i386_link_hash_entry): Add plt_second.
1991 (elf_i386_link_hash_table): Add plt_second and
1992 plt_second_eh_frame.
1993 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1994 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1995 the second PLT. Check the second PLT.
1996 (elf_i386_relocate_section): Use the second PLT to resolve
1997 PLT reference if needed.
1998 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2000 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2001 second PLT. Generate unwind info for the second PLT.
2002 (elf_i386_plt_type): Add plt_second.
2003 (elf_i386_get_synthetic_symtab): Support the second PLT.
2004 (elf_i386_parse_gnu_properties): Support
2005 GNU_PROPERTY_X86_FEATURE_1_AND.
2006 (elf_i386_merge_gnu_properties): Support
2007 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2008 on GNU_PROPERTY_X86_FEATURE_1_IBT
2009 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2010 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2011 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2012 is set on all relocatable inputs.
2013 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2014 (elf_x32_lazy_ibt_plt_entry): Likewise.
2015 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2016 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2017 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2018 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2019 (elf_x86_64_lazy_ibt_plt): Likewise.
2020 (elf_x32_lazy_ibt_plt): Likewise.
2021 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2022 (elf_x32_non_lazy_ibt_plt): Likewise.
2023 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2024 (elf_x86_64_parse_gnu_properties): Support
2025 GNU_PROPERTY_X86_FEATURE_1_AND.
2026 (elf_x86_64_merge_gnu_properties): Support
2027 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2028 on GNU_PROPERTY_X86_FEATURE_1_IBT
2029 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2030 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2031 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2032 is set on all relocatable inputs.
2034 2017-06-22 Nick Clifton <nickc@redhat.com>
2037 * som.c (setup_sections): NUL terminate the space_strings buffer.
2038 Check that the space.name field does not index beyond the end of
2039 the space_strings buffer.
2041 2017-06-21 Nick Clifton <nickc@redhat.com>
2044 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2046 2017-06-21 Nick Clifton <nickc@redhat.com>
2049 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2050 type of the size parameter.
2051 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2052 length of the counted string.
2053 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2054 (_bfd_vms_save_counted_string): Likewise.
2055 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2056 _bfd_vms_save_counted_string.
2057 (_bfd_vms_slurp_ehdr): Likewise.
2058 (_bfd_vms_slurp_egsd): Likewise.
2059 (Parse_module): Likewise.
2061 2017-06-21 Alan Modra <amodra@gmail.com>
2063 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2064 calls before tocsave calls.
2065 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2068 2017-06-21 Nick Clifton <nickc@redhat.com>
2071 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2072 bfd_get_full_section_contents returns no contents.
2074 2017-06-21 Nick Clifton <nickc@redhat.com>
2077 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2080 2017-06-21 Nick Clifton <nickc@redhat.com>
2083 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2085 (image_set_ptr): Likewise.
2086 (alpha_vms_fix_sec_rel): Likewise.
2087 (alpha_vms_slurp_relocs): Likewise.
2089 2017-06-21 Nick Clifton <nickc@redhat.com>
2092 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2094 (ieee_archive_p): Likewise.
2095 (ieee_object_p): Likewise.
2097 2017-06-21 Nick Clifton <nickc@redhat.com>
2100 * elf.c (setup_group): Zero the group section pointer list after
2101 allocation so that loops can be caught. Check for NULL pointers
2102 when processing a group list.
2104 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2106 * elf-s390.h: New file.
2107 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2109 (elf_s390_additional_program_headers): New function.
2110 (elf_s390_modify_segment_map): New function.
2111 (bfd_elf_s390_set_options): New function.
2112 (elf_backend_additional_program_headers)
2113 (elf_backend_modify_segment_map): Add macro definitions.
2115 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2118 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2119 the DYNAMIC bit instead of bfd_count_sections.
2121 2017-06-19 Nick Clifton <nickc@redhat.com>
2124 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2126 (evax_bfd_print_eeom): Likewise.
2127 (evax_bfd_print_egsd): Check for an overlarge record length.
2128 (evax_bfd_print_etir): Likewise.
2130 2017-06-19 Nick Clifton <nickc@redhat.com>
2133 * libieee.h (struct common_header_type): Add end_p field.
2134 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2136 (read_id): Check for a length that exceeds the remaining bytes in
2138 (ieee_seek): Initialise end_p.
2139 (ieee_archive_p): Likewise.
2140 (ieee_object_p): Likewise.
2142 2017-06-19 Nick Clifton <nickc@redhat.com>
2145 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2146 before reading the EIHS structure entries.
2148 2017-06-19 Nick Clifton <nickc@redhat.com>
2151 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2152 gsd_size. Check that there are enough bytes remaining to read the
2153 type and size of the next egsd. Check that the size of the egsd
2154 does not exceed the size of the record.
2156 2017-06-19 Alan Modra <amodra@gmail.com>
2158 * config.bfd: Correct targ_underscore for cris.
2160 2017-06-18 Alan Modra <amodra@gmail.com>
2162 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2163 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2165 2017-06-16 Nick Clifton <nickc@redhat.com>
2167 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2168 bucketlist is empty because there are no symbols to add to the
2171 2017-06-16 Alan Modra <amodra@gmail.com>
2177 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2178 (BFD_JUMP_TABLE_LINK): Likewise.
2179 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2180 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2181 (bfd_elf_define_start_stop): New function.
2182 * linker.c (bfd_generic_define_start_stop): New function.
2183 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2185 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2186 * aout-target.h (MY_bfd_define_start_stop): Define.
2187 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2188 * binary.c (binary_bfd_define_start_stop): Define.
2189 * bout.c (b_out_bfd_define_start_stop): Define.
2190 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2191 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2192 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2193 * coffcode.h (coff_bfd_define_start_stop): Define.
2194 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2195 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2196 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2197 * ieee.c (ieee_bfd_define_start_stop): Define.
2198 * ihex.c (ihex_bfd_define_start_stop): Define.
2199 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2200 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2201 * mmo.c (mmo_bfd_define_start_stop): Define.
2202 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2203 * oasys.c (oasys_bfd_define_start_stop): Define.
2204 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2205 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2206 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2207 * som.c (som_bfd_define_start_stop): Define.
2208 * srec.c (srec_bfd_define_start_stop): Define.
2209 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2210 * versados.c (versados_bfd_define_start_stop): Define.
2211 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2212 (alpha_vms_bfd_define_start_stop): Define.
2213 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2214 * bfd-in2.h: Regenerate.
2215 * libbfd.h: Regenerate.
2217 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2219 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2220 SYMBOL_REFERENCES_LOCAL.
2222 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2225 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2226 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2227 runtime for if there needs copy relocation elimination.
2228 (need_copy_relocation_p): New function. Return true for symbol with
2229 pc-relative references and if it's against read-only sections.
2230 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2231 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2232 that are related with accessing external objects.
2233 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2234 in elfNN_aarch64_check_relocs.
2236 2017-06-15 Nick Clifton <nickc@redhat.com>
2239 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2242 (ieee_archive_p): Likewise.
2244 2017-06-15 Nick Clifton <nickc@redhat.com>
2247 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2249 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2251 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2252 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2253 keep both windowed and call0 ABI PLT definitions.
2254 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2255 elf_xtensa_*_plt_entry endex.
2256 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2258 2017-06-14 Nick Clifton <nickc@redhat.com>
2261 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2264 2017-06-14 Nick Clifton <nickc@redhat.com>
2267 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2268 maximum value for the ascic pointer. Check that name processing
2269 does not read beyond this value.
2270 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2273 2017-06-14 Nick Clifton <nickc@redhat.com>
2276 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2277 (process_otr): Check for an invalid offset in the otr structure.
2279 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2281 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2283 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2289 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2290 vtable field to a union.
2291 (_bfd_elf_is_start_stop): Removed.
2292 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2293 __start_SECNAME and __stop_SECNAME symbols.
2294 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2295 * elflink.c (_bfd_elf_is_start_stop): Removed.
2296 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2297 _bfd_elf_is_start_stop.
2298 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2299 __stop_SECNAME symbols. Updated.
2300 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2301 (bfd_elf_gc_record_vtinherit): Likewise.
2302 (bfd_elf_gc_record_vtentry): Likewise.
2304 2017-06-13 Nick Clifton <nickc@redhat.com>
2307 * elflink.c (elf_link_adjust_relocs): Generate an error when
2308 encountering a reloc against a symbol removed by garbage
2311 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2313 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2314 to merge_gnu_properties.
2315 * elf-properties.c (elf_merge_gnu_properties): Add struct
2316 bfd_link_info * and pass it to merge_gnu_properties.
2317 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2318 and pass it to elf_merge_gnu_properties.
2319 (_bfd_elf_link_setup_gnu_properties): Pass info to
2320 elf_merge_gnu_property_list.
2321 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2323 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2325 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2328 * binary.c (binary_set_section_contents): Scale lma by octets
2329 per byte to set filepos.
2331 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2333 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2336 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2338 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2341 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2343 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2344 patched section contents for TLS IE reloc.
2345 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2347 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2349 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2350 RELOC_FOR_GLOBAL_SYMBOL macro.
2352 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2354 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2357 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2359 * config/tc-arc.c (md_undefined_symbol): Changed.
2360 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2362 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2364 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2367 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2369 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2370 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2372 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2374 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2377 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2379 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2380 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2381 is non-zero. Add clarifying comments.
2383 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2385 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2386 name. Use local IFUNC symbol name string to report unsupported
2387 non-PIC call to IFUNC function.
2388 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2389 when generating R_386_IRELATIVE relocation.
2390 (elf_i386_finish_dynamic_symbol): Likewise.
2391 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2393 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2394 when generating R_X86_64_IRELATIVE relocation.
2395 (elf_x86_64_finish_dynamic_symbol): Likewise.
2397 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2399 * elf.c (setup_group): Make sure BFD sections are created for all
2400 group sections in the input file when processing SHF_GROUP
2402 (bfd_section_from_shdr): Avoid duplicating logic already
2403 implemented in `setup_group'.
2405 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2408 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2409 if the hint address is zero.
2411 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2414 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2415 ELF_COMMON_DEF_P for common symbols.
2417 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2419 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2420 SEC_GROUP sections as SEC_EXCLUDE.
2421 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2422 (assign_section_numbers): Use resolve_section_groups flag instead
2423 of relocatable link type.
2424 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2425 flag instead of checking the final_link flag for part of the
2426 checks in here. Fix white space as a result.
2427 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2428 instead of relocatable link type.
2429 (bfd_elf_final_link): Likewise.
2431 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2433 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2435 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2436 (s3_bfd_score_elf_check_relocs): Likewise.
2437 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2438 (score_elf_final_link_relocate): Likewise.
2439 (s7_bfd_score_elf_check_relocs): Likewise.
2441 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2443 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2446 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2448 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2449 from `reloc_count' rather than decrementing it.
2450 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2451 `reloc_count' by `int_rels_per_ext_rel'.
2452 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2453 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2454 entry determination.
2455 (s3_bfd_score_elf_check_relocs): Likewise.
2456 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2457 (s7_bfd_score_elf_relocate_section): Likewise.
2458 (s7_bfd_score_elf_check_relocs): Likewise.
2459 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2460 prototype and function.
2461 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2462 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2463 triple rather than once the sum of REL and RELA relocation entry
2465 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2466 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2467 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2468 storage allocation size determination.
2469 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2470 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2471 by `int_rels_per_ext_rel' for last relocation entry
2473 (bfd_elf_final_link): Do not multiply `reloc_count' by
2474 `int_rels_per_ext_rel' for internal relocation storage
2475 allocation size determination.
2476 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2477 `int_rels_per_ext_rel' for last relocation entry determination.
2478 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2479 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2480 (_bfd_mips_elf_relocate_section): Likewise.
2482 2017-06-05 Alan Modra <amodra@gmail.com>
2485 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2487 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2489 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2490 determine structure sizes.
2491 (elfcore_grok_freebsd_prstatus): Likewise.
2493 2017-06-01 Alan Modra <amodra@gmail.com>
2495 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2496 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2498 (is_elfv2_localentry0): New function.
2499 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2500 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2501 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2502 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2503 optimized localentry:0 stubs.
2504 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2505 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2507 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2509 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2511 2017-05-30 Casey Smith <clegg89@gmail.com>
2514 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2515 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2517 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2519 * cpu-arc.c (arc_compatible): New function.
2521 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2523 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2525 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2528 * bfdio.c (bfd_get_file_size): New function.
2529 * bfd-in2.h: Regenerated.
2531 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2533 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2536 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2538 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2539 dynobj instead of htab->elf.dynobj.
2541 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2543 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2545 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2546 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2547 actual number of internal relocations retrieved. Adjust
2548 function description.
2549 (bfd_elf64_canonicalize_reloc): Remove macro.
2550 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2552 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2554 * archures.c (bfd_mach_sparc_v9m8): Define.
2555 (bfd_mach_sparc_v8plusm8): Likewise.
2556 (bfd_mach_sparc_v9_p): Adjust to M8.
2557 (bfd_mach_sparc_64bit_p): Likewise.
2558 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2559 bfd_mach_sparc_v8plusm8.
2560 * bfd-in2.h: Regenerated.
2561 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2563 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2564 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2565 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2567 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2568 bfd_mach_sparc_v8plusm8.
2570 2017-05-19 Alan Modra <amodra@gmail.com>
2572 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2573 debug and special sections when no non-note alloc sections in an
2576 2017-05-18 Alan Modra <amodra@gmail.com>
2578 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2579 * elf-m10300.c: Likewise.
2581 * elf32-arc.c: Likewise.
2582 * elf32-bfin.c: Likewise.
2583 * elf32-m68k.c: Likewise.
2584 * elf32-nds32.c: Likewise.
2585 * elf32-tilepro.c: Likewise.
2586 * elflink.c: Likewise.
2587 * elfnn-aarch64.c: Likewise.
2588 * elfnn-riscv.c: Likewise.
2589 * elfxx-tilegx.c: Likewise.
2590 * mach-o.c: Likewise.
2591 * peXXigen.c: Likewise.
2592 * vms-alpha.c: Likewise.
2593 * vms-lib.c: Likewise.
2595 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2598 * elflink.c (elf_gc_mark_debug_section): New function.
2599 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2600 referenced by kept debug sections.
2602 2017-05-16 Alan Modra <amodra@gmail.com>
2604 * elf-m10300.c: Rename occurrences of non_ir_ref.
2605 * elf32-arm.c: Likewise.
2606 * elf32-bfin.c: Likewise.
2607 * elf32-cr16.c: Likewise.
2608 * elf32-cris.c: Likewise.
2609 * elf32-d10v.c: Likewise.
2610 * elf32-dlx.c: Likewise.
2611 * elf32-fr30.c: Likewise.
2612 * elf32-frv.c: Likewise.
2613 * elf32-hppa.c: Likewise.
2614 * elf32-i370.c: Likewise.
2615 * elf32-i386.c: Likewise.
2616 * elf32-iq2000.c: Likewise.
2617 * elf32-lm32.c: Likewise.
2618 * elf32-m32c.c: Likewise.
2619 * elf32-m32r.c: Likewise.
2620 * elf32-m68hc1x.c: Likewise.
2621 * elf32-m68k.c: Likewise.
2622 * elf32-mcore.c: Likewise.
2623 * elf32-metag.c: Likewise.
2624 * elf32-microblaze.c: Likewise.
2625 * elf32-moxie.c: Likewise.
2626 * elf32-msp430.c: Likewise.
2627 * elf32-mt.c: Likewise.
2628 * elf32-nios2.c: Likewise.
2629 * elf32-or1k.c: Likewise.
2630 * elf32-ppc.c: Likewise.
2631 * elf32-rl78.c: Likewise.
2632 * elf32-s390.c: Likewise.
2633 * elf32-score.c: Likewise.
2634 * elf32-score7.c: Likewise.
2635 * elf32-sh.c: Likewise.
2636 * elf32-tic6x.c: Likewise.
2637 * elf32-tilepro.c: Likewise.
2638 * elf32-v850.c: Likewise.
2639 * elf32-vax.c: Likewise.
2640 * elf32-xstormy16.c: Likewise.
2641 * elf32-xtensa.c: Likewise.
2642 * elf64-alpha.c: Likewise.
2643 * elf64-hppa.c: Likewise.
2644 * elf64-ia64-vms.c: Likewise.
2645 * elf64-mmix.c: Likewise.
2646 * elf64-ppc.c: Likewise.
2647 * elf64-s390.c: Likewise.
2648 * elf64-sh64.c: Likewise.
2649 * elf64-x86-64.c: Likewise.
2650 * elflink.c: Likewise.
2651 * elfnn-aarch64.c: Likewise.
2652 * elfnn-ia64.c: Likewise.
2653 * elfnn-riscv.c: Likewise.
2654 * elfxx-mips.c: Likewise.
2655 * elfxx-sparc.c: Likewise.
2656 * elfxx-tilegx.c: Likewise.
2657 * linker.c: Likewise.
2659 2017-05-16 Alan Modra <amodra@gmail.com>
2661 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2662 * elflink.c (elf_link_add_object_symbols): Update to use
2664 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2666 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2668 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2670 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2672 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2674 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2675 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2677 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2679 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2681 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2683 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2684 to plt_second/plt_second_eh_frame.
2685 (elf_x86_64_link_hash_newfunc): Updated.
2686 (elf_x86_64_allocate_dynrelocs): Likewise.
2687 (elf_x86_64_size_dynamic_sections): Likewise.
2688 (elf_x86_64_relocate_section): Likewise.
2689 (elf_x86_64_finish_dynamic_symbol): Likewise.
2690 (elf_x86_64_finish_dynamic_sections): Likewise.
2691 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2692 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2694 (elf_backend_setup_gnu_properties): Updated. Create the
2695 .plt.sec section instead of the .plt.sec section.
2697 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2699 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2700 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2701 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2703 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2705 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2706 (bfd_elf64_set_reloc): Define.
2707 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2709 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2711 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2712 (struct bfd_target): New field _bfd_set_reloc.
2713 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2714 * reloc.c (_bfd_generic_set_reloc): New function.
2715 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2716 * nlm-target.h (nlm_set_reloc): Likewise.
2717 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2718 * aout-tic30.c (MY_set_reloc): Likewise.
2719 * aout-target.h (MY_set_reloc): Likewise.
2720 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2721 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2722 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2723 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2724 * aout-adobe.c (aout_32_set_reloc): Likewise.
2725 * bout.c (b_out_set_reloc): Likewise.
2726 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2727 * i386os9k.c (aout_32_set_reloc): Likewise.
2728 * ieee.c (ieee_set_reloc): Likewise.
2729 * oasys.c (oasys_set_reloc): Likewise.
2730 * som.c (som_set_reloc): Likewise.
2731 * versados.c (versados_set_reloc): Likewise.
2732 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2733 _bfd_generic_set_reloc.
2734 (rs6000_xcoff64_aix_vec): LIkewise.
2735 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2736 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2737 * i386msdos.c (msdos_set_reloc): Define to
2738 _bfd_norelocs_set_reloc.
2739 * elfcode.h (elf_set_reloc): Define.
2740 * bfd-in2.h: Regenerated.
2742 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2745 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2746 for IFUNC function address.
2748 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2750 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2751 (CONFLICT_LIST): Likewise.
2752 (opcode/arc-attrs.h): Include.
2753 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2754 (arc_extract_features): New file.
2755 (arc_stralloc): Likewise.
2756 (arc_elf_merge_attributes): Likewise.
2757 (arc_elf_merge_private_bfd_data): Use object attributes.
2758 (bfd_arc_get_mach_from_attributes): New function.
2759 (arc_elf_object_p): Use object attributes.
2760 (arc_elf_final_write_processing): Likewise.
2761 (elf32_arc_obj_attrs_arg_type): New function.
2762 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2763 (elf32_arc_section_from_shdr): Likewise.
2764 (elf_backend_obj_attrs_vendor): Define.
2765 (elf_backend_obj_attrs_section): Likewise.
2766 (elf_backend_obj_attrs_arg_type): Likewise.
2767 (elf_backend_obj_attrs_section_type): Likewise.
2768 (elf_backend_obj_attrs_handle_unknown): Likewise.
2769 (elf_backend_section_from_shdr): Likewise.
2771 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2774 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2775 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2776 and the destination is a Thumb symbol.
2778 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2780 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2781 initializer to silence GCC 4.2.
2782 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2784 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2786 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2787 (LAZY_PLT_ENTRY_SIZE): This.
2788 (NON_LAZY_PLT_ENTRY_SIZE): New.
2789 (elf_x86_64_plt0_entry): Renamed to ...
2790 (elf_x86_64_lazy_plt0_entry): This.
2791 (elf_x86_64_plt_entry): Renamed to ...
2792 (elf_x86_64_lazy_plt_entry): This.
2793 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2794 (elf_x86_64_lazy_bnd_plt0_entry): This.
2795 (elf_x86_64_legacy_plt_entry): Removed.
2796 (elf_x86_64_bnd_plt_entry): Renamed to ...
2797 (elf_x86_64_lazy_bnd_plt_entry): This.
2798 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2799 (elf_x86_64_non_lazy_plt_entry): This.
2800 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2801 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2802 (elf_x86_64_eh_frame_plt): Renamed to ...
2803 (elf_x86_64_eh_frame_lazy_plt): This.
2804 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2805 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2806 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2807 (elf_x86_64_eh_frame_non_lazy_plt): This.
2808 (elf_x86_64_lazy_plt_layout): New.
2809 (elf_x86_64_non_lazy_plt_layout): Likewise.
2810 (elf_x86_64_plt_layout): Likewise.
2811 (elf_x86_64_backend_data): Remove PLT layout information. Add
2812 os for target system.
2813 (GET_PLT_ENTRY_SIZE): Removed.
2814 (elf_x86_64_lazy_plt): New.
2815 (elf_x86_64_non_lazy_plt): Likewise.
2816 (elf_x86_64_lazy_bnd_plt): Likewise.
2817 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2818 (elf_x86-64_arch_bed): Updated.
2819 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2820 (elf_x86_64_create_dynamic_sections): Removed.
2821 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2822 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2823 (elf_x86-64_adjust_dynamic_symbol): Updated.
2824 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2825 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2826 size for PLT0 if there is no PLT0. Get plt_entry_size from
2827 non_lazy_plt for non-lazy PLT entries.
2828 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2829 from non_lazy_plt for non-lazy PLT entries.
2830 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2831 if there is no PLT0.
2832 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2833 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2834 entries with non-lazy PLT layout. Don't fill the second and third
2835 slots in the PLT entry if there is no PLT0.
2836 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2837 if there is no PLT0. Set sh_entsize on the .plt.got section.
2838 (compare_relocs): New.
2839 (elf_x86_64_plt_type): Likewise.
2840 (elf_x86_64_plt): Likewise.
2841 (elf_x86_64_nacl_plt): New. Forward declaration.
2842 (elf_x86_64_get_plt_sym_val): Removed.
2843 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2844 against all dynamic relocations.
2845 (elf_x86_64_link_setup_gnu_properties): New function.
2846 (elf_backend_create_dynamic_sections): Updated.
2847 (elf_backend_setup_gnu_properties): New.
2848 (elf_x86_64_nacl_plt): New.
2849 (elf_x86_64_nacl_arch_bed): Updated.
2851 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2853 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2854 (LAZY_PLT_ENTRY_SIZE): This.
2855 (NON_LAZY_PLT_ENTRY_SIZE): New.
2856 (elf_i386_plt0_entry): Renamed to ...
2857 (elf_i386_lazy_plt0_entry): This.
2858 (elf_i386_plt_entry): Renamed to ...
2859 (elf_i386_lazy_plt_entry): This.
2860 (elf_i386_pic_plt0_entry): Renamed to ...
2861 (elf_i386_pic_lazy_plt0_entry): This.
2862 (elf_i386_pic_plt_entry): Renamed to ...
2863 (elf_i386_pic_lazy_plt_entry): This.
2864 (elf_i386_got_plt_entry): Renamed to ...
2865 (elf_i386_non_lazy_plt_entry): This.
2866 (elf_i386_pic_got_plt_entry): Renamed to ...
2867 (elf_i386_pic_non_lazy_plt_entry): This.
2868 (elf_i386_eh_frame_plt): Renamed to ...
2869 (elf_i386_eh_frame_lazy_plt): This.
2870 (elf_i386_eh_frame_plt_got): Renamed to ...
2871 (elf_i386_eh_frame_non_lazy_plt): This.
2872 (elf_i386_plt_layout): Renamed to ...
2873 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2874 eh_frame_plt_got_size.
2875 (elf_i386_non_lazy_plt_layout): New.
2876 (elf_i386_plt_layout): Likewise.
2877 (elf_i386_non_lazy_plt): Likewise.
2878 (GET_PLT_ENTRY_SIZE): Removed.
2879 (elf_i386_plt): Renamed to ...
2880 (elf_i386_lazy_plt): This.
2881 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2882 (elf_i386_arch_bed): Updated.
2883 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2884 (elf_i386_create_dynamic_sections): Removed.
2885 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2886 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2887 (elf_i386_adjust_dynamic_symbol): Updated.
2888 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2889 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2890 size for PLT0 if there is no PLT0.
2891 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2892 output section is discarded only if GOT isn't empty.
2893 (elf_i386_relocate_section): Updated. Properly get PLT index
2894 if there is no PLT0.
2895 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2896 second and third slots in the PLT entry if there is no PLT0.
2897 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2898 if there is no PLT0. Set sh_entsize on the .plt.got section.
2899 (elf_i386_nacl_plt): Forward declaration.
2900 (elf_i386_get_plt_sym_val): Removed.
2901 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2902 against all dynamic relocations.
2903 (elf_i386_link_setup_gnu_properties): New function.
2904 (elf_backend_create_dynamic_sections): Updated.
2905 (elf_backend_setup_gnu_properties): New.
2906 (elf_i386_nacl_plt): Updated.
2907 (elf_i386_nacl_arch_bed): Likewise.
2908 (elf_i386_vxworks_arch_bed): Likewise.
2910 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2912 * elflink.c (elf_output_implib): Remove executable flag from import
2914 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2915 library is a relocatable object file.
2917 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2920 * elf32-avr.c (avr_should_move_sym): New function.
2921 (avr_should_reduce_sym_size): Likewise.
2922 (avr_should_increase_sym_size): Likewise.
2923 (elf32_avr_relax_delete_bytes): Adjust symbol values
2924 and sizes by calling new functions.
2926 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2928 * config.bfd (riscv32-*): Enable rv64.
2930 2017-05-02 Alan Modra <amodra@gmail.com>
2933 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2934 rather than h->root.type == bfd_link_hash_new.
2935 (bfd_elf_record_link_assignment): Similarly, call
2936 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2938 2017-04-29 Alan Modra <amodra@gmail.com>
2941 * reloc.c (reloc_offset_in_range): New function.
2942 (bfd_perform_relocation, bfd_install_relocation): Use it.
2943 (_bfd_final_link_relocate): Likewise.
2945 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2947 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2948 before using .plt.got.
2949 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2951 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2953 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2954 instead of "+=" to update 0.
2956 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2958 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2959 .plt.got section here.
2960 (elf_i386_check_relocs): Don't create the .plt.got section.
2961 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2962 the .plt.got and .plt.bnd sections here.
2963 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2966 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2968 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2970 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2971 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2972 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2973 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2976 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2978 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2980 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2981 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2982 the first relocatable ELF input with GNU properties.
2984 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2986 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2987 VxWorks for non-PIC.
2989 2017-04-27 Alan Modra <amodra@gmail.com>
2991 * elf-bfd.h (struct elf_backend_data): Make asection param of
2992 elf_backend_eh_frame_address_size const.
2993 (_bfd_elf_eh_frame_address_size): Likewise.
2994 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2995 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2996 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2997 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2998 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2999 (next_cie_fde_offset): Constify params.
3000 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3002 2017-04-27 Alan Modra <amodra@gmail.com>
3004 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3005 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3006 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3008 (offset_adjust): New function.
3009 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3010 (adjust_eh_frame_local_symbols): Likewise.
3011 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3012 after changing anything. Return true if anything changed.
3013 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3014 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3016 2017-04-27 Alan Modra <amodra@gmail.com>
3018 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3021 2017-04-27 Alan Modra <amodra@gmail.com>
3023 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3024 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3025 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3026 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3027 for undef and undefweak dyn_relocs.
3028 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3029 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3030 (allocate_got, allocate_dynrelocs): Likewise.
3031 (ppc64_elf_relocate_section): Likewise.
3033 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3035 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3036 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3037 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3038 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3040 2017-04-26 Nick Clifton <nickc@redhat.com>
3043 * reloc.c (bfd_perform_relocation): Check for a negative address
3046 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3049 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3051 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3052 (elf_backend_always_renumber_dynsyms): Define.
3053 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3054 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3055 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3056 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3058 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3060 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3062 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3063 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3064 sections have been created.
3066 2017-04-26 Nick Clifton <nickc@redhat.com>
3069 * compress.c (bfd_init_section_compress_status): Check the return
3070 value from bfd_malloc.
3072 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3074 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3075 no_finish_dynamic_symbol.
3076 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3078 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3079 weak symbol, don't make it dynamic.
3080 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3081 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3082 relocation for GOT reference.
3083 (elf_x86_64_finish_dynamic_symbol): Abort if
3084 no_finish_dynamic_symbol isn't 0.
3086 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3089 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3090 undefined weak symbol, don't make it dynamic.
3091 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3092 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3093 relocation for R_386_GOT32.
3095 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3098 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3100 2017-04-23 Alan Modra <amodra@gmail.com>
3103 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3104 * elf.c (lcomm_sym): New.
3105 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3106 * bfd-in2.h: Regenerate.
3108 2017-04-23 Alan Modra <amodra@gmail.com>
3111 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3112 parameters and comment.
3113 (_bfd_elf_get_reloc_section): Delete.
3114 (_bfd_elf_plt_get_reloc_section): Declare.
3115 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3116 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3118 (_bfd_elf_get_reloc_section): ..here. Delete.
3119 (assign_section_numbers): Call elf_get_reloc_section.
3120 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3121 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3123 2017-04-23 Alan Modra <amodra@gmail.com>
3126 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3129 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3132 * elf32-i386.c (elf_i386_link_hash_entry): Add
3133 no_finish_dynamic_symbol.
3134 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3135 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3136 symbol, don't make it dynamic in PIE.
3137 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3138 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3139 relocation for R_386_GOT32
3140 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3143 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3147 * elflink.c (elf_link_add_object_symbols): Require
3148 --no-dynamic-linker with -E/--dynamic-list when creating
3151 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3153 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3156 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3158 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3159 dynamic symbol sorting.
3161 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3164 * elflink.c (elf_link_add_object_symbols): Preserve
3165 dynamic_ref_after_ir_def when restoring the symbol table for
3166 unneeded dynamic object.
3168 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3171 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3172 on on undefined IFUNC symbol in the second PLT.
3174 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3176 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3178 2017-04-19 Alan Modra <amodra@gmail.com>
3180 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3181 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3182 * elf32-ppc.c:Formatting.
3183 (ensure_undefweak_dynamic): Don't make dynamic when
3184 info->dynamic_undefined_weak is zero.
3185 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3186 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3187 not default visibility. Discard undef and undefweak
3189 (ppc_elf_relocate_section): Adjust to suit.
3190 * elf64-ppc.c: Formatting.
3191 (ensure_undefweak_dynamic): Don't make dynamic when
3192 info->dynamic_undefined_weak is zero.
3193 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3194 info->dynamic_undefined_weak. Discard them earlier.
3196 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3199 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3200 before generating the version definition section.
3202 2017-04-17 Alan Modra <amodra@gmail.com>
3204 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3205 state when a regular object file defines a symbol with
3206 incompatible type to that defined by an earlier shared lib.
3208 2017-04-13 Alan Modra <amodra@gmail.com>
3210 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3212 * elf32-arm.c: Likewise.
3213 * elf32-i386.c: Likewise.
3214 * elf32-mep.c: Likewise.
3215 * elf64-ia64-vms.c: Likewise.
3216 * elf64-x86-64.c: Likewise.
3217 * elflink.c: Likewise.
3218 * elfnn-ia64.c: Likewise.
3219 * elfxx-mips.c: Likewise.
3221 2017-04-13 Alan Modra <amodra@gmail.com>
3223 * aoutx.h: Use %B and %A in error messages throughout file.
3224 * aout-cris.c: Likewise.
3225 * archive.c: Likewise.
3226 * binary.c: Likewise.
3227 * coff-rs6000.c: Likewise.
3228 * coff-tic4x.c: Likewise.
3229 * coffcode.h: Likewise.
3230 * coffgen.c: Likewise.
3231 * cofflink.c: Likewise.
3232 * coffswap.h: Likewise.
3233 * cpu-arm.c: Likewise.
3234 * elf-eh-frame.c: Likewise.
3235 * elf-m10300.c: Likewise.
3237 * elf32-arc.c: Likewise.
3238 * elf32-arm.c: Likewise.
3239 * elf32-bfin.c: Likewise.
3240 * elf32-frv.c: Likewise.
3241 * elf32-iq2000.c: Likewise.
3242 * elf32-m32c.c: Likewise.
3243 * elf32-microblaze.c: Likewise.
3244 * elf32-nds32.c: Likewise.
3245 * elf32-rl78.c: Likewise.
3246 * elf32-rx.c: Likewise.
3247 * elf32-score.c: Likewise.
3248 * elf32-score7.c: Likewise.
3249 * elf32-sh64.c: Likewise.
3250 * elf32-v850.c: Likewise.
3251 * elf32-vax.c: Likewise.
3252 * elf32-visium.c: Likewise.
3253 * elf64-ia64-vms.c: Likewise.
3254 * elf64-mmix.c: Likewise.
3255 * elf64-sh64.c: Likewise.
3256 * elfcode.h: Likewise.
3257 * elfnn-aarch64.c: Likewise.
3258 * elfnn-ia64.c: Likewise.
3259 * elfxx-mips.c: Likewise.
3260 * hpux-core.c: Likewise.
3263 * linker.c: Likewise.
3264 * merge.c: Likewise.
3266 * oasys.c: Likewise.
3267 * pdp11.c: Likewise.
3268 * peXXigen.c: Likewise.
3269 * rs6000-core.c: Likewise.
3270 * vms-alpha.c: Likewise.
3271 * xcofflink.c: Likewise.
3273 2017-04-13 Alan Modra <amodra@gmail.com>
3275 * bfd.c (PRINT_TYPE): Define.
3276 (_doprnt): New function.
3277 (error_handler_internal): Use _doprnt.
3278 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3279 calls in their natural order, throughout file.
3280 * coff-mcore.c: Likewise.
3281 * coff-ppc.c: Likewise.
3282 * coff-tic80.c: Likewise.
3283 * cofflink.c: Likewise.
3284 * elf-s390-common.c: Likewise.
3286 * elf32-arm.c: Likewise.
3287 * elf32-i386.c: Likewise.
3288 * elf32-m32r.c: Likewise.
3289 * elf32-msp430.c: Likewise.
3290 * elf32-spu.c: Likewise.
3291 * elf64-ia64-vms.c: Likewise.
3292 * elf64-sparc.c: Likewise.
3293 * elf64-x86-64.c: Likewise.
3294 * elflink.c: Likewise.
3295 * elfnn-aarch64.c: Likewise.
3296 * elfnn-ia64.c: Likewise.
3297 * elfxx-mips.c: Likewise.
3299 2017-04-13 Alan Modra <amodra@gmail.com>
3301 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3302 branch veneers" error. Fix double space and format message.
3303 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3304 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3306 2017-04-13 Alan Modra <amodra@gmail.com>
3308 * bfd-in2.h: Regenerate.
3310 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3312 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3313 extra `\n' in warning/error messages.
3314 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3315 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3317 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3319 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3320 processor-specific properties with generic ELF target vector.
3322 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3324 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3325 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3326 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3327 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3329 (link_hash_newfunc): Initialize has_got_reloc and
3331 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3333 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3335 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3337 (_bfd_sparc_elf_fixup_symbol): New function.
3338 (allocate_dynrelocs): Don't allocate space for dynamic
3339 relocations and discard relocations against resolved undefined
3340 weak symbols in executable. Don't make resolved undefined weak
3341 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3342 relocation against undefined weak symbols in PIE.
3343 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3344 relocations against resolved undefined weak symbols in PIE
3345 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3346 without ynamic PLT/GOT relocations for resolved undefined weak
3348 Don't generate dynamic relocation against resolved undefined
3349 weak symbol in executable.
3350 (pie_finish_undefweak_symbol): New function.
3351 (_bfd_sparc_elf_finish_dynamic_sections): Call
3352 pie_finish_undefweak_symbol on all symbols in PIE.
3353 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3354 (_bfd_sparc_elf_fixup_symbol): New function.
3356 2017-04-10 Nick Clifton <nickc@redhat.com>
3358 * config.bfd: Remove ns32k from obsolete list.
3360 2017-04-10 Alan Modra <amodra@gmail.com>
3363 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3364 (special_sections_i): Likewise for .init_array.
3365 (special_sections_p): Likewise for .preinit_array.
3367 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3371 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3372 ELF_COMMON_DEF_P for common symbols.
3373 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3374 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3375 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3376 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3377 07492f668d2173da7a2bda3707ff0985e0f460b6.
3379 2017-04-07 Pedro Alves <palves@redhat.com>
3381 * opncls.c (bfd_get_debug_link_info): Rename to...
3382 (bfd_get_debug_link_info_1): ... this. Change type of second
3383 parameter to void pointer. Adjust.
3384 (bfd_get_debug_link_info): Reimplement on top of
3385 bfd_get_debug_link_info_1.
3386 (separate_debug_file_exists, separate_alt_debug_file_exists):
3387 Change type of second parameter to void pointer. Adjust.
3388 (get_func_type, check_func_type): Change type of second parameter
3390 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3391 the callback functions instead of passing the address of a local.
3392 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3393 find_separate_debug_file.
3394 (get_alt_debug_link_info_shim): Change type of second parameter to
3395 void pointer. Adjust.
3396 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3397 find_separate_debug_file.
3398 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3399 of second parameter to void pointer. Adjust.
3400 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3401 pointer local to find_separate_debug_file.
3403 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3405 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3406 external symbols with a definition.
3407 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3409 2017-04-07 Alan Modra <amodra@gmail.com>
3411 * po/SRC-POTFILES.in: Regenerate.
3413 2017-04-05 Alan Modra <amodra@gmail.com>
3415 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3418 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3420 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3421 numbers for DataDirectory entry indicies passed to
3424 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3426 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3427 each GNU_MBIND section and align GNU_MBIND section to page size.
3428 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3429 segment for each GNU_MBIND section.
3430 (_bfd_elf_init_private_section_data): Copy sh_info from input
3431 for GNU_MBIND section.
3433 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3435 * elfnn-riscv.c (GP_NAME): Delete.
3436 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3437 (_bfd_riscv_relax_lui): Likewise.
3439 2017-04-04 Nick Clifton <nickc@redhat.com>
3442 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3444 (bfd_elf_final_link): Only initialize the extended symbol index
3445 section if there are extended symbol tables to list.
3447 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3449 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3450 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3451 * configure.ac (elf): Add elf-properties.lo.
3452 * Makefile.in: Regenerated.
3453 * configure: Likewise.
3454 * elf-bfd.h (elf_property_kind): New.
3455 (elf_property): Likewise.
3456 (elf_property_list): Likewise.
3457 (elf_properties): Likewise.
3458 (_bfd_elf_parse_gnu_properties): Likewise.
3459 (_bfd_elf_get_property): Likewise.
3460 (_bfd_elf_link_setup_gnu_properties): Likewise.
3461 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3462 and setup_gnu_properties.
3463 (elf_obj_tdata): Add properties.
3464 * elf-properties.c: New file.
3465 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3466 (elf_i386_merge_gnu_properties): Likewise.
3467 (elf_backend_parse_gnu_properties): Likewise.
3468 (elf_backend_merge_gnu_properties): Likewise.
3469 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3470 (elf_x86_64_merge_gnu_properties): Likewise.
3471 (elf_backend_parse_gnu_properties): Likewise.
3472 (elf_backend_merge_gnu_properties): Likewise.
3473 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3474 (elf_backend_parse_gnu_properties): Likewise.
3475 (elf_backend_setup_gnu_properties): Likewise.
3476 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3477 elf_backend_merge_gnu_properties and
3478 elf_backend_setup_gnu_properties.
3480 2017-03-30 Pip Cet <pipcet@gmail.com>
3482 * elf32-wasm32.c: Add relocation code, two relocs.
3483 * reloc.c: Add wasm32 relocations.
3484 * libbfd.h: Regenerate.
3485 * bfd-in2.h: Regenerate.
3486 * bfd/po/bfd.pot: Regenerate.
3488 2017-03-29 Nick Clifton <nickc@redhat.com>
3491 * coff-bfd.h (struct coff_section_data): Add new fields:
3492 saved_bias and bias.
3493 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3494 computed for PE binaries.
3495 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3498 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3501 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3502 to handle a local symbol with a hash-symbol-entry; without PLT.
3503 Add BFD_ASSERT for an incidental case with GOT entry present.
3504 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3505 isn't forced-or-set local.
3507 2017-03-27 Pip Cet <pipcet@gmail.com>
3509 * wasm-module.c: New file to support WebAssembly modules.
3510 * wasm-module.h: New file to support WebAssembly modules.
3511 * doc/webassembly.texi: Start documenting wasm-module.c.
3512 * config.bfd: Add wasm_vec.
3513 * targets.c: Likewise.
3514 * configure.ac: Likewise.
3515 * Makefile.am: Add entries for wasm-module.c.
3516 * Makefile.in: Regenerate.
3517 * configure: Regenerate.
3518 * po/SRC-POTFILES.in: Regenerate.
3520 2017-03-27 Pip Cet <pipcet@gmail.com>
3522 * cpu-wasm32.c: New file to support wasm32 architecture.
3523 * elf32-wasm32.c: New file to support wasm32 architecture.
3524 * Makefile.am: Add wasm32 architecture.
3525 * archures.c: Likewise.
3526 * config.bfd: Likewise.
3527 * configure.ac: Likewise.
3528 * targets.c: Likewise.
3529 * Makefile.in: Regenerate.
3530 * bfd-in2.h: Regenerate.
3531 * configure: Regenerate.
3532 * po/SRC-POTFILES.in: Regenerate.
3534 2017-03-20 Alan Modra <amodra@gmail.com>
3537 * elf64-ppc.c (compare_symbols): Stabilize sort.
3539 2017-03-18 Alan Modra <amodra@gmail.com>
3541 * elf64-ppc.c (struct ppc_link_hash_table): Add
3542 local_ifunc_resolver and maybe_local_ifunc_resolver.
3543 (ppc_build_one_stub): Set flags on emitting dynamic
3544 relocation to ifunc.
3545 (ppc64_elf_relocate_section): Likewise.
3546 (ppc64_elf_finish_dynamic_symbol): Likewise.
3547 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3548 local dynamic relocs to ifuncs.
3549 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3550 local_ifunc_resolver and maybe_local_ifunc_resolver.
3551 (ppc_elf_relocate_section): Set flag on emitting dynamic
3552 relocation to ifuncs.
3553 (ppc_elf_finish_dynamic_symbol): Likewise.
3554 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3555 dynamic relocs to ifuncs.
3557 2017-03-13 Nick Clifton <nickc@redhat.com>
3560 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3561 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3562 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3563 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3564 * bfd-in2.h: Regenerate.
3565 * libbfd.h: Regenerate.
3566 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3568 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3569 (elfNN_aarch64_howto_table): Likewise.
3570 (aarch64_tls_transition_without_check): Likewise.
3571 (aarch64_reloc_got_type): Likewise.
3572 (elfNN_aarch64_final_link_relocate): Likewise.
3573 (elfNN_aarch64_tls_relax): Likewise.
3574 (elfNN_aarch64_relocate_section): Likewise.
3575 (elfNN_aarch64_gc_sweep_hook): Likewise.
3576 (elfNN_aarch64_check_relocs): Likewise.
3577 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3578 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3580 2017-03-11 Alan Modra <amodra@gmail.com>
3582 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3583 parameter is in fact used. Whitespace fixes.
3584 * elf64-ppc.c: Likewise.
3586 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3588 * rs6000-core.c (CORE_NEW): Simplify macro when
3589 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3591 2017-03-07 Alan Modra <amodra@gmail.com>
3595 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3598 2017-03-05 Alan Modra <amodra@gmail.com>
3600 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3601 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3602 (next_cie_fde_offset): New function.
3603 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3604 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3605 four bytes. Align CIEs to four or eight bytes depending on
3606 per_encoding_aligned8. Align FDEs according to their encoding.
3607 Pad last FDE to output section alignment.
3608 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3610 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3611 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3612 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3614 2017-03-02 Martin Bickel <binutils@ineranves.de>
3617 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3618 empty segments which have a zero filesz, but a non-zero memsz.
3620 2017-03-02 Alan Modra <amodra@gmail.com>
3622 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3624 2017-02-28 Alan Modra <amodra@gmail.com>
3626 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3627 (ppc64_elf_relocate_section): Likewise.
3629 2017-02-28 Alan Modra <amodra@gmail.com>
3632 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3633 rather than elf32_nios2_hash_table or elf_hash_table.
3634 (create_got_section): Likewise.
3635 (nios2_elf32_finish_dynamic_symbol): Likewise.
3636 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3637 (nios2_elf32_size_dynamic_sections): Likewise.
3638 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3639 vars. Use htab equivalents directly instead. Don't create
3640 all dynamic sections on needing just the GOT. Use a goto
3641 rather than a fall-through with reloc test. Ensure
3642 htab->dynobj is set when making dynamic sreloc section.
3643 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3644 equivalent directly instead. Don't segfault on looking for
3645 .dynamic when dynamic sections have not been created. Don't
3646 segfault on .got.plt being discarded.
3647 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3648 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3649 fixme and another not so relevant comment.
3650 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3651 already set, set hash table dynobj on creating .sbss.
3653 2017-02-28 Alan Modra <amodra@gmail.com>
3655 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3656 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3657 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3658 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3659 (ppc64_elf_relocate_section): Likewise.
3660 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3661 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3662 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3663 * libbfd.h: Regenerate.
3664 * bfd-in2.h: Regenerate.
3666 2017-02-28 Alan Modra <amodra@gmail.com>
3668 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3669 dynamic .data.rel.ro read-only.
3670 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3671 rather than section flags when deciding where copy reloc goes.
3672 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3673 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3674 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3675 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3676 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3677 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3678 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3679 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3680 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3681 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3682 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3683 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3684 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3685 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3686 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3687 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3688 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3689 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3690 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3692 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3694 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3695 `jalr $0, $25' instruction encoding.
3697 2017-02-27 Nick Clifton <nickc@redhat.com>
3700 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3701 generating a seg-fault when encountering a symbol that has been
3702 deleted by garbage collection.
3704 2017-02-25 Alan Modra <amodra@gmail.com>
3706 * elf32-arc.c (struct dynamic_sections): Delete.
3707 (enum dyn_section_types): Delete.
3708 (dyn_section_names): Delete.
3709 (arc_create_dynamic_sections): Delete.
3710 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3711 segfault on discarded .rela.plt section.
3712 (elf_arc_size_dynamic_sections): Formatting. Don't call
3713 arc_create_dynamic_sections. Don't allocate memory for sections
3714 handled by the generic linker. Correct code finding relocs in
3715 read-only sections. Set SEC_EXCLUDE on zero size .got,
3716 .got.plt, and .dynbss sections. Do set .interp for pies.
3718 2017-02-24 Andrew Waterman <andrew@sifive.com>
3720 * elfnn-riscv.c (GP_NAME): New macro.
3721 (riscv_global_pointer_value): Use it.
3722 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3723 output section, consider only that section's alignment.
3725 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3727 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3728 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3729 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3730 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3732 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3734 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3735 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3738 2017-02-23 Alan Modra <amodra@gmail.com>
3741 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3743 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3744 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3747 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3750 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3751 processing ahead of the call to `elf_gc_sweep_symbol'.
3753 2017-02-22 Nick Clifton <nickc@redhat.com>
3756 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3757 created section 4-byte alignment.
3759 2017-02-22 Alan Modra <amodra@gmail.com>
3761 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3762 on .got or .plt output section being discarded by script.
3763 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3766 2017-02-21 Alan Modra <amodra@gmail.com>
3768 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3769 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3771 2017-02-20 Alan Modra <amodra@gmail.com>
3774 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3775 if DT_RELSZ/DT_RELASZ is zero.
3777 2017-02-17 Nick Clifton <nickc@redhat.com>
3779 * compress.c (bfd_get_full_section_contents): Remember to reduce
3780 compressed size by the sizeof the compression header when
3781 decompressing the contents.
3783 2017-02-17 Pedro Alves <palves@redhat.com>
3785 * srec.c (Chunk): Rename to ...
3786 (_bfd_srec_len): ... this.
3787 (S3Forced): Rename to ...
3788 (_bfd_srec_forceS3): ... this.
3789 * objcopy.c: Adjust all references.
3791 2017-02-17 Pedro Alves <palves@redhat.com>
3793 * archive.c (bsd_write_armap): Rename to ...
3794 (_bfd_bsd_write_armap): ... this.
3795 (coff_write_armap): Rename to ...
3796 (_bfd_coff_write_armap): ... this.
3797 * libbfd-in.h (bsd_write_armap): Rename to ...
3798 (_bfd_bsd_write_armap): ... this.
3799 (coff_write_armap): Rename to ...
3800 (_bfd_coff_write_armap): ... this.
3801 * aout-target.h, aout-tic30.c: Adjust all users.
3802 * libbfd.h: Regenerate.
3804 2017-02-17 Pedro Alves <palves@redhat.com>
3806 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3807 (warn_deprecated): Rename to ...
3808 (_bfd_warn_deprecated): ... this.
3809 * libbfd.c (warn_deprecated): Rename to ...
3810 (_bfd_warn_deprecated): ... this.
3811 * bfd-in2.h: Regenerate.
3813 2017-02-17 Pedro Alves <palves@redhat.com>
3815 * bfdio.c (real_ftell): Rename to ...
3816 (_bfd_real_ftell): ... this.
3817 (real_fseek): Rename to ...
3818 (_bfd_real_fseek): ... this.
3819 (real_fopen): Rename to ...
3820 (_bfd_real_fopen): ... this.
3821 * libbfd-in.h (real_ftell): Rename to ...
3822 (_bfd_real_ftell): ... this.
3823 (real_fseek): Rename to ...
3824 (_bfd_real_fseek): ... this.
3825 (real_fopen): Rename to ...
3826 (_bfd_real_fopen): ... this.
3827 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3828 * libbfd.h: Regenerate.
3830 2017-02-17 Pedro Alves <palves@redhat.com>
3832 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3833 * libbfd.c (read_unsigned_leb128): Rename to ...
3834 (_bfd_read_unsigned_leb128): ... this.
3835 (read_signed_leb128): Rename to ...
3836 (_bfd_read_signed_leb128): ... this.
3837 (safe_read_leb128): Rename to ...
3838 (_bfd_safe_read_leb128): ... this.
3839 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3840 (_bfd_read_unsigned_leb128): ... this.
3841 (read_signed_leb128): Rename to ...
3842 (_bfd_read_signed_leb128): ... this.
3843 (safe_read_leb128): Rename to ...
3844 (_bfd_safe_read_leb128): ... this.
3845 * libbfd.h: Renegerate.
3847 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3849 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3850 before trying to fine matching file and line information.
3852 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3854 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3855 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3856 not match current bfd, then reload debug information. Record bfd
3857 we're loading debug info for in the stash. If we have debug
3858 informatin in the cache then perform section placement before
3861 2017-02-16 Alan Modra <amodra@gmail.com>
3864 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3865 * elfxx-target.h (elf_backend_no_page_alias): Define.
3866 (elfNN_bed): Init new field.
3867 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3868 ensure PT_LOAD segment starts on a new page.
3869 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3871 2017-02-16 Alan Modra <amodra@gmail.com>
3874 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3877 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3879 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3880 * bfd-in2.h: Regenerated.
3882 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3885 * elf32-i386.c (elf_i386_relocate_section): Allow
3886 "lea foo@GOT, %reg" in PIC.
3888 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3891 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3892 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3893 error against local IFUNC symbol without a base register for
3896 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3898 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3899 `%P: %H:' with `info->callbacks->einfo'.
3900 (ppc_elf_relocate_section): Likewise.
3901 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3902 (ppc64_elf_edit_toc): Likewise.
3903 (ppc64_elf_relocate_section): Likewise.
3905 2017-02-14 Alan Modra <amodra@gmail.com>
3907 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3908 --gc-keep-exported, and test versioned field of sym rather than
3909 looking for @ in name.
3911 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3913 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3916 2017-02-13 Nick Clifton <nickc@redhat.com>
3919 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3922 2017-02-07 Andrew Waterman <andrew@sifive.com>
3924 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3925 entry size if PLT header is written.
3927 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3929 Fix sparc64 dynamic relocation processing to use the dynamic
3931 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3932 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3935 2017-02-03 Nick Clifton <nickc@redhat.com>
3938 * coffcode.h (coff_write_object_contents): Enlarge size of
3939 s_name_buf in order to avoid compile time warning about possible
3941 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3942 32-bits of insn value before printing into buffer.
3944 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3946 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3947 `max_local_dynindx'.
3948 (mips_elf_sort_hash_table): Handle it.
3949 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3950 symbols bump up `max_local_dynindx' rather than
3951 `max_non_got_dynindx'.
3953 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3955 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3956 `min_got_dynindx', `max_unref_got_dynindx' and
3957 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3958 (mips_elf_sort_hash_table): Adjust accordingly.
3960 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3962 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3963 to access the hash table.
3965 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3967 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3968 non-NULL `htab' to the beginning.
3970 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3972 * elflink.c (elf_gc_sweep): Wrap overlong line.
3974 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3976 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3977 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3978 * elfxx-mips.c (mips_elf_link_hash_table): Add
3979 `ignore_branch_isa' member.
3980 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3981 in branch relocation calculation as an error if
3982 `ignore_branch_isa' has been set.
3983 (_bfd_mips_elf_insn32): Rename to...
3984 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3985 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3986 Handle the new parameter.
3988 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3990 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3991 local variable dynobj.
3994 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3995 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3996 executable from read-only sections into sdynrelro.
3997 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3998 dynamic relocs in sdynrelro.
3999 (elf_backend_want_dynrelro): Define.
4001 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4003 * config.bfd (*-*-rtemsaout*): Mark as removed.
4005 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4007 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4008 (arm-*-rtems*): Move to (arm*-*-eabi*).
4009 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4010 (m68-*-rtems*): Move to (m68*-*-elf*).
4012 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4014 * config.bfd (*-*-rtemscoff*): Mark as removed.
4016 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4019 * elflink.c (bfd_elf_record_link_assignment): Revert last
4020 change and don't ever clear `forced_local'. Set `mark'
4022 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4024 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4025 (bfd_elf_size_dynamic_sections): ... here.
4026 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4027 and set `mark' instead in `__tls_get_addr_opt' processing.
4028 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4030 2017-01-24 Alan Modra <amodra@gmail.com>
4032 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4033 where dynamic relocs are preferable. Allow ifunc too.
4034 (ensure_undefweak_dynamic): New function.
4035 (allocate_dynrelocs): Use it here. Move plt handling last and
4036 don't make symbols dynamic, simplifying loop. Only make undef
4037 weak symbols with GOT entries dynamic. Correct condition
4038 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4039 comments. Remove goto.
4040 (ppc_elf_relocate_section): Correct test for using dynamic
4041 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4042 to suit. Set up explicit tls_index entries and implicit GOT
4043 tls_index entries resolvable at link time for
4044 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4045 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4046 (ensure_undefweak_dynamic): New function.
4047 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4048 with GOT entries dynamic. Remove unnecessary test of
4049 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4050 (ppc64_elf_relocate_section): Correct test for using dynamic
4051 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4052 to suit. Set up explicit tls_index entries and implicit GOT
4053 tls_index entries resolvable at link time for __tls_get_addr_opt.
4054 Simplify expression to clear mem for prelink.
4056 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4058 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4060 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4062 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4063 (elf_backend_hash_symbol): Define.
4065 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4068 * elflink.c (bfd_elf_record_link_assignment): Clear any
4069 `forced_local' marking for DSO symbols that are not being
4072 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4074 * elfnn-riscv.c (riscv_elf_object_p): New function.
4076 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4079 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4081 (elf_x86_64_check_relocs): Create .eh_frame section for the
4083 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4084 .eh_frame section for the .plt.bnd section.
4085 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4086 for the .plt.bnd section.
4088 2017-01-12 Nick Clifton <nickc@redhat.com>
4091 * opncls.c (find_separate_debug_file): Add include_dirs
4092 parameter. Only include the directory part of the bfd's filename
4093 in search paths if include_dirs is true. Add a couple of extra
4094 locations for looking for debug files.
4095 ( bfd_follow_gnu_debuglink): Update invocation of
4096 find_separate_debug_file.
4097 (bfd_follow_gnu_debugaltlink): Likewise.
4098 (get_build_id): New function: Finds the build-id of the given bfd.
4099 (get_build_id_name): New function: Computes the name of the
4100 separate debug info file for a bfd, based upon its build-id.
4101 (check_build_id_file): New function: Checks to see if a separate
4102 debug info file exists at the given location, and that its
4103 build-id matches that of the original bfd.
4104 (bfd_follow_build_id_debuglink): New function: Finds a separate
4105 debug info file for a given bfd by using the build-id method.
4106 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4107 method of locating a separate debug info file before using the
4109 * bfd-in2.h: Regenerate.
4111 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4114 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4115 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4116 elf_x86_64_eh_frame_plt_got.
4117 (elf_x86_64_size_dynamic_sections): Get unwind info from
4118 elf_x86_64_bnd_arch_bed for the BND PLT.
4120 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4122 * config.bfd: Add entries for i686-redox and x86_64-redox.
4124 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4126 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4128 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4129 .eh_frame section to 4 bytes for x32.
4130 (elf_x86_64_check_relocs): Likewise.
4132 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4135 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4136 (PLT_GOT_FDE_LENGTH): Likewise.
4137 (elf_i386_plt_layout): Add eh_frame_plt_got and
4138 eh_frame_plt_got_size.
4139 (elf_i386_plt): Updated.
4140 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4141 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4142 (elf_i386_size_dynamic_sections): Allocate and initialize
4143 .eh_frame section for .plt.got.
4144 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4146 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4147 eh_frame_plt_got_size.
4148 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4149 (PLT_GOT_FDE_LENGTH): Likewise.
4150 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4151 eh_frame_plt_got_size.
4152 (elf_x86_64_arch_bed): Updated.
4153 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4154 eh_frame_plt_got_size.
4155 (elf_x86_64_nacl_arch_bed): Likewise.
4156 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4157 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4158 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4159 .eh_frame section for .plt.got.
4160 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4163 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4165 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4166 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4168 2017-01-09 Nick Clifton <nickc@redhat.com>
4170 * dwarf2.c (lookup_address_in_function_table): Return early if
4171 there are no functions in the given comp unit, or if the high
4172 address of the last function in the comp unit is less than the
4175 2017-01-09 Nick Clifton <nickc@redhat.com>
4178 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4179 message if there are too many symbols to load.
4181 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4183 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4184 if relocs are cached.
4186 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4189 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4190 for R_MICROBLAZE_GOTOFF_64.
4192 2017-01-03 Nick Clifton <nickc@redhat.com>
4194 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4195 warning about using a possibly uninitialised variable.
4197 2017-01-02 Alan Modra <amodra@gmail.com>
4199 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4200 (allocate_plt_static, allocate_dynrelocs): Use it.
4202 2017-01-02 Alan Modra <amodra@gmail.com>
4204 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4205 .PARISC.unwind section.
4207 2017-01-02 Alan Modra <amodra@gmail.com>
4210 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4211 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4212 indirect to GOT pointer relative code edit.
4214 2017-01-02 Alan Modra <amodra@gmail.com>
4216 Update year range in copyright notice of all files.
4218 For older changes see ChangeLog-2016
4220 Copyright (C) 2017 Free Software Foundation, Inc.
4222 Copying and distribution of this file, with or without modification,
4223 are permitted in any medium without royalty provided the copyright
4224 notice and this notice are preserved.
4230 version-control: never